diff --git a/dev-lang/python/patches/python3-3.4.0.patchset b/dev-lang/python/patches/python3-3.4.0.patchset index ed7b611c7..aa994824c 100644 --- a/dev-lang/python/patches/python3-3.4.0.patchset +++ b/dev-lang/python/patches/python3-3.4.0.patchset @@ -1,4 +1,4 @@ -From 1c89acb4a76d78fb3df72d3c74647cffe340bfbd Mon Sep 17 00:00:00 2001 +From 40e14d16905c97a6793dabe45ec7b2fd228f03b7 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Thu, 10 Apr 2014 16:03:33 +0000 Subject: initial Haiku patch @@ -194,7 +194,7 @@ index 6cbc78f..3c2390a 100644 #ifdef SCHED_BATCH if (PyModule_AddIntMacro(m, SCHED_BATCH)) return -1; diff --git a/Modules/resource.c b/Modules/resource.c -index 3a1cf09..7a834b1 100644 +index 3a1cf09..bb56e30 100644 --- a/Modules/resource.c +++ b/Modules/resource.c @@ -83,6 +83,7 @@ resource_getrusage(PyObject *self, PyObject *args) @@ -211,20 +211,20 @@ index 3a1cf09..7a834b1 100644 PyStructSequence_SET_ITEM(result, 15, PyLong_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)); ++ PyStructSequence_SET_ITEM(result, 2, PyLong_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 3, PyLong_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 4, PyLong_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 5, PyLong_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 6, PyLong_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 7, PyLong_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 8, PyLong_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 9, PyLong_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 10, PyLong_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 11, PyLong_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 12, PyLong_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 13, PyLong_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 14, PyLong_FromLong(0)); ++ PyStructSequence_SET_ITEM(result, 15, PyLong_FromLong(0)); +#endif if (PyErr_Occurred()) { Py_DECREF(result); @@ -453,21 +453,23 @@ index 25e1dc8..8b4b4cc 100644 esac AC_MSG_CHECKING(for --with-libm=STRING) diff --git a/setup.py b/setup.py -index 8269e1c..68d2333 100644 +index 8269e1c..2ee9731 100644 --- a/setup.py +++ b/setup.py -@@ -517,6 +517,10 @@ class PyBuildExt(build_ext): +@@ -517,6 +517,12 @@ class PyBuildExt(build_ext): config_h_vars = sysconfig.parse_config_h(file) srcdir = sysconfig.get_config_var('srcdir') + + # Haiku-specific library locations + if host_platform == 'haiku1': ++ inc_dirs += ['/boot/develop/headers/posix', ++ '/boot/system/develop/headers'] + lib_dirs += ['/boot/system/develop/lib'] # OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb) if host_platform in ['osf1', 'unixware7', 'openunix8']: -@@ -544,9 +548,9 @@ class PyBuildExt(build_ext): +@@ -544,9 +550,9 @@ class PyBuildExt(build_ext): if item.startswith('-L'): lib_dirs.append(item[2:]) @@ -479,7 +481,7 @@ index 8269e1c..68d2333 100644 math_libs = [] # XXX Omitted modules: gl, pure, dl, SGI-specific modules -@@ -754,15 +758,22 @@ class PyBuildExt(build_ext): +@@ -754,15 +760,22 @@ class PyBuildExt(build_ext): '/usr/local/ssl/include', '/usr/contrib/ssl/include/' ] @@ -505,7 +507,7 @@ index 8269e1c..68d2333 100644 ['/usr/local/ssl/lib', '/usr/contrib/ssl/lib/' ] ) -@@ -770,8 +781,8 @@ class PyBuildExt(build_ext): +@@ -770,8 +783,8 @@ class PyBuildExt(build_ext): if (ssl_incs is not None and ssl_libs is not None): exts.append( Extension('_ssl', ['_ssl.c'], @@ -516,7 +518,7 @@ index 8269e1c..68d2333 100644 libraries = ['ssl', 'crypto'], depends = ['socketmodule.h']), ) else: -@@ -811,8 +822,8 @@ class PyBuildExt(build_ext): +@@ -811,8 +824,8 @@ class PyBuildExt(build_ext): # of hash functions from the OpenSSL library. exts.append( Extension('_hashlib', ['_hashopenssl.c'], depends = ['hashlib.h'], @@ -527,7 +529,7 @@ index 8269e1c..68d2333 100644 libraries = ['ssl', 'crypto']) ) else: print("warning: openssl 0x%08x is too old for _hashlib" % -@@ -1236,7 +1247,7 @@ class PyBuildExt(build_ext): +@@ -1236,7 +1249,7 @@ class PyBuildExt(build_ext): exts.append( Extension('resource', ['resource.c']) ) # Sun yellow pages. Some systems have the functions in libc. diff --git a/dev-lang/python/python-3.2.recipe b/dev-lang/python/python-3.2.recipe deleted file mode 100644 index 25d290522..000000000 --- a/dev-lang/python/python-3.2.recipe +++ /dev/null @@ -1,42 +0,0 @@ -DESCRIPTION="python - An interpreted, interactive, object-oriented programming language" -HOMEPAGE="http://www.python.org" -SRC_URI="http://www.python.org/ftp/python/3.2/Python-3.2.tar.bz2" -CHECKSUM_MD5="92e94b5b6652b96349d6362b8337811d" -REVISION="1" -STATUS_HAIKU="stable" -DEPEND="sys-libs/readline >= 6.0" -BUILD() -{ - cd Python-3.2/Modules/_ctypes/libffi - libtoolize --force --copy --install - cd ../../.. - echo "AC_CONFIG_MACRO_DIR([m4])" >> configure.in - libtoolize --force --copy --install - aclocal - autoconf - ./configure --prefix=`finddir B_COMMON_DIRECTORY` \ - --enable-shared \ - --mandir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY/man` \ - CFLAGS=-I`finddir B_COMMON_DIRECTORY`/include - ln -sf `pwd`/libpython3.2m.so.1.0 /boot/common/lib/libpython3.2m.so.1.0 - make -} - -INSTALL() -{ - cd Python-3.2 - make install -} - -TEST() -{ - cd Python-3.2 - cd Lib/test - rm test_asynchat.py # this one stalls, so skip it for now - rm test_multiprocessing.py # this one stalls, so skip it for now - - python regrtest.py -} - -LICENSE="Python" -COPYRIGHT="1990-2011, Python Software Foundation" diff --git a/dev-lang/python/python3-3.4.0.recipe b/dev-lang/python/python3-3.4.0.recipe index 6df525ab0..91e9e78a1 100644 --- a/dev-lang/python/python3-3.4.0.recipe +++ b/dev-lang/python/python3-3.4.0.recipe @@ -35,6 +35,9 @@ PROVIDES=" cmd:python3.4m_config = $portVersion compat >= 3.4 cmd:pyvenv = $portVersion compat >= 3.4 cmd:pyvenv_3.4 = $portVersion compat >= 3.4 + cmd:easy_install_3.4 = $portVersion compat >= 3.4 + cmd:pip3 = $portVersion compat >= 3.4 + cmd:pip3.4 = $portVersion compat >= 3.4 devel:libpython3.4m = 1.0 lib:libpython3.4m = 1.0 lib:libpython3 = 3.4 @@ -92,6 +95,8 @@ BUILD() # prevent make from rebuilding stuff that requires python touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h + rm -f python + make $jobArgs }