summaryrefslogtreecommitdiff
path: root/package/python2
diff options
context:
space:
mode:
Diffstat (limited to 'package/python2')
-rw-r--r--package/python2/Makefile6
-rw-r--r--package/python2/patches/patch-Makefile_pre_in28
-rw-r--r--package/python2/patches/patch-Misc_python_pc11
-rw-r--r--package/python2/patches/patch-Modules_Setup_config11
-rw-r--r--package/python2/patches/patch-Modules_config_c18
-rw-r--r--package/python2/patches/patch-Modules_posixmodule_c16
-rw-r--r--package/python2/patches/patch-pyconfig_h521
-rw-r--r--package/python2/patches/patch-setup_py10
8 files changed, 599 insertions, 22 deletions
diff --git a/package/python2/Makefile b/package/python2/Makefile
index 9785db316..ac40ca66f 100644
--- a/package/python2/Makefile
+++ b/package/python2/Makefile
@@ -39,12 +39,12 @@ post-extract:
(cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
OPT="$(HOSTCFLAGS)" \
./configure --without-cxx-main --without-threads \
- --prefix=$(STAGING_TOOLS) \
+ --prefix=$(STAGING_HOST_DIR) \
);
$(MAKE) -C ${WRKBUILD} python Parser/pgen
$(MAKE) -C ${WRKBUILD} install
- ${CP} ${WRKBUILD}/Parser/pgen ${STAGING_TOOLS}/bin/pgen
- ${CP} ${WRKBUILD}/python ${STAGING_TOOLS}/bin/hostpython
+ ${CP} ${WRKBUILD}/Parser/pgen ${STAGING_HOST_DIR}/bin/pgen
+ ${CP} ${WRKBUILD}/python ${STAGING_HOST_DIR}/bin/hostpython
${CP} ${WRKBUILD}/Parser/pgen ${WRKBUILD}/Parser/hostpgen
${CP} ${WRKBUILD}/python ${WRKBUILD}/hostpython
$(MAKE) -C ${WRKBUILD} clean
diff --git a/package/python2/patches/patch-Makefile_pre_in b/package/python2/patches/patch-Makefile_pre_in
index 4cbd61e8c..5fec2d1a1 100644
--- a/package/python2/patches/patch-Makefile_pre_in
+++ b/package/python2/patches/patch-Makefile_pre_in
@@ -1,7 +1,7 @@
diff -Nur Python-2.7.1.orig/Makefile.pre.in Python-2.7.1/Makefile.pre.in
--- Python-2.7.1.orig/Makefile.pre.in 2010-10-14 13:37:30.000000000 +0200
-+++ Python-2.7.1/Makefile.pre.in 2010-12-14 16:02:44.000000000 +0100
-@@ -179,6 +179,7 @@
++++ Python-2.7.1/Makefile.pre.in 2010-12-27 21:06:29.000000000 +0100
+@@ -179,6 +179,7 @@ UNICODE_OBJS= @UNICODE_OBJS@
PYTHON= python$(EXE)
BUILDPYTHON= python$(BUILDEXE)
@@ -9,7 +9,7 @@ diff -Nur Python-2.7.1.orig/Makefile.pre.in Python-2.7.1/Makefile.pre.in
# The task to run while instrument when building the profile-opt target
PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
-@@ -211,6 +212,7 @@
+@@ -211,6 +212,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
##########################################################################
# Parser
PGEN= Parser/pgen$(EXE)
@@ -17,7 +17,7 @@ diff -Nur Python-2.7.1.orig/Makefile.pre.in Python-2.7.1/Makefile.pre.in
POBJS= \
Parser/acceler.o \
-@@ -380,7 +382,7 @@
+@@ -380,7 +382,7 @@ build_all_generate_profile:
$(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov"
run_profile_task:
@@ -26,7 +26,7 @@ diff -Nur Python-2.7.1.orig/Makefile.pre.in Python-2.7.1/Makefile.pre.in
build_all_use_profile:
$(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use"
-@@ -398,14 +400,14 @@
+@@ -398,14 +400,14 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
platform: $(BUILDPYTHON)
@@ -44,7 +44,7 @@ diff -Nur Python-2.7.1.orig/Makefile.pre.in Python-2.7.1/Makefile.pre.in
esac
# Build static library
-@@ -538,7 +540,7 @@
+@@ -538,7 +540,7 @@ Modules/python.o: $(srcdir)/Modules/pyth
$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
-@$(INSTALL) -d Include
@@ -53,7 +53,7 @@ diff -Nur Python-2.7.1.orig/Makefile.pre.in Python-2.7.1/Makefile.pre.in
$(PGEN): $(PGENOBJS)
$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
-@@ -702,7 +704,7 @@
+@@ -702,7 +704,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho
TESTOPTS= -l $(EXTRATESTOPTS)
TESTPROG= $(srcdir)/Lib/test/regrtest.py
@@ -62,7 +62,7 @@ diff -Nur Python-2.7.1.orig/Makefile.pre.in Python-2.7.1/Makefile.pre.in
test: all platform
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
-@@ -725,7 +727,7 @@
+@@ -725,7 +727,7 @@ testuniversal: all platform
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
-$(TESTPYTHON) $(TESTPROG) -uall $(TESTOPTS)
$(TESTPYTHON) $(TESTPROG) -uall $(TESTOPTS)
@@ -71,7 +71,7 @@ diff -Nur Python-2.7.1.orig/Makefile.pre.in Python-2.7.1/Makefile.pre.in
# Like testall, but with a single pass only
-@@ -920,26 +922,26 @@
+@@ -920,26 +922,26 @@ libinstall: build_all $(srcdir)/Lib/$(PL
done; \
done
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
@@ -105,7 +105,7 @@ diff -Nur Python-2.7.1.orig/Makefile.pre.in Python-2.7.1/Makefile.pre.in
# Create the PLATDIR source directory, if one wasn't distributed..
$(srcdir)/Lib/$(PLATDIR):
-@@ -1044,7 +1046,8 @@
+@@ -1044,7 +1046,8 @@ libainstall: all python-config
# Install the dynamically loadable modules
# This goes into $(exec_prefix)
sharedinstall: sharedmods
@@ -115,7 +115,7 @@ diff -Nur Python-2.7.1.orig/Makefile.pre.in Python-2.7.1/Makefile.pre.in
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
-@@ -1082,7 +1085,7 @@
+@@ -1082,7 +1085,7 @@ frameworkinstallstructure: $(LDLIBRARY)
fi; \
done
$(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers
@@ -124,7 +124,7 @@ diff -Nur Python-2.7.1.orig/Makefile.pre.in Python-2.7.1/Makefile.pre.in
$(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
$(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
$(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
-@@ -1117,7 +1120,7 @@
+@@ -1117,7 +1120,7 @@ frameworkinstallextras:
# This installs a few of the useful scripts in Tools/scripts
scriptsinstall:
SRCDIR=$(srcdir) $(RUNSHARED) \
@@ -133,7 +133,7 @@ diff -Nur Python-2.7.1.orig/Makefile.pre.in Python-2.7.1/Makefile.pre.in
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
--root=/$(DESTDIR)
-@@ -1139,7 +1142,7 @@
+@@ -1139,7 +1142,7 @@ config.status: $(srcdir)/configure
# Run reindent on the library
reindent:
@@ -142,7 +142,7 @@ diff -Nur Python-2.7.1.orig/Makefile.pre.in Python-2.7.1/Makefile.pre.in
# Rerun configure with the same options as it was run last time,
# provided the config.status script exists
-@@ -1242,7 +1245,7 @@
+@@ -1242,7 +1245,7 @@ funny:
# Perform some verification checks on any modified files.
patchcheck:
diff --git a/package/python2/patches/patch-Misc_python_pc b/package/python2/patches/patch-Misc_python_pc
new file mode 100644
index 000000000..174230d83
--- /dev/null
+++ b/package/python2/patches/patch-Misc_python_pc
@@ -0,0 +1,11 @@
+--- Python-2.7.1.orig/Misc/python.pc 2010-12-27 21:24:34.000000000 +0100
++++ Python-2.7.1/Misc/python.pc 2010-12-27 21:07:05.000000000 +0100
+@@ -7,7 +7,7 @@ Name: Python
+ Description: Python library
+ Requires:
+ Version: 2.7
+-Libs.private: -ldl -framework CoreFoundation
++Libs.private: -lpthread -ldl -lpthread
+ Libs: -L${libdir} -lpython2.7
+ Cflags: -I${includedir}/python2.7
+
diff --git a/package/python2/patches/patch-Modules_Setup_config b/package/python2/patches/patch-Modules_Setup_config
new file mode 100644
index 000000000..c0d4e9fb8
--- /dev/null
+++ b/package/python2/patches/patch-Modules_Setup_config
@@ -0,0 +1,11 @@
+--- Python-2.7.1.orig/Modules/Setup.config 2010-12-27 21:24:34.000000000 +0100
++++ Python-2.7.1/Modules/Setup.config 2010-12-27 21:07:05.000000000 +0100
+@@ -4,7 +4,7 @@
+ # based on configure-time options.
+
+ # Threading
+-#thread threadmodule.c
++thread threadmodule.c
+
+ # The signal module
+ signal signalmodule.c
diff --git a/package/python2/patches/patch-Modules_config_c b/package/python2/patches/patch-Modules_config_c
new file mode 100644
index 000000000..1ceca607f
--- /dev/null
+++ b/package/python2/patches/patch-Modules_config_c
@@ -0,0 +1,18 @@
+--- Python-2.7.1.orig/Modules/config.c 2010-12-27 21:24:35.000000000 +0100
++++ Python-2.7.1/Modules/config.c 2010-12-27 21:07:05.000000000 +0100
+@@ -23,6 +23,7 @@ extern "C" {
+ #endif
+
+
++extern void initthread(void);
+ extern void initsignal(void);
+ extern void initposix(void);
+ extern void initerrno(void);
+@@ -44,6 +45,7 @@ extern void _PyWarnings_Init(void);
+
+ struct _inittab _PyImport_Inittab[] = {
+
++ {"thread", initthread},
+ {"signal", initsignal},
+ {"posix", initposix},
+ {"errno", initerrno},
diff --git a/package/python2/patches/patch-Modules_posixmodule_c b/package/python2/patches/patch-Modules_posixmodule_c
new file mode 100644
index 000000000..c14f7e5cb
--- /dev/null
+++ b/package/python2/patches/patch-Modules_posixmodule_c
@@ -0,0 +1,16 @@
+--- Python-2.7.1.orig/Modules/posixmodule.c 2010-11-26 18:35:50.000000000 +0100
++++ Python-2.7.1/Modules/posixmodule.c 2010-12-27 21:23:45.000000000 +0100
+@@ -3775,13 +3775,6 @@ posix_openpty(PyObject *self, PyObject *
+ slave_fd = open(slave_name, O_RDWR | O_NOCTTY); /* open slave */
+ if (slave_fd < 0)
+ return posix_error();
+-#if !defined(__CYGWIN__) && !defined(HAVE_DEV_PTC)
+- ioctl(slave_fd, I_PUSH, "ptem"); /* push ptem */
+- ioctl(slave_fd, I_PUSH, "ldterm"); /* push ldterm */
+-#ifndef __hpux
+- ioctl(slave_fd, I_PUSH, "ttcompat"); /* push ttcompat */
+-#endif /* __hpux */
+-#endif /* HAVE_CYGWIN */
+ #endif /* HAVE_OPENPTY */
+
+ return Py_BuildValue("(ii)", master_fd, slave_fd);
diff --git a/package/python2/patches/patch-pyconfig_h b/package/python2/patches/patch-pyconfig_h
new file mode 100644
index 000000000..52e21767c
--- /dev/null
+++ b/package/python2/patches/patch-pyconfig_h
@@ -0,0 +1,521 @@
+--- Python-2.7.1.orig/pyconfig.h 2010-12-27 21:24:34.000000000 +0100
++++ Python-2.7.1/pyconfig.h 2010-12-27 21:07:05.000000000 +0100
+@@ -32,10 +32,10 @@
+
+ /* Define if C doubles are 64-bit IEEE 754 binary format, stored with the
+ least significant byte first */
+-#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
++/* #undef DOUBLE_IS_LITTLE_ENDIAN_IEEE754 */
+
+ /* Define if --enable-ipv6 is specified */
+-#define ENABLE_IPV6 1
++/* #undef ENABLE_IPV6 */
+
+ /* Define if flock needs to be linked with bsd library. */
+ /* #undef FLOCK_NEEDS_LIBBSD */
+@@ -63,7 +63,7 @@
+ #define HAVE_ASINH 1
+
+ /* Define to 1 if you have the <asm/types.h> header file. */
+-/* #undef HAVE_ASM_TYPES_H */
++#define HAVE_ASM_TYPES_H 1
+
+ /* Define to 1 if you have the `atanh' function. */
+ #define HAVE_ATANH 1
+@@ -75,7 +75,7 @@
+ /* #undef HAVE_BIND_TEXTDOMAIN_CODESET */
+
+ /* Define to 1 if you have the <bluetooth/bluetooth.h> header file. */
+-/* #undef HAVE_BLUETOOTH_BLUETOOTH_H */
++#define HAVE_BLUETOOTH_BLUETOOTH_H 1
+
+ /* Define to 1 if you have the <bluetooth.h> header file. */
+ /* #undef HAVE_BLUETOOTH_H */
+@@ -126,7 +126,7 @@
+ #define HAVE_CTERMID 1
+
+ /* Define if you have the 'ctermid_r' function. */
+-#define HAVE_CTERMID_R 1
++/* #undef HAVE_CTERMID_R */
+
+ /* Define to 1 if you have the <curses.h> header file. */
+ #define HAVE_CURSES_H 1
+@@ -185,7 +185,7 @@
+ #define HAVE_DYNAMIC_LOADING 1
+
+ /* Define if you have the 'epoll' functions. */
+-/* #undef HAVE_EPOLL */
++#define HAVE_EPOLL 1
+
+ /* Define to 1 if you have the `erf' function. */
+ #define HAVE_ERF 1
+@@ -215,10 +215,10 @@
+ #define HAVE_FCNTL_H 1
+
+ /* Define if you have the 'fdatasync' function. */
+-/* #undef HAVE_FDATASYNC */
++#define HAVE_FDATASYNC 1
+
+ /* Define to 1 if you have the `finite' function. */
+-#define HAVE_FINITE 1
++/* #undef HAVE_FINITE */
+
+ /* Define to 1 if you have the `flock' function. */
+ #define HAVE_FLOCK 1
+@@ -227,7 +227,7 @@
+ #define HAVE_FORK 1
+
+ /* Define to 1 if you have the `forkpty' function. */
+-#define HAVE_FORKPTY 1
++/* #undef HAVE_FORKPTY */
+
+ /* Define to 1 if you have the `fpathconf' function. */
+ #define HAVE_FPATHCONF 1
+@@ -267,7 +267,7 @@
+ #define HAVE_GCC_ASM_FOR_X87 1
+
+ /* Define if you have the getaddrinfo function. */
+-#define HAVE_GETADDRINFO 1
++/* #undef HAVE_GETADDRINFO */
+
+ /* Define to 1 if you have the `getcwd' function. */
+ #define HAVE_GETCWD 1
+@@ -279,10 +279,10 @@
+ #define HAVE_GETGROUPS 1
+
+ /* Define to 1 if you have the `gethostbyname' function. */
+-#define HAVE_GETHOSTBYNAME 1
++/* #undef HAVE_GETHOSTBYNAME */
+
+ /* Define this if you have some version of gethostbyname_r() */
+-/* #undef HAVE_GETHOSTBYNAME_R */
++#define HAVE_GETHOSTBYNAME_R 1
+
+ /* Define this if you have the 3-arg version of gethostbyname_r(). */
+ /* #undef HAVE_GETHOSTBYNAME_R_3_ARG */
+@@ -291,13 +291,13 @@
+ /* #undef HAVE_GETHOSTBYNAME_R_5_ARG */
+
+ /* Define this if you have the 6-arg version of gethostbyname_r(). */
+-/* #undef HAVE_GETHOSTBYNAME_R_6_ARG */
++#define HAVE_GETHOSTBYNAME_R_6_ARG 1
+
+ /* Define to 1 if you have the `getitimer' function. */
+ #define HAVE_GETITIMER 1
+
+ /* Define to 1 if you have the `getloadavg' function. */
+-#define HAVE_GETLOADAVG 1
++/* #undef HAVE_GETLOADAVG */
+
+ /* Define to 1 if you have the `getlogin' function. */
+ #define HAVE_GETLOGIN 1
+@@ -327,25 +327,25 @@
+ #define HAVE_GETPWENT 1
+
+ /* Define to 1 if you have the `getresgid' function. */
+-/* #undef HAVE_GETRESGID */
++#define HAVE_GETRESGID 1
+
+ /* Define to 1 if you have the `getresuid' function. */
+-/* #undef HAVE_GETRESUID */
++#define HAVE_GETRESUID 1
+
+ /* Define to 1 if you have the `getsid' function. */
+ #define HAVE_GETSID 1
+
+ /* Define to 1 if you have the `getspent' function. */
+-/* #undef HAVE_GETSPENT */
++#define HAVE_GETSPENT 1
+
+ /* Define to 1 if you have the `getspnam' function. */
+-/* #undef HAVE_GETSPNAM */
++#define HAVE_GETSPNAM 1
+
+ /* Define to 1 if you have the `gettimeofday' function. */
+ #define HAVE_GETTIMEOFDAY 1
+
+ /* Define to 1 if you have the `getwd' function. */
+-#define HAVE_GETWD 1
++/* #undef HAVE_GETWD */
+
+ /* Define to 1 if you have the <grp.h> header file. */
+ #define HAVE_GRP_H 1
+@@ -381,7 +381,7 @@
+ #define HAVE_KILLPG 1
+
+ /* Define if you have the 'kqueue' functions. */
+-#define HAVE_KQUEUE 1
++/* #undef HAVE_KQUEUE */
+
+ /* Define to 1 if you have the <langinfo.h> header file. */
+ #define HAVE_LANGINFO_H 1
+@@ -390,13 +390,13 @@
+ and long long is available and at least as big as an off_t. You may need to
+ add some flags for configuration and compilation to enable this mode. (For
+ Solaris and Linux, the necessary defines are already defined.) */
+-/* #undef HAVE_LARGEFILE_SUPPORT */
++#define HAVE_LARGEFILE_SUPPORT 1
+
+ /* Define to 1 if you have the `lchflags' function. */
+ /* #undef HAVE_LCHFLAGS */
+
+ /* Define to 1 if you have the `lchmod' function. */
+-#define HAVE_LCHMOD 1
++/* #undef HAVE_LCHMOD */
+
+ /* Define to 1 if you have the `lchown' function. */
+ #define HAVE_LCHOWN 1
+@@ -414,7 +414,7 @@
+ /* #undef HAVE_LIBIEEE */
+
+ /* Define to 1 if you have the <libintl.h> header file. */
+-/* #undef HAVE_LIBINTL_H */
++#define HAVE_LIBINTL_H 1
+
+ /* Define if you have the readline library (-lreadline). */
+ #define HAVE_LIBREADLINE 1
+@@ -429,10 +429,10 @@
+ #define HAVE_LINK 1
+
+ /* Define to 1 if you have the <linux/netlink.h> header file. */
+-/* #undef HAVE_LINUX_NETLINK_H */
++#define HAVE_LINUX_NETLINK_H 1
+
+ /* Define to 1 if you have the <linux/tipc.h> header file. */
+-/* #undef HAVE_LINUX_TIPC_H */
++#define HAVE_LINUX_TIPC_H 1
+
+ /* Define to 1 if you have the `log1p' function. */
+ #define HAVE_LOG1P 1
+@@ -465,7 +465,7 @@
+ #define HAVE_MKTIME 1
+
+ /* Define to 1 if you have the `mremap' function. */
+-/* #undef HAVE_MREMAP */
++#define HAVE_MREMAP 1
+
+ /* Define to 1 if you have the <ncurses.h> header file. */
+ #define HAVE_NCURSES_H 1
+@@ -474,16 +474,16 @@
+ /* #undef HAVE_NDIR_H */
+
+ /* Define to 1 if you have the <netpacket/packet.h> header file. */
+-/* #undef HAVE_NETPACKET_PACKET_H */
++#define HAVE_NETPACKET_PACKET_H 1
+
+ /* Define to 1 if you have the `nice' function. */
+ #define HAVE_NICE 1
+
+ /* Define to 1 if you have the `openpty' function. */
+-#define HAVE_OPENPTY 1
++/* #undef HAVE_OPENPTY */
+
+ /* Define if compiling using MacOS X 10.5 SDK or later. */
+-#define HAVE_OSX105_SDK 1
++/* #undef HAVE_OSX105_SDK */
+
+ /* Define to 1 if you have the `pathconf' function. */
+ #define HAVE_PATHCONF 1
+@@ -519,10 +519,10 @@
+ /* #undef HAVE_PTHREAD_INIT */
+
+ /* Define to 1 if you have the `pthread_sigmask' function. */
+-/* #undef HAVE_PTHREAD_SIGMASK */
++#define HAVE_PTHREAD_SIGMASK 1
+
+ /* Define to 1 if you have the <pty.h> header file. */
+-/* #undef HAVE_PTY_H */
++#define HAVE_PTY_H 1
+
+ /* Define to 1 if you have the `putenv' function. */
+ #define HAVE_PUTENV 1
+@@ -537,7 +537,7 @@
+ #define HAVE_RL_CALLBACK 1
+
+ /* Define if you can turn off readline's signal handling. */
+-/* #undef HAVE_RL_CATCH_SIGNAL */
++#define HAVE_RL_CATCH_SIGNAL 1
+
+ /* Define if you have readline 2.2 */
+ #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
+@@ -549,7 +549,7 @@
+ #define HAVE_RL_COMPLETION_MATCHES 1
+
+ /* Define if you have rl_completion_suppress_append */
+-/* #undef HAVE_RL_COMPLETION_SUPPRESS_APPEND */
++#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
+
+ /* Define if you have readline 4.0 */
+ #define HAVE_RL_PRE_INPUT_HOOK 1
+@@ -567,7 +567,7 @@
+ #define HAVE_SEM_OPEN 1
+
+ /* Define to 1 if you have the `sem_timedwait' function. */
+-/* #undef HAVE_SEM_TIMEDWAIT */
++#define HAVE_SEM_TIMEDWAIT 1
+
+ /* Define to 1 if you have the `sem_unlink' function. */
+ #define HAVE_SEM_UNLINK 1
+@@ -600,10 +600,10 @@
+ #define HAVE_SETREGID 1
+
+ /* Define to 1 if you have the `setresgid' function. */
+-/* #undef HAVE_SETRESGID */
++#define HAVE_SETRESGID 1
+
+ /* Define to 1 if you have the `setresuid' function. */
+-/* #undef HAVE_SETRESUID */
++#define HAVE_SETRESUID 1
+
+ /* Define to 1 if you have the `setreuid' function. */
+ #define HAVE_SETREUID 1
+@@ -618,7 +618,7 @@
+ #define HAVE_SETVBUF 1
+
+ /* Define to 1 if you have the <shadow.h> header file. */
+-/* #undef HAVE_SHADOW_H */
++#define HAVE_SHADOW_H 1
+
+ /* Define to 1 if you have the `sigaction' function. */
+ #define HAVE_SIGACTION 1
+@@ -630,13 +630,13 @@
+ #define HAVE_SIGNAL_H 1
+
+ /* Define to 1 if you have the `sigrelse' function. */
+-#define HAVE_SIGRELSE 1
++/* #undef HAVE_SIGRELSE */
+
+ /* Define to 1 if you have the `snprintf' function. */
+ #define HAVE_SNPRINTF 1
+
+ /* Define if sockaddr has sa_len member */
+-#define HAVE_SOCKADDR_SA_LEN 1
++/* #undef HAVE_SOCKADDR_SA_LEN */
+
+ /* struct sockaddr_storage (sys/socket.h) */
+ #define HAVE_SOCKADDR_STORAGE 1
+@@ -645,7 +645,7 @@
+ #define HAVE_SOCKETPAIR 1
+
+ /* Define to 1 if you have the <spawn.h> header file. */
+-#define HAVE_SPAWN_H 1
++/* #undef HAVE_SPAWN_H */
+
+ /* Define if your compiler provides ssize_t */
+ #define HAVE_SSIZE_T 1
+@@ -654,10 +654,10 @@
+ #define HAVE_STATVFS 1
+
+ /* Define if you have struct stat.st_mtim.tv_nsec */
+-/* #undef HAVE_STAT_TV_NSEC */
++#define HAVE_STAT_TV_NSEC 1
+
+ /* Define if you have struct stat.st_mtimensec */
+-#define HAVE_STAT_TV_NSEC2 1
++/* #undef HAVE_STAT_TV_NSEC2 */
+
+ /* Define if your compiler supports variable length function prototypes (e.g.
+ void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */
+@@ -694,10 +694,10 @@
+ #define HAVE_STRUCT_STAT_ST_BLOCKS 1
+
+ /* Define to 1 if `st_flags' is a member of `struct stat'. */
+-#define HAVE_STRUCT_STAT_ST_FLAGS 1
++/* #undef HAVE_STRUCT_STAT_ST_FLAGS */
+
+ /* Define to 1 if `st_gen' is a member of `struct stat'. */
+-#define HAVE_STRUCT_STAT_ST_GEN 1
++/* #undef HAVE_STRUCT_STAT_ST_GEN */
+
+ /* Define to 1 if `st_rdev' is a member of `struct stat'. */
+ #define HAVE_STRUCT_STAT_ST_RDEV 1
+@@ -729,10 +729,10 @@
+ /* #undef HAVE_SYS_DIR_H */
+
+ /* Define to 1 if you have the <sys/epoll.h> header file. */
+-/* #undef HAVE_SYS_EPOLL_H */
++#define HAVE_SYS_EPOLL_H 1
+
+ /* Define to 1 if you have the <sys/event.h> header file. */
+-#define HAVE_SYS_EVENT_H 1
++/* #undef HAVE_SYS_EVENT_H */
+
+ /* Define to 1 if you have the <sys/file.h> header file. */
+ #define HAVE_SYS_FILE_H 1
+@@ -741,7 +741,7 @@
+ /* #undef HAVE_SYS_LOADAVG_H */
+
+ /* Define to 1 if you have the <sys/lock.h> header file. */
+-#define HAVE_SYS_LOCK_H 1
++/* #undef HAVE_SYS_LOCK_H */
+
+ /* Define to 1 if you have the <sys/mkdev.h> header file. */
+ /* #undef HAVE_SYS_MKDEV_H */
+@@ -829,7 +829,7 @@
+ #define HAVE_TMPNAM 1
+
+ /* Define to 1 if you have the `tmpnam_r' function. */
+-/* #undef HAVE_TMPNAM_R */
++#define HAVE_TMPNAM_R 1
+
+ /* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
+ `HAVE_STRUCT_TM_TM_ZONE' instead. */
+@@ -863,7 +863,7 @@
+ /* #undef HAVE_USABLE_WCHAR_T */
+
+ /* Define to 1 if you have the <util.h> header file. */
+-#define HAVE_UTIL_H 1
++/* #undef HAVE_UTIL_H */
+
+ /* Define to 1 if you have the `utimes' function. */
+ #define HAVE_UTIMES 1
+@@ -888,7 +888,7 @@
+
+ /* Define if tzset() actually switches the local timezone in a meaningful way.
+ */
+-#define HAVE_WORKING_TZSET 1
++/* #undef HAVE_WORKING_TZSET */
+
+ /* Define if the zlib library has inflateCopy */
+ #define HAVE_ZLIB_COPY 1
+@@ -953,7 +953,7 @@
+ /* #undef Py_DEBUG */
+
+ /* Defined if Python is built as a shared library. */
+-/* #undef Py_ENABLE_SHARED */
++#define Py_ENABLE_SHARED 1
+
+ /* Define as the size of the unicode type. */
+ #define Py_UNICODE_SIZE 2
+@@ -980,16 +980,16 @@
+ #define SIZEOF_FLOAT 4
+
+ /* The size of `fpos_t', as computed by sizeof. */
+-#define SIZEOF_FPOS_T 8
++#define SIZEOF_FPOS_T 20
+
+ /* The size of `int', as computed by sizeof. */
+ #define SIZEOF_INT 4
+
+ /* The size of `long', as computed by sizeof. */
+-#define SIZEOF_LONG 8
++#define SIZEOF_LONG 4
+
+ /* The size of `long double', as computed by sizeof. */
+-#define SIZEOF_LONG_DOUBLE 16
++#define SIZEOF_LONG_DOUBLE 12
+
+ /* The size of `long long', as computed by sizeof. */
+ #define SIZEOF_LONG_LONG 8
+@@ -1001,22 +1001,22 @@
+ #define SIZEOF_PID_T 4
+
+ /* The size of `pthread_t', as computed by sizeof. */
+-#define SIZEOF_PTHREAD_T 8
++#define SIZEOF_PTHREAD_T 4
+
+ /* The size of `short', as computed by sizeof. */
+ #define SIZEOF_SHORT 2
+
+ /* The size of `size_t', as computed by sizeof. */
+-#define SIZEOF_SIZE_T 8
++#define SIZEOF_SIZE_T 4
+
+ /* The size of `time_t', as computed by sizeof. */
+-#define SIZEOF_TIME_T 8
++#define SIZEOF_TIME_T 4
+
+ /* The size of `uintptr_t', as computed by sizeof. */
+-#define SIZEOF_UINTPTR_T 8
++#define SIZEOF_UINTPTR_T 4
+
+ /* The size of `void *', as computed by sizeof. */
+-#define SIZEOF_VOID_P 8
++#define SIZEOF_VOID_P 4
+
+ /* The size of `wchar_t', as computed by sizeof. */
+ #define SIZEOF_WCHAR_T 4
+@@ -1032,7 +1032,7 @@
+ #define SYS_SELECT_WITH_SYS_TIME 1
+
+ /* Define if tanh(-0.) is -0., or if platform doesn't have signed zeros */
+-#define TANH_PRESERVES_ZERO_SIGN 1
++/* #undef TANH_PRESERVES_ZERO_SIGN */
+
+ /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+ #define TIME_WITH_SYS_TIME 1
+@@ -1063,10 +1063,10 @@
+
+
+ /* Define if you want to use MacPython modules on MacOSX in unix-Python. */
+-#define USE_TOOLBOX_OBJECT_GLUE 1
++/* #undef USE_TOOLBOX_OBJECT_GLUE */
+
+ /* Define if a va_list is an array of some kind */
+-#define VA_LIST_IS_ARRAY 1
++/* #undef VA_LIST_IS_ARRAY */
+
+ /* Define if you want SIGFPE handled (see Include/pyfpe.h). */
+ /* #undef WANT_SIGFPE_HANDLER */
+@@ -1076,7 +1076,7 @@
+ /* #undef WANT_WCTYPE_FUNCTIONS */
+
+ /* Define if WINDOW in curses.h offers a field _flags. */
+-/* #undef WINDOW_HAS_FLAGS */
++#define WINDOW_HAS_FLAGS 1
+
+ /* Define if you want documentation strings in extension modules */
+ #define WITH_DOC_STRINGS 1
+@@ -1084,10 +1084,10 @@
+ /* Define if you want to use the new-style (Openstep, Rhapsody, MacOS) dynamic
+ linker (dyld) instead of the old-style (NextStep) dynamic linker (rld).
+ Dyld is necessary to support frameworks. */
+-#define WITH_DYLD 1
++/* #undef WITH_DYLD */
+
+ /* Define to 1 if libintl is needed for locale functions. */
+-/* #undef WITH_LIBINTL */
++#define WITH_LIBINTL 1
+
+ /* Define if you want to produce an OpenStep/Rhapsody framework (shared
+ library plus accessory files). */
+@@ -1097,7 +1097,7 @@
+ #define WITH_PYMALLOC 1
+
+ /* Define if you want to compile in rudimentary thread support */
+-/* #undef WITH_THREAD */
++#define WITH_THREAD 1
+
+ /* Define to profile with the Pentium timestamp counter */
+ /* #undef WITH_TSC */
+@@ -1152,7 +1152,7 @@
+ /* #undef _POSIX_1_SOURCE */
+
+ /* Define to activate features from IEEE Stds 1003.1-2001 */
+-/* #undef _POSIX_C_SOURCE */
++#define _POSIX_C_SOURCE 200112L
+
+ /* Define to 1 if you need to in order for `stat' and other things to work. */
+ /* #undef _POSIX_SOURCE */
+@@ -1161,7 +1161,7 @@
+ /* #undef _POSIX_THREADS */
+
+ /* Define to force use of thread-safe errno, h_errno, and other functions */
+-/* #undef _REENTRANT */
++#define _REENTRANT 1
+
+ /* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+@@ -1174,10 +1174,10 @@
+ /* #undef _UINT64_T */
+
+ /* Define to the level of X/Open that your system supports */
+-/* #undef _XOPEN_SOURCE */
++#define _XOPEN_SOURCE 600
+
+ /* Define to activate Unix95-and-earlier features */
+-/* #undef _XOPEN_SOURCE_EXTENDED */
++#define _XOPEN_SOURCE_EXTENDED 1
+
+ /* Define on FreeBSD to activate all library features */
+ #define __BSD_VISIBLE 1
diff --git a/package/python2/patches/patch-setup_py b/package/python2/patches/patch-setup_py
index 9b86cf560..a92a85b37 100644
--- a/package/python2/patches/patch-setup_py
+++ b/package/python2/patches/patch-setup_py
@@ -1,7 +1,7 @@
diff -Nur Python-2.7.orig/setup.py Python-2.7/setup.py
---- Python-2.7.orig/setup.py 2010-06-27 14:36:16.000000000 +0200
-+++ Python-2.7/setup.py 2010-12-11 02:28:23.000000000 +0100
-@@ -21,7 +21,7 @@
+--- Python-2.7.1.orig/setup.py 2010-10-31 17:40:21.000000000 +0100
++++ Python-2.7.1/setup.py 2010-12-27 21:06:29.000000000 +0100
+@@ -21,7 +21,7 @@ from distutils.spawn import find_executa
COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount')
# This global variable is used to hold the list of modules to be disabled.
@@ -10,7 +10,7 @@ diff -Nur Python-2.7.orig/setup.py Python-2.7/setup.py
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
-@@ -307,48 +307,14 @@
+@@ -307,48 +307,14 @@ class PyBuildExt(build_ext):
ext_filename = os.path.join(
self.build_lib,
self.get_ext_filename(self.get_ext_fullname(ext.name)))
@@ -62,7 +62,7 @@ diff -Nur Python-2.7.orig/setup.py Python-2.7/setup.py
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.
-@@ -398,11 +364,8 @@
+@@ -403,11 +369,8 @@ class PyBuildExt(build_ext):
# lib_dirs and inc_dirs are used to search for files;
# if a file is found in one of those directories, it can
# be assumed that no additional -I,-L directives are needed.