diff --git a/dev-lang/python/patches/python-2.7.6.patchset b/dev-lang/python/patches/python-2.7.10.patchset similarity index 80% rename from dev-lang/python/patches/python-2.7.6.patchset rename to dev-lang/python/patches/python-2.7.10.patchset index 4698005bc..7749dfb81 100644 --- a/dev-lang/python/patches/python-2.7.6.patchset +++ b/dev-lang/python/patches/python-2.7.10.patchset @@ -1,4 +1,4 @@ -From e158682a7e7e4eaee89b0a319898cc81fe87a051 Mon Sep 17 00:00:00 2001 +From c0a96d9df40b6b648dede4fd54ce52c6bef67e1e Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Wed, 12 Mar 2014 21:17:06 +0000 Subject: initial Haiku patch @@ -79,7 +79,7 @@ index b9f1c6c..7be61d3 100644 # finalize_unix () diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py -index 4aa9334..d06e5e8 100644 +index de7da1d..8180c8e 100644 --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py @@ -90,7 +90,8 @@ def get_python_inc(plat_specific=0, prefix=None): @@ -465,17 +465,17 @@ index 0000000..d9da80c +set -v +python $H2PY -i '(u_long)' $HEADERS/posix/netinet/in.h diff --git a/Lib/test/test_fileio.py b/Lib/test/test_fileio.py -index e7955cc..703ddf6 100644 +index e21e47f..7baf562 100644 --- a/Lib/test/test_fileio.py +++ b/Lib/test/test_fileio.py -@@ -297,6 +297,7 @@ class OtherFileTests(unittest.TestCase): - self.assertEqual(f.writable(), True) - if sys.platform != "darwin" and \ - 'bsd' not in sys.platform and \ -+ 'haiku' not in sys.platform and \ - not sys.platform.startswith('sunos'): - # Somehow /dev/tty appears seekable on some BSDs - self.assertEqual(f.seekable(), False) +@@ -308,6 +308,7 @@ class OtherFileTests(unittest.TestCase): + self.assertEqual(f.writable(), True) + if sys.platform != "darwin" and \ + 'bsd' not in sys.platform and \ ++ 'haiku' not in sys.platform and \ + not sys.platform.startswith('sunos'): + # Somehow /dev/tty appears seekable on some BSDs + self.assertEqual(f.seekable(), False) diff --git a/Modules/resource.c b/Modules/resource.c index 53a6c3e..6c5f52f 100644 --- a/Modules/resource.c @@ -497,10 +497,10 @@ index 53a6c3e..6c5f52f 100644 if (PyErr_Occurred()) { Py_DECREF(result); diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c -index 2735ecc..fb01c63 100644 +index 5def531..5e3e5cc 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c -@@ -4865,7 +4865,9 @@ init_socket(void) +@@ -4871,7 +4871,9 @@ init_socket(void) #ifndef __BEOS__ /* We have incomplete socket support. */ PyModule_AddIntConstant(m, "SOCK_RAW", SOCK_RAW); @@ -511,7 +511,7 @@ index 2735ecc..fb01c63 100644 PyModule_AddIntConstant(m, "SOCK_RDM", SOCK_RDM); #endif diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h -index 8515499..4e33e4f 100644 +index d98e00e..2bfb3dc 100644 --- a/Modules/socketmodule.h +++ b/Modules/socketmodule.h @@ -47,6 +47,10 @@ typedef int socklen_t; @@ -558,7 +558,7 @@ index 12c43b0..206b325 100644 Py_BEGIN_ALLOW_THREADS diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c -index d22dca2..9a5d561 100644 +index f052574..6a77f0d 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -19,7 +19,7 @@ @@ -571,7 +571,7 @@ index d22dca2..9a5d561 100644 #else const char *Py_FileSystemDefaultEncoding = NULL; /* use default */ diff --git a/Tools/scripts/h2py.py b/Tools/scripts/h2py.py -index c64501e..7df3ad7 100755 +index 40b1bce..4185370 100755 --- a/Tools/scripts/h2py.py +++ b/Tools/scripts/h2py.py @@ -50,7 +50,7 @@ except KeyError: @@ -584,19 +584,19 @@ index c64501e..7df3ad7 100755 elif sys.platform.startswith("atheos"): searchdirs=os.environ['C_INCLUDE_PATH'].split(':') diff --git a/configure.ac b/configure.ac -index 891d568..24959b3 100644 +index 78fe3c7..09f4249 100644 --- a/configure.ac +++ b/configure.ac -@@ -883,7 +883,7 @@ if test $enable_shared = "yes"; then - RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} +@@ -889,7 +889,7 @@ if test $enable_shared = "yes"; then + RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} INSTSONAME="$LDLIBRARY".$SOVERSION ;; - Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*) + Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|Haiku*) LDLIBRARY='libpython$(VERSION).so' BLDLIBRARY='-L. -lpython$(VERSION)' - RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} -@@ -891,6 +891,9 @@ if test $enable_shared = "yes"; then + RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} +@@ -897,6 +897,9 @@ if test $enable_shared = "yes"; then FreeBSD*) SOVERSION=`echo $SOVERSION|cut -d "." -f 1` ;; @@ -606,7 +606,7 @@ index 891d568..24959b3 100644 esac INSTSONAME="$LDLIBRARY".$SOVERSION ;; -@@ -1006,7 +1009,7 @@ AC_PROG_MKDIR_P +@@ -1012,7 +1015,7 @@ AC_PROG_MKDIR_P AC_SUBST(LN) if test -z "$LN" ; then case $ac_sys_system in @@ -615,8 +615,8 @@ index 891d568..24959b3 100644 CYGWIN*) LN="ln -s";; atheos*) LN="ln -s";; *) LN=ln;; -@@ -2024,7 +2027,7 @@ then - fi +@@ -2036,7 +2039,7 @@ then + BLDSHARED="$LDSHARED" fi ;; - Linux*|GNU*|QNX*) @@ -624,7 +624,7 @@ index 891d568..24959b3 100644 LDSHARED='$(CC) -shared' LDCXXSHARED='$(CXX) -shared';; BSD/OS*/4*) -@@ -2096,7 +2099,7 @@ then +@@ -2108,7 +2111,7 @@ then then CCSHARED="-fPIC"; else CCSHARED="+z"; fi;; @@ -633,7 +633,7 @@ index 891d568..24959b3 100644 BSD/OS*/4*) CCSHARED="-fpic";; FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";; OpenUNIX*|UnixWare*) -@@ -2128,7 +2131,7 @@ then +@@ -2140,7 +2143,7 @@ then LINKFORSHARED="-Wl,-E -Wl,+s";; # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; @@ -642,7 +642,7 @@ index 891d568..24959b3 100644 # -u libsys_s pulls in all symbols in libsys Darwin/*) # -u _PyMac_Error is needed to pull in the mac toolbox glue, -@@ -2243,14 +2246,16 @@ case "$ac_sys_system" in +@@ -2258,14 +2261,16 @@ case "$ac_sys_system" in esac # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. @@ -663,7 +663,7 @@ index 891d568..24959b3 100644 esac AC_MSG_CHECKING(for --with-libs) -@@ -3586,7 +3591,7 @@ fi], +@@ -3602,7 +3607,7 @@ fi], AC_SUBST(LIBM) case $ac_sys_system in Darwin) ;; @@ -673,10 +673,10 @@ index 891d568..24959b3 100644 esac AC_MSG_CHECKING(for --with-libm=STRING) diff --git a/setup.py b/setup.py -index 40ad843..24621ef 100644 +index 6a6ad23..6bc6782 100644 --- a/setup.py +++ b/setup.py -@@ -523,6 +523,12 @@ class PyBuildExt(build_ext): +@@ -525,6 +525,12 @@ class PyBuildExt(build_ext): 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) @@ -689,7 +689,7 @@ index 40ad843..24621ef 100644 # OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb) if host_platform in ['osf1', 'unixware7', 'openunix8']: -@@ -551,7 +557,7 @@ class PyBuildExt(build_ext): +@@ -553,7 +559,7 @@ class PyBuildExt(build_ext): # Check for MacOS X, which doesn't need libm.a at all math_libs = ['m'] @@ -698,7 +698,7 @@ index 40ad843..24621ef 100644 math_libs = [] # XXX Omitted modules: gl, pure, dl, SGI-specific modules -@@ -788,15 +794,22 @@ class PyBuildExt(build_ext): +@@ -792,15 +798,22 @@ class PyBuildExt(build_ext): '/usr/local/ssl/include', '/usr/contrib/ssl/include/' ] @@ -724,7 +724,7 @@ index 40ad843..24621ef 100644 ['/usr/local/ssl/lib', '/usr/contrib/ssl/lib/' ] ) -@@ -804,8 +817,8 @@ class PyBuildExt(build_ext): +@@ -808,8 +821,8 @@ class PyBuildExt(build_ext): if (ssl_incs is not None and ssl_libs is not None): exts.append( Extension('_ssl', ['_ssl.c'], @@ -735,7 +735,7 @@ index 40ad843..24621ef 100644 libraries = ['ssl', 'crypto'], depends = ['socketmodule.h']), ) else: -@@ -843,8 +856,8 @@ class PyBuildExt(build_ext): +@@ -847,8 +860,8 @@ class PyBuildExt(build_ext): # The _hashlib module wraps optimized implementations # of hash functions from the OpenSSL library. exts.append( Extension('_hashlib', ['_hashopenssl.c'], @@ -746,7 +746,7 @@ index 40ad843..24621ef 100644 libraries = ['ssl', 'crypto']) ) else: print ("warning: openssl 0x%08x is too old for _hashlib" % -@@ -1324,7 +1337,7 @@ class PyBuildExt(build_ext): +@@ -1327,7 +1340,7 @@ class PyBuildExt(build_ext): missing.append('resource') # Sun yellow pages. Some systems have the functions in libc. @@ -759,14 +759,14 @@ index 40ad843..24621ef 100644 1.8.3.4 -From 5f8c5e79e84950d038d1c62328eef90c457de7b7 Mon Sep 17 00:00:00 2001 +From 8348c402f7f409e3024c78381c1d4e1f842ae448 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 5 Apr 2014 21:16:40 +0000 Subject: fix pyconfig.h path diff --git a/Makefile.pre.in b/Makefile.pre.in -index cf75650..bb54b6f 100644 +index b3b2b36..77340fd 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -105,7 +105,7 @@ BINDIR= @bindir@ @@ -782,7 +782,7 @@ index cf75650..bb54b6f 100644 1.8.3.4 -From a769fb6232923674b192bb7332027f1e12209084 Mon Sep 17 00:00:00 2001 +From 2f77b7b4f848d6b85cffa3f31c5f1c0026b64e64 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 18 Jun 2014 12:19:13 +0000 Subject: Import missed change from the 2.6.9 patches @@ -793,7 +793,7 @@ expected with this version of Python. diff --git a/Lib/site.py b/Lib/site.py -index f1b0ae8..c18a7dd 100644 +index 4a09f3c..4b6e01e 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -287,6 +287,13 @@ def getsitepackages(): @@ -814,17 +814,17 @@ index f1b0ae8..c18a7dd 100644 1.8.3.4 -From 7f0ea727b5110c0cbb4f88b7c4851ea431215f95 Mon Sep 17 00:00:00 2001 +From ef5bdbe6e87e4b5ad6b541c65051f8f13e392676 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 21 Sep 2014 18:59:44 +0200 Subject: gcc2 fix. diff --git a/Modules/_ctypes/libffi/include/ffi_common.h b/Modules/_ctypes/libffi/include/ffi_common.h -index 650ca69..02a1913 100644 +index 37f5a9e..37b0b25 100644 --- a/Modules/_ctypes/libffi/include/ffi_common.h +++ b/Modules/_ctypes/libffi/include/ffi_common.h -@@ -115,7 +115,7 @@ typedef signed int SINT64 __attribute__((__mode__(__DI__))); +@@ -119,7 +119,7 @@ typedef signed int SINT64 __attribute__((__mode__(__DI__))); typedef float FLOAT32; @@ -837,17 +837,17 @@ index 650ca69..02a1913 100644 1.8.3.4 -From 73930d516fe87aced15e67cd27cb221810ff1cdd Mon Sep 17 00:00:00 2001 +From 529eb791f594d7559a63b6088efea078fa012e7f Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Fri, 28 Nov 2014 16:26:28 +0000 Subject: tarfile: let link fail and catch exception. diff --git a/Lib/tarfile.py b/Lib/tarfile.py -index 44ecd24..7a0b4e3 100644 +index 082f361..4451189 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py -@@ -2238,7 +2238,7 @@ class TarFile(object): +@@ -2263,7 +2263,7 @@ class TarFile(object): (platform limitation), we try to make a copy of the referenced file instead of a link. """ @@ -856,7 +856,7 @@ index 44ecd24..7a0b4e3 100644 # For systems that support symbolic and hard links. if tarinfo.issym(): if os.path.lexists(targetpath): -@@ -2252,7 +2252,7 @@ class TarFile(object): +@@ -2277,7 +2277,7 @@ class TarFile(object): os.link(tarinfo._link_target, targetpath) else: self._extract_member(self._find_link_target(tarinfo), targetpath) @@ -868,3 +868,141 @@ index 44ecd24..7a0b4e3 100644 -- 1.8.3.4 + +From 2f5996ce4a51079584b6d7b4d1dfba9e8e8fb018 Mon Sep 17 00:00:00 2001 +From: Timothy Gu +Date: Sun, 11 Jan 2015 18:18:22 -0800 +Subject: Fix resource module after the initial haiku patch + + +diff --git a/Modules/resource.c b/Modules/resource.c +index 6c5f52f..73758bb 100644 +--- a/Modules/resource.c ++++ b/Modules/resource.c +@@ -101,6 +101,21 @@ resource_getrusage(PyObject *self, PyObject *args) + PyStructSequence_SET_ITEM(result, 13, PyInt_FromLong(ru.ru_nsignals)); + PyStructSequence_SET_ITEM(result, 14, PyInt_FromLong(ru.ru_nvcsw)); + PyStructSequence_SET_ITEM(result, 15, PyInt_FromLong(ru.ru_nivcsw)); ++#else ++ PyStructSequence_SET_ITEM(result, 2, PyInt_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 3, PyInt_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 4, PyInt_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 5, PyInt_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 6, PyInt_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 7, PyInt_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 8, PyInt_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 9, PyInt_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 10, PyInt_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 11, PyInt_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 12, PyInt_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 13, PyInt_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 14, PyInt_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 15, PyInt_FromLong(0)); + #endif + + if (PyErr_Occurred()) { +-- +1.8.3.4 + + +From 57c574a0ce25088f026dffbb9abc06f7b7610a98 Mon Sep 17 00:00:00 2001 +From: Timothy Gu +Date: Sun, 11 Jan 2015 18:40:43 -0800 +Subject: resource: Fix [gs]et_rlimit() modes detection + +Haiku defines many of them, but they are actually empty stubs that will always +return EINVAL. No better way of doing this. + +diff --git a/Modules/resource.c b/Modules/resource.c +index 73758bb..0c396f6 100644 +--- a/Modules/resource.c ++++ b/Modules/resource.c +@@ -284,19 +284,19 @@ initresource(void) + (PyObject*) &StructRUsageType); + + /* insert constants */ +-#ifdef RLIMIT_CPU ++#if !defined(__HAIKU__) && defined(RLIMIT_CPU) + PyModule_AddIntConstant(m, "RLIMIT_CPU", RLIMIT_CPU); + #endif + +-#ifdef RLIMIT_FSIZE ++#if !defined(__HAIKU__) && defined(RLIMIT_FSIZE) + PyModule_AddIntConstant(m, "RLIMIT_FSIZE", RLIMIT_FSIZE); + #endif + +-#ifdef RLIMIT_DATA ++#if !defined(__HAIKU__) && defined(RLIMIT_DATA) + PyModule_AddIntConstant(m, "RLIMIT_DATA", RLIMIT_DATA); + #endif + +-#ifdef RLIMIT_STACK ++#if !defined(__HAIKU__) && defined(RLIMIT_STACK) + PyModule_AddIntConstant(m, "RLIMIT_STACK", RLIMIT_STACK); + #endif + +@@ -308,31 +308,31 @@ initresource(void) + PyModule_AddIntConstant(m, "RLIMIT_NOFILE", RLIMIT_NOFILE); + #endif + +-#ifdef RLIMIT_OFILE ++#if !defined(__HAIKU__) && defined(RLIMIT_OFILE) + PyModule_AddIntConstant(m, "RLIMIT_OFILE", RLIMIT_OFILE); + #endif + +-#ifdef RLIMIT_VMEM ++#if !defined(__HAIKU__) && defined(RLIMIT_VMEM) + PyModule_AddIntConstant(m, "RLIMIT_VMEM", RLIMIT_VMEM); + #endif + +-#ifdef RLIMIT_AS ++#if !defined(__HAIKU__) && defined(RLIMIT_AS) + PyModule_AddIntConstant(m, "RLIMIT_AS", RLIMIT_AS); + #endif + +-#ifdef RLIMIT_RSS ++#if !defined(__HAIKU__) && defined(RLIMIT_RSS) + PyModule_AddIntConstant(m, "RLIMIT_RSS", RLIMIT_RSS); + #endif + +-#ifdef RLIMIT_NPROC ++#if !defined(__HAIKU__) && defined(RLIMIT_NPROC) + PyModule_AddIntConstant(m, "RLIMIT_NPROC", RLIMIT_NPROC); + #endif + +-#ifdef RLIMIT_MEMLOCK ++#if !defined(__HAIKU__) && defined(RLIMIT_MEMLOCK) + PyModule_AddIntConstant(m, "RLIMIT_MEMLOCK", RLIMIT_MEMLOCK); + #endif + +-#ifdef RLIMIT_SBSIZE ++#if !defined(__HAIKU__) && defined(RLIMIT_SBSIZE) + PyModule_AddIntConstant(m, "RLIMIT_SBSIZE", RLIMIT_SBSIZE); + #endif + +-- +1.8.3.4 + + +From d9e84b7fdfc5a049e471f63ea49763785b574ee7 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Tue, 26 May 2015 19:39:55 +0000 +Subject: Haiku hasn't makedev(), _PyInt_FromDev isn't defined. + + +diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c +index 4e86d32..ffe0db1 100644 +--- a/Modules/posixmodule.c ++++ b/Modules/posixmodule.c +@@ -1483,6 +1483,8 @@ _pystat_fromstructstat(STRUCT_STAT *st) + #endif + #ifdef MS_WINDOWS + PyStructSequence_SET_ITEM(v, 2, PyLong_FromUnsignedLong(st->st_dev)); ++#elif defined(__HAIKU__) ++ PyStructSequence_SET_ITEM(v, 2, PyInt_FromLong(st->st_dev)); + #else + PyStructSequence_SET_ITEM(v, 2, _PyInt_FromDev(st->st_dev)); + #endif +-- +1.8.3.4 + diff --git a/dev-lang/python/python-2.7.6.recipe b/dev-lang/python/python-2.7.10.recipe similarity index 87% rename from dev-lang/python/python-2.7.6.recipe rename to dev-lang/python/python-2.7.10.recipe index 538ea7e82..caac100c6 100644 --- a/dev-lang/python/python-2.7.6.recipe +++ b/dev-lang/python/python-2.7.10.recipe @@ -11,12 +11,12 @@ OSI-approved open source license. HOMEPAGE="http://www.python.org" LICENSE="Python" COPYRIGHT="1990-2012, Python Software Foundation" -SRC_URI="https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz" -CHECKSUM_SHA256="1fd68e81f8bf7386ff239b7faee9ba387129d2cf34eab13350bd8503a0bff6a1" -REVISION="6" -ARCHITECTURES="x86_gcc2 !x86 x86_64" +SRC_URI="https://www.python.org/ftp/python/$portVersion/Python-$portVersion.tar.xz" +CHECKSUM_SHA256="1cd3730781b91caf0fa1c4d472dc29274186480161a150294c42ce9b5c5effc0" +REVISION="1" +ARCHITECTURES="x86_gcc2 x86 x86_64" -PATCHES="python-2.7.6.patchset" +PATCHES="python-$portVersion.patchset" PROVIDES=" python = $portVersion compat >= 2.7 @@ -34,7 +34,7 @@ PROVIDES=" lib:libpython2.7 = 1.0 " REQUIRES=" - haiku + haiku >= $haikuVersion lib:libbz2 lib:libncurses lib:libssl @@ -53,7 +53,7 @@ BUILD_REQUIRES=" devel:libz " BUILD_PREREQUIRES=" - haiku_devel + haiku_devel >= $haikuVersion cmd:aclocal cmd:autoconf cmd:find @@ -64,7 +64,7 @@ BUILD_PREREQUIRES=" cmd:pkg_config " -SOURCE_DIR="Python-2.7.6" +SOURCE_DIR="Python-$portVersion" GLOBAL_WRITABLE_FILES=" non-packaged/lib/python2.7/site-packages directory keep-old