From nobody@FreeBSD.org  Wed Feb 16 04:22:06 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 096AD106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 Feb 2011 04:22:06 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id D33998FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 Feb 2011 04:22:05 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p1G4M58M092230
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 Feb 2011 04:22:05 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p1G4M5Qa092229;
	Wed, 16 Feb 2011 04:22:05 GMT
	(envelope-from nobody)
Message-Id: <201102160422.p1G4M5Qa092229@red.freebsd.org>
Date: Wed, 16 Feb 2011 04:22:05 GMT
From: Justin Hibbits <chmeeedalf@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Add ctype module for Python build on PPC
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         154818
>Category:       ports
>Synopsis:       Add ctype module for Python build on PPC
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 16 04:30:10 UTC 2011
>Closed-Date:    Fri Feb 18 00:09:47 UTC 2011
>Last-Modified:  Fri Feb 18 00:09:47 UTC 2011
>Originator:     Justin Hibbits
>Release:        9-CURRENT
>Organization:
>Environment:
>Description:
lang/python26 doesn't build _ctype module on PowerPC because the libffi included is too old and broken.  The attached patch builds the port with devel/libffi optionally.  A similar patch can probably be applied to python27, I don't know which libffi it comes with.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ur python26/Makefile /var/cache/portshaker/ports/lang/python26/Makefile
--- python26/Makefile	2011-02-15 22:46:52.000000000 -0500
+++ /var/cache/portshaker/ports/lang/python26/Makefile	2010-09-12 05:07:43.000000000 -0400
@@ -54,8 +54,7 @@
 		UCS4 "Use UCS4 for unicode support" on \
 		PYMALLOC "Use python's internal malloc" on \
 		IPV6 "Enable IPv6 support" on \
-		FPECTL "Enable floating point exception handling" off \
-		SYS_LIBFFI "Use libffi from ports rather than internal" off
+		FPECTL "Enable floating point exception handling" off
 
 .include <bsd.port.pre.mk>
 
@@ -146,11 +145,6 @@
 CONFIGURE_ARGS+=	--with-fpectl
 .endif
 
-.if defined(WITH_SYS_LIBFFI)
-LIB_DEPENDS+=		ffi:${PORTSDIR}/devel/libffi
-CONFIGURE_ARGS+=	--with-system-ffi
-.endif
-
 pre-patch:
 	${CP} -r ${PATCH_WRKSRC}/Lib/plat-freebsd8 \
 		${PATCH_WRKSRC}/Lib/plat-freebsd9
diff -ur python26/files/patch-Modules-_ctypes-libffi-configure /var/cache/portshaker/ports/lang/python26/files/patch-Modules-_ctypes-libffi-configure
--- python26/files/patch-Modules-_ctypes-libffi-configure	2011-02-15 22:58:06.000000000 -0500
+++ /var/cache/portshaker/ports/lang/python26/files/patch-Modules-_ctypes-libffi-configure	2010-09-12 05:07:44.000000000 -0400
@@ -5,7 +5,7 @@
    ;;
  
 -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-+powerpc-*freebsd*|amd64-*-freebsd*|x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
++amd64-*-freebsd*|x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
  s390*-*linux*|sparc*-*linux*)
    # Find out which ABI we are using.
    echo 'int i;' > conftest.$ac_ext
Only in python26: work


>Release-Note:
>Audit-Trail:

From: Justin Hibbits <jrh29@alumni.cwru.edu>
To: bug-followup@FreeBSD.org, chmeeedalf@gmail.com
Cc:  
Subject: Re: ports/154818: Add ctype module for Python build on PPC
Date: Wed, 16 Feb 2011 08:09:15 -0500

 --0016e64c2e1ce293f3049c65fc6d
 Content-Type: text/plain; charset=ISO-8859-1
 
 Please close this.  It's a duplicate of ports/153657 and ports/146823, and
 the patch is reverse (forgot to check before submitting).
 
 --0016e64c2e1ce293f3049c65fc6d
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 Please close this.=A0 It&#39;s a duplicate of ports/153657 and ports/146823=
 , and the patch is reverse (forgot to check before submitting).<br>
 
 --0016e64c2e1ce293f3049c65fc6d--
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Fri Feb 18 00:09:38 UTC 2011 
State-Changed-Why:  
Closed at submitter's request. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154818 
>Unformatted:
