Hi,

Would anyone care to check this out and would anyone object to this being 
committed? Basically this enables optional (default) dependency on 
devel/libffi instead of libffi shipped within the python tarballs. The 
default is to use devel/libffi however the user can opt to use the ffi 
delivered with each python tarball. Comments? Ojbections?




Index: python27/Makefile
===================================================================
--- python27/Makefile   (revision 371618)
+++ python27/Makefile   (working copy)
@@ -2,7 +2,7 @@
 
 PORTNAME=      python27
 PORTVERSION=   2.7.8
-PORTREVISION=  5
+PORTREVISION=  6
 CATEGORIES=    lang python ipv6
 MASTER_SITES=  PYTHON
 MASTER_SITE_SUBDIR=    ftp/python/${PORTVERSION}
@@ -34,8 +34,8 @@
                        PORTVERSION=${PORTVERSION} \
                        OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/}             
# For plat-freebsd* in 
pkg-plist. http://bugs.python.org/issue19554
 
-OPTIONS_DEFINE=                DEBUG IPV6 NLS PYMALLOC SEM THREADS
-OPTIONS_DEFAULT=       IPV6 NLS PYMALLOC SEM THREADS UCS4
+OPTIONS_DEFINE=                DEBUG IPV6 NLS PYMALLOC SEM THREADS PORT_FFI
+OPTIONS_DEFAULT=       IPV6 NLS PYMALLOC SEM THREADS UCS4 PORT_FFI
 OPTIONS_SINGLE=                UNICODE
 OPTIONS_SINGLE_UNICODE=        UCS2 UCS4
 
@@ -45,6 +45,7 @@
 UCS2_DESC=     Enable UCS2 Unicode Strings
 UCS4_DESC=     Enable UCS4 Unicode Strings
 PYMALLOC_DESC= Enable specialized mallocs
+PORT_FFI_DESC= Use devel/ffi instead of ffi bundled with Python
 
 DEBUG_CONFIGURE_WITH=  pydebug
 IPV6_CONFIGURE_ENABLE= ipv6
@@ -88,6 +89,12 @@
 CFLAGS+=       -DPYTHON_DEFAULT_RECURSION_LIMIT=900
 .endif
 
+.if ${PORT_OPTIONS:MPORT_FFI}
+CONFIGURE_ARGS+=       --with-system-ffi
+BUILD_DEPENDS+=        libffi>=0:${PORTSDIR}/devel/libffi
+RUN_DEPENDS+=  libffi>=0:${PORTSDIR}/devel/libffi
+.endif
+
 # See http://bugs.freebsd.org/115940
 .if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS) # the world with NO_NIS
 PLIST_SUB+=    NO_NIS="@comment "
Index: python32/Makefile
===================================================================
--- python32/Makefile   (revision 371618)
+++ python32/Makefile   (working copy)
@@ -2,7 +2,7 @@
 
 PORTNAME=      python32
 PORTVERSION=   3.2.5
-PORTREVISION=  11
+PORTREVISION=  12
 CATEGORIES=    lang python ipv6
 MASTER_SITES=  PYTHON
 MASTER_SITE_SUBDIR=    ftp/python/${PORTVERSION}
@@ -33,13 +33,15 @@
 PLIST_SUB=             ABI=${ABIFLAGS} \
                        OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/}             
# For plat-freebsd* in 
pkg-plist. http://bugs.python.org/issue19554
 
-OPTIONS_DEFINE=                DEBUG IPV6 NLS PYMALLOC THREADS TSC UCS4
-OPTIONS_DEFAULT=       IPV6 NLS PYMALLOC THREADS UCS4
+OPTIONS_DEFINE=                DEBUG IPV6 NLS PYMALLOC THREADS TSC PORT_FFI
+OPTIONS_DEFAULT=       IPV6 NLS PYMALLOC THREADS PORT_FFI
+
 OPTIONS_SUB=           yes
 
 NLS_DESC=              Enable gettext support for the locale module
 PYMALLOC_DESC=         Enable specialized mallocs
 TSC_DESC=              Enable processor timestamp counter profiling
+PORT_FFI_DESC=         Use devel/ffi instead of ffi bundled with Python
 
 DEBUG_CONFIGURE_WITH=  pydebug
 IPV6_CONFIGURE_ENABLE= ipv6
@@ -75,6 +77,12 @@
 ABIFLAGS:=             d${ABIFLAGS}
 .endif
 
+.if ${PORT_OPTIONS:MPORT_FFI}
+CONFIGURE_ARGS+=       --with-system-ffi
+BUILD_DEPENDS+=  libffi>=0:${PORTSDIR}/devel/libffi
+RUN_DEPENDS+=    libffi>=0:${PORTSDIR}/devel/libffi
+.endif
+
 .if !empty(ABIFLAGS)
 PLIST_FILES+=  bin/python3.2%%ABI%%
 PLIST_FILES+=  bin/python3.2%%ABI%%-config
