aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authorpawel <pawel@FreeBSD.org>2013-12-20 03:16:55 +0800
committerpawel <pawel@FreeBSD.org>2013-12-20 03:16:55 +0800
commit4983718df67249fc4f9b2d77d2ddbde4ffdb3049 (patch)
treef07e54494d6a8a25028942deaaabe10cad7c7ba0 /x11
parent40042d9ce76d0843fe2b89d154ceaf88796f36c0 (diff)
downloadfreebsd-ports-gnome-4983718df67249fc4f9b2d77d2ddbde4ffdb3049.tar.gz
freebsd-ports-gnome-4983718df67249fc4f9b2d77d2ddbde4ffdb3049.tar.zst
freebsd-ports-gnome-4983718df67249fc4f9b2d77d2ddbde4ffdb3049.zip
- Fix build with clang
- Support staging PR: ports/184828 Submitted by: KATO Tsuguru <tkato432@yahoo.com>
Diffstat (limited to 'x11')
-rw-r--r--x11/xorg-edit/Makefile17
-rw-r--r--x11/xorg-edit/files/patch-xorgedit__guiframe.cpp54
2 files changed, 62 insertions, 9 deletions
diff --git a/x11/xorg-edit/Makefile b/x11/xorg-edit/Makefile
index 637e16bead6c..177fdc2ddf9a 100644
--- a/x11/xorg-edit/Makefile
+++ b/x11/xorg-edit/Makefile
@@ -15,10 +15,10 @@ LICENSE= GPLv3
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USE_BZIP2= yes
+USES= dos2unix gmake
DOS2UNIX_GLOB= *.cpp *.h
USE_WX= 2.6+
WX_UNICODE= yes
-USES= dos2unix gmake
PLIST_FILES= bin/xorg-edit \
lib/xorg-edit/de_DE/LC_MESSAGES/xorg-edit.mo \
@@ -34,7 +34,6 @@ PLIST_DIRS= lib/xorg-edit/options/devices \
DESKTOP_ENTRIES="Xorg Edit" "" "" "${PORTNAME}" "Settings;" true
-NO_STAGE= yes
post-patch:
@${REINPLACE_CMD} -e \
's|^CXX =|CXX ?=| ; \
@@ -58,15 +57,15 @@ do-configure:
@${ECHO_CMD} ' $$(MAKE) -C xorgedit' >> ${WRKSRC}/Makefile
do-install:
- (cd ${WRKDIR} && ${INSTALL_SCRIPT} xorg-edit ${PREFIX}/bin)
- @${MKDIR} ${PREFIX}/lib/xorg-edit
+ (cd ${WRKDIR} && ${INSTALL_SCRIPT} xorg-edit ${STAGEDIR}${PREFIX}/bin)
+ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/xorg-edit
(cd ${WRKSRC} && ${INSTALL_PROGRAM} xorg-edit \
- ${PREFIX}/lib/xorg-edit)
- @${MKDIR} ${PREFIX}/lib/xorg-edit/de_DE/LC_MESSAGES
+ ${STAGEDIR}${PREFIX}/lib/xorg-edit)
+ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/xorg-edit/de_DE/LC_MESSAGES
(cd ${WRKSRC}/de_DE/LC_MESSAGES && ${INSTALL_DATA} ${PORTNAME}.mo \
- ${PREFIX}/lib/xorg-edit/de_DE/LC_MESSAGES)
- @${MKDIR} ${PREFIX}/lib/xorg-edit/options/devices
+ ${STAGEDIR}${PREFIX}/lib/xorg-edit/de_DE/LC_MESSAGES)
+ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/xorg-edit/options/devices
(cd ${WRKSRC}/options/devices && ${INSTALL_DATA} *.xml \
- ${PREFIX}/lib/xorg-edit/options/devices)
+ ${STAGEDIR}${PREFIX}/lib/xorg-edit/options/devices)
.include <bsd.port.mk>
diff --git a/x11/xorg-edit/files/patch-xorgedit__guiframe.cpp b/x11/xorg-edit/files/patch-xorgedit__guiframe.cpp
new file mode 100644
index 000000000000..a2073a19330d
--- /dev/null
+++ b/x11/xorg-edit/files/patch-xorgedit__guiframe.cpp
@@ -0,0 +1,54 @@
+--- xorgedit/guiframe.cpp.orig
++++ xorgedit/guiframe.cpp
+@@ -182,8 +182,13 @@
+ otherSectionTab = new wxPanel(layout); // iles/modules/extensions/dri tab panel
+ wxBoxSizer *otherSectionTabSizer=new wxBoxSizer(wxVERTICAL);
+
++#ifdef __clang__
++ wxString *tempList = new wxString[devListSize+1]; // initial list for combo und choice elements
++ wxString *optList = new wxString[optListSize]; // initial list for option combo und choice elements
++#else
+ wxString tempList[devListSize+1]; // initial list for combo und choice elements
+ wxString optList[optListSize]; // initial list for option combo und choice elements
++#endif
+
+ optList[0]=_("----------");
+ optList[1]=_("Add Option");
+@@ -821,6 +826,11 @@
+ if (ShowError()) return;
+ }
+ SetSaved(true);
++
++#ifdef __clang__
++ delete[] optList;
++ delete[] tempList;
++#endif
+ }
+
+ const bool GuiFrame::CreateBackup(void) const
+@@ -1832,8 +1842,13 @@
+
+ warningText->SetLabel(_("Warning: Improper use of this tool can cause damage to your\nxorg.conf and may not start your Xserver.\nYou must restart X to take the changes effect."));
+
++#ifdef __clang__
++ wxString *tempList = new wxString[devListSize+1]; // initial list for combo und choice elements
++ wxString *optList = new wxString[optListSize]; // initial list for option combo und choice elements
++#else
+ wxString tempList[devListSize+1]; // initial list for combo und choice elements
+ wxString optList[optListSize]; // initial list for option combo und choice elements
++#endif
+ unsigned int offset=0;
+ unsigned int i;
+
+@@ -2269,6 +2284,11 @@
+
+ driBox->SetLabel(_("DRI"));
+ return(false);
++
++#ifdef __clang__
++ delete[] optList;
++ delete[] tempList;
++#endif
+ }
+
+ void GuiFrame::SetSaved(const bool save)