aboutsummaryrefslogtreecommitdiff
path: root/lang/python31/files
diff options
context:
space:
mode:
Diffstat (limited to 'lang/python31/files')
-rw-r--r--lang/python31/files/patch-CVE-2014-191250
-rw-r--r--lang/python31/files/patch-Doc-library-fcntl.rst11
-rw-r--r--lang/python31/files/patch-Lib-test-test_fcntl.py11
-rw-r--r--lang/python31/files/patch-Lib-test-test_ioctl.py23
-rw-r--r--lang/python31/files/patch-Lib-test_regrtest.py11
-rw-r--r--lang/python31/files/patch-Lib__distutils__unixccompiler.py15
-rw-r--r--lang/python31/files/patch-Lib__py_compile.py49
-rw-r--r--lang/python31/files/patch-Makefile.pre.in16
-rw-r--r--lang/python31/files/patch-Modules-_ctypes-libffi-configure11
-rw-r--r--lang/python31/files/patch-Modules-_ctypes-libffi-src-powerpc-ffitarget.h11
-rw-r--r--lang/python31/files/patch-Modules-fcntlmodule.c53
-rw-r--r--lang/python31/files/patch-Modules___ctypes__libffi__src__arm__ffi.c36
-rw-r--r--lang/python31/files/patch-Modules__selectmodule.c11
-rw-r--r--lang/python31/files/patch-issue2037454
-rw-r--r--lang/python31/files/patch-setup.py95
15 files changed, 0 insertions, 457 deletions
diff --git a/lang/python31/files/patch-CVE-2014-1912 b/lang/python31/files/patch-CVE-2014-1912
deleted file mode 100644
index fe786ab766fc..000000000000
--- a/lang/python31/files/patch-CVE-2014-1912
+++ /dev/null
@@ -1,50 +0,0 @@
-# HG changeset patch
-# User Benjamin Peterson <benjamin@python.org>
-# Date 1389672374 18000
-# Node ID 715fd3d8ac93878e49a072474a4706a449720d9b
-# Parent b1ddcb220a7f375146c090a854438cf31fa3a388# Parent 87673659d8f7ba1623cd4914f09ad3d2ade034e9
-complain when nbytes > buflen to fix possible buffer overflow (closes #20246)
-
-# HG changeset patch
-# User Stefan Krah <skrah@bytereef.org>
-# Date 1390341520 -3600
-# Node ID c25e1442529f16ba5fb9df8786a019866b0686e9
-# Parent fbb4d48046e564dd89511598dbbf04422ac6da35
-Issue #20246: Fix test failures on FreeBSD. Patch by Ryan Smith-Roberts.
-
-diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
---- Lib/test/test_socket.py
-+++ Lib/test/test_socket.py
-@@ -1424,6 +1424,14 @@ class BufferIOTest(SocketConnectedTest):
- buf = bytes(MSG)
- self.serv_conn.send(buf)
-
-+ def testRecvFromIntoSmallBuffer(self):
-+ # See issue #20246.
-+ buf = bytearray(8)
-+ self.assertRaises(ValueError, self.cli_conn.recvfrom_into, buf, 1024)
-+
-+ def _testRecvFromIntoSmallBuffer(self):
-+ self.serv_conn.send(MSG)
-+
-
- TIPC_STYPE = 2000
- TIPC_LOWER = 200
-
-diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
---- Modules/socketmodule.c
-+++ Modules/socketmodule.c
-@@ -2494,6 +2494,12 @@ sock_recvfrom_into(PySocketSockObject *s
- if (recvlen == 0) {
- /* If nbytes was not specified, use the buffer's length */
- recvlen = buflen;
-+ } else if (recvlen > buflen) {
-+ PyBuffer_Release(&pbuf);
-+ Py_XDECREF(addr);
-+ PyErr_SetString(PyExc_ValueError,
-+ "nbytes is greater than the length of the buffer");
-+ return NULL;
- }
-
- readlen = sock_recvfrom_guts(s, buf, recvlen, flags, &addr);
-
diff --git a/lang/python31/files/patch-Doc-library-fcntl.rst b/lang/python31/files/patch-Doc-library-fcntl.rst
deleted file mode 100644
index 46c072e1c062..000000000000
--- a/lang/python31/files/patch-Doc-library-fcntl.rst
+++ /dev/null
@@ -1,11 +0,0 @@
---- Doc/library/fcntl.rst.orig 2009-06-08 09:41:29.000000000 -0400
-+++ Doc/library/fcntl.rst 2010-06-24 22:31:02.000000000 -0400
-@@ -48,8 +48,6 @@
- This function is identical to the :func:`fcntl` function, except that the
- argument handling is even more complicated.
-
-- The op parameter is limited to values that can fit in 32-bits.
--
- The parameter *arg* can be one of an integer, absent (treated identically to the
- integer ``0``), an object supporting the read-only buffer interface (most likely
- a plain Python string) or an object supporting the read-write buffer interface.
diff --git a/lang/python31/files/patch-Lib-test-test_fcntl.py b/lang/python31/files/patch-Lib-test-test_fcntl.py
deleted file mode 100644
index 606a6e9a9612..000000000000
--- a/lang/python31/files/patch-Lib-test-test_fcntl.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- Lib/test/test_fcntl.py.orig 2009-05-24 11:46:13.000000000 -0400
-+++ Lib/test/test_fcntl.py 2010-06-24 13:56:52.000000000 -0400
-@@ -29,7 +29,7 @@
- if sys.platform in ('netbsd1', 'netbsd2', 'netbsd3',
- 'Darwin1.2', 'darwin',
- 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5',
-- 'freebsd6', 'freebsd7', 'freebsd8',
-+ 'freebsd6', 'freebsd7', 'freebsd8', 'freebsd9', 'freebsd10',
- 'bsdos2', 'bsdos3', 'bsdos4',
- 'openbsd', 'openbsd2', 'openbsd3', 'openbsd4'):
- if struct.calcsize('l') == 8:
diff --git a/lang/python31/files/patch-Lib-test-test_ioctl.py b/lang/python31/files/patch-Lib-test-test_ioctl.py
deleted file mode 100644
index 2488bc755583..000000000000
--- a/lang/python31/files/patch-Lib-test-test_ioctl.py
+++ /dev/null
@@ -1,23 +0,0 @@
---- Lib/test/test_ioctl.py.orig 2009-08-13 04:51:18.000000000 -0400
-+++ Lib/test/test_ioctl.py 2010-06-24 13:35:29.000000000 -0400
-@@ -41,18 +41,9 @@ class IoctlTests(unittest.TestCase):
- raise unittest.SkipTest('pty module required')
- mfd, sfd = pty.openpty()
- try:
-- if termios.TIOCSWINSZ < 0:
-- set_winsz_opcode_maybe_neg = termios.TIOCSWINSZ
-- set_winsz_opcode_pos = termios.TIOCSWINSZ & 0xffffffff
-- else:
-- set_winsz_opcode_pos = termios.TIOCSWINSZ
-- set_winsz_opcode_maybe_neg, = struct.unpack("i",
-- struct.pack("I", termios.TIOCSWINSZ))
--
-+ set_winsz_opcode = termios.TIOCSWINSZ
- our_winsz = struct.pack("HHHH",80,25,0,0)
-- # test both with a positive and potentially negative ioctl code
-- new_winsz = fcntl.ioctl(mfd, set_winsz_opcode_pos, our_winsz)
-- new_winsz = fcntl.ioctl(mfd, set_winsz_opcode_maybe_neg, our_winsz)
-+ new_winsz = fcntl.ioctl(mfd, set_winsz_opcode, our_winsz)
- finally:
- os.close(mfd)
- os.close(sfd)
diff --git a/lang/python31/files/patch-Lib-test_regrtest.py b/lang/python31/files/patch-Lib-test_regrtest.py
deleted file mode 100644
index 99754f75043e..000000000000
--- a/lang/python31/files/patch-Lib-test_regrtest.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- Lib/test/regrtest.py.orig 2011-06-11 17:48:50.000000000 +0200
-+++ Lib/test/regrtest.py 2011-10-28 11:17:37.000000000 +0200
-@@ -1203,6 +1203,8 @@
- _expectations['freebsd6'] = _expectations['freebsd4']
- _expectations['freebsd7'] = _expectations['freebsd4']
- _expectations['freebsd8'] = _expectations['freebsd4']
-+_expectations['freebsd9'] = _expectations['freebsd4']
-+_expectations['freebsd10'] = _expectations['freebsd4']
-
- class _ExpectedSkips:
- def __init__(self):
diff --git a/lang/python31/files/patch-Lib__distutils__unixccompiler.py b/lang/python31/files/patch-Lib__distutils__unixccompiler.py
deleted file mode 100644
index 930c565520bb..000000000000
--- a/lang/python31/files/patch-Lib__distutils__unixccompiler.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# Description: Some python extensions can't be compiled with clang 3.4
-# Issue ID: http://bugs.python.org/issue20767
-# Submitted by: antoine
-
---- ./Lib/distutils/unixccompiler.py.orig 2014-03-09 14:58:11.840899942 +1100
-+++ ./Lib/distutils/unixccompiler.py 2014-03-09 15:07:24.038743110 +1100
-@@ -285,6 +285,8 @@
- if sys.platform[:6] == "darwin":
- # MacOSX's linker doesn't understand the -R flag at all
- return "-L" + dir
-+ elif sys.platform[:7] == "freebsd":
-+ return "-Wl,-rpath=" + dir
- elif sys.platform[:5] == "hp-ux":
- if self._is_gcc(compiler):
- return ["-Wl,+s", "-L" + dir]
diff --git a/lang/python31/files/patch-Lib__py_compile.py b/lang/python31/files/patch-Lib__py_compile.py
deleted file mode 100644
index 1eaaca1e5697..000000000000
--- a/lang/python31/files/patch-Lib__py_compile.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# Description: python3 py_compile does not ignore UTF-8 BOM characters
-# Issue: http://bugs.python.org/issue8168
-# Commit: http://hg.python.org/cpython/rev/e15a8a476494/
-# PR: ports/186034
-
---- ./Lib/py_compile.py.orig 2014-02-21 23:28:42.491208180 +1100
-+++ ./Lib/py_compile.py 2014-02-21 23:29:22.052513709 +1100
-@@ -7,8 +7,8 @@
- import imp
- import marshal
- import os
--import re
- import sys
-+import tokenize
- import traceback
-
- MAGIC = imp.get_magic()
-@@ -78,21 +78,6 @@
- (x >> 16) & 0xff,
- (x >> 24) & 0xff]))
-
--def read_encoding(file, default):
-- """Read the first two lines of the file looking for coding: xyzzy."""
-- f = open(file, "rb")
-- try:
-- for i in range(2):
-- line = f.readline()
-- if not line:
-- break
-- m = re.match(br".*\bcoding:\s*(\S+)\b", line)
-- if m:
-- return m.group(1).decode("ascii")
-- return default
-- finally:
-- f.close()
--
- def compile(file, cfile=None, dfile=None, doraise=False):
- """Byte-compile one Python source file to Python bytecode.
-
-@@ -128,7 +113,8 @@
- directories).
-
- """
-- encoding = read_encoding(file, "utf-8")
-+ with open(file, "rb") as f:
-+ encoding = tokenize.detect_encoding(f.readline)[0]
- f = open(file, 'U', encoding=encoding)
- try:
- timestamp = int(os.fstat(f.fileno()).st_mtime)
diff --git a/lang/python31/files/patch-Makefile.pre.in b/lang/python31/files/patch-Makefile.pre.in
deleted file mode 100644
index 1979cfa34049..000000000000
--- a/lang/python31/files/patch-Makefile.pre.in
+++ /dev/null
@@ -1,16 +0,0 @@
-# Description: Run ranlib before installing the library read-only
-# Submitted by: antoine@ (r350207)
-# TODO: Upstream
-
---- ./Makefile.pre.in.orig 2014-04-20 23:22:37.435954278 +1000
-+++ ./Makefile.pre.in 2014-04-20 23:23:10.767071278 +1000
-@@ -985,8 +985,8 @@
- if test "$(SO)" = .dll; then \
- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
- else \
-+ $(RANLIB) $(LIBRARY) ; \
- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
-- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
- fi; \
- else \
- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
diff --git a/lang/python31/files/patch-Modules-_ctypes-libffi-configure b/lang/python31/files/patch-Modules-_ctypes-libffi-configure
deleted file mode 100644
index c788e1813719..000000000000
--- a/lang/python31/files/patch-Modules-_ctypes-libffi-configure
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
-@@ -4725,7 +4725,7 @@
- rm -rf conftest*
- ;;
-
--x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-+amd64-*-freebsd*|x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
- s390*-*linux*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
diff --git a/lang/python31/files/patch-Modules-_ctypes-libffi-src-powerpc-ffitarget.h b/lang/python31/files/patch-Modules-_ctypes-libffi-src-powerpc-ffitarget.h
deleted file mode 100644
index 8ea91d52c0cf..000000000000
--- a/lang/python31/files/patch-Modules-_ctypes-libffi-src-powerpc-ffitarget.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- Modules/_ctypes/libffi/src/powerpc/ffitarget.h.orig 2011-11-16 20:32:42.000000000 -0800
-+++ Modules/_ctypes/libffi/src/powerpc/ffitarget.h 2011-11-16 20:33:23.000000000 -0800
-@@ -78,6 +78,8 @@
- FFI_SYSV,
- FFI_GCC_SYSV,
- FFI_LINUX64,
-+ FFI_LINUX,
-+ FFI_LINUX_SOFT_FLOAT,
- FFI_DEFAULT_ABI = FFI_SYSV,
- #endif
-
diff --git a/lang/python31/files/patch-Modules-fcntlmodule.c b/lang/python31/files/patch-Modules-fcntlmodule.c
deleted file mode 100644
index 6f9f3ab01d0a..000000000000
--- a/lang/python31/files/patch-Modules-fcntlmodule.c
+++ /dev/null
@@ -1,53 +0,0 @@
---- Modules/fcntlmodule.c.orig 2010-12-14 09:44:03.000000000 +0800
-+++ Modules/fcntlmodule.c 2010-12-14 09:47:17.000000000 +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.
--
-- 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;
- Py_buffer pstr;
-@@ -119,7 +114,7 @@
- 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,
- &pstr, &mutate_arg)) {
- char *arg;
-@@ -174,7 +169,7 @@
- }
-
- PyErr_Clear();
-- if (PyArg_ParseTuple(args, "O&Is*:ioctl",
-+ if (PyArg_ParseTuple(args, "O&ks*:ioctl",
- conv_descriptor, &fd, &code, &pstr)) {
- str = pstr.buf;
- len = pstr.len;
-@@ -201,7 +196,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;
diff --git a/lang/python31/files/patch-Modules___ctypes__libffi__src__arm__ffi.c b/lang/python31/files/patch-Modules___ctypes__libffi__src__arm__ffi.c
deleted file mode 100644
index 1e8b0d7af825..000000000000
--- a/lang/python31/files/patch-Modules___ctypes__libffi__src__arm__ffi.c
+++ /dev/null
@@ -1,36 +0,0 @@
-# Description: Fix _ctypes abort on import for FreeBSD/ARM. This is an issue
-# for anything !apple that is using the libcompiler_rt provided by clang on arm
-# PR: ports/149167 ports/184517
-# Patch by: cognet@ (to be upstreamed @ LLVM)
-
---- ./Modules/_ctypes/libffi/src/arm/ffi.c.orig 2013-12-08 15:55:58.351993767 +1100
-+++ ./Modules/_ctypes/libffi/src/arm/ffi.c 2013-12-08 15:57:40.531068291 +1100
-@@ -29,6 +29,11 @@
-
- #include <stdlib.h>
-
-+#if defined(__FreeBSD__) && defined(__arm__)
-+#include <sys/types.h>
-+#include <machine/sysarch.h>
-+#endif
-+
- /* ffi_prep_args is called by the assembly routine once stack space
- has been allocated for the function's arguments */
-
-@@ -273,6 +278,16 @@
-
- /* How to make a trampoline. */
-
-+#if defined(__FreeBSD__) && defined(__arm__)
-+#define __clear_cache(start, end) do { \
-+ struct arm_sync_icache_args ua; \
-+ \
-+ ua.addr = (uintptr_t)(start); \
-+ ua.len = (char *)(end) - (char *)start; \
-+ sysarch(ARM_SYNC_ICACHE, &ua); \
-+ } while (0);
-+#endif
-+
- #define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \
- ({ unsigned char *__tramp = (unsigned char*)(TRAMP); \
- unsigned int __fun = (unsigned int)(FUN); \
diff --git a/lang/python31/files/patch-Modules__selectmodule.c b/lang/python31/files/patch-Modules__selectmodule.c
deleted file mode 100644
index 6b072eb9f08f..000000000000
--- a/lang/python31/files/patch-Modules__selectmodule.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./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;
diff --git a/lang/python31/files/patch-issue20374 b/lang/python31/files/patch-issue20374
deleted file mode 100644
index 867478d2ad67..000000000000
--- a/lang/python31/files/patch-issue20374
+++ /dev/null
@@ -1,54 +0,0 @@
-# Description: fix readline.so build with readline 6.3
-# Patch obtained from upstream, issue #20374
-# http://bugs.python.org/issue20374
-
---- ./Modules/readline.c.orig 2012-04-09 23:25:36.000000000 +0000
-+++ ./Modules/readline.c 2014-03-01 15:37:28.000000000 +0000
-@@ -693,14 +693,22 @@
- }
-
- static int
-+#if defined(_RL_FUNCTION_TYPEDEF)
- on_startup_hook(void)
-+#else
-+on_startup_hook()
-+#endif
- {
- return on_hook(startup_hook);
- }
-
- #ifdef HAVE_RL_PRE_INPUT_HOOK
- static int
-+#if defined(_RL_FUNCTION_TYPEDEF)
- on_pre_input_hook(void)
-+#else
-+on_pre_input_hook()
-+#endif
- {
- return on_hook(pre_input_hook);
- }
-@@ -794,7 +802,7 @@
- * before calling the normal completer */
-
- static char **
--flex_complete(char *text, int start, int end)
-+flex_complete(const char *text, int start, int end)
- {
- #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
- rl_completion_append_character ='\0';
-@@ -834,12 +842,12 @@
- rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
- rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
- /* Set our hook functions */
-- rl_startup_hook = (Function *)on_startup_hook;
-+ rl_startup_hook = on_startup_hook;
- #ifdef HAVE_RL_PRE_INPUT_HOOK
-- rl_pre_input_hook = (Function *)on_pre_input_hook;
-+ rl_pre_input_hook = on_pre_input_hook;
- #endif
- /* Set our completion function */
-- rl_attempted_completion_function = (CPPFunction *)flex_complete;
-+ rl_attempted_completion_function = flex_complete;
- /* Set Python word break characters */
- rl_completer_word_break_characters =
- strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?");
diff --git a/lang/python31/files/patch-setup.py b/lang/python31/files/patch-setup.py
deleted file mode 100644
index 36ceb854b64f..000000000000
--- a/lang/python31/files/patch-setup.py
+++ /dev/null
@@ -1,95 +0,0 @@
---- ./setup.py.orig 2012-04-10 09:25:37.000000000 +1000
-+++ ./setup.py 2013-12-01 21:05:04.742891449 +1100
-@@ -17,7 +17,7 @@
- from distutils.spawn import find_executable
-
- # This global variable is used to hold the list of modules to be disabled.
--disabled_module_list = []
-+disabled_module_list = ["_sqlite3", "_tkinter", "_gdbm"]
-
- def add_dir_to_list(dirlist, dir):
- """Add the directory 'dir' to the list 'dirlist' (at the front) if
-@@ -601,7 +601,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'
-@@ -637,7 +637,7 @@
- 'termcap'):
- readline_libs.append('termcap')
- exts.append( Extension('readline', ['readline.c'],
-- library_dirs=['/usr/lib/termcap'],
-+ library_dirs=['/usr/lib', '/usr/lib/termcap'],
- extra_link_args=readline_extra_link_args,
- libraries=readline_libs) )
- else:
-@@ -731,6 +731,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']) )
-+ else:
-+ open('.without_own_sha', 'w')
-
- if openssl_ver < 0x00907000:
- # no openssl at all, use our own md5 and sha1
-@@ -1139,12 +1141,13 @@
- # provided by the ncurses library.
- panel_library = 'panel'
- 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 curses_library == 'curses' and platform != 'darwin':
- # OSX has an old Berkeley curses, not good enough for
-@@ -1165,6 +1168,7 @@
- if (module_enabled(exts, '_curses') and
- self.compiler.find_library_file(lib_dirs, panel_library)):
- exts.append( Extension('_curses_panel', ['_curses_panel.c'],
-+ library_dirs = ['/usr/lib'],
- libraries = [panel_library] + curses_libs) )
- else:
- missing.append('_curses_panel')
-@@ -1301,7 +1305,7 @@
- macros = dict()
- libraries = []
-
-- elif platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'):
-+ elif platform in ('freebsd6', 'freebsd7', 'freebsd8', 'freebsd9', 'freebsd10'):
- # FreeBSD's P1003.1b semaphore support is very experimental
- # and has many known problems. (as of June 2008)
- macros = dict()
-@@ -1344,8 +1348,12 @@
- # End multiprocessing
-
- # Platform-specific libraries
-- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
-- 'freebsd7', 'freebsd8'):
-+ #############################
-+ # Backport Commit: http://hg.python.org/cpython/rev/50f1922bc1d5
-+ # Backport Issue: http://bugs.python.org/issue12326
-+ #############################
-+ if any(platform.startswith(prefix)
-+ for prefix in ("linux", "freebsd", "gnukfreebsd")):
- exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
- else:
- missing.append('ossaudiodev')
-@@ -1831,8 +1839,7 @@
- # called unless there's at least one extension module defined.
- ext_modules=[Extension('_struct', ['_struct.c'])],
-
-- scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3",
-- "Tools/scripts/2to3"]
-+ scripts = []
- )
-
- # --install-platlib