aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/depends/native/Makefile8
-rw-r--r--tools/depends/target/Makefile6
-rw-r--r--tools/depends/target/config.site.in4
-rw-r--r--tools/depends/target/python27/Makefile83
-rw-r--r--tools/depends/target/python27/Python-2.6.5-urllib.diff28
-rw-r--r--tools/depends/target/python27/Python-2.7.10-android.patch59
-rw-r--r--tools/depends/target/python27/Python-2.7.10-crosscompile.patch147
-rw-r--r--tools/depends/target/python27/Python-no-export-path.patch11
-rw-r--r--tools/depends/target/python27/Python-setup.patch76
-rw-r--r--tools/depends/target/python27/fix-datetime.patch18
-rw-r--r--tools/depends/target/python27/fix-ffi.patch51
-rw-r--r--tools/depends/target/python27/modules.setup520
-rw-r--r--tools/depends/target/python27/urllib-ssl-no-cert_check.patch14
13 files changed, 1017 insertions, 8 deletions
diff --git a/tools/depends/native/Makefile b/tools/depends/native/Makefile
index 833a91381f..4125181f7c 100644
--- a/tools/depends/native/Makefile
+++ b/tools/depends/native/Makefile
@@ -6,7 +6,7 @@ endif
NATIVE= m4-native gettext-native autoconf-native automake-native \
libtool-native pkg-config-native yasm-native cmake-native \
- gas-preprocessor-native python26-native zlib-native \
+ gas-preprocessor-native python27-native zlib-native \
pcre-native swig-native rpl-native libsquish-native \
tiff-native libpng-native libjpeg-turbo-native liblzo2-native giflib-native \
distribute-native distutilscross-native JsonSchemaBuilder TexturePacker \
@@ -33,10 +33,10 @@ libtool-native: automake-native
libpng-native: zlib-native
tiff-native: libjpeg-turbo-native
swig-native: pcre-native
-distribute-native: python26-native
-distutilscross-native: python26-native distribute-native
+distribute-native: python27-native
+distutilscross-native: python27-native distribute-native
tar-native: xz-native
-python26-native: zlib-native
+python27-native: zlib-native
#liblzo2 has stale packaged automake files that cause borked host/build detection
liblzo2-native: automake-native
diff --git a/tools/depends/target/Makefile b/tools/depends/target/Makefile
index ed17ca5834..30ae282595 100644
--- a/tools/depends/target/Makefile
+++ b/tools/depends/target/Makefile
@@ -12,7 +12,7 @@ DEPENDS = \
libogg libvorbis libflac fribidi libmpeg2 \
libass libsquish \
libmodplug librtmp libxml2 yajl libmicrohttpd mysql libffi \
- python26 libshairplay \
+ python27 libshairplay \
libplist libcec libbluray boost tinyxml dummy-libxbmc \
libamplayer libssh taglib libusb libnfs \
pythonmodule-pil libxslt ffmpeg platform crossguid libdcadec giflib
@@ -83,7 +83,7 @@ libflac: libogg gettext
libass: fontconfig libpng freetype2 expat $(ICONV)
librtmp: openssl
libmicrohttpd: gnutls libgcrypt libgpg-error
-python26: expat gettext libxml2 sqlite3 openssl libffi
+python27: expat gettext libxml2 sqlite3 openssl libffi
libcdio: $(ICONV)
libplist: libxml2 $(ZLIB)
libbluray: $(ICONV) libxml2
@@ -94,7 +94,7 @@ libpng: $(ZLIB)
openssl: $(ZLIB)
gnutls: nettle $(ZLIB)
nettle: gmp
-pythonmodule-pil: $(ZLIB) libjpeg-turbo libpng freetype2 python26
+pythonmodule-pil: $(ZLIB) libjpeg-turbo libpng freetype2 python27
libsdl2: $(LINUX_SYSTEM_LIBS)
libxslt: libgcrypt
ffmpeg: $(ICONV) $(ZLIB) bzip2 libvorbis $(FFMPEG_DEPENDS)
diff --git a/tools/depends/target/config.site.in b/tools/depends/target/config.site.in
index 36b3eab66f..fd6e9e4eb8 100644
--- a/tools/depends/target/config.site.in
+++ b/tools/depends/target/config.site.in
@@ -35,7 +35,7 @@ LIBGCRYPT_CONFIG=@prefix@/@deps_dir@/bin/libgcrypt-config
PATH=@prefix@/@tool_dir@/bin:@use_toolchain@/usr/bin:@use_toolchain@/bin:$PATH
LD_LIBRARY_PATH=@prefix@/@tool_dir@/lib:$LD_LIBRARY_PATH
-PYTHON_VERSION=2.6
+PYTHON_VERSION=2.7
PYTHON_LDFLAGS="-L@prefix@/@deps_dir@/lib -lpython${PYTHON_VERSION} -lc -ldl -lm -lexpat -lffi -lintl -lutil -lssl -lcrypto"
PYTHON_CPPFLAGS=-I@prefix@/@deps_dir@/include/python${PYTHON_VERSION}
PYTHON_SITE_PKG=@prefix@/@deps_dir@/lib/python${PYTHON_VERSION}/site-packages
@@ -65,6 +65,8 @@ fi
#python
ac_cv_func_gethostbyname_r=no
ac_cv_header_sys_un_h=yes
+ac_cv_file__dev_ptmx=no
+ac_cv_file__dev_ptc=no
#gnutls
gl_cv_func_gettimeofday_clobber=no
diff --git a/tools/depends/target/python27/Makefile b/tools/depends/target/python27/Makefile
new file mode 100644
index 0000000000..db97a78021
--- /dev/null
+++ b/tools/depends/target/python27/Makefile
@@ -0,0 +1,83 @@
+include ../../Makefile.include
+DEPS= ../../Makefile.include Makefile Python-2.7.10-crosscompile.patch Python-2.7.10-android.patch Python-no-export-path.patch \
+ Python-setup.patch fix-datetime.patch Python-2.6.5-urllib.diff modules.setup
+
+# lib name, version
+LIBNAME=Python
+VERSION=2.7.10
+SOURCE=$(LIBNAME)-$(VERSION)
+ARCHIVE=$(SOURCE).tar.xz
+
+ifeq ($(OS),osx)
+ HOSTPLATFORM=_PYTHON_HOST_PLATFORM="darwin"
+endif
+ifeq ($(OS),ios)
+ HOSTPLATFORM=_PYTHON_HOST_PLATFORM="darwin"
+ LINK_ICONV=-framework CoreFoundation -liconv
+endif
+
+# configuration settings
+CONFIGURE=OPT="$(CFLAGS)" \
+ LIBS=-lm \
+ ./configure --prefix=$(PREFIX) --host=$(HOST) \
+ --disable-toolbox-glue --disable-framework --with-system-ffi --without-pymalloc --enable-ipv6
+
+LIBDYLIB=$(PLATFORM)/libpython2.7.a
+
+all: .installed-$(PLATFORM)
+
+$(TARBALLS_LOCATION)/$(ARCHIVE):
+ cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE)
+
+$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
+ echo $(NATIVEPREFIX)
+ rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
+ cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
+ cd $(PLATFORM); patch -p0 < ../Python-2.7.10-crosscompile.patch
+ cd $(PLATFORM); patch -p0 < ../Python-setup.patch
+ cd $(PLATFORM); patch -p0 < ../fix-datetime.patch
+ cd $(PLATFORM); patch -p0 < ../Python-2.7.10-android.patch
+ cd $(PLATFORM); patch -p0 < ../Python-no-export-path.patch
+ cd $(PLATFORM); patch -p0 < ../fix-ffi.patch
+ cd $(PLATFORM); patch -p1 < ../urllib-ssl-no-cert_check.patch
+ifeq ($(OS),ios)
+ cd $(PLATFORM); patch -p0 < ../Python-2.6.5-urllib.diff
+ cd $(PLATFORM); sed -ie 's|MACHDEP="unknown"|MACHDEP="darwin"|' configure.ac
+endif
+ cp modules.setup $(PLATFORM)/Modules/Setup.dist
+
+#Add -liconv as needed, and add the _scproxy module for darwin
+# disable locale altogether for Android
+ifeq ($(OS),android)
+ cd $(PLATFORM); sed -ie 's|_locale _localemodule.c -lintl|#_locale _localemodule.c -lintl|' Modules/Setup.dist
+else
+ cd $(PLATFORM); sed -ie 's|_locale _localemodule.c -lintl|_locale _localemodule.c -lintl $(LINK_ICONV) |' Modules/Setup.dist
+endif
+ifeq ($(OS),osx)
+ cd $(PLATFORM); sed -ie 's|MACHDEP="unknown"|MACHDEP="darwin"|' configure.ac
+ echo "_scproxy \$$(srcdir)/Mac/Modules/_scproxy.c -framework SystemConfiguration -framework CoreFoundation" >> $(PLATFORM)/Modules/Setup.dist
+endif
+
+ifeq ($(OS),android)
+ cd $(PLATFORM); sed -ie 's|-framework CoreFoundation||' configure.ac
+endif
+
+ cd $(PLATFORM); $(AUTORECONF)
+ cd $(PLATFORM); $(CONFIGURE)
+
+$(LIBDYLIB): $(PLATFORM)
+ $(MAKE) -C $(PLATFORM) $(HOSTPLATFORM) PYTHON_FOR_BUILD=$(NATIVEPREFIX)/bin/python NATIVE_PGEN=$(NATIVEPREFIX)/bin/pgen CROSS_COMPILE_TARGET=yes libpython2.7.a
+ touch $@
+
+.installed-$(PLATFORM): $(LIBDYLIB)
+ $(MAKE) -C $(PLATFORM) $(HOSTPLATFORM) PYTHON_FOR_BUILD=$(NATIVEPREFIX)/bin/python NATIVE_PGEN=$(NATIVEPREFIX)/bin/pgen CROSS_COMPILE_TARGET=yes install
+ find $(PREFIX)/lib/python2.7 -type f -name "*.py" -delete
+ find $(PREFIX)/lib/python2.7 -type f -name "*.pyc" -delete
+ touch $(LIBDYLIB)
+ touch $@
+
+clean:
+ rm -rf $(PLATFORM) .installed-$(PLATFORM)
+
+distclean::
+ rm -rf $(PLATFORM) .installed-$(PLATFORM)
diff --git a/tools/depends/target/python27/Python-2.6.5-urllib.diff b/tools/depends/target/python27/Python-2.6.5-urllib.diff
new file mode 100644
index 0000000000..5b2264df50
--- /dev/null
+++ b/tools/depends/target/python27/Python-2.6.5-urllib.diff
@@ -0,0 +1,28 @@
+--- Lib/urllib.py 2010-02-20 17:13:01.000000000 -0500
++++ Lib/urllib.py 2013-03-14 18:12:02.526251189 -0400
+@@ -1330,7 +1330,6 @@
+
+
+ if sys.platform == 'darwin':
+- from _scproxy import _get_proxy_settings, _get_proxies
+
+ def proxy_bypass_macosx_sysconf(host):
+ """
+@@ -1352,7 +1351,7 @@
+ parts = (parts + [0, 0, 0, 0])[:4]
+ return (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8) | parts[3]
+
+- proxy_settings = _get_proxy_settings()
++ return False
+
+ # Check for simple host names:
+ if '.' not in host:
+@@ -1393,7 +1392,7 @@
+ This function uses the MacOSX framework SystemConfiguration
+ to fetch the proxy information.
+ """
+- return _get_proxies()
++ return {}
+
+
+
diff --git a/tools/depends/target/python27/Python-2.7.10-android.patch b/tools/depends/target/python27/Python-2.7.10-android.patch
new file mode 100644
index 0000000000..a1b36a6284
--- /dev/null
+++ b/tools/depends/target/python27/Python-2.7.10-android.patch
@@ -0,0 +1,59 @@
+--- Modules/pwdmodule.c.orig 2015-10-09 10:16:03.679939815 +0200
++++ Modules/pwdmodule.c 2015-10-09 10:18:48.567945964 +0200
+@@ -68,14 +68,14 @@
+ #define SETS(i,val) sets(v, i, val)
+
+ SETS(setIndex++, p->pw_name);
+-#ifdef __VMS
++#if defined __VMS || defined(ANDROID)
+ SETS(setIndex++, "");
+ #else
+ SETS(setIndex++, p->pw_passwd);
+ #endif
+ PyStructSequence_SET_ITEM(v, setIndex++, _PyInt_FromUid(p->pw_uid));
+ PyStructSequence_SET_ITEM(v, setIndex++, _PyInt_FromGid(p->pw_gid));
+-#ifdef __VMS
++#if defined __VMS || defined(ANDROID)
+ SETS(setIndex++, "");
+ #else
+ SETS(setIndex++, p->pw_gecos);
+--- Modules/termios.c.orig 2015-10-09 10:56:52.448031136 +0200
++++ Modules/termios.c 2015-10-09 10:59:43.668037521 +0200
+@@ -227,6 +227,7 @@
+ return Py_None;
+ }
+
++#if !defined(ANDROID)
+ PyDoc_STRVAR(termios_tcdrain__doc__,
+ "tcdrain(fd) -> None\n\
+ \n\
+@@ -246,6 +247,7 @@
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
++#endif
+
+ PyDoc_STRVAR(termios_tcflush__doc__,
+ "tcflush(fd, queue) -> None\n\
+@@ -301,8 +303,10 @@
+ METH_VARARGS, termios_tcsetattr__doc__},
+ {"tcsendbreak", termios_tcsendbreak,
+ METH_VARARGS, termios_tcsendbreak__doc__},
++#if !defined(ANDROID)
+ {"tcdrain", termios_tcdrain,
+ METH_VARARGS, termios_tcdrain__doc__},
++#endif
+ {"tcflush", termios_tcflush,
+ METH_VARARGS, termios_tcflush__doc__},
+ {"tcflow", termios_tcflow,
+--- Modules/posixmodule.c.orig 2015-10-09 13:19:47.524350922 +0200
++++ Modules/posixmodule.c 2015-10-09 13:20:55.436353454 +0200
+@@ -3981,7 +3981,7 @@
+ 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)
++#if !defined(__CYGWIN__) && !defined(HAVE_DEV_PTC) && !defined(ANDROID)
+ ioctl(slave_fd, I_PUSH, "ptem"); /* push ptem */
+ ioctl(slave_fd, I_PUSH, "ldterm"); /* push ldterm */
+ #ifndef __hpux
diff --git a/tools/depends/target/python27/Python-2.7.10-crosscompile.patch b/tools/depends/target/python27/Python-2.7.10-crosscompile.patch
new file mode 100644
index 0000000000..7de1ead296
--- /dev/null
+++ b/tools/depends/target/python27/Python-2.7.10-crosscompile.patch
@@ -0,0 +1,147 @@
+--- Makefile.pre.in.orig 2015-05-23 18:09:16.000000000 +0200
++++ Makefile.pre.in 2015-10-10 12:29:21.988926069 +0200
+@@ -234,6 +234,7 @@
+ ##########################################################################
+ # Parser
+ PGEN= Parser/pgen$(EXE)
++PGEN_FOR_BUILD=$(NATIVE_PGEN)
+
+ PSRCS= \
+ Parser/acceler.c \
+@@ -472,9 +473,9 @@
+ *\ -s*|s*) quiet="-q";; \
+ *) quiet="";; \
+ esac; \
+- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
++ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
+ _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
+- $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
++ PYTHONXCPREFIX='$(DESTDIR)$(prefix)' $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
+
+ # Build static library
+ # avoid long command lines, same as LIBRARY_OBJS
+@@ -611,7 +612,7 @@
+ $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
+ @$(MKDIR_P) Include
+ $(MAKE) $(PGEN)
+- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
++ $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+ $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
+ $(MAKE) $(GRAMMAR_H)
+ touch $(GRAMMAR_C)
+@@ -1042,12 +1043,12 @@
+ $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
+ $(DESTDIR)$(LIBDEST)/distutils/tests ; \
+ fi
+- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
++ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ $(DESTDIR)$(LIBDEST)
+- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
++ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+@@ -1175,11 +1176,13 @@
+ # Install the dynamically loadable modules
+ # This goes into $(exec_prefix)
+ sharedinstall: sharedmods
++ CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
+ $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
++ --skip-build \
+ --prefix=$(prefix) \
+- --install-scripts=$(BINDIR) \
+- --install-platlib=$(DESTSHARED) \
+- --root=$(DESTDIR)/
++ --install-scripts=$(DESTDIR)$(BINDIR) \
++ --install-platlib=$(DESTDIR)$(DESTSHARED) \
++ --root=/
+ -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata.py*
+
+ # Here are a couple of targets for MacOSX again, to install a full
+--- setup.py.orig 2015-05-23 18:09:25.000000000 +0200
++++ setup.py 2015-10-10 12:29:22.000925764 +0200
+@@ -17,7 +17,7 @@
+ from distutils.command.install_lib import install_lib
+ from distutils.spawn import find_executable
+
+-cross_compiling = "_PYTHON_HOST_PLATFORM" in os.environ
++cross_compiling = ("_PYTHON_HOST_PLATFORM" in os.environ) or ('CROSS_COMPILE_TARGET' in os.environ)
+
+ def get_platform():
+ # cross build
+@@ -162,6 +162,7 @@
+
+ def build_extensions(self):
+
++ return
+ # Detect which modules should be compiled
+ missing = self.detect_modules()
+
+@@ -326,6 +327,9 @@
+
+ # Don't try to load extensions for cross builds
+ if cross_compiling:
++ self.announce(
++ 'WARNING: skipping import check for cross-compiled: "%s"' %
++ ext.name)
+ return
+
+ try:
+@@ -480,7 +484,7 @@
+ for directory in reversed(options.dirs):
+ add_dir_to_list(dir_list, directory)
+
+- if os.path.normpath(sys.prefix) != '/usr' \
++ if os.path.normpath(sys.prefix) != '/usr' and not cross_compiling \
+ and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
+ # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
+ # (PYTHONFRAMEWORK is set) to avoid # linking problems when
+@@ -556,6 +560,11 @@
+ if host_platform in ['darwin', 'beos']:
+ math_libs = []
+
++ # Insert libraries and headers from embedded root file system (RFS)
++ #if 'CROSS_COMPILE_TARGET' in os.environ:
++ # lib_dirs += [os.environ['RFS'] + '/usr/lib']
++ # inc_dirs += [os.environ['RFS'] + '/usr/include']
++
+ # XXX Omitted modules: gl, pure, dl, SGI-specific modules
+
+ #
+@@ -2028,8 +2037,13 @@
+
+ # Pass empty CFLAGS because we'll just append the resulting
+ # CFLAGS to Python's; -g or -O2 is to be avoided.
+- cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \
+- % (ffi_builddir, ffi_srcdir, " ".join(config_args))
++ if cross_compiling:
++ cmd = "cd %s && env CFLAGS='' '%s/configure' --host=%s --build=%s %s" \
++ % (ffi_builddir, ffi_srcdir, os.environ.get('HOSTARCH'),
++ os.environ.get('BUILDARCH'), " ".join(config_args))
++ else:
++ cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \
++ % (ffi_builddir, ffi_srcdir, " ".join(config_args))
+
+ res = os.system(cmd)
+ if res or not os.path.exists(ffi_configfile):
+--- configure.ac.orig 2015-10-10 13:10:34.139980182 +0200
++++ configure.ac 2015-10-10 13:11:00.715341145 +0200
+@@ -325,7 +325,6 @@
+ *)
+ # for now, limit cross builds to known configurations
+ MACHDEP="unknown"
+- AC_MSG_ERROR([cross build not supported for $host])
+ esac
+ ac_sys_release=
+ else
+@@ -371,7 +370,6 @@
+ *)
+ # for now, limit cross builds to known configurations
+ MACHDEP="unknown"
+- AC_MSG_ERROR([cross build not supported for $host])
+ esac
+ _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
+ fi
diff --git a/tools/depends/target/python27/Python-no-export-path.patch b/tools/depends/target/python27/Python-no-export-path.patch
new file mode 100644
index 0000000000..5b001b1ed3
--- /dev/null
+++ b/tools/depends/target/python27/Python-no-export-path.patch
@@ -0,0 +1,11 @@
+--- Makefile.pre.in.orig 2015-10-09 19:10:15.042905069 +0200
++++ Makefile.pre.in 2015-10-09 19:11:01.513642241 +0200
+@@ -1070,8 +1070,6 @@
+ $(srcdir)/Lib/$(PLATDIR):
+ mkdir $(srcdir)/Lib/$(PLATDIR)
+ cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
+- export PATH; PATH="`pwd`:$$PATH"; \
+- export PYTHONPATH; PYTHONPATH="$(srcdir)/Lib:$(abs_builddir)/`cat pybuilddir.txt`"; \
+ export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
+ export EXE; EXE="$(BUILDEXE)"; \
+ if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
diff --git a/tools/depends/target/python27/Python-setup.patch b/tools/depends/target/python27/Python-setup.patch
new file mode 100644
index 0000000000..e32dd508ee
--- /dev/null
+++ b/tools/depends/target/python27/Python-setup.patch
@@ -0,0 +1,76 @@
+--- setup.py.orig 2015-10-07 16:32:16.219083585 +0200
++++ setup.py 2015-10-07 16:41:48.563085871 +0200
+@@ -320,6 +320,9 @@
+ self.announce('WARNING: skipping import check for Cygwin-based "%s"'
+ % ext.name)
+ return
++ #if os.environ.get('CROSS_COMPILE_TARGET') == 'yes':
++ # return
++
+ ext_filename = os.path.join(
+ self.build_lib,
+ self.get_ext_filename(self.get_ext_fullname(ext.name)))
+@@ -331,27 +334,30 @@
+ try:
+ imp.load_dynamic(ext.name, ext_filename)
+ except ImportError, why:
+- self.failed.append(ext.name)
+- self.announce('*** WARNING: renaming "%s" since importing it'
+- ' failed: %s' % (ext.name, why), level=3)
+- assert not self.inplace
+- basename, tail = os.path.splitext(ext_filename)
+- newname = basename + "_failed" + tail
+- if os.path.exists(newname):
+- os.remove(newname)
+- os.rename(ext_filename, newname)
+-
+- # XXX -- This relies on a Vile HACK in
+- # distutils.command.build_ext.build_extension(). The
+- # _built_objects attribute is stored there strictly for
+- # use here.
+- # If there is a failure, _built_objects may not be there,
+- # so catch the AttributeError and move on.
+- try:
+- for filename in self._built_objects:
+- os.remove(filename)
+- except AttributeError:
+- self.announce('unable to remove files (ignored)')
++ if os.environ.get('CROSS_COMPILE_TARGET') != "yes":
++ self.failed.append(ext.name)
++ self.announce('*** WARNING: renaming "%s" since importing it'
++ ' failed: %s' % (ext.name, why), level=3)
++ assert not self.inplace
++ basename, tail = os.path.splitext(ext_filename)
++ newname = basename + "_failed" + tail
++ if os.path.exists(newname):
++ os.remove(newname)
++ os.rename(ext_filename, newname)
++
++ # XXX -- This relies on a Vile HACK in
++ # distutils.command.build_ext.build_extension(). The
++ # _built_objects attribute is stored there strictly for
++ # use here.
++ # If there is a failure, _built_objects may not be there,
++ # so catch the AttributeError and move on.
++ try:
++ for filename in self._built_objects:
++ os.remove(filename)
++ except AttributeError:
++ self.announce('unable to remove files (ignored)')
++ else:
++ self.announce('WARNING: "%s" failed importing, ignored because we are cross-compiling' % ext.name)
+ except:
+ exc_type, why, tb = sys.exc_info()
+ self.announce('*** WARNING: importing extension "%s" '
+
+--- Modules/makesetup.orig 2015-10-08 09:53:38.787333151 +0200
++++ Modules/makesetup 2015-10-08 11:28:50.939355966 +0200
+@@ -212,6 +212,7 @@
+ objs="$objs $obj"
+ case $src in
+ glmodule.c) ;;
++ # _*io.c) src='$(srcdir)/'"$srcdir/_io/$(echo $src| tr -d "_")";;
+ /*) ;;
+ \$*) ;;
+ *) src='$(srcdir)/'"$srcdir/$src";;
+
diff --git a/tools/depends/target/python27/fix-datetime.patch b/tools/depends/target/python27/fix-datetime.patch
new file mode 100644
index 0000000000..831c69d964
--- /dev/null
+++ b/tools/depends/target/python27/fix-datetime.patch
@@ -0,0 +1,18 @@
+--- Modules/_testcapimodule.c.orig 2015-10-07 16:50:38.751087989 +0200
++++ Modules/_testcapimodule.c 2015-10-07 16:50:59.119088070 +0200
+@@ -8,8 +8,14 @@
+ #include "Python.h"
+ #include <float.h>
+ #include "structmember.h"
+-#include "datetime.h"
+ #include "marshal.h"
++#ifdef Py_BUILD_CORE
++#undef Py_BUILD_CORE
++#include "datetime.h"
++#define Py_BUILD_CORE
++#else
++#include "datetime.h"
++#endif
+
+ #ifdef WITH_THREAD
+ #include "pythread.h"
diff --git a/tools/depends/target/python27/fix-ffi.patch b/tools/depends/target/python27/fix-ffi.patch
new file mode 100644
index 0000000000..29f8af8575
--- /dev/null
+++ b/tools/depends/target/python27/fix-ffi.patch
@@ -0,0 +1,51 @@
+--- Modules/_ctypes/malloc_closure.c.orig 2015-10-11 20:37:30.534378131 +0200
++++ Modules/_ctypes/malloc_closure.c 2015-10-11 20:38:57.322381368 +0200
+@@ -93,6 +93,7 @@
+ /******************************************************************/
+
+ /* put the item back into the free list */
++/*
+ void ffi_closure_free(void *p)
+ {
+ ITEM *item = (ITEM *)p;
+@@ -100,7 +101,6 @@
+ free_list = item;
+ }
+
+-/* return one item from the free list, allocating more if needed */
+ void *ffi_closure_alloc(size_t ignored, void** codeloc)
+ {
+ ITEM *item;
+@@ -113,3 +113,4 @@
+ *codeloc = (void *)item;
+ return (void *)item;
+ }
++*/
+--- Modules/_ctypes/cfield.c.orig 2015-10-11 20:34:03.034370393 +0200
++++ Modules/_ctypes/cfield.c 2015-10-11 20:37:04.462377159 +0200
+@@ -1723,6 +1723,7 @@
+ */
+
+ /* align and size are bogus for void, but they must not be zero */
++/*
+ ffi_type ffi_type_void = { 1, 1, FFI_TYPE_VOID };
+
+ ffi_type ffi_type_uint8 = { 1, 1, FFI_TYPE_UINT8 };
+@@ -1739,14 +1740,14 @@
+
+ ffi_type ffi_type_float = { sizeof(float), FLOAT_ALIGN, FFI_TYPE_FLOAT };
+ ffi_type ffi_type_double = { sizeof(double), DOUBLE_ALIGN, FFI_TYPE_DOUBLE };
+-
++*/
+ #ifdef ffi_type_longdouble
+ #undef ffi_type_longdouble
+ #endif
+- /* This is already defined on OSX */
++ /* This is already defined on OSX
+ ffi_type ffi_type_longdouble = { sizeof(long double), LONGDOUBLE_ALIGN,
+ FFI_TYPE_LONGDOUBLE };
+
+ ffi_type ffi_type_pointer = { sizeof(void *), VOID_P_ALIGN, FFI_TYPE_POINTER };
+-
++*/
+ /*---------------- EOF ----------------*/
diff --git a/tools/depends/target/python27/modules.setup b/tools/depends/target/python27/modules.setup
new file mode 100644
index 0000000000..cbb7e277fb
--- /dev/null
+++ b/tools/depends/target/python27/modules.setup
@@ -0,0 +1,520 @@
+# -*- makefile -*-
+# The file Setup is used by the makesetup script to construct the files
+# Makefile and config.c, from Makefile.pre and config.c.in,
+# respectively. The file Setup itself is initially copied from
+# Setup.dist; once it exists it will not be overwritten, so you can edit
+# Setup to your heart's content. Note that Makefile.pre is created
+# from Makefile.pre.in by the toplevel configure script.
+
+# (VPATH notes: Setup and Makefile.pre are in the build directory, as
+# are Makefile and config.c; the *.in and *.dist files are in the source
+# directory.)
+
+# Each line in this file describes one or more optional modules.
+# Modules enabled here will not be compiled by the setup.py script,
+# so the file can be used to override setup.py's behavior.
+
+# Lines have the following structure:
+#
+# <module> ... [<sourcefile> ...] [<cpparg> ...] [<library> ...]
+#
+# <sourcefile> is anything ending in .c (.C, .cc, .c++ are C++ files)
+# <cpparg> is anything starting with -I, -D, -U or -C
+# <library> is anything ending in .a or beginning with -l or -L
+# <module> is anything else but should be a valid Python
+# identifier (letters, digits, underscores, beginning with non-digit)
+#
+# (As the makesetup script changes, it may recognize some other
+# arguments as well, e.g. *.so and *.sl as libraries. See the big
+# case statement in the makesetup script.)
+#
+# Lines can also have the form
+#
+# <name> = <value>
+#
+# which defines a Make variable definition inserted into Makefile.in
+#
+# Finally, if a line contains just the word "*shared*" (without the
+# quotes but with the stars), then the following modules will not be
+# built statically. The build process works like this:
+#
+# 1. Build all modules that are declared as static in Modules/Setup,
+# combine them into libpythonxy.a, combine that into python.
+# 2. Build all modules that are listed as shared in Modules/Setup.
+# 3. Invoke setup.py. That builds all modules that
+# a) are not builtin, and
+# b) are not listed in Modules/Setup, and
+# c) can be build on the target
+#
+# Therefore, modules declared to be shared will not be
+# included in the config.c file, nor in the list of objects to be
+# added to the library archive, and their linker options won't be
+# added to the linker options. Rules to create their .o files and
+# their shared libraries will still be added to the Makefile, and
+# their names will be collected in the Make variable SHAREDMODS. This
+# is used to build modules as shared libraries. (They can be
+# installed using "make sharedinstall", which is implied by the
+# toplevel "make install" target.) (For compatibility,
+# *noconfig* has the same effect as *shared*.)
+#
+# In addition, *static* explicitly declares the following modules to
+# be static. Lines containing "*static*" and "*shared*" may thus
+# alternate throughout this file.
+
+# NOTE: As a standard policy, as many modules as can be supported by a
+# platform should be present. The distribution comes with all modules
+# enabled that are supported by most platforms and don't require you
+# to ftp sources from elsewhere.
+*static*
+
+# Some special rules to define PYTHONPATH.
+# Edit the definitions below to indicate which options you are using.
+# Don't add any whitespace or comments!
+
+# Directories where library files get installed.
+# DESTLIB is for Python modules; MACHDESTLIB for shared libraries.
+DESTLIB=$(LIBDEST)
+MACHDESTLIB=$(BINLIBDEST)
+
+# NOTE: all the paths are now relative to the prefix that is computed
+# at run time!
+
+# Standard path -- don't edit.
+# No leading colon since this is the first entry.
+# Empty since this is now just the runtime prefix.
+DESTPATH=
+
+# Site specific path components -- should begin with : if non-empty
+SITEPATH=
+
+# Standard path components for test modules
+TESTPATH=
+
+# Path components for machine- or system-dependent modules and shared libraries
+MACHDEPPATH=:plat-$(MACHDEP)
+EXTRAMACHDEPPATH=
+
+# Path component for the Tkinter-related modules
+# The TKPATH variable is always enabled, to save you the effort.
+TKPATH=:lib-tk
+
+# Path component for old modules.
+OLDPATH=:lib-old
+
+COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH)$(TKPATH)$(OLDPATH)
+PYTHONPATH=$(COREPYTHONPATH)
+
+
+# The modules listed here can't be built as shared libraries for
+# various reasons; therefore they are listed here instead of in the
+# normal order.
+
+# This only contains the minimal set of modules required to run the
+# setup.py script in the root of the Python source tree.
+
+posix posixmodule.c # posix (UNIX) system calls
+errno errnomodule.c # posix (UNIX) errno values
+pwd pwdmodule.c # this is needed to find out the user's home dir
+ # if $HOME is not set
+_sre _sre.c # Fredrik Lundh's new regular expressions
+_codecs _codecsmodule.c # access to the builtin codecs and codec registry
+
+# The zipimport module is always imported at startup. Having it as a
+# builtin module avoids some bootstrapping problems and reduces overhead.
+zipimport zipimport.c
+
+# The rest of the modules listed in this file are all commented out by
+# default. Usually they can be detected and built as dynamically
+# loaded modules by the new setup.py script added in Python 2.1. If
+# you're on a platform that doesn't support dynamic loading, want to
+# compile modules statically into the Python binary, or need to
+# specify some odd set of compiler switches, you can uncomment the
+# appropriate lines below.
+
+# ======================================================================
+
+# The Python symtable module depends on .h files that setup.py doesn't track
+_symtable symtablemodule.c
+
+# The SGI specific GL module:
+
+GLHACK=-Dclear=__GLclear
+#gl glmodule.c cgensupport.c -I$(srcdir) $(GLHACK) -lgl -lX11
+
+# Pure module. Cannot be linked dynamically.
+# -DWITH_QUANTIFY, -DWITH_PURIFY, or -DWITH_ALL_PURE
+#WHICH_PURE_PRODUCTS=-DWITH_ALL_PURE
+#PURE_INCLS=-I/usr/local/include
+#PURE_STUBLIBS=-L/usr/local/lib -lpurify_stubs -lquantify_stubs
+#pure puremodule.c $(WHICH_PURE_PRODUCTS) $(PURE_INCLS) $(PURE_STUBLIBS)
+
+# Uncommenting the following line tells makesetup that all following
+# modules are to be built as shared libraries (see above for more
+# detail; also note that *static* reverses this effect):
+
+#*shared*
+
+# GNU readline. Unlike previous Python incarnations, GNU readline is
+# now incorporated in an optional module, configured in the Setup file
+# instead of by a configure script switch. You may have to insert a
+# -L option pointing to the directory where libreadline.* lives,
+# and you may have to change -ltermcap to -ltermlib or perhaps remove
+# it, depending on your system -- see the GNU readline instructions.
+# It's okay for this to be a shared library, too.
+
+#readline readline.c -lreadline -lncurses
+
+
+# Modules that should always be present (non UNIX dependent):
+
+array arraymodule.c # array objects
+cmath cmathmodule.c # -lm # complex math library functions
+math mathmodule.c _math.c # -lm # math library functions, e.g. sin()
+_struct _struct.c # binary structure packing/unpacking
+time timemodule.c # -lm # time operations and variables
+operator operator.c # operator.add() and similar goodies
+_weakref _weakref.c # basic weak reference support
+_testcapi _testcapimodule.c # Python C API test module
+_random _randommodule.c # Random number generator
+_collections _collectionsmodule.c # Container types
+itertools itertoolsmodule.c # Functions creating iterators for efficient looping
+strop stropmodule.c # String manipulations
+_functools _functoolsmodule.c # Tools for working with functions and callable objects
+
+EXPATDEFINES='-DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI'
+_elementtree -I$(srcdir)/Modules/expat $(EXPATDEFINES) _elementtree.c # elementtree accelerator
+#_pickle _pickle.c # pickle accelerator
+datetime datetimemodule.c # date/time type
+_bisect _bisectmodule.c # Bisection algorithms
+
+unicodedata unicodedata.c # static Unicode character database
+
+# access to ISO C locale support
+_locale _localemodule.c -lintl
+
+
+# Modules with some UNIX dependencies -- on by default:
+# (If you have a really backward UNIX, select and socket may not be
+# supported...)
+#
+fcntl fcntlmodule.c # fcntl(2) and ioctl(2)
+#spwd spwdmodule.c # spwd(3)
+#grp grpmodule.c # grp(3)
+select selectmodule.c # select(2); not on ancient System V
+
+# Memory-mapped files (also works on Win32).
+mmap mmapmodule.c
+
+# CSV file helper
+_csv _csv.c
+
+# Socket module helper for socket(2)
+_socket socketmodule.c
+
+# Socket module helper for SSL support; you must comment out the other
+# socket line above, and possibly edit the SSL variable:
+SSLDEFINES='-DUSE_SSL'
+_ssl _ssl.c \
+ $(SSLDEFINES) -I$(prefix)/include -I$(prefix)/include/openssl \
+ -L$(prefix)/lib -lssl -lcrypto
+
+_hashlib _hashopenssl.c \
+ $(SSLDEFINES) -I$(prefix)/include -I$(prefix)/include/openssl \
+ -L$(prefix)/lib -lssl -lcrypto
+
+# The crypt module is now disabled by default because it breaks builds
+# on many systems (where -lcrypt is needed), e.g. Linux (I believe).
+#
+# First, look at Setup.config; configure may have set this for you.
+
+#crypt cryptmodule.c -lcrypt # crypt(3); needs -lcrypt on some systems
+
+# Some more UNIX dependent modules -- off by default, since these
+# are not supported by all UNIX systems:
+
+#nis nismodule.c -lnsl # Sun yellow pages -- not everywhere
+termios termios.c # Steen Lumholt's termios module
+resource resource.c # Jeremy Hylton's rlimit interface
+
+
+# Multimedia modules -- off by default.
+# These don't work for 64-bit platforms!!!
+# #993173 says audioop works on 64-bit platforms, though.
+# These represent audio samples or images as strings:
+
+#audioop audioop.c # Operations on audio samples
+#imageop imageop.c # Operations on images
+
+
+# Note that the _md5 and _sha modules are normally only built if the
+# system does not have the OpenSSL libs containing an optimized version.
+
+# The _md5 module implements the RSA Data Security, Inc. MD5
+# Message-Digest Algorithm, described in RFC 1321. The necessary files
+# md5.c and md5.h are included here.
+
+_md5 md5module.c md5.c
+
+
+# The _sha module implements the SHA checksum algorithms.
+# (NIST's Secure Hash Algorithms.)
+_sha shamodule.c
+_sha256 sha256module.c
+_sha512 sha512module.c
+
+
+# SGI IRIX specific modules -- off by default.
+
+# These module work on any SGI machine:
+
+# *** gl must be enabled higher up in this file ***
+#fm fmmodule.c $(GLHACK) -lfm -lgl # Font Manager
+#sgi sgimodule.c # sgi.nap() and a few more
+
+# This module requires the header file
+# /usr/people/4Dgifts/iristools/include/izoom.h:
+#imgfile imgfile.c -limage -lgutil -lgl -lm # Image Processing Utilities
+
+
+# These modules require the Multimedia Development Option (I think):
+
+#al almodule.c -laudio # Audio Library
+#cd cdmodule.c -lcdaudio -lds -lmediad # CD Audio Library
+#cl clmodule.c -lcl -lawareaudio # Compression Library
+#sv svmodule.c yuvconvert.c -lsvideo -lXext -lX11 # Starter Video
+
+
+# The FORMS library, by Mark Overmars, implements user interface
+# components such as dialogs and buttons using SGI's GL and FM
+# libraries. You must ftp the FORMS library separately from
+# ftp://ftp.cs.ruu.nl/pub/SGI/FORMS. It was tested with FORMS 2.2a.
+# NOTE: if you want to be able to use FORMS and curses simultaneously
+# (or both link them statically into the same binary), you must
+# compile all of FORMS with the cc option "-Dclear=__GLclear".
+
+# The FORMS variable must point to the FORMS subdirectory of the forms
+# toplevel directory:
+
+#FORMS=/ufs/guido/src/forms/FORMS
+#fl flmodule.c -I$(FORMS) $(GLHACK) $(FORMS)/libforms.a -lfm -lgl
+
+
+# SunOS specific modules -- off by default:
+
+#sunaudiodev sunaudiodev.c
+
+
+# A Linux specific module -- off by default; this may also work on
+# some *BSDs.
+
+#linuxaudiodev linuxaudiodev.c
+
+
+# George Neville-Neil's timing module:
+
+timing timingmodule.c
+
+
+# The _tkinter module.
+#
+# The command for _tkinter is long and site specific. Please
+# uncomment and/or edit those parts as indicated. If you don't have a
+# specific extension (e.g. Tix or BLT), leave the corresponding line
+# commented out. (Leave the trailing backslashes in! If you
+# experience strange errors, you may want to join all uncommented
+# lines and remove the backslashes -- the backslash interpretation is
+# done by the shell's "read" command and it may not be implemented on
+# every system.
+
+# *** Always uncomment this (leave the leading underscore in!):
+# _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
+# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
+# -L/usr/local/lib \
+# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
+# -I/usr/local/include \
+# *** Uncomment and edit to reflect where your X11 header files are:
+# -I/usr/X11R6/include \
+# *** Or uncomment this for Solaris:
+# -I/usr/openwin/include \
+# *** Uncomment and edit for Tix extension only:
+# -DWITH_TIX -ltix8.1.8.2 \
+# *** Uncomment and edit for BLT extension only:
+# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
+# *** Uncomment and edit for PIL (TkImaging) extension only:
+# (See http://www.pythonware.com/products/pil/ for more info)
+# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
+# *** Uncomment and edit for TOGL extension only:
+# -DWITH_TOGL togl.c \
+# *** Uncomment and edit to reflect your Tcl/Tk versions:
+# -ltk8.2 -ltcl8.2 \
+# *** Uncomment and edit to reflect where your X11 libraries are:
+# -L/usr/X11R6/lib \
+# *** Or uncomment this for Solaris:
+# -L/usr/openwin/lib \
+# *** Uncomment these for TOGL extension only:
+# -lGL -lGLU -lXext -lXmu \
+# *** Uncomment for AIX:
+# -lld \
+# *** Always uncomment this; X11 libraries to link with:
+# -lX11
+
+# Lance Ellinghaus's syslog module
+syslog syslogmodule.c # syslog daemon interface
+
+
+# Curses support, requring the System V version of curses, often
+# provided by the ncurses library. e.g. on Linux, link with -lncurses
+# instead of -lcurses).
+#
+# First, look at Setup.config; configure may have set this for you.
+
+#_curses _cursesmodule.c -lcurses -ltermcap
+# Wrapper for the panel library that's part of ncurses and SYSV curses.
+#_curses_panel _curses_panel.c -lpanel -lncurses
+
+
+# Generic (SunOS / SVR4) dynamic loading module.
+# This is not needed for dynamic loading of Python modules --
+# it is a highly experimental and dangerous device for calling
+# *arbitrary* C functions in *arbitrary* shared libraries:
+
+#dl dlmodule.c
+
+
+# Modules that provide persistent dictionary-like semantics. You will
+# probably want to arrange for at least one of them to be available on
+# your machine, though none are defined by default because of library
+# dependencies. The Python module anydbm.py provides an
+# implementation independent wrapper for these; dumbdbm.py provides
+# similar functionality (but slower of course) implemented in Python.
+
+# The standard Unix dbm module has been moved to Setup.config so that
+# it will be compiled as a shared library by default. Compiling it as
+# a built-in module causes conflicts with the pybsddb3 module since it
+# creates a static dependency on an out-of-date version of db.so.
+#
+# First, look at Setup.config; configure may have set this for you.
+
+#dbm -I$(prefix)/include -L$(prefix)/lib dbmmodule.c # dbm(3) may require -lndbm or similar
+
+# Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
+#
+# First, look at Setup.config; configure may have set this for you.
+
+#gdbm gdbmmodule.c -I$(prefix)/include -L$(prefix)/lib -lgdbm
+
+
+# Sleepycat Berkeley DB interface.
+#
+# This requires the Sleepycat DB code, see http://www.sleepycat.com/
+# The earliest supported version of that library is 3.0, the latest
+# supported version is 4.0 (4.1 is specifically not supported, as that
+# changes the semantics of transactional databases). A list of available
+# releases can be found at
+#
+# http://www.sleepycat.com/update/index.html
+#
+# Edit the variables DB and DBLIBVERto point to the db top directory
+# and the subdirectory of PORT where you built it.
+#DB=/usr/local/BerkeleyDB.4.0
+#DBLIBVER=4.0
+#DBINC=$(DB)/include
+#DBLIB=$(DB)/lib
+#_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
+
+# Historical Berkeley DB 1.85
+#
+# This module is deprecated; the 1.85 version of the Berkeley DB library has
+# bugs that can cause data corruption. If you can, use later versions of the
+# library instead, available from <http://www.sleepycat.com/>.
+
+#DB=/depot/sundry/src/berkeley-db/db.1.85
+#DBPORT=$(DB)/PORT/irix.5.3
+#bsddb185 bsddbmodule.c -I$(DBPORT)/include -I$(DBPORT) $(DBPORT)/libdb.a
+
+
+
+# Helper module for various ascii-encoders
+binascii binascii.c
+
+# Fred Drake's interface to the Python parser
+parser parsermodule.c
+
+# cStringIO and cPickle
+cStringIO cStringIO.c
+cPickle cPickle.c
+
+
+# Lee Busby's SIGFPE modules.
+# The library to link fpectl with is platform specific.
+# Choose *one* of the options below for fpectl:
+
+# For SGI IRIX (tested on 5.3):
+#fpectl fpectlmodule.c -lfpe
+
+# For Solaris with SunPro compiler (tested on Solaris 2.5 with SunPro C 4.2):
+# (Without the compiler you don't have -lsunmath.)
+#fpectl fpectlmodule.c -R/opt/SUNWspro/lib -lsunmath -lm
+
+# For other systems: see instructions in fpectlmodule.c.
+#fpectl fpectlmodule.c ...
+
+# Test module for fpectl. No extra libraries needed.
+#fpetest fpetestmodule.c
+
+# Andrew Kuchling's zlib module.
+# This require zlib 1.1.3 (or later).
+# See http://www.gzip.org/zlib/
+zlib zlibmodule.c -I$(prefix)/include -L$(prefix)/lib -lz
+
+# Interface to the Expat XML parser
+#
+# Expat was written by James Clark and is now maintained by a group of
+# developers on SourceForge; see www.libexpat.org for more
+# information. The pyexpat module was written by Paul Prescod after a
+# prototype by Jack Jansen. Source of Expat 1.95.2 is included in
+# Modules/expat/. Usage of a system shared libexpat.so/expat.dll is
+# not advised.
+#
+# More information on Expat can be found at www.libexpat.org.
+#
+pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat $(EXPATDEFINES) -I$(prefix)/include -L$(prefix)/lib -lexpat
+
+
+# Hye-Shik Chang's CJKCodecs
+
+# multibytecodec is required for all the other CJK codec modules
+_multibytecodec cjkcodecs/multibytecodec.c
+
+_codecs_cn cjkcodecs/_codecs_cn.c
+_codecs_hk cjkcodecs/_codecs_hk.c
+_codecs_iso2022 cjkcodecs/_codecs_iso2022.c
+_codecs_jp cjkcodecs/_codecs_jp.c
+_codecs_kr cjkcodecs/_codecs_kr.c
+_codecs_tw cjkcodecs/_codecs_tw.c
+
+# Example -- included for reference only:
+# xx xxmodule.c
+
+# Another example -- the 'xxsubtype' module shows C-level subtyping in action
+xxsubtype xxsubtype.c
+
+_lsprof _lsprof.c rotatingtree.c
+_json _json.c
+#_io/fileio _io/fileio.c
+_io _io/bufferedio.c _io/bytesio.c _io/fileio.c _io/iobase.c _io/_iomodule.c _io/stringio.c _io/textio.c
+_heapq _heapqmodule.c
+_hotshot _hotshot.c
+future_builtins future_builtins.c
+
+SQLITEDEFINES='-DMODULE_NAME="sqlite3"'
+_sqlite3 _sqlite/connection.c \
+ _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/prepare_protocol.c \
+ _sqlite/row.c _sqlite/statement.c _sqlite/module.c _sqlite/util.c _sqlite/cache.c \
+ -I$(prefix)/include -L$(prefix)/lib -lsqlite3 $(SQLITEDEFINES)
+
+_ctypes _ctypes/callbacks.c _ctypes/callproc.c _ctypes/cfield.c _ctypes/_ctypes.c \
+ _ctypes/malloc_closure.c _ctypes/stgdict.c \
+ -I$(prefix)/include/ffi -L$(prefix)/lib -lffi
+
+#bz2 bz2module.c -I$(prefix)/include -L$(prefix)/lib -lbz2
diff --git a/tools/depends/target/python27/urllib-ssl-no-cert_check.patch b/tools/depends/target/python27/urllib-ssl-no-cert_check.patch
new file mode 100644
index 0000000000..e57c419234
--- /dev/null
+++ b/tools/depends/target/python27/urllib-ssl-no-cert_check.patch
@@ -0,0 +1,14 @@
+diff --git a/Lib/ssl.py b/Lib/ssl.py
+index 5df6ed3..a871519 100644
+--- a/Lib/ssl.py
++++ b/Lib/ssl.py
+@@ -482,7 +482,7 @@ def _create_unverified_context(protocol=PROTOCOL_SSLv23, cert_reqs=None,
+ return context
+
+ # Used by http.client if no context is explicitly passed.
+-_create_default_https_context = create_default_context
++_create_default_https_context = _create_unverified_context
+
+
+ # Backwards compatibility alias, even though it's not a public name.
+