aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorkoobs <koobs@FreeBSD.org>2013-12-01 17:34:20 +0800
committerkoobs <koobs@FreeBSD.org>2013-12-01 17:34:20 +0800
commit40f29c0a01a44b583e79fc5a2f8d85d813c6317a (patch)
tree702b3867a53006ec422a3b9d86a1af6b80183e18 /lang
parentc042690618c8b71de50d33dc9364f75a56545502 (diff)
downloadfreebsd-ports-gnome-40f29c0a01a44b583e79fc5a2f8d85d813c6317a.tar.gz
freebsd-ports-gnome-40f29c0a01a44b583e79fc5a2f8d85d813c6317a.tar.zst
freebsd-ports-gnome-40f29c0a01a44b583e79fc5a2f8d85d813c6317a.zip
lang/python31: Backport upstream kevent fix and use libffi from ports
Backport a change fixing use of kevent flags that was merged to Python default, 3.3 and 2.7 branches, but not 3.2 and 3.1 that were in security-only mode at the time of commit. [1] - Add patch: patch-Modules__selectmodule.c Based on patch by: David Naylor <naylor.b.david@gmail.com> Unconditionally use libffi from ports because the Python 3.1 branch was closed for maintenance when the import of libffi 3.0.13 took place. This fixes _ctypes module build failure on i386. [2] - Add global CONFIGURE_ARGS and LIB_DEPENDS References: [1] Issue #11973: Fix a problem in kevent. The flags and fflags fields are now properly handled as unsigned. [#11973] http://bugs.python.org/issue11973 http://hg.python.org/cpython/rev/8345fb616cbd [2] Fixes Issue #17192: Update the ctypes module's libffi to v3.0.13. This specifically addresses a stack misalignment issue on x86 and issues on some more recent platforms. [#17192] http://bugs.python.org/issue17192 http://hg.python.org/cpython/rev/a94b3b4599f1 http://hg.python.org/cpython/rev/688bc0b44d96 While I'm here: - Add LICENSE (PSFL) - Clean up & whitespace alignment PR: ports/156759 [1] Reviewed by: mva
Diffstat (limited to 'lang')
-rw-r--r--lang/python31/Makefile40
-rw-r--r--lang/python31/files/patch-Modules__selectmodule.c11
2 files changed, 34 insertions, 17 deletions
diff --git a/lang/python31/Makefile b/lang/python31/Makefile
index 965605053f06..f49607ddee84 100644
--- a/lang/python31/Makefile
+++ b/lang/python31/Makefile
@@ -1,24 +1,30 @@
# $FreeBSD$
-PORTNAME= python31
-PORTVERSION= 3.1.5
-PORTREVISION= 5
-CATEGORIES= lang python ipv6
-MASTER_SITES= PYTHON
+PORTNAME= python31
+PORTVERSION= 3.1.5
+PORTREVISION= 6
+CATEGORIES= lang python ipv6
+MASTER_SITES= PYTHON
MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR}
-DISTFILES= ${PYTHON_DISTFILE}
+DISTFILES= ${PYTHON_DISTFILE}
+DIST_SUBDIR= python
MAINTAINER= python@FreeBSD.org
COMMENT= Interpreted object-oriented programming language
-DEPRECATED= Python 3.1 will be end-of-life soon, please migrate to lang/python33
-EXPIRATION_DATE=2014-06-01
+LICENSE= PSFL
-DIST_SUBDIR= python
-GNU_CONFIGURE= yes
+LIB_DEPENDS= libffi.so:${PORTSDIR}/devel/libffi
+
+DEPRECATED= Python 3.1 will be end-of-life soon, please migrate to lang/python33
+EXPIRATION_DATE= 2014-06-01
+
+GNU_CONFIGURE= yes
CONFIGURE_SCRIPT= ../configure # must be relative
-CONFIGURE_ENV= OPT="" SVNVERSION="echo freebsd" ac_cv_opt_olimit_ok=no
-MAKE_ENV= VPATH="${PYTHON_WRKSRC}"
+CONFIGURE_ARGS= --with-system-ffi
+CONFIGURE_ENV= OPT="" SVNVERSION="echo freebsd" ac_cv_opt_olimit_ok=no
+MAKE_ENV= VPATH="${PYTHON_WRKSRC}"
+
INSTALL_TARGET= altinstall
MAN1= ${PYTHON_VERSION}.1
@@ -26,7 +32,7 @@ USE_LDCONFIG= yes
USE_PYTHON= yes
USE_XZ= yes
-PYTHON_VERSION= python3.1
+PYTHON_VERSION= python3.1
PYTHON_NO_DEPENDS= yes
WRKSRC= ${PYTHON_WRKSRC}/portbld.static
@@ -73,14 +79,14 @@ CONFIGURE_ENV+= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MTHREADS}
-PLIST_SUB+= THREADS=""
+PLIST_SUB+= THREADS=""
CONFIGURE_ARGS+= --with-threads
CFLAGS+= ${PTHREAD_CFLAGS}
LDFLAGS+= ${PTHREAD_LIBS}
-.else # defined(WITHOUT_THREADS)
-PLIST_SUB+= THREADS="@comment "
+.else
+PLIST_SUB+= THREADS="@comment "
CONFIGURE_ARGS+= --without-threads
-.endif # !defined(WITHOUT_THREADS)
+.endif
.if ${PORT_OPTIONS:MUCS4}
CONFIGURE_ARGS+= --with-wide-unicode
diff --git a/lang/python31/files/patch-Modules__selectmodule.c b/lang/python31/files/patch-Modules__selectmodule.c
new file mode 100644
index 000000000000..6b072eb9f08f
--- /dev/null
+++ b/lang/python31/files/patch-Modules__selectmodule.c
@@ -0,0 +1,11 @@
+--- ./Modules/selectmodule.c.orig 2013-11-30 23:09:48.211062086 +1100
++++ ./Modules/selectmodule.c 2013-11-30 23:53:51.740895007 +1100
+@@ -1229,7 +1229,7 @@
+
+ EV_SET(&(self->e), 0, EVFILT_READ, EV_ADD, 0, 0, 0); /* defaults */
+
+- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|hhiii:kevent", kwlist,
++ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|hHIii:kevent", kwlist,
+ &pfd, &(self->e.filter), &(self->e.flags),
+ &(self->e.fflags), &(self->e.data), &(self->e.udata))) {
+ return -1;