summaryrefslogtreecommitdiff
path: root/data/python
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2018-10-12 16:38:39 -1000
committerSam Bingner <sam@bingner.com>2018-10-12 16:38:39 -1000
commitab753fcde40b28248172c552ce2b1f23eddfc9f4 (patch)
tree2ff2724ef77294878f91b528843a0f0b6dba5462 /data/python
parent295030d5719c3af352cfc5394b8ce13e3a1e0fb9 (diff)
Update more packages
Diffstat (limited to 'data/python')
-rw-r--r--data/python/Python-2.7.15.tar.xz (renamed from data/python/Python-2.5.1.tgz)bin11060830 -> 12642436 bytes
l---------data/python/_metadata/ncurses.dep1
-rw-r--r--data/python/_metadata/version2
-rw-r--r--data/python/bundle.diff32
-rw-r--r--data/python/clean.diff11
-rw-r--r--data/python/common.diff12
-rw-r--r--data/python/cross.diff443
-rw-r--r--data/python/distutils.diff115
-rw-r--r--data/python/dylib.diff33
-rw-r--r--data/python/environ.diff35
-rw-r--r--data/python/framework.diff28
-rw-r--r--data/python/gestalt.diff25
-rw-r--r--data/python/longlong.diff28
-rw-r--r--data/python/make.sh25
-rw-r--r--data/python/modules.diff32
-rw-r--r--data/python/starpython.diff152
-rw-r--r--data/python/test.diff17
-rw-r--r--data/python/timestamp.diff10
-rw-r--r--data/python/zz-setup.diff175
19 files changed, 339 insertions, 837 deletions
diff --git a/data/python/Python-2.5.1.tgz b/data/python/Python-2.7.15.tar.xz
index 2ce439a2e..cf32934b7 100644
--- a/data/python/Python-2.5.1.tgz
+++ b/data/python/Python-2.7.15.tar.xz
Binary files differ
diff --git a/data/python/_metadata/ncurses.dep b/data/python/_metadata/ncurses.dep
new file mode 120000
index 000000000..a395fad08
--- /dev/null
+++ b/data/python/_metadata/ncurses.dep
@@ -0,0 +1 @@
+../../ncurses \ No newline at end of file
diff --git a/data/python/_metadata/version b/data/python/_metadata/version
index 73462a5a1..f24054fd3 100644
--- a/data/python/_metadata/version
+++ b/data/python/_metadata/version
@@ -1 +1 @@
-2.5.1
+2.7.15
diff --git a/data/python/bundle.diff b/data/python/bundle.diff
deleted file mode 100644
index c7f38b986..000000000
--- a/data/python/bundle.diff
+++ /dev/null
@@ -1,32 +0,0 @@
-diff -r -u Python-2.5.1/configure.in Python-2.5.1+iPhone/configure.in
---- Python-2.5.1/configure.in 2007-03-12 10:50:51.000000000 +0000
-+++ Python-2.5.1+iPhone/configure.in 2008-01-09 11:45:20.000000000 +0000
-@@ -1484,7 +1484,12 @@
- if test "${enable_universalsdk}"; then
- LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
- fi
-- LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
-+ LDSHARED='$(CC) $(LDFLAGS) -undefined dynamic_lookup'
-+ if test "$enable_framework" ; then
-+ LDSHARED="$LDSHARED -bundle"
-+ else
-+ LDSHARED="$LDSHARED -dynamiclib"
-+ fi
- BLDSHARED="$LDSHARED"
- else
- LDSHARED='$(CC) $(LDFLAGS) -bundle'
-diff -r -u Python-2.5.1/Makefile.pre.in Python-2.5.1+iPhone/Makefile.pre.in
---- Python-2.5.1/Makefile.pre.in 2006-12-08 20:46:13.000000000 +0000
-+++ Python-2.5.1+iPhone/Makefile.pre.in 2008-01-09 12:00:36.000000000 +0000
-@@ -362,9 +362,9 @@
- $(AR) cr $@ $(MODOBJS)
- $(RANLIB) $@
-
--libpython$(VERSION).so: $(LIBRARY_OBJS)
-+libpython$(VERSION).dylib: $(LIBRARY_OBJS)
- if test $(INSTSONAME) != $(LDLIBRARY); then \
-- $(LDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
-+ $(LDSHARED) -Wl,-dylib_install_name,$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
- $(LN) -f $(INSTSONAME) $@; \
- else\
- $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
diff --git a/data/python/clean.diff b/data/python/clean.diff
deleted file mode 100644
index 36d5ba186..000000000
--- a/data/python/clean.diff
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -ru BuildPython-2.5.1/Makefile.pre.in Python-2.5.1/Makefile.pre.in
---- BuildPython-2.5.1/Makefile.pre.in 2006-12-08 20:46:13.000000000 +0000
-+++ Python-2.5.1/Makefile.pre.in 2008-01-09 07:58:21.000000000 +0000
-@@ -1015,7 +1015,6 @@
-
- clean: pycremoval
- find . -name '*.o' -exec rm -f {} ';'
-- find . -name '*.s[ol]' -exec rm -f {} ';'
- find $(srcdir)/build -name 'fficonfig.h' -exec rm -f {} ';' || true
- find $(srcdir)/build -name 'fficonfig.py' -exec rm -f {} ';' || true
-
diff --git a/data/python/common.diff b/data/python/common.diff
deleted file mode 100644
index 64f9eb4f2..000000000
--- a/data/python/common.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -r -u Python-2.5.1/configure.in Python-2.5.1+iPhone/configure.in
---- Python-2.5.1/configure.in 2007-03-12 10:50:51.000000000 +0000
-+++ Python-2.5.1+iPhone/configure.in 2008-01-09 12:10:16.000000000 +0000
-@@ -814,7 +816,7 @@
- ;;
- # is there any other compiler on Darwin besides gcc?
- Darwin*)
-- BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
-+ BASECFLAGS="$BASECFLAGS -no-cpp-precomp -fno-common"
- if test "${enable_universalsdk}"; then
- BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
- fi
diff --git a/data/python/cross.diff b/data/python/cross.diff
deleted file mode 100644
index 68c84d061..000000000
--- a/data/python/cross.diff
+++ /dev/null
@@ -1,443 +0,0 @@
-diff -ru Python-2.5.1/configure.in Python-2.5.1+iPhone/configure.in
---- Python-2.5.1/configure.in 2007-03-12 10:50:51.000000000 +0000
-+++ Python-2.5.1+iPhone/configure.in 2008-04-29 10:53:21.000000000 +0000
-@@ -165,7 +165,7 @@
- AC_MSG_CHECKING(MACHDEP)
- if test -z "$MACHDEP"
- then
-- ac_sys_system=`uname -s`
-+ ac_sys_system=Darwin
- if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
- -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
- ac_sys_release=`uname -v`
-@@ -247,6 +247,8 @@
-
- esac
-
-+define_xopen_source=no
-+
- if test $define_xopen_source = yes
- then
- # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
-@@ -1420,7 +1422,6 @@
- echo '+ Continuing in 10 seconds to let you to ponder. +'
- echo '+ +'
- echo '====================================================================='
-- sleep 10
- fi
- AC_MSG_RESULT($SO)
- AC_DEFINE_UNQUOTED(SHLIB_EXT, "$SO", [Define this to be extension of shared libraries (including the dot!).])
-@@ -1473,12 +1474,11 @@
- Darwin/*)
- # Use -undefined dynamic_lookup whenever possible (10.3 and later).
- # This allows an extension to be used in any Python
-- cur_target=`sw_vers -productVersion | sed 's/\(10\.[[0-9]]*\).*/\1/'`
-+ cur_target=10.5
- if test ${cur_target} '>' 10.2; then
- cur_target=10.3
- fi
- CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
-- EXPORT_MACOSX_DEPLOYMENT_TARGET=''
- if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
- then
- if test "${enable_universalsdk}"; then
-@@ -3367,41 +3368,6 @@
- AC_MSG_RESULT(no)
- fi
-
--AC_MSG_CHECKING(for %zd printf() format support)
--AC_TRY_RUN([#include <stdio.h>
--#include <stddef.h>
--#include <string.h>
--
--int main()
--{
-- char buffer[256];
--
--#ifdef HAVE_SSIZE_T
--typedef ssize_t Py_ssize_t;
--#elif SIZEOF_VOID_P == SIZEOF_LONG
--typedef long Py_ssize_t;
--#else
--typedef int Py_ssize_t;
--#endif
--
-- if(sprintf(buffer, "%zd", (size_t)123) < 0)
-- return 1;
--
-- if (strcmp(buffer, "123"))
-- return 1;
--
-- if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
-- return 1;
--
-- if (strcmp(buffer, "-123"))
-- return 1;
--
-- return 0;
--}],
--[AC_MSG_RESULT(yes)
-- AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])],
-- AC_MSG_RESULT(no))
--
- AC_CHECK_TYPE(socklen_t,,
- AC_DEFINE(socklen_t,int,
- Define to `int' if <sys/socket.h> does not define.),[
-diff -ru Python-2.5.1/Include/pyport.h Python-2.5.1+iPhone/Include/pyport.h
---- Python-2.5.1/Include/pyport.h 2006-10-02 15:24:01.000000000 +0000
-+++ Python-2.5.1+iPhone/Include/pyport.h 2008-04-29 10:53:21.000000000 +0000
-@@ -731,7 +731,7 @@
- * rather than waiting for integer multiplication to trigger bogus
- * overflows.
- */
--#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
-+//#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
- #endif
-
- #ifdef __cplusplus
-diff -ru Python-2.5.1/Modules/_ctypes/cfield.c Python-2.5.1+iPhone/Modules/_ctypes/cfield.c
---- Python-2.5.1/Modules/_ctypes/cfield.c 2007-03-22 19:43:37.000000000 +0000
-+++ Python-2.5.1+iPhone/Modules/_ctypes/cfield.c 2008-04-29 10:53:21.000000000 +0000
-@@ -1642,7 +1642,7 @@
- struct _ffi_type **elements;
- } ffi_type;
- */
--
-+#if 0
- /* align and size are bogus for void, but they must not be zero */
- ffi_type ffi_type_void = { 1, 1, FFI_TYPE_VOID };
-
-@@ -1664,5 +1664,5 @@
- /* ffi_type ffi_type_longdouble */
-
- ffi_type ffi_type_pointer = { sizeof(void *), VOID_P_ALIGN, FFI_TYPE_POINTER };
--
-+#endif
- /*---------------- EOF ----------------*/
-diff -ru Python-2.5.1/Modules/getaddrinfo.c Python-2.5.1+iPhone/Modules/getaddrinfo.c
---- Python-2.5.1/Modules/getaddrinfo.c 2003-08-17 21:28:39.000000000 +0000
-+++ Python-2.5.1+iPhone/Modules/getaddrinfo.c 2008-04-29 10:53:21.000000000 +0000
-@@ -38,7 +38,7 @@
- * - PF_UNSPEC case would be handled in getipnodebyname() with the AI_ALL flag.
- */
-
--#if 0
-+#if 1
- #include <sys/types.h>
- #include <sys/param.h>
- #include <sys/sysctl.h>
-diff -ru Python-2.5.1/Modules/mmapmodule.c Python-2.5.1+iPhone/Modules/mmapmodule.c
---- Python-2.5.1/Modules/mmapmodule.c 2006-08-22 13:57:07.000000000 +0000
-+++ Python-2.5.1+iPhone/Modules/mmapmodule.c 2008-04-29 10:53:21.000000000 +0000
-@@ -36,6 +36,7 @@
- #ifdef UNIX
- #include <sys/mman.h>
- #include <sys/stat.h>
-+#include <sys/fcntl.h>
-
- #if defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE)
- static int
-diff -ru Python-2.5.1/setup.py Python-2.5.1+iPhone/setup.py
---- Python-2.5.1/setup.py 2007-02-14 12:53:41.000000000 +0000
-+++ Python-2.5.1+iPhone/setup.py 2008-04-29 11:05:35.000000000 +0000
-@@ -206,46 +206,16 @@
- ext_filename = os.path.join(
- self.build_lib,
- self.get_ext_filename(self.get_ext_fullname(ext.name)))
-- try:
-- imp.load_dynamic(ext.name, ext_filename)
-- except ImportError, why:
-- 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)')
-- except:
-- exc_type, why, tb = sys.exc_info()
-- self.announce('*** WARNING: importing extension "%s" '
-- 'failed with %s: %s' % (ext.name, exc_type, why),
-- level=3)
-
- def get_platform(self):
-- # Get value of sys.platform
-- for platform in ['cygwin', 'beos', 'darwin', 'atheos', 'osf1']:
-- if sys.platform.startswith(platform):
-- return platform
-- return sys.platform
-+ return 'darwin'
-
- def detect_modules(self):
-+ sysroot = os.getenv('PKG_ROOT')
-+
- # Ensure that /usr/local is always used
-- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-+ add_dir_to_list(self.compiler.library_dirs, sysroot + '/usr/local/lib')
-+ add_dir_to_list(self.compiler.include_dirs, sysroot + '/usr/local/include')
-
- # Add paths specified in the environment variables LDFLAGS and
- # CPPFLAGS for header and library files.
-@@ -294,10 +264,10 @@
- # if a file is found in one of those directories, it can
- # be assumed that no additional -I,-L directives are needed.
- lib_dirs = self.compiler.library_dirs + [
-- '/lib64', '/usr/lib64',
-- '/lib', '/usr/lib',
-+ sysroot + '/lib64', sysroot + '/usr/lib64',
-+ sysroot + '/lib', sysroot + '/usr/lib',
- ]
-- inc_dirs = self.compiler.include_dirs + ['/usr/include']
-+ inc_dirs = self.compiler.include_dirs + [sysroot + '/usr/include']
- exts = []
-
- config_h = sysconfig.get_config_h_filename()
-@@ -309,9 +279,11 @@
- # Check for AtheOS which has libraries in non-standard locations
- if platform == 'atheos':
- lib_dirs += ['/system/libs', '/atheos/autolnk/lib']
-- lib_dirs += os.getenv('LIBRARY_PATH', '').split(os.pathsep)
- inc_dirs += ['/system/include', '/atheos/autolnk/include']
-- inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep)
-+
-+ lib_dirs += os.getenv('LIBRARY_PATH', '').split(os.pathsep)
-+ inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep)
-+ inc_dirs += os.getenv('CPATH', '').split(os.pathsep)
-
- # OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb)
- if platform in ['osf1', 'unixware7', 'openunix8']:
-@@ -476,7 +447,7 @@
- if find_file('readline/rlconf.h', inc_dirs, []) is None:
- do_readline = False
- if do_readline:
-- if sys.platform == 'darwin':
-+ if self.get_platform() == 'darwin':
- # In every directory on the search path search for a dynamic
- # library and then a static library, instead of first looking
- # for dynamic libraries on the entiry path.
-@@ -496,11 +467,11 @@
- elif self.compiler.find_library_file(lib_dirs, 'curses'):
- readline_libs.append('curses')
- elif self.compiler.find_library_file(lib_dirs +
-- ['/usr/lib/termcap'],
-+ [sysroot + '/usr/lib/termcap'],
- 'termcap'):
- readline_libs.append('termcap')
- exts.append( Extension('readline', ['readline.c'],
-- library_dirs=['/usr/lib/termcap'],
-+ library_dirs=[sysroot + '/usr/lib/termcap'],
- extra_link_args=readline_extra_link_args,
- libraries=readline_libs) )
- if platform not in ['mac']:
-@@ -520,20 +491,20 @@
- depends = ['socketmodule.h']) )
- # Detect SSL support for the socket module (via _ssl)
- search_for_ssl_incs_in = [
-- '/usr/local/ssl/include',
-- '/usr/contrib/ssl/include/'
-+ sysroot + '/usr/local/ssl/include',
-+ sysroot + '/usr/contrib/ssl/include/'
- ]
- ssl_incs = find_file('openssl/ssl.h', inc_dirs,
- search_for_ssl_incs_in
- )
- if ssl_incs is not None:
- krb5_h = find_file('krb5.h', inc_dirs,
-- ['/usr/kerberos/include'])
-+ [sysroot + '/usr/kerberos/include'])
- if krb5_h:
- ssl_incs += krb5_h
- ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
-- ['/usr/local/ssl/lib',
-- '/usr/contrib/ssl/lib/'
-+ [sysroot + '/usr/local/ssl/lib',
-+ sysroot + '/usr/contrib/ssl/lib/'
- ] )
-
- if (ssl_incs is not None and
-@@ -612,31 +583,25 @@
-
- # construct a list of paths to look for the header file in on
- # top of the normal inc_dirs.
-- db_inc_paths = [
-- '/usr/include/db4',
-- '/usr/local/include/db4',
-- '/opt/sfw/include/db4',
-- '/sw/include/db4',
-- '/usr/include/db3',
-- '/usr/local/include/db3',
-- '/opt/sfw/include/db3',
-- '/sw/include/db3',
-- ]
-+ db_inc_paths = []
-+ # major number specific paths
-+ for x in (3,4):
-+ db_inc_paths += map(lambda i: i + '/db%d' % x, inc_dirs)
- # 4.x minor number specific paths
- for x in (0,1,2,3,4,5):
-- db_inc_paths.append('/usr/include/db4%d' % x)
-- db_inc_paths.append('/usr/include/db4.%d' % x)
-- db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x)
-- db_inc_paths.append('/usr/local/include/db4%d' % x)
-- db_inc_paths.append('/pkg/db-4.%d/include' % x)
-- db_inc_paths.append('/opt/db-4.%d/include' % x)
-+ db_inc_paths += map(lambda i: i + '/db%d' % x, inc_dirs)
-+ db_inc_paths += map(lambda i: i + '/db.%d' % x, inc_dirs)
-+ db_inc_paths.append(sysroot + '/usr/local/BerkeleyDB.4.%d/include' % x)
-+ db_inc_paths.append(sysroot + '/usr/local/include/db4%d' % x)
-+ db_inc_paths.append(sysroot + '/pkg/db-4.%d/include' % x)
-+ db_inc_paths.append(sysroot + '/opt/db-4.%d/include' % x)
- # 3.x minor number specific paths
- for x in (3,):
-- db_inc_paths.append('/usr/include/db3%d' % x)
-- db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x)
-- db_inc_paths.append('/usr/local/include/db3%d' % x)
-- db_inc_paths.append('/pkg/db-3.%d/include' % x)
-- db_inc_paths.append('/opt/db-3.%d/include' % x)
-+ db_inc_paths += map(lambda i: i + '/db3%d' % x, inc_dirs)
-+ db_inc_paths.append(sysroot + '/usr/local/BerkeleyDB.3.%d/include' % x)
-+ db_inc_paths.append(sysroot + '/usr/local/include/db3%d' % x)
-+ db_inc_paths.append(sysroot + '/pkg/db-3.%d/include' % x)
-+ db_inc_paths.append(sysroot + '/opt/db-3.%d/include' % x)
-
- # Add some common subdirectories for Sleepycat DB to the list,
- # based on the standard include directories. This way DB3/4 gets
-@@ -746,13 +711,9 @@
- # We hunt for #define SQLITE_VERSION "n.n.n"
- # We need to find >= sqlite version 3.0.8
- sqlite_incdir = sqlite_libdir = None
-- sqlite_inc_paths = [ '/usr/include',
-- '/usr/include/sqlite',
-- '/usr/include/sqlite3',
-- '/usr/local/include',
-- '/usr/local/include/sqlite',
-- '/usr/local/include/sqlite3',
-- ]
-+ sqlite_inc_paths = inc_dirs
-+ sqlite_inc_paths += map(lambda i: i + '/sqlite', inc_dirs)
-+ sqlite_inc_paths += map(lambda i: i + '/sqlite3', inc_dirs)
- MIN_SQLITE_VERSION_NUMBER = (3, 0, 8)
- MIN_SQLITE_VERSION = ".".join([str(x)
- for x in MIN_SQLITE_VERSION_NUMBER])
-@@ -806,13 +767,13 @@
- '_sqlite/util.c', ]
-
- sqlite_defines = []
-- if sys.platform != "win32":
-+ if self.get_platform() != "win32":
- sqlite_defines.append(('MODULE_NAME', '"sqlite3"'))
- else:
- sqlite_defines.append(('MODULE_NAME', '\\"sqlite3\\"'))
-
-
-- if sys.platform == 'darwin':
-+ if self.get_platform() == 'darwin':
- # In every directory on the search path search for a dynamic
- # library and then a static library, instead of first looking
- # for dynamic libraries on the entiry path.
-@@ -837,7 +798,7 @@
- # accidentally building this module with a later version of the
- # underlying db library. May BSD-ish Unixes incorporate db 1.85
- # symbols into libc and place the include file in /usr/include.
-- f = "/usr/include/db.h"
-+ f = sysroot + "/usr/include/db.h"
- if os.path.exists(f):
- data = open(f).read()
- m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
-@@ -962,7 +923,7 @@
- break
- if version >= version_req:
- if (self.compiler.find_library_file(lib_dirs, 'z')):
-- if sys.platform == "darwin":
-+ if self.get_platform() == "darwin":
- zlib_extra_link_args = ('-Wl,-search_paths_first',)
- else:
- zlib_extra_link_args = ()
-@@ -972,7 +933,7 @@
-
- # Gustavo Niemeyer's bz2 module.
- if (self.compiler.find_library_file(lib_dirs, 'bz2')):
-- if sys.platform == "darwin":
-+ if self.get_platform() == "darwin":
- bz2_extra_link_args = ('-Wl,-search_paths_first',)
- else:
- bz2_extra_link_args = ()
-@@ -1175,7 +1136,7 @@
- # For 8.4a2, the X11 headers are not included. Rather than include a
- # complicated search, this is a hard-coded path. It could bail out
- # if X11 libs are not found...
-- include_dirs.append('/usr/X11R6/include')
-+ include_dirs.append(sysroot + '/usr/X11R6/include')
- frameworks = ['-framework', 'Tcl', '-framework', 'Tk']
-
- ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'],
-@@ -1217,7 +1178,7 @@
- # Check for the include files on Debian and {Free,Open}BSD, where
- # they're put in /usr/include/{tcl,tk}X.Y
- dotversion = version
-- if '.' not in dotversion and "bsd" in sys.platform.lower():
-+ if '.' not in dotversion and "bsd" in self.get_platform().lower():
- # OpenBSD and FreeBSD use Tcl/Tk library names like libtcl83.a,
- # but the include subdirs are named like .../include/tcl8.3.
- dotversion = dotversion[:-1] + '.' + dotversion[-1]
-@@ -1244,19 +1205,19 @@
-
- # Check for various platform-specific directories
- if platform == 'sunos5':
-- include_dirs.append('/usr/openwin/include')
-- added_lib_dirs.append('/usr/openwin/lib')
-- elif os.path.exists('/usr/X11R6/include'):
-- include_dirs.append('/usr/X11R6/include')
-- added_lib_dirs.append('/usr/X11R6/lib64')
-- added_lib_dirs.append('/usr/X11R6/lib')
-- elif os.path.exists('/usr/X11R5/include'):
-- include_dirs.append('/usr/X11R5/include')
-- added_lib_dirs.append('/usr/X11R5/lib')
-+ include_dirs.append(sysroot + '/usr/openwin/include')
-+ added_lib_dirs.append(sysroot + '/usr/openwin/lib')
-+ elif os.path.exists(sysroot + '/usr/X11R6/include'):
-+ include_dirs.append(sysroot + '/usr/X11R6/include')
-+ added_lib_dirs.append(sysroot + '/usr/X11R6/lib64')
-+ added_lib_dirs.append(sysroot + '/usr/X11R6/lib')
-+ elif os.path.exists(sysroot + '/usr/X11R5/include'):
-+ include_dirs.append(sysroot + '/usr/X11R5/include')
-+ added_lib_dirs.append(sysroot + '/usr/X11R5/lib')
- else:
- # Assume default location for X11
-- include_dirs.append('/usr/X11/include')
-- added_lib_dirs.append('/usr/X11/lib')
-+ include_dirs.append(sysroot + '/usr/X11/include')
-+ added_lib_dirs.append(sysroot + '/usr/X11/lib')
-
- # If Cygwin, then verify that X is installed before proceeding
- if platform == 'cygwin':
-@@ -1363,13 +1324,13 @@
- '_ctypes/malloc_closure.c']
- depends = ['_ctypes/ctypes.h']
-
-- if sys.platform == 'darwin':
-+ if self.get_platform() == 'darwin':
- sources.append('_ctypes/darwin/dlfcn_simple.c')
- include_dirs.append('_ctypes/darwin')
- # XXX Is this still needed?
- ## extra_link_args.extend(['-read_only_relocs', 'warning'])
-
-- elif sys.platform == 'sunos5':
-+ elif self.get_platform() == 'sunos5':
- # XXX This shouldn't be necessary; it appears that some
- # of the assembler code is non-PIC (i.e. it has relocations
- # when it shouldn't. The proper fix would be to rewrite
diff --git a/data/python/distutils.diff b/data/python/distutils.diff
deleted file mode 100644
index dacfdee33..000000000
--- a/data/python/distutils.diff
+++ /dev/null
@@ -1,115 +0,0 @@
-diff -ru BuildPython-2.5.1/Lib/distutils/util.py Python-2.5.1/Lib/distutils/util.py
---- BuildPython-2.5.1/Lib/distutils/util.py 2006-05-23 21:54:23.000000000 +0000
-+++ Python-2.5.1/Lib/distutils/util.py 2008-01-09 07:47:28.000000000 +0000
-@@ -13,110 +13,7 @@
- from distutils import log
-
- def get_platform ():
-- """Return a string that identifies the current platform. This is used
-- mainly to distinguish platform-specific build directories and
-- platform-specific built distributions. Typically includes the OS name
-- and version and the architecture (as supplied by 'os.uname()'),
-- although the exact information included depends on the OS; eg. for IRIX
-- the architecture isn't particularly important (IRIX only runs on SGI
-- hardware), but for Linux the kernel version isn't particularly
-- important.
--
-- Examples of returned values:
-- linux-i586
-- linux-alpha (?)
-- solaris-2.6-sun4u
-- irix-5.3
-- irix64-6.2
--
-- For non-POSIX platforms, currently just returns 'sys.platform'.
-- """
-- if os.name != "posix" or not hasattr(os, 'uname'):
-- # XXX what about the architecture? NT is Intel or Alpha,
-- # Mac OS is M68k or PPC, etc.
-- return sys.platform
--
-- # Try to distinguish various flavours of Unix
--
-- (osname, host, release, version, machine) = os.uname()
--
-- # Convert the OS name to lowercase, remove '/' characters
-- # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh")
-- osname = string.lower(osname)
-- osname = string.replace(osname, '/', '')
-- machine = string.replace(machine, ' ', '_')
-- machine = string.replace(machine, '/', '-')
--
-- if osname[:5] == "linux":
-- # At least on Linux/Intel, 'machine' is the processor --
-- # i386, etc.
-- # XXX what about Alpha, SPARC, etc?
-- return "%s-%s" % (osname, machine)
-- elif osname[:5] == "sunos":
-- if release[0] >= "5": # SunOS 5 == Solaris 2
-- osname = "solaris"
-- release = "%d.%s" % (int(release[0]) - 3, release[2:])
-- # fall through to standard osname-release-machine representation
-- elif osname[:4] == "irix": # could be "irix64"!
-- return "%s-%s" % (osname, release)
-- elif osname[:3] == "aix":
-- return "%s-%s.%s" % (osname, version, release)
-- elif osname[:6] == "cygwin":
-- osname = "cygwin"
-- rel_re = re.compile (r'[\d.]+')
-- m = rel_re.match(release)
-- if m:
-- release = m.group()
-- elif osname[:6] == "darwin":
-- #
-- # For our purposes, we'll assume that the system version from
-- # distutils' perspective is what MACOSX_DEPLOYMENT_TARGET is set
-- # to. This makes the compatibility story a bit more sane because the
-- # machine is going to compile and link as if it were
-- # MACOSX_DEPLOYMENT_TARGET.
-- from distutils.sysconfig import get_config_vars
-- cfgvars = get_config_vars()
--
-- macver = os.environ.get('MACOSX_DEPLOYMENT_TARGET')
-- if not macver:
-- macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET')
--
-- if not macver:
-- # Get the system version. Reading this plist is a documented
-- # way to get the system version (see the documentation for
-- # the Gestalt Manager)
-- try:
-- f = open('/System/Library/CoreServices/SystemVersion.plist')
-- except IOError:
-- # We're on a plain darwin box, fall back to the default
-- # behaviour.
-- pass
-- else:
-- m = re.search(
-- r'<key>ProductUserVisibleVersion</key>\s*' +
-- r'<string>(.*?)</string>', f.read())
-- f.close()
-- if m is not None:
-- macver = '.'.join(m.group(1).split('.')[:2])
-- # else: fall back to the default behaviour
--
-- if macver:
-- from distutils.sysconfig import get_config_vars
-- release = macver
-- osname = "macosx"
--
--
-- if (release + '.') < '10.4.' and \
-- get_config_vars().get('UNIVERSALSDK', '').strip():
-- # The universal build will build fat binaries, but not on
-- # systems before 10.4
-- machine = 'fat'
--
-- elif machine in ('PowerPC', 'Power_Macintosh'):
-- # Pick a sane name for the PPC architecture.
-- machine = 'ppc'
--
-- return "%s-%s-%s" % (osname, release, machine)
-+ return 'darwin-10.5-arm'
-
- # get_platform ()
-
diff --git a/data/python/dylib.diff b/data/python/dylib.diff
deleted file mode 100644
index 979925d4a..000000000
--- a/data/python/dylib.diff
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -ru Python-2.5.1/Python/dynload_shlib.c Python-2.5.1+iPhone/Python/dynload_shlib.c
---- Python-2.5.1/Python/dynload_shlib.c 2006-01-04 01:30:17.000000000 +0000
-+++ Python-2.5.1+iPhone/Python/dynload_shlib.c 2008-01-09 10:04:49.000000000 +0000
-@@ -40,11 +40,14 @@
- {".pyd", "rb", C_EXTENSION},
- {".dll", "rb", C_EXTENSION},
- #else
--#ifdef __VMS
-+#if defined(__VMS)
- {".exe", "rb", C_EXTENSION},
- {".EXE", "rb", C_EXTENSION},
- {"module.exe", "rb", C_EXTENSION},
- {"MODULE.EXE", "rb", C_EXTENSION},
-+#elif defined(__APPLE__)
-+ {".dylib", "rb", C_EXTENSION},
-+ {"module.dylib", "rb", C_EXTENSION},
- #else
- {".so", "rb", C_EXTENSION},
- {"module.so", "rb", C_EXTENSION},
-diff -ru Python-2.5.1/configure.in Python-2.5.1+iPhone/configure.in
---- Python-2.5.1/configure.in 2007-03-12 10:50:51.000000000 +0000
-+++ Python-2.5.1+iPhone/configure.in 2008-01-09 10:27:52.000000000 +0000
-@@ -636,8 +638,8 @@
- RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
- INSTSONAME="$LDLIBRARY".$SOVERSION
- ;;
-- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
-- LDLIBRARY='libpython$(VERSION).so'
-+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|Darwin*)
-+ LDLIBRARY='libpython$(VERSION)'"${SO-so}"
- BLDLIBRARY='-L. -lpython$(VERSION)'
- RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
- case $ac_sys_system in
diff --git a/data/python/environ.diff b/data/python/environ.diff
deleted file mode 100644
index 9e011b5dc..000000000
--- a/data/python/environ.diff
+++ /dev/null
@@ -1,35 +0,0 @@
-diff -ru Python-2.5.1/Misc/setuid-prog.c Python-2.5.1+iPhone/Misc/setuid-prog.c
---- Python-2.5.1/Misc/setuid-prog.c 1998-09-10 20:18:09.000000000 +0000
-+++ Python-2.5.1+iPhone/Misc/setuid-prog.c 2008-04-13 02:50:37.000000000 +0000
-@@ -102,9 +102,8 @@
- clean_environ(void)
- {
- char **p;
-- extern char **environ;
-
-- for (p = environ; *p; p++) {
-+ for (p = _NSGetEnviron(); *p; p++) {
- if (strncmp(*p, "LD_", 3) == 0)
- **p = 'X';
- else if (strncmp(*p, "_RLD", 4) == 0)
-diff -ru Python-2.5.1/Modules/posixmodule.c Python-2.5.1+iPhone/Modules/posixmodule.c
---- Python-2.5.1/Modules/posixmodule.c 2007-04-04 18:30:56.000000000 +0000
-+++ Python-2.5.1+iPhone/Modules/posixmodule.c 2008-04-29 10:50:27.000000000 +0000
-@@ -339,7 +339,7 @@
- #endif
-
- /* Return a dictionary corresponding to the POSIX environment table */
--#ifdef WITH_NEXT_FRAMEWORK
-+#if 1
- /* On Darwin/MacOSX a shared library or framework has no access to
- ** environ directly, we must obtain it with _NSGetEnviron().
- */
-@@ -357,7 +357,7 @@
- d = PyDict_New();
- if (d == NULL)
- return NULL;
--#ifdef WITH_NEXT_FRAMEWORK
-+#if 1
- if (environ == NULL)
- environ = *_NSGetEnviron();
- #endif
diff --git a/data/python/framework.diff b/data/python/framework.diff
deleted file mode 100644
index 2593a590c..000000000
--- a/data/python/framework.diff
+++ /dev/null
@@ -1,28 +0,0 @@
-diff -r -u Python-2.5.1/Mac/Makefile.in Python-2.5.1+iPhone/Mac/Makefile.in
---- Python-2.5.1/Mac/Makefile.in 2006-06-11 20:23:29.000000000 +0000
-+++ Python-2.5.1+iPhone/Mac/Makefile.in 2008-01-09 11:32:54.000000000 +0000
-@@ -223,7 +223,6 @@
- done
-
-
-- $(RUNSHARED) $(BUILDPYTHON) $(CACHERSRC) -v $(DESTDIR)$(MACLIBDEST) $(DESTDIR)$(MACTOOLSDEST)
- $(RUNSHARED) $(BUILDPYTHON) -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
- $(RUNSHARED) $(BUILDPYTHON) -O -Wi -tt $(compileall) -d $(MACTOOLSDEST) -x badsyntax $(DESTDIR)$(MACTOOLSDEST)
-
-diff -r -u Python-2.5.1/Makefile.pre.in Python-2.5.1+iPhone/Makefile.pre.in
---- Python-2.5.1/Makefile.pre.in 2006-12-08 20:46:13.000000000 +0000
-+++ Python-2.5.1+iPhone/Makefile.pre.in 2008-01-09 11:34:00.000000000 +0000
-@@ -391,8 +391,11 @@
- -compatibility_version $(VERSION) \
- -current_version $(VERSION); \
- else \
-- libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) \
-- @LIBTOOL_CRUFT@ ;\
-+ $(CC) -o $(LDLIBRARY) -arch_only arm -dynamiclib \
-+ -all_load $(LIBRARY) -Wl,-single_module \
-+ -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) \
-+ -compatibility_version $(VERSION) \
-+ -current_version $(VERSION); \
- fi
- $(INSTALL) -d -m $(DIRMODE) \
- $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj
diff --git a/data/python/gestalt.diff b/data/python/gestalt.diff
deleted file mode 100644
index febf9c32b..000000000
--- a/data/python/gestalt.diff
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -ru Python-2.5.1/Lib/ctypes/__init__.py Python-2.5.1+iPhone/Lib/ctypes/__init__.py
---- Python-2.5.1/Lib/ctypes/__init__.py 2007-03-09 20:21:16.000000000 +0000
-+++ Python-2.5.1+iPhone/Lib/ctypes/__init__.py 2008-03-08 20:35:54.000000000 +0000
-@@ -24,19 +24,13 @@
-
- DEFAULT_MODE = RTLD_LOCAL
- if _os.name == "posix" and _sys.platform == "darwin":
-- import gestalt
-+ import platform
-
-- # gestalt.gestalt("sysv") returns the version number of the
-- # currently active system file as BCD.
-- # On OS X 10.4.6 -> 0x1046
-- # On OS X 10.2.8 -> 0x1028
-- # See also http://www.rgaros.nl/gestalt/
-- #
- # On OS X 10.3, we use RTLD_GLOBAL as default mode
- # because RTLD_LOCAL does not work at least on some
- # libraries.
-
-- if gestalt.gestalt("sysv") < 0x1040:
-+ if int(platform.release().split('.')[0]) < 8:
- DEFAULT_MODE = RTLD_GLOBAL
-
- from _ctypes import FUNCFLAG_CDECL as _FUNCFLAG_CDECL, \
diff --git a/data/python/longlong.diff b/data/python/longlong.diff
deleted file mode 100644
index 82e339059..000000000
--- a/data/python/longlong.diff
+++ /dev/null
@@ -1,28 +0,0 @@
-diff -ru Python-2.5.1/Modules/_ctypes/cfield.c Python-2.5.1+iPhone/Modules/_ctypes/cfield.c
---- Python-2.5.1/Modules/_ctypes/cfield.c 2007-03-22 19:43:37.000000000 +0000
-+++ Python-2.5.1+iPhone/Modules/_ctypes/cfield.c 2008-03-08 21:04:51.000000000 +0000
-@@ -1538,20 +1538,13 @@
- { 'H', H_set, H_get, &ffi_type_ushort, H_set_sw, H_get_sw},
- { 'i', i_set, i_get, &ffi_type_sint, i_set_sw, i_get_sw},
- { 'I', I_set, I_get, &ffi_type_uint, I_set_sw, I_get_sw},
--/* XXX Hm, sizeof(int) == sizeof(long) doesn't hold on every platform */
--/* As soon as we can get rid of the type codes, this is no longer a problem */
--#if SIZEOF_LONG == 4
-- { 'l', l_set, l_get, &ffi_type_sint, l_set_sw, l_get_sw},
-- { 'L', L_set, L_get, &ffi_type_uint, L_set_sw, L_get_sw},
--#elif SIZEOF_LONG == 8
- { 'l', l_set, l_get, &ffi_type_slong, l_set_sw, l_get_sw},
- { 'L', L_set, L_get, &ffi_type_ulong, L_set_sw, L_get_sw},
--#else
--# error
--#endif
-+/* XXX Hm, sizeof(long) == sizeof(int64_t) doesn't hold on every platform */
-+/* As soon as we can get rid of the type codes, this is no longer a problem */
- #ifdef HAVE_LONG_LONG
-- { 'q', q_set, q_get, &ffi_type_slong, q_set_sw, q_get_sw},
-- { 'Q', Q_set, Q_get, &ffi_type_ulong, Q_set_sw, Q_get_sw},
-+ { 'q', q_set, q_get, &ffi_type_sint64, q_set_sw, q_get_sw},
-+ { 'Q', Q_set, Q_get, &ffi_type_uint64, Q_set_sw, Q_get_sw},
- #endif
- { 'P', P_set, P_get, &ffi_type_pointer},
- { 'z', z_set, z_get, &ffi_type_pointer},
diff --git a/data/python/make.sh b/data/python/make.sh
index 059937971..e4ba3d1d9 100644
--- a/data/python/make.sh
+++ b/data/python/make.sh
@@ -1,23 +1,8 @@
pkg:extract
cd *
-./configure --prefix=/usr
-make
-cp -a Parser/pgen{,_}
-cp -a python{,_}
-sleep 10
+./configure
+make -j8
pkg:patch
-autoconf
-SO=.dylib CXX=${PKG_TARG}-g++ pkg:configure --enable-shared --with-system-ffi --with-signal-module --disable-toolbox-glue
-make clean
-rm libpython2.5.a
-#make Include/graminit.h Python/graminit.c CC=gcc BASECFLAGS=
-#cp -a Parser/pgen pgen-host
-#make clean
-make python AR=${PKG_TARG}-ar
-sleep 2
-touch python_
-make BUILDPYTHON=python_
-pkg:install BUILDPYTHON=python_
-pkg: rm -f /usr/bin/python{,2.5}
-pkg: cp -fa python /usr/bin/python2.5
-pkg: ln -s python2.5 /usr/bin/python
+CFLAGS='-Wno-format' pkg:configure --disable-ipv6 ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no ac_cv_have_long_long_format=yes --disable-toolbox-glue
+make -j8
+pkg:install
diff --git a/data/python/modules.diff b/data/python/modules.diff
deleted file mode 100644
index f5b9985b6..000000000
--- a/data/python/modules.diff
+++ /dev/null
@@ -1,32 +0,0 @@
-diff -ru Python-2.5.1/setup.py Python-2.5.1+iPhone/setup.py
---- Python-2.5.1/setup.py 2007-02-14 12:53:41.000000000 +0000
-+++ Python-2.5.1+iPhone/setup.py 2008-01-09 12:43:58.000000000 +0000
-@@ -460,8 +430,7 @@
- # 64-bit platforms.
- exts.append( Extension('audioop', ['audioop.c']) )
-
-- # Disabled on 64-bit platforms
-- if sys.maxint != 9223372036854775807L:
-+ if True:
- # Operations on images
- exts.append( Extension('imageop', ['imageop.c']) )
- # Read SGI RGB image files (but coded portably)
-@@ -606,7 +577,7 @@
- # a release. Most open source OSes come with one or more
- # versions of BerkeleyDB already installed.
-
-- max_db_ver = (4, 5)
-+ max_db_ver = (4, 6)
- min_db_ver = (3, 3)
- db_setup_debug = False # verbose debug prints from this script?
-
-@@ -1025,8 +996,7 @@
- exts.append(Extension('_codecs_' + loc,
- ['cjkcodecs/_codecs_%s.c' % loc]))
-
-- # Dynamic loading module
-- if sys.maxint == 0x7fffffff:
-+ if True:
- # This requires sizeof(int) == sizeof(long) == sizeof(char*)
- dl_inc = find_file('dlfcn.h', [], inc_dirs)
- if (dl_inc is not None) and (platform not in ['atheos']):
diff --git a/data/python/starpython.diff b/data/python/starpython.diff
new file mode 100644
index 000000000..8750b00e7
--- /dev/null
+++ b/data/python/starpython.diff
@@ -0,0 +1,152 @@
+Only in Python-2.7.15+iPhone/Lib: _scproxy.py
+diff -ur Python-2.7.15/Makefile.pre.in Python-2.7.15+iPhone/Makefile.pre.in
+--- Python-2.7.15/Makefile.pre.in 2018-04-29 12:47:33.000000000 -1000
++++ Python-2.7.15+iPhone/Makefile.pre.in 2018-09-04 18:39:57.000000000 -1000
+@@ -1131,28 +1131,30 @@
+ $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
+ $(DESTDIR)$(LIBDEST)/distutils/tests ; \
+ fi
+- 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) \
+- $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
+- -d $(LIBDEST) -f \
+- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+- $(DESTDIR)$(LIBDEST)
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
+- -d $(LIBDEST)/site-packages -f \
+- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
+- -d $(LIBDEST)/site-packages -f \
+- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
++# compile use host python, which may not be 2.7.9, which lead to fail.
++# So, we not compile, by srplab
++# 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) \
++# $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
++# -d $(LIBDEST) -f \
++# -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
++# $(DESTDIR)$(LIBDEST)
++# -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
++# $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
++# -d $(LIBDEST)/site-packages -f \
++# -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
++# -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
++# $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
++# -d $(LIBDEST)/site-packages -f \
++# -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
++# -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
++# $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
++# -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
++# $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
+
+ # Create the PLATDIR source directory, if one wasn't distributed..
+ $(srcdir)/Lib/$(PLATDIR):
+Only in Python-2.7.15+iPhone: Makefile.pre.in.orig
+diff -ur Python-2.7.15/Python/dynload_shlib.c Python-2.7.15+iPhone/Python/dynload_shlib.c
+--- Python-2.7.15/Python/dynload_shlib.c 2018-04-29 12:47:33.000000000 -1000
++++ Python-2.7.15+iPhone/Python/dynload_shlib.c 2018-09-04 18:39:57.000000000 -1000
+@@ -84,6 +84,14 @@
+ PyOS_snprintf(funcname, sizeof(funcname),
+ LEAD_UNDERSCORE "init%.200s", shortname);
+
++ /* On IOS, dlopen crash as soon as we try to open one of our library.
++ * Instead, we have done a redirection of linking to convert our .so into a
++ * .a. Then the main executable is linked with theses symbol. So, instead
++ * of trying to dlopen, directly do the dlsym.
++ * -- Mathieu
++ */
++ return (dl_funcptr) dlsym(RTLD_DEFAULT, funcname);
++#if 0
+ if (fp != NULL) {
+ int i;
+ struct stat statb;
+@@ -140,4 +148,5 @@
+ handles[nhandles++].handle = handle;
+ p = (dl_funcptr) dlsym(handle, funcname);
+ return p;
++#endif
+ }
+diff -ur Python-2.7.15/Python/pythonrun.c Python-2.7.15+iPhone/Python/pythonrun.c
+--- Python-2.7.15/Python/pythonrun.c 2018-04-29 12:47:33.000000000 -1000
++++ Python-2.7.15+iPhone/Python/pythonrun.c 2018-09-04 18:39:57.000000000 -1000
+@@ -287,8 +287,10 @@
+ _PyGILState_Init(interp, tstate);
+ #endif /* WITH_THREAD */
+
++#if 0
+ if (!Py_NoSiteFlag)
+ initsite(); /* Module site */
++#endif
+
+ if ((p = Py_GETENV("PYTHONIOENCODING")) && *p != '\0') {
+ p = icodeset = codeset = strdup(p);
+Only in Python-2.7.15+iPhone/Python: pythonrun.c.orig
+Only in Python-2.7.15+iPhone: config.site
+diff -ur Python-2.7.15/configure Python-2.7.15+iPhone/configure
+--- Python-2.7.15/configure 2018-04-29 12:47:33.000000000 -1000
++++ Python-2.7.15+iPhone/configure 2018-09-04 18:39:57.000000000 -1000
+@@ -3287,6 +3287,9 @@
+ *-*-cygwin*)
+ ac_sys_system=Cygwin
+ ;;
++ *-*-darwin*)
++ ac_sys_system=Darwin
++ ;;
+ *)
+ # for now, limit cross builds to known configurations
+ MACHDEP="unknown"
+@@ -3333,6 +3336,15 @@
+ *-*-cygwin*)
+ _host_cpu=
+ ;;
++ *-*-darwin*)
++ case "$host_cpu" in
++ arm*)
++ _host_cpu=arm
++ ;;
++ *)
++ _host_cpu=$host_cpu
++ esac
++ ;;
+ *)
+ # for now, limit cross builds to known configurations
+ MACHDEP="unknown"
+Only in Python-2.7.15+iPhone: configure.orig
+diff -ur Python-2.7.15/setup.py Python-2.7.15+iPhone/setup.py
+--- Python-2.7.15/setup.py 2018-04-29 12:47:33.000000000 -1000
++++ Python-2.7.15+iPhone/setup.py 2018-09-04 18:40:07.000000000 -1000
+@@ -188,7 +188,7 @@
+ ext_map = dict((ext.name, i) for i, ext in enumerate(extensions))
+ if "_ctypes" in ext_map:
+ ctypes = extensions.pop(ext_map["_ctypes"])
+- extensions.append(ctypes)
++ # extensions.append(ctypes) # not build ctypes, by srplab
+ self.extensions = extensions
+
+ # Fix up the autodetected modules, prefixing all the source files
+@@ -1433,8 +1433,8 @@
+ missing.append('zlib')
+ else:
+ missing.append('zlib')
+- else:
+- missing.append('zlib')
++ #else:
++ # missing.append('zlib')
+
+ # Helper module for various ascii-encoders. Uses zlib for an optimized
+ # crc32 if we have it. Otherwise binascii uses its own.
+Only in Python-2.7.15+iPhone: setup.py.orig
diff --git a/data/python/test.diff b/data/python/test.diff
deleted file mode 100644
index e2258207b..000000000
--- a/data/python/test.diff
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -ru Python-2.5.1/Makefile.pre.in Python-2.5.1+iPhone/Makefile.pre.in
---- Python-2.5.1/Makefile.pre.in 2006-12-08 20:46:13.000000000 +0000
-+++ Python-2.5.1+iPhone/Makefile.pre.in 2008-01-09 08:21:39.000000000 +0000
-@@ -775,11 +775,11 @@
- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST) -f \
-- -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
-+ -x 'bad_coding|badsyntax|site-packages|test' $(DESTDIR)$(LIBDEST)
- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST) -f \
-- -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
-+ -x 'bad_coding|badsyntax|site-packages|test' $(DESTDIR)$(LIBDEST)
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST)/site-packages -f \
diff --git a/data/python/timestamp.diff b/data/python/timestamp.diff
index 76642259f..cebeb8131 100644
--- a/data/python/timestamp.diff
+++ b/data/python/timestamp.diff
@@ -1,6 +1,6 @@
-diff -ru Python-2.5.1/Modules/getbuildinfo.c Python-2.5.1+iPhone/Modules/getbuildinfo.c
---- Python-2.5.1/Modules/getbuildinfo.c 2006-01-18 09:13:51.000000000 +0000
-+++ Python-2.5.1+iPhone/Modules/getbuildinfo.c 2008-06-19 08:00:45.000000000 +0000
+diff -ur Python-2.7.15/Modules/getbuildinfo.c Python-2.7.15+iPhone/Modules/getbuildinfo.c
+--- Python-2.7.15/Modules/getbuildinfo.c 2018-04-29 12:47:33.000000000 -1000
++++ Python-2.7.15+iPhone/Modules/getbuildinfo.c 2018-09-04 16:04:45.000000000 -1000
@@ -5,20 +5,12 @@
#endif
@@ -20,5 +20,5 @@ diff -ru Python-2.5.1/Modules/getbuildinfo.c Python-2.5.1+iPhone/Modules/getbuil
#endif
-#endif
- #ifdef SUBWCREV
- #define SVNVERSION "$WCRANGE$$WCMODS?M:$"
+ /* XXX Only unix build process has been tested */
+ #ifndef GITVERSION
diff --git a/data/python/zz-setup.diff b/data/python/zz-setup.diff
new file mode 100644
index 000000000..6116ff998
--- /dev/null
+++ b/data/python/zz-setup.diff
@@ -0,0 +1,175 @@
+diff -ur Python-2.7.15/setup.py Python-2.7.15+iPhone/setup.py
+--- Python-2.7.15/setup.py 2018-04-29 12:47:33.000000000 -1000
++++ Python-2.7.15+iPhone/setup.py 2018-09-04 21:49:58.000000000 -1000
+@@ -18,6 +18,7 @@
+ from distutils.spawn import find_executable
+
+ cross_compiling = "_PYTHON_HOST_PLATFORM" in os.environ
++sysroot = os.environ['PKG_ROOT']
+
+ def get_platform():
+ # cross build
+@@ -49,9 +50,7 @@
+ """
+ cflags = sysconfig.get_config_var('CFLAGS')
+ m = re.search(r'-isysroot\s+(\S+)', cflags)
+- if m is None:
+- sysroot = '/'
+- else:
++ if m is not None:
+ sysroot = m.group(1)
+ return sysroot
+
+@@ -80,6 +79,8 @@
+ # system, but with only header files and libraries.
+ sysroot = macosx_sdk_root()
+
++ sysroot = os.environ['PKG_ROOT']
++
+ # Check the standard locations
+ for dir in std_dirs:
+ f = os.path.join(dir, filename)
+@@ -110,6 +111,8 @@
+ if host_platform == 'darwin':
+ sysroot = macosx_sdk_root()
+
++ sysroot = os.environ['PKG_ROOT']
++
+ # Check whether the found file is in one of the standard directories
+ dirname = os.path.dirname(result)
+ for p in std_dirs:
+@@ -461,6 +464,7 @@
+ if cross_compiling:
+ self.add_gcc_paths()
+ self.add_multiarch_paths()
++ sysroot = os.environ['PKG_ROOT']
+
+ # Add paths specified in the environment variables LDFLAGS and
+ # CPPFLAGS for header and library files.
+@@ -497,7 +501,8 @@
+ add_dir_to_list(dir_list, directory)
+
+ if os.path.normpath(sys.prefix) != '/usr' \
+- and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
++ and not sysconfig.get_config_var('PYTHONFRAMEWORK') \
++ and not cross_compiling:
+ # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
+ # (PYTHONFRAMEWORK is set) to avoid # linking problems when
+ # building a framework with different architectures than
+@@ -519,12 +524,12 @@
+ lib_dirs = self.compiler.library_dirs[:]
+ if not cross_compiling:
+ for d in (
+- '/usr/include',
++ sysroot + '/usr/include',
+ ):
+ add_dir_to_list(inc_dirs, d)
+ for d in (
+- '/lib64', '/usr/lib64',
+- '/lib', '/usr/lib',
++ sysroot + '/lib64', sysroot + '/usr/lib64',
++ sysroot + '/lib', sysroot + '/usr/lib',
+ ):
+ add_dir_to_list(lib_dirs, d)
+ exts = []
+@@ -808,21 +813,22 @@
+ depends=['socketmodule.h'],
+ libraries=math_libs) )
+ # Detect SSL support for the socket module (via _ssl)
++ sysroot = os.environ['PKG_ROOT']
+ search_for_ssl_incs_in = [
+- '/usr/local/ssl/include',
+- '/usr/contrib/ssl/include/'
++ sysroot + '/usr/local/ssl/include',
++ sysroot + '/usr/contrib/ssl/include/'
+ ]
+ ssl_incs = find_file('openssl/ssl.h', inc_dirs,
+ search_for_ssl_incs_in
+ )
+ if ssl_incs is not None:
+ krb5_h = find_file('krb5.h', inc_dirs,
+- ['/usr/kerberos/include'])
++ [sysroot + '/usr/kerberos/include'])
+ if krb5_h:
+ ssl_incs += krb5_h
+ ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
+- ['/usr/local/ssl/lib',
+- '/usr/contrib/ssl/lib/'
++ [sysroot + '/usr/local/ssl/lib',
++ sysroot + '/usr/contrib/ssl/lib/'
+ ] )
+
+ if (ssl_incs is not None and
+@@ -944,16 +950,17 @@
+
+ # construct a list of paths to look for the header file in on
+ # top of the normal inc_dirs.
++ sysroot = os.environ['PKG_ROOT']
+ db_inc_paths = [
+- '/usr/include/db4',
+- '/usr/local/include/db4',
+- '/opt/sfw/include/db4',
+- '/usr/include/db3',
+- '/usr/local/include/db3',
+- '/opt/sfw/include/db3',
++ sysroot + '/usr/include/db4',
++ sysroot + '/usr/local/include/db4',
++ sysroot + '/opt/sfw/include/db4',
++ sysroot + '/usr/include/db3',
++ sysroot + '/usr/local/include/db3',
++ sysroot + '/opt/sfw/include/db3',
+ # Fink defaults (http://fink.sourceforge.net/)
+- '/sw/include/db4',
+- '/sw/include/db3',
++ sysroot + '/sw/include/db4',
++ sysroot + '/sw/include/db3',
+ ]
+ # 4.x minor number specific paths
+ for x in gen_db_minor_ver_nums(4):
+@@ -1133,8 +1140,7 @@
+ # Scan the default include directories before the SQLite specific
+ # ones. This allows one to override the copy of sqlite on OSX,
+ # where /usr/include contains an old version of sqlite.
+- if host_platform == 'darwin':
+- sysroot = macosx_sdk_root()
++ sysroot = os.environ['PKG_ROOT']
+
+ for d_ in inc_dirs + sqlite_inc_paths:
+ d = d_
+@@ -1231,7 +1237,6 @@
+
+ if host_platform == 'darwin':
+ if is_macosx_sdk_path(f):
+- sysroot = macosx_sdk_root()
+ f = os.path.join(sysroot, f[1:])
+
+ if os.path.exists(f) and not db_incs:
+@@ -1797,7 +1802,6 @@
+ join(os.getenv('HOME'), '/Library/Frameworks')
+ ]
+
+- sysroot = macosx_sdk_root()
+
+ # Find the directory that contains the Tcl.framework and Tk.framework
+ # bundles.
+@@ -1843,6 +1847,7 @@
+ cflags = sysconfig.get_config_vars('CFLAGS')[0]
+ archs = re.findall('-arch\s+(\w+)', cflags)
+
++ sysroot = os.environ['PKG_ROOT']
+ if is_macosx_sdk_path(F):
+ fp = os.popen("file %s/Tk.framework/Tk | grep 'for architecture'"%(os.path.join(sysroot, F[1:]),))
+ else:
+@@ -2117,10 +2122,11 @@
+ if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"):
+ return
+
++ sysroot = os.environ['PKG_ROOT']
+ if host_platform == 'darwin':
+ # OS X 10.5 comes with libffi.dylib; the include files are
+ # in /usr/include/ffi
+- inc_dirs.append('/usr/include/ffi')
++ inc_dirs.append(sysroot + '/usr/include/ffi')
+
+ ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")]
+ if not ffi_inc or ffi_inc[0] == '':