aboutsummaryrefslogtreecommitdiff
path: root/lang/python26/files
diff options
context:
space:
mode:
authorWen Heping <wen@FreeBSD.org>2010-09-12 09:07:44 +0000
committerWen Heping <wen@FreeBSD.org>2010-09-12 09:07:44 +0000
commita332f5435d7cffa7d4da8d3a89c4d8a7bbc38b7b (patch)
treee5185e5550af10260b626e4095f653d33debe3bf /lang/python26/files
parent3494ab1c719c61a6105430169132d3b2527fcc67 (diff)
Notes
Diffstat (limited to 'lang/python26/files')
-rw-r--r--lang/python26/files/patch-Lib-test-test_fcntl.py11
-rw-r--r--lang/python26/files/patch-Lib-test-test_socket.py11
-rw-r--r--lang/python26/files/patch-Modules-_ctypes-libffi-configure4
-rw-r--r--lang/python26/files/patch-Modules-fcntlmodule.c88
-rw-r--r--lang/python26/files/patch-Python_thread__pthread.h32
-rw-r--r--lang/python26/files/patch-setup.py80
6 files changed, 123 insertions, 103 deletions
diff --git a/lang/python26/files/patch-Lib-test-test_fcntl.py b/lang/python26/files/patch-Lib-test-test_fcntl.py
new file mode 100644
index 000000000000..ebd2ec81265f
--- /dev/null
+++ b/lang/python26/files/patch-Lib-test-test_fcntl.py
@@ -0,0 +1,11 @@
+--- Lib/test/test_fcntl.py.orig 2010-08-14 16:56:31.290525837 +0800
++++ Lib/test/test_fcntl.py 2010-08-14 16:56:39.007508167 +0800
+@@ -30,7 +30,7 @@
+ if sys.platform in ('netbsd1', 'netbsd2', 'netbsd3',
+ 'Darwin1.2', 'darwin',
+ 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5',
+- 'freebsd6', 'freebsd7', 'freebsd8',
++ 'freebsd6', 'freebsd7', 'freebsd8', 'freebsd9',
+ 'bsdos2', 'bsdos3', 'bsdos4',
+ 'openbsd', 'openbsd2', 'openbsd3', 'openbsd4'):
+ if struct.calcsize('l') == 8:
diff --git a/lang/python26/files/patch-Lib-test-test_socket.py b/lang/python26/files/patch-Lib-test-test_socket.py
new file mode 100644
index 000000000000..8c1ada8b2da6
--- /dev/null
+++ b/lang/python26/files/patch-Lib-test-test_socket.py
@@ -0,0 +1,11 @@
+--- Lib/test/test_socket.py.orig 2010-08-14 16:51:08.542899328 +0800
++++ Lib/test/test_socket.py 2010-08-14 16:53:25.902184941 +0800
+@@ -334,7 +334,7 @@
+ # I've ordered this by protocols that have both a tcp and udp
+ # protocol, at least for modern Linuxes.
+ if sys.platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
+- 'freebsd7', 'freebsd8', 'darwin'):
++ 'freebsd7', 'freebsd8', 'freebsd9', 'darwin'):
+ # avoid the 'echo' service on this platform, as there is an
+ # assumption breaking non-standard port/protocol entry
+ services = ('daytime', 'qotd', 'domain')
diff --git a/lang/python26/files/patch-Modules-_ctypes-libffi-configure b/lang/python26/files/patch-Modules-_ctypes-libffi-configure
index c788e1813719..a420fe20f4ad 100644
--- a/lang/python26/files/patch-Modules-_ctypes-libffi-configure
+++ b/lang/python26/files/patch-Modules-_ctypes-libffi-configure
@@ -1,5 +1,5 @@
---- Modules/_ctypes/libffi/configure.orig 2008-05-24 00:06:50.000000000 +0900
-+++ Modules/_ctypes/libffi/configure 2008-10-09 20:24:02.000000000 +0900
+--- Modules/_ctypes/libffi/configure.orig 2010-09-02 09:18:23.000000000 +0800
++++ Modules/_ctypes/libffi/configure 2010-09-02 09:18:49.000000000 +0800
@@ -4725,7 +4725,7 @@
rm -rf conftest*
;;
diff --git a/lang/python26/files/patch-Modules-fcntlmodule.c b/lang/python26/files/patch-Modules-fcntlmodule.c
index b8dfd783eca7..b71168e181fe 100644
--- a/lang/python26/files/patch-Modules-fcntlmodule.c
+++ b/lang/python26/files/patch-Modules-fcntlmodule.c
@@ -1,53 +1,53 @@
---- Modules/fcntlmodule.c.orig 2009-05-24 11:41:43.000000000 -0400
-+++ Modules/fcntlmodule.c 2010-06-24 22:27:04.000000000 -0400
+--- Modules/fcntlmodule.c.orig 2010-08-14 16:36:54.991363730 +0800
++++ Modules/fcntlmodule.c 2010-08-14 16:41:05.555822031 +0800
@@ -97,20 +97,15 @@
{
#define IOCTL_BUFSZ 1024
- int fd;
-- /* In PyArg_ParseTuple below, we use the unsigned non-checked 'I'
-+ /* In PyArg_ParseTuple below, we use the unsigned non-checked 'k'
- format for the 'code' parameter because Python turns 0x8000000
- into either a large positive number (PyLong or PyInt on 64-bit
- platforms) or a negative number on others (32-bit PyInt)
- whereas the system expects it to be a 32bit bit field value
- regardless of it being passed as an int or unsigned long on
-- various platforms. See the termios.TIOCSWINSZ constant across
-- platforms for an example of thise.
+ int fd;
+- /* In PyArg_ParseTuple below, we use the unsigned non-checked 'I'
++ /* In PyArg_ParseTuple below, we use the unsigned non-checked 'k'
+ format for the 'code' parameter because Python turns 0x8000000
+ into either a large positive number (PyLong or PyInt on 64-bit
+ platforms) or a negative number on others (32-bit PyInt)
+ whereas the system expects it to be a 32bit bit field value
+ regardless of it being passed as an int or unsigned long on
+- various platforms. See the termios.TIOCSWINSZ constant across
+- platforms for an example of thise.
-
-- If any of the 64bit platforms ever decide to use more than 32bits
-- in their unsigned long ioctl codes this will break and need
-- special casing based on the platform being built on.
-+ various platforms.
- */
-- unsigned int code;
-+ unsigned long code;
- int arg;
- int ret;
- char *str;
+- If any of the 64bit platforms ever decide to use more than 32bits
+- in their unsigned long ioctl codes this will break and need
+- special casing based on the platform being built on.
++ various platforms.
+ */
+- unsigned int code;
++ unsigned long code;
+ int arg;
+ int ret;
+ char *str;
@@ -118,7 +113,7 @@
- int mutate_arg = 1;
- char buf[IOCTL_BUFSZ+1]; /* argument plus NUL byte */
+ int mutate_arg = 1;
+ char buf[IOCTL_BUFSZ+1]; /* argument plus NUL byte */
-- if (PyArg_ParseTuple(args, "O&Iw#|i:ioctl",
-+ if (PyArg_ParseTuple(args, "O&kw#|i:ioctl",
- conv_descriptor, &fd, &code,
- &str, &len, &mutate_arg)) {
- char *arg;
+- if (PyArg_ParseTuple(args, "O&Iw#|i:ioctl",
++ if (PyArg_ParseTuple(args, "O&kw#|i:ioctl",
+ conv_descriptor, &fd, &code,
+ &str, &len, &mutate_arg)) {
+ char *arg;
@@ -169,7 +164,7 @@
- }
+ }
- PyErr_Clear();
-- if (PyArg_ParseTuple(args, "O&Is#:ioctl",
-+ if (PyArg_ParseTuple(args, "O&ks#:ioctl",
- conv_descriptor, &fd, &code, &str, &len)) {
- if (len > IOCTL_BUFSZ) {
- PyErr_SetString(PyExc_ValueError,
+ PyErr_Clear();
+- if (PyArg_ParseTuple(args, "O&Is#:ioctl",
++ if (PyArg_ParseTuple(args, "O&ks#:ioctl",
+ conv_descriptor, &fd, &code, &str, &len)) {
+ if (len > IOCTL_BUFSZ) {
+ PyErr_SetString(PyExc_ValueError,
@@ -191,7 +186,7 @@
- PyErr_Clear();
- arg = 0;
- if (!PyArg_ParseTuple(args,
-- "O&I|i;ioctl requires a file or file descriptor,"
-+ "O&k|i;ioctl requires a file or file descriptor,"
- " an integer and optionally an integer or buffer argument",
- conv_descriptor, &fd, &code, &arg)) {
- return NULL;
+ PyErr_Clear();
+ arg = 0;
+ if (!PyArg_ParseTuple(args,
+- "O&I|i;ioctl requires a file or file descriptor,"
++ "O&k|i;ioctl requires a file or file descriptor,"
+ " an integer and optionally an integer or buffer argument",
+ conv_descriptor, &fd, &code, &arg)) {
+ return NULL;
diff --git a/lang/python26/files/patch-Python_thread__pthread.h b/lang/python26/files/patch-Python_thread__pthread.h
index cde868cd8826..67355d496333 100644
--- a/lang/python26/files/patch-Python_thread__pthread.h
+++ b/lang/python26/files/patch-Python_thread__pthread.h
@@ -1,5 +1,5 @@
---- Python/thread_pthread.h.orig 2006-06-13 16:04:24.000000000 +0100
-+++ Python/thread_pthread.h 2009-03-12 10:55:49.000000000 +0000
+--- Python/thread_pthread.h.orig 2010-05-09 22:46:46.000000000 +0800
++++ Python/thread_pthread.h 2010-08-15 14:27:51.886823397 +0800
@@ -26,13 +26,18 @@
#endif
#endif
@@ -10,9 +10,9 @@
+
/* The POSIX spec says that implementations supporting the sem_*
family of functions must indicate this by defining
- _POSIX_SEMAPHORES. */
+ _POSIX_SEMAPHORES. */
#ifdef _POSIX_SEMAPHORES
- /* On FreeBSD 4.x, _POSIX_SEMAPHORES is defined empty, so
+ /* On FreeBSD 4.x, _POSIX_SEMAPHORES is defined empty, so
we need to add 0 to make it work there as well. */
-#if (_POSIX_SEMAPHORES+0) == -1
+#if defined(__FreeBSD__) && __FreeBSD_version < 701104 && \
@@ -30,26 +30,26 @@
#endif
@@ -149,6 +153,7 @@
{
- pthread_t th;
- int status;
-+ sigset_t set, oset;
+ pthread_t th;
+ int status;
++ sigset_t set, oset;
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
- pthread_attr_t attrs;
+ pthread_attr_t attrs;
#endif
@@ -177,6 +182,8 @@
#if defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
- pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM);
+ pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM);
#endif
-+ sigfillset(&set);
-+ SET_THREAD_SIGMASK(SIG_BLOCK, &set, &oset);
++ sigfillset(&set);
++ SET_THREAD_SIGMASK(SIG_BLOCK, &set, &oset);
- status = pthread_create(&th,
+ status = pthread_create(&th,
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
@@ -188,6 +195,7 @@
- (void *)arg
- );
+ (void *)arg
+ );
-+ SET_THREAD_SIGMASK(SIG_SETMASK, &oset, NULL);
++ SET_THREAD_SIGMASK(SIG_SETMASK, &oset, NULL);
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
- pthread_attr_destroy(&attrs);
+ pthread_attr_destroy(&attrs);
#endif
diff --git a/lang/python26/files/patch-setup.py b/lang/python26/files/patch-setup.py
index c7825e0f1872..829817af3af7 100644
--- a/lang/python26/files/patch-setup.py
+++ b/lang/python26/files/patch-setup.py
@@ -1,7 +1,7 @@
---- setup.py.orig 2009-03-31 18:20:48.000000000 +0000
-+++ setup.py 2009-09-10 05:27:01.000000000 +0000
-@@ -17,7 +17,7 @@ from distutils.command.install import in
- from distutils.command.install_lib import install_lib
+--- setup.py.orig 2010-07-17 20:31:09.000000000 +0800
++++ setup.py 2010-09-03 08:59:33.000000000 +0800
+@@ -18,7 +18,7 @@
+ from distutils.spawn import find_executable
# This global variable is used to hold the list of modules to be disabled.
-disabled_module_list = []
@@ -9,25 +9,25 @@
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
-@@ -577,7 +577,7 @@ class PyBuildExt(build_ext):
-
- readline_libs = ['readline']
- if self.compiler.find_library_file(lib_dirs,
-- 'ncursesw'):
-+ 'xxxncursesw'):
- readline_libs.append('ncursesw')
- elif self.compiler.find_library_file(lib_dirs,
- 'ncurses'):
-@@ -589,7 +589,7 @@ class PyBuildExt(build_ext):
+@@ -627,7 +627,7 @@
+ # curses_library = readline_termcap_library
+ # elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
+ # (...)
+- if self.compiler.find_library_file(lib_dirs, 'ncursesw'):
++ if self.compiler.find_library_file(lib_dirs, 'xxxncursesw'):
+ curses_library = 'ncursesw'
+ elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
+ curses_library = 'ncurses'
+@@ -666,7 +666,7 @@
'termcap'):
readline_libs.append('termcap')
exts.append( Extension('readline', ['readline.c'],
- library_dirs=['/usr/lib/termcap'],
-+ library_dirs=['/usr/lib', '/usr/lib/termcap'],
++ library_dirs=['/usr/lib','/usr/lib/termcap'],
extra_link_args=readline_extra_link_args,
libraries=readline_libs) )
else:
-@@ -689,6 +689,8 @@ class PyBuildExt(build_ext):
+@@ -766,6 +766,8 @@
# OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash
exts.append( Extension('_sha256', ['sha256module.c']) )
exts.append( Extension('_sha512', ['sha512module.c']) )
@@ -36,41 +36,39 @@
# Modules that provide persistent dictionary-like semantics. You will
# probably want to arrange for at least one of them to be available on
-@@ -990,7 +992,7 @@ class PyBuildExt(build_ext):
- # the more recent berkeleydb's db.h file first in the include path
- # when attempting to compile and it will fail.
- f = "/usr/include/db.h"
+@@ -1101,7 +1103,7 @@
+ sysroot = macosx_sdk_root()
+ f = os.path.join(sysroot, f[1:])
+
- if os.path.exists(f) and not db_incs:
+ if os.path.exists(f):
data = open(f).read()
m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
if m is not None:
-@@ -1080,7 +1082,7 @@ class PyBuildExt(build_ext):
- # Curses support, requiring the System V version of curses, often
+@@ -1193,12 +1195,13 @@
# provided by the ncurses library.
panel_library = 'panel'
-- if (self.compiler.find_library_file(lib_dirs, 'ncursesw')):
-+ if (self.compiler.find_library_file(lib_dirs, 'xxxncursesw')):
- curses_libs = ['ncursesw']
- # Bug 1464056: If _curses.so links with ncursesw,
- # _curses_panel.so must link with panelw.
-@@ -1090,6 +1092,7 @@ class PyBuildExt(build_ext):
- elif (self.compiler.find_library_file(lib_dirs, 'ncurses')):
- curses_libs = ['ncurses']
+ if curses_library.startswith('ncurses'):
+- if curses_library == 'ncursesw':
++ if curses_library == 'xxxncursesw':
+ # Bug 1464056: If _curses.so links with ncursesw,
+ # _curses_panel.so must link with panelw.
+ panel_library = 'panelw'
+ curses_libs = [curses_library]
exts.append( Extension('_curses', ['_cursesmodule.c'],
+ library_dirs = ['/usr/lib'],
libraries = curses_libs) )
- elif (self.compiler.find_library_file(lib_dirs, 'curses')
- and platform != 'darwin'):
-@@ -1111,6 +1114,7 @@ class PyBuildExt(build_ext):
- if (module_enabled(exts, '_curses') and
- self.compiler.find_library_file(lib_dirs, panel_library)):
- exts.append( Extension('_curses_panel', ['_curses_panel.c'],
+ elif curses_library == 'curses' and platform != 'darwin':
+ # OSX has an old Berkeley curses, not good enough for
+@@ -1211,6 +1214,7 @@
+ curses_libs = ['curses']
+
+ exts.append( Extension('_curses', ['_cursesmodule.c'],
+ library_dirs = ['/usr/lib'],
- libraries = [panel_library] + curses_libs) )
+ libraries = curses_libs) )
else:
- missing.append('_curses_panel')
-@@ -1273,7 +1277,7 @@ class PyBuildExt(build_ext):
+ missing.append('_curses')
+@@ -1381,7 +1385,7 @@
)
libraries = []
@@ -79,7 +77,7 @@
# FreeBSD's P1003.1b semaphore support is very experimental
# and has many known problems. (as of June 2008)
macros = dict( # FreeBSD
-@@ -1338,7 +1342,7 @@ class PyBuildExt(build_ext):
+@@ -1450,7 +1454,7 @@
missing.append('linuxaudiodev')
if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
@@ -88,7 +86,7 @@
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
else:
missing.append('ossaudiodev')
-@@ -1891,9 +1895,7 @@ def main():
+@@ -2026,9 +2030,7 @@
ext_modules=[Extension('_struct', ['_struct.c'])],
# Scripts to install