From tkato432@yahoo.com  Mon Dec 16 18:09:08 2013
Return-Path: <tkato432@yahoo.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id F25FC623
	for <FreeBSD-gnats-submit@FreeBSD.org>; Mon, 16 Dec 2013 18:06:56 +0000 (UTC)
Received: from omta03.auone-net.jp (mail-or2-f145.auone-net.jp [111.87.219.145])
	by mx1.freebsd.org (Postfix) with ESMTP id 9832818DC
	for <FreeBSD-gnats-submit@FreeBSD.org>; Mon, 16 Dec 2013 18:06:56 +0000 (UTC)
Received: from coppermine.my.domain (ZT030106.ppp.dion.ne.jp [59.128.30.106])
	by omta03.auone-net.jp (au one net mail) with ESMTP id E92D41880009
	for <FreeBSD-gnats-submit@FreeBSD.org>; Tue, 17 Dec 2013 03:06:53 +0900 (JST)
Message-Id: <20131217025159.6dcf467b50cd5d6d8688f59d@yahoo.com>
Date: Tue, 17 Dec 2013 02:51:59 +0900
From: KATO Tsuguru <tkato432@yahoo.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Subject: x11/xorg-edit: Fix build with clang

>Number:         184828
>Category:       ports
>Synopsis:       x11/xorg-edit: Fix build with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pawel
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 16 18:10:07 UTC 2013
>Closed-Date:    Thu Dec 19 19:17:02 UTC 2013
>Last-Modified:  Fri Dec 20 08:10:01 UTC 2013
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Fix build with clang

New file:
files/patch-xorgedit__guiframe.cpp

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/x11/xorg-edit/Makefile x11/xorg-edit/Makefile
--- /usr/ports/x11/xorg-edit/Makefile	2013-11-19 02:05:36.000000000 +0900
+++ x11/xorg-edit/Makefile	2013-12-17 00:00:00.000000000 +0900
@@ -15,10 +15,10 @@
 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 @@
 
 DESKTOP_ENTRIES="Xorg Edit" "" "" "${PORTNAME}" "Settings;" true
 
-NO_STAGE=	yes
 post-patch:
 	@${REINPLACE_CMD} -e \
 		's|^CXX =|CXX ?=| ; \
@@ -58,15 +57,15 @@
 	@${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 -urN /usr/ports/x11/xorg-edit/files/patch-xorgedit__guiframe.cpp x11/xorg-edit/files/patch-xorgedit__guiframe.cpp
--- /usr/ports/x11/xorg-edit/files/patch-xorgedit__guiframe.cpp	1970-01-01 09:00:00.000000000 +0900
+++ x11/xorg-edit/files/patch-xorgedit__guiframe.cpp	2013-12-17 00:00:00.000000000 +0900
@@ -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)
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->pawel 
Responsible-Changed-By: pawel 
Responsible-Changed-When: Thu Dec 19 19:08:36 UTC 2013 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=184828 
State-Changed-From-To: open->closed 
State-Changed-By: pawel 
State-Changed-When: Thu Dec 19 19:17:02 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=184828 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/184828: commit references a PR
Date: Thu, 19 Dec 2013 19:17:08 +0000 (UTC)

 Author: pawel
 Date: Thu Dec 19 19:16:55 2013
 New Revision: 336948
 URL: http://svnweb.freebsd.org/changeset/ports/336948
 
 Log:
   - Fix build with clang
   - Support staging
   
   PR:		ports/184828
   Submitted by:	KATO Tsuguru <tkato432@yahoo.com>
 
 Added:
   head/x11/xorg-edit/files/
   head/x11/xorg-edit/files/patch-xorgedit__guiframe.cpp   (contents, props changed)
 Modified:
   head/x11/xorg-edit/Makefile
 
 Modified: head/x11/xorg-edit/Makefile
 ==============================================================================
 --- head/x11/xorg-edit/Makefile	Thu Dec 19 19:04:25 2013	(r336947)
 +++ head/x11/xorg-edit/Makefile	Thu Dec 19 19:16:55 2013	(r336948)
 @@ -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/device
  
  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>
 
 Added: head/x11/xorg-edit/files/patch-xorgedit__guiframe.cpp
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/x11/xorg-edit/files/patch-xorgedit__guiframe.cpp	Thu Dec 19 19:16:55 2013	(r336948)
 @@ -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)
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/184828: commit references a PR
Date: Fri, 20 Dec 2013 08:01:59 +0000 (UTC)

 Author: bapt
 Date: Fri Dec 20 08:01:45 2013
 New Revision: 336981
 URL: http://svnweb.freebsd.org/changeset/ports/336981
 
 Log:
   MFH: r336948
   
   - Fix build with clang
   - Support staging
   
   PR:		ports/184828
   Submitted by:	KATO Tsuguru <tkato432@yahoo.com>
 
 Added:
   branches/2014Q1/x11/xorg-edit/files/
      - copied from r336948, head/x11/xorg-edit/files/
 Modified:
   branches/2014Q1/x11/xorg-edit/Makefile
 Directory Properties:
   branches/2014Q1/   (props changed)
 
 Modified: branches/2014Q1/x11/xorg-edit/Makefile
 ==============================================================================
 --- branches/2014Q1/x11/xorg-edit/Makefile	Fri Dec 20 08:00:46 2013	(r336980)
 +++ branches/2014Q1/x11/xorg-edit/Makefile	Fri Dec 20 08:01:45 2013	(r336981)
 @@ -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/device
  
  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>
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
