aboutsummaryrefslogtreecommitdiff
path: root/lang/python32
diff options
context:
space:
mode:
authorKubilay Kocak <koobs@FreeBSD.org>2015-01-21 12:34:50 +0000
committerKubilay Kocak <koobs@FreeBSD.org>2015-01-21 12:34:50 +0000
commit5da5cfa9d34706e9ed2aca5fa93c975d151f5810 (patch)
tree6f062a178d83fba9995303a22a36e0c54a58e54c /lang/python32
parent17e8ac8f79795bf8d0b00bc65534440b059bc6c0 (diff)
lang/python32: Fix ABIFLAGS for PYMALLOC option
Investigating the comment regarding a 'configure script bug' lead me to a bug which manifested itself in 'm' not being added to ABIFLAGS when PYMALLOC was enabled, not the inability to set --without-pymalloc using PYMALLOC_CONFIGURE_WITH (options helpers). The incorrect ABIFLAGS caused packaging failures with default options, so I'm not sure how this wasn't picked up earlier: Error: Orphaned: include/python3.2u/<file> <snip> Error: Missing: include/python3.2mu/<file> - Backport an upstream commit [1] to correct the configure bug that never made it to the 3.2 branch. - Use options helpers for PYMALLOC accordingly While I'm here, clean up after the LIBFFI option addition: - Sort options variables: OPTIONS_* and *_DESC - Use OPTIONS helpers [1] https://hg.python.org/cpython/raw-rev/d158b0a78390 Approved by: python
Notes
Notes: svn path=/head/; revision=377591
Diffstat (limited to 'lang/python32')
-rw-r--r--lang/python32/Makefile20
-rw-r--r--lang/python32/files/patch-changeset-d158b0a7839024
2 files changed, 32 insertions, 12 deletions
diff --git a/lang/python32/Makefile b/lang/python32/Makefile
index 86f719da55cb..7135bdb5cca1 100644
--- a/lang/python32/Makefile
+++ b/lang/python32/Makefile
@@ -33,17 +33,19 @@ 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 UCS4 LIBFFI
-OPTIONS_DEFAULT= IPV6 NLS PYMALLOC THREADS UCS4 LIBFFI
+OPTIONS_DEFINE= DEBUG IPV6 LIBFFI NLS PYMALLOC THREADS TSC UCS4
+OPTIONS_DEFAULT= IPV6 LIBFFI NLS PYMALLOC THREADS UCS4
OPTIONS_SUB= yes
+LIBFFI_DESC= Use libffi from ports instead of bundled version
NLS_DESC= Enable gettext support for the locale module
PYMALLOC_DESC= Enable specialized mallocs
TSC_DESC= Enable processor timestamp counter profiling
-LIBFFI_DESC= Use libffi from ports instead of bundled version
DEBUG_CONFIGURE_WITH= pydebug
IPV6_CONFIGURE_ENABLE= ipv6
+LIBFFI_CONFIGURE_ON= --with-system-ffi
+LIBFFI_LIB_DEPENDS= libffi.so:${PORTSDIR}/devel/libffi
# Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat
# to break in Python 2.7, or preprocessor complaints in Python >= 3.3
@@ -53,6 +55,8 @@ NLS_CPPFLAGS= -I${LOCALBASE}/include
NLS_LIBS= -L${LOCALBASE}/lib -lintl
NLS_CONFIGURE_ENV_OFF= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no
+PYMALLOC_CONFIGURE_WITH= pymalloc
+
THREADS_CONFIGURE_WITH= threads
THREADS_CFLAGS= ${PTHREAD_CFLAGS}
THREADS_LDFLAGS= ${PTHREAD_LIBS}
@@ -67,18 +71,10 @@ ABIFLAGS:= u${ABIFLAGS}
.if ${PORT_OPTIONS:MPYMALLOC}
ABIFLAGS:= m${ABIFLAGS}
-.else
-# Can't use PYMALLOC_CONFIGURE_WITH here, since the configure script has a bug
-CONFIGURE_ARGS+= --without-pymalloc
.endif
.if ${PORT_OPTIONS:MDEBUG}
-ABIFLAGS:= d${ABIFLAGS}
-.endif
-
-.if ${PORT_OPTIONS:MLIBFFI}
-CONFIGURE_ARGS+= --with-system-ffi
-LIB_DEPENDS+= libffi.so:${PORTSDIR}/devel/libffi
+ABIFLAGS:= d${ABIFLAGS}
.endif
.if !empty(ABIFLAGS)
diff --git a/lang/python32/files/patch-changeset-d158b0a78390 b/lang/python32/files/patch-changeset-d158b0a78390
new file mode 100644
index 000000000000..9f1eb2743b2c
--- /dev/null
+++ b/lang/python32/files/patch-changeset-d158b0a78390
@@ -0,0 +1,24 @@
+# HG changeset patch (based on)
+# User doko@ubuntu.com
+# Date 1341068713 -7200
+# Node ID d158b0a78390c104540c69d9d73f9c31fc5577dc
+# Parent 575efae8ec5777b6130c29f7917d4e05303cfe12
+- Issue #3754: Some unrelated configure.ac cleanups.
+
+--- configure.orig 2015-01-21 11:43:28 UTC
++++ configure
+@@ -9439,13 +9439,13 @@ fi
+ if test -z "$with_pymalloc"
+ then
+ with_pymalloc="yes"
+- ABIFLAGS="${ABIFLAGS}m"
+ fi
+ if test "$with_pymalloc" != "no"
+ then
+
+ $as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
+
++ ABIFLAGS="${ABIFLAGS}m"
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
+ $as_echo "$with_pymalloc" >&6; }