aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordemon <demon@FreeBSD.org>2014-10-29 21:21:21 +0800
committerdemon <demon@FreeBSD.org>2014-10-29 21:21:21 +0800
commit6d1c525d1c9a79fea6002b85dd1a35072456735c (patch)
treeb37bf413f3394e9afa304bc94a8438be7de2ae02
parentd784f58e778219cd76cf89d054d43e198bfef76e (diff)
downloadfreebsd-ports-gnome-6d1c525d1c9a79fea6002b85dd1a35072456735c.tar.gz
freebsd-ports-gnome-6d1c525d1c9a79fea6002b85dd1a35072456735c.tar.zst
freebsd-ports-gnome-6d1c525d1c9a79fea6002b85dd1a35072456735c.zip
Add an option to use libffi from ports instead of bundled one.
Submitted by: cy Require this option for i386, this fixes build error.
-rw-r--r--lang/python34/Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/lang/python34/Makefile b/lang/python34/Makefile
index df285350666b..dd3b04361485 100644
--- a/lang/python34/Makefile
+++ b/lang/python34/Makefile
@@ -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 @@ MAKE_ARGS+= LIBPC="${PREFIX}/libdata/pkgconfig" # Until pathfix gets support
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 @@ 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
HASH_DESC= Hash Algorithm (PEP-456)
FNV_DESC= Modified Fowler-Noll-Vo Algorithm
@@ -78,6 +80,15 @@ ABIFLAGS:= m${ABIFLAGS}
ABIFLAGS:= d${ABIFLAGS}
.endif
+.if ${PORT_OPTIONS:MPORT_FFI}
+CONFIGURE_ARGS+= --with-system-ffi
+LIB_DEPENDS+= libffi.so:${PORTSDIR}/devel/libffi
+.else
+.if ${ARCH} == i386
+BROKEN= You must use libffi from ports on i386
+.endif
+.endif
+
.if !empty(ABIFLAGS)
PLIST_FILES+= bin/python3.4%%ABI%%
PLIST_FILES+= bin/python3.4%%ABI%%-config