From nwhitehorn@anacreon.physics.wisc.edu  Tue Jun  8 19:31:50 2010
Return-Path: <nwhitehorn@anacreon.physics.wisc.edu>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BACF0106566B
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  8 Jun 2010 19:31:50 +0000 (UTC)
	(envelope-from nwhitehorn@anacreon.physics.wisc.edu)
Received: from anacreon.physics.wisc.edu (anacreon.physics.wisc.edu [128.104.160.176])
	by mx1.freebsd.org (Postfix) with ESMTP id 6CB1A8FC19
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  8 Jun 2010 19:31:50 +0000 (UTC)
Received: from anacreon.physics.wisc.edu (localhost [127.0.0.1])
	by anacreon.physics.wisc.edu (8.14.4/8.14.4) with ESMTP id o58JVnSv032751
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 8 Jun 2010 14:31:49 -0500 (CDT)
	(envelope-from nwhitehorn@anacreon.physics.wisc.edu)
Received: (from nwhitehorn@localhost)
	by anacreon.physics.wisc.edu (8.14.4/8.14.4/Submit) id o58JVnxA032750;
	Tue, 8 Jun 2010 14:31:49 -0500 (CDT)
	(envelope-from nwhitehorn)
Message-Id: <201006081931.o58JVnxA032750@anacreon.physics.wisc.edu>
Date: Tue, 8 Jun 2010 14:31:49 -0500 (CDT)
From: Nathan Whitehorn <nwhitehorn@freebsd.org>
Reply-To: Nathan Whitehorn <nwhitehorn@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] powerpc64 support for x11-toolkits/gtk20
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         147699
>Category:       ports
>Synopsis:       [patch] powerpc64 support for x11-toolkits/gtk20
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnome
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 08 19:40:00 UTC 2010
>Closed-Date:    Mon Jun 14 08:19:23 UTC 2010
>Last-Modified:  Mon Jun 14 08:20:01 UTC 2010
>Originator:     Nathan Whitehorn
>Release:        FreeBSD 9.0-CURRENT powerpc64
>Organization:
University of Wisconsin
>Environment:
System: FreeBSD anacreon.physics.wisc.edu 9.0-CURRENT FreeBSD 9.0-CURRENT #3 r208870:208872: Sun Jun 6 09:33:03 CDT 2010 root@anacreon.physics.wisc.edu:/usr/obj/scratch/src/sys/ANACREON powerpc64

>Description:
	Due to a flaw in binutils 2.15, function names can conflict with
ELF assembler directives on PPC64 systems. As a result, it is not possible
to have functions named things like 'text' and 'data', one of which GTK 2.0
has.
>How-To-Repeat:
	Build GTK 2 on powerpc64.
>Fix:
	This patches renames a private function in gtkbuilderparser.c from
text to XXXtext on powerpc64 systems to work around the ABI problem with
binutils.

--- gtk20-ppc64.diff begins here ---
--- Makefile.bak	2010-06-08 14:13:17.000000000 -0500
+++ Makefile	2010-06-08 14:15:03.000000000 -0500
@@ -61,6 +61,14 @@
 CONFIGURE_ARGS+=	--enable-debug=yes
 .endif
 
+.if !defined(ARCH)
+ARCH!=  /usr/bin/uname -p
+.endif
+
+.if ${ARCH} == powerpc64
+EXTRA_PATCHES=  ${.CURDIR}/files/extra-arch-powerpc64
+.endif
+
 .include <bsd.port.pre.mk>
 
 .if (defined(WITH_CUPS) || exists(${LOCALBASE}/lib/libcups.so)) && \
--- /dev/null	2010-06-08 14:26:55.000000000 -0500
+++ files/extra-arch-powerpc64	2010-06-08 14:15:47.000000000 -0500
@@ -0,0 +1,20 @@
+--- gtk/gtkbuilderparser.c.dist	2010-06-08 14:11:06.000000000 -0500
++++ gtk/gtkbuilderparser.c	2010-06-08 14:11:33.000000000 -0500
+@@ -1051,7 +1051,7 @@
+ /* Called for character data */
+ /* text is not nul-terminated */
+ static void
+-text (GMarkupParseContext *context,
++XXXtext (GMarkupParseContext *context,
+       const gchar         *text,
+       gsize                text_len,
+       gpointer             user_data,
+@@ -1106,7 +1106,7 @@
+ static const GMarkupParser parser = {
+   start_element,
+   end_element,
+-  text,
++  XXXtext,
+   NULL,
+   NULL
+ };
--- gtk20-ppc64.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gnome 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Jun 8 19:40:11 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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

From: Koop Mast <kwm@FreeBSD.org>
To: bug-followup@FreeBSD.org, nwhitehorn@freebsd.org
Cc:  
Subject: Re: ports/147699: [patch] powerpc64 support for x11-toolkits/gtk20
Date: Fri, 11 Jun 2010 23:05:32 +0200

 Hello,
 
 Is the following part needed? Because it is also in bsd.port.mk:1208. It
 is a bit double doing it again in the port.
 
 # Get the architecture
 .if !defined(ARCH)
 ARCH!=  ${UNAME} -p
 .endif
 
 -Koop
 

From: Nathan Whitehorn <nwhitehorn@freebsd.org>
To: Koop Mast <kwm@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/147699: [patch] powerpc64 support for x11-toolkits/gtk20
Date: Fri, 11 Jun 2010 19:35:13 -0500

 On Fri, 11 Jun 2010 23:05:32 +0200
 Koop Mast <kwm@FreeBSD.org> wrote:
 
 > Hello,
 > 
 > Is the following part needed? Because it is also in bsd.port.mk:1208.
 > It is a bit double doing it again in the port.
 > 
 > # Get the architecture
 > .if !defined(ARCH)
 > ARCH!=  ${UNAME} -p
 > .endif
 > 
 > -Koop
 > 
 
 It does not seem so. I had just blindly copied the architecture
 detection code out of the xorg-server Makefile. You have to move the
 conditional until after the .include <bsd.port.pre.mk> for it to work,
 though, since ARCH isn't defined before that.
 -Nathan 
State-Changed-From-To: open->closed 
State-Changed-By: kwm 
State-Changed-When: Mon Jun 14 08:19:05 UTC 2010 
State-Changed-Why:  
Committed thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/147699: commit references a PR
Date: Mon, 14 Jun 2010 08:15:12 +0000 (UTC)

 kwm         2010-06-14 08:14:54 UTC
 
   FreeBSD ports repository
 
   Modified files:
     x11-toolkits/gtk20   Makefile 
   Added files:
     x11-toolkits/gtk20/files extra-arch-powerpc64 
   Log:
   Fix the build on powerpc64.
   
   Due to a flaw in binutils 2.15, function names can conflict with ELF assembler
   directives on PPC64 systems. As a result, it is not possible to have functions
   named things like 'text' and 'data', one of which GTK 2.0 has.
   
   PR:             ports/147699
   Submitted by:   nwhitehorn@
   
   Revision  Changes    Path
   1.246     +4 -0      ports/x11-toolkits/gtk20/Makefile
   1.1       +20 -0     ports/x11-toolkits/gtk20/files/extra-arch-powerpc64 (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