Index: python33/Makefile
===================================================================
--- python33/Makefile   (revision 371618)
+++ python33/Makefile   (working copy)
@@ -2,7 +2,7 @@
 
 PORTNAME=      python33
 PORTVERSION=   3.3.5
-PORTREVISION=  4
+PORTREVISION=  5
 CATEGORIES=    lang python ipv6
 MASTER_SITES=  PYTHON
 MASTER_SITE_SUBDIR=    ftp/python/${PORTVERSION}
@@ -33,13 +33,15 @@
 PLIST_SUB=             ABI=${ABIFLAGS} \
                        OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/}             
# For plat-freebsd* in 
pkg-plist. http://bugs.python.org/issue19554
 
-OPTIONS_DEFINE=                DEBUG IPV6 NLS PYMALLOC THREADS TSC
-OPTIONS_DEFAULT=       IPV6 NLS PYMALLOC THREADS
+OPTIONS_DEFINE=                DEBUG IPV6 NLS PYMALLOC THREADS TSC PORT_FFI
+OPTIONS_DEFAULT=       IPV6 NLS PYMALLOC THREADS PORT_FFI
+
 OPTIONS_SUB=           yes
 
 NLS_DESC=              Enable gettext support for the locale module
 PYMALLOC_DESC=         Enable specialized mallocs
 TSC_DESC=              Enable processor timestamp counter profiling
+PORT_FFI_DESC=         Use devel/ffi instead of ffi bundled with Python
 
 DEBUG_CONFIGURE_WITH=  pydebug
 IPV6_CONFIGURE_ENABLE= ipv6
@@ -69,6 +71,12 @@
 ABIFLAGS:=     d${ABIFLAGS}
 .endif
 
+.if ${PORT_OPTIONS:MPORT_FFI}
+CONFIGURE_ARGS+=       --with-system-ffi
+BUILD_DEPENDS+=  libffi>=0:${PORTSDIR}/devel/libffi
+RUN_DEPENDS+=    libffi>=0:${PORTSDIR}/devel/libffi
+.endif
+
 .if !empty(ABIFLAGS)
 PLIST_FILES+=  bin/python3.3%%ABI%%
 PLIST_FILES+=  bin/python3.3%%ABI%%-config
Index: python34/Makefile
===================================================================
--- python34/Makefile   (revision 371618)
+++ python34/Makefile   (working copy)
@@ -3,6 +3,7 @@
 
 PORTNAME=      python34
 PORTVERSION=   3.4.2
+PORTREVISION=  1
 CATEGORIES=    lang python ipv6
 MASTER_SITES=  PYTHON
 MASTER_SITE_SUBDIR=    ftp/python/${PORTVERSION}
@@ -34,8 +35,8 @@
 PLIST_SUB=             ABI=${ABIFLAGS} \
                        OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/}             
# For plat-freebsd* in 
pkg-plist. http://bugs.python.org/issue19554
 
-OPTIONS_DEFINE=                DEBUG IPV6 NLS PYMALLOC THREADS TSC
-OPTIONS_DEFAULT=       IPV6 NLS PYMALLOC THREADS
+OPTIONS_DEFINE=                DEBUG IPV6 NLS PYMALLOC THREADS TSC PORT_FFI
+OPTIONS_DEFAULT=       IPV6 NLS PYMALLOC THREADS PORT_FFI
 OPTIONS_RADIO=         HASH
 OPTIONS_RADIO_HASH=    FNV SIPHASH
 OPTIONS_SUB=           yes
@@ -43,6 +44,7 @@
 NLS_DESC=              Enable gettext support for the locale module
 PYMALLOC_DESC=         Enable specialized mallocs
 TSC_DESC=              Enable processor timestamp counter profiling
+PORT_FFI_DESC=         Use devel/ffi instead of ffi bundled with Python
 
 HASH_DESC=             Hash Algorithm (PEP-456)
 FNV_DESC=              Modified Fowler-Noll-Vo Algorithm
@@ -78,6 +80,12 @@
 ABIFLAGS:=     d${ABIFLAGS}
 .endif
 
+.if ${PORT_OPTIONS:MPORT_FFI}
+CONFIGURE_ARGS+=       --with-system-ffi
+BUILD_DEPENDS+=  libffi>=0:${PORTSDIR}/devel/libffi
+RUN_DEPENDS+=    libffi>=0:${PORTSDIR}/devel/libffi
+.endif
+
 .if !empty(ABIFLAGS)
 PLIST_FILES+=  bin/python3.4%%ABI%%
 PLIST_FILES+=  bin/python3.4%%ABI%%-config

Cheers,
Cy Schubert <cy.schub...@komquats.com>
FreeBSD UNIX:  <c...@freebsd.org>   Web:  http://www.FreeBSD.org

        The need of the many outweighs the greed of the few.
_______________________________________________
freebsd-python@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"

Reply via email to