summaryrefslogtreecommitdiff
path: root/lang/python27/files/extra-patch-setup.py
diff options
context:
space:
mode:
authorBruce M Simpson <bms@FreeBSD.org>2009-03-14 09:33:40 +0000
committerBruce M Simpson <bms@FreeBSD.org>2009-03-14 09:33:40 +0000
commita95007e2081d3b2f6008a3503c1eca7a498228ad (patch)
treefb4598bc96030320e8e3409e74d0136444ce9ba6 /lang/python27/files/extra-patch-setup.py
parent- Update to 1.18 (diff)
Add support for building Python against GNU Portable Threads (Pth),
and also add experimental support for POSIX semaphores in FreeBSD 7-STABLE and up. The option knobs PTH and SEM respectively are added to enable this behaviour. Python is able to use POSIX semaphores for thread synchronization in threading, and prefers them. The multiprocessing module in Python 2.6 requires POSIX semaphores, however, the FreeBSD rtld and malloc need further work to allow a process to call pthread_create() immediately after fork() as it is not something allowed by a strict interpretation of the POSIX specs; therefore allow GNU Pth to be used until the situation is resolved. Approved by: miwi
Diffstat (limited to 'lang/python27/files/extra-patch-setup.py')
-rw-r--r--lang/python27/files/extra-patch-setup.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/lang/python27/files/extra-patch-setup.py b/lang/python27/files/extra-patch-setup.py
new file mode 100644
index 000000000000..109f7841adfa
--- /dev/null
+++ b/lang/python27/files/extra-patch-setup.py
@@ -0,0 +1,26 @@
+--- setup.py.1 2009-03-12 04:07:36.000000000 +0000
++++ setup.py 2009-03-12 04:08:36.000000000 +0000
+@@ -1265,13 +1265,21 @@
+ )
+ libraries = []
+
+- elif platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'):
++ elif platform in ('freebsd4', 'freebsd5', 'freebsd6'):
+ # FreeBSD's P1003.1b semaphore support is very experimental
+ # and has many known problems. (as of June 2008)
+- macros = dict( # FreeBSD
++ macros = dict( # FreeBSD 4-6
+ HAVE_SEM_OPEN=0,
+ HAVE_SEM_TIMEDWAIT=0,
+ HAVE_FD_TRANSFER=1,
++ )
++ libraries = []
++
++ elif platform in ('freebsd7', 'freebsd8'):
++ macros = dict( # FreeBSD 7+
++ HAVE_SEM_OPEN=1,
++ HAVE_SEM_TIMEDWAIT=1,
++ HAVE_FD_TRANSFER=1,
+ )
+ libraries = []
+