This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -1,4 +1,4 @@
From 86342bd79fd31f85bfb8df30d0b8bf1cc66cbd75 Mon Sep 17 00:00:00 2001
From a4cd9d290a0fe86b16dbd55dc5de35390ba2bd0d Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 10 Apr 2014 16:03:33 +0000
Subject: initial Haiku patch
@@ -86,20 +86,20 @@ index 0258d3d..aaec6e6 100644
def finalize_other(self):
"""Finalizes options for non-posix platforms"""
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index 2bcd1dd..8d8ff39 100644
index 83160f8..7e9fec5 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -99,7 +99,8 @@ def get_python_inc(plat_specific=0, prefix=None):
@@ -107,7 +107,8 @@ def get_python_inc(plat_specific=0, prefix=None):
incdir = os.path.join(get_config_var('srcdir'), 'Include')
return os.path.normpath(incdir)
python_dir = 'python' + get_python_version() + build_flags
- return os.path.join(prefix, "include", python_dir)
+ inc_dir = "include" if sys.platform != "haiku1" else "develop/headers"
+ return os.path.join(prefix, inc_dir, python_dir)
elif os.name == "nt":
return os.path.join(prefix, "include")
else:
@@ -129,12 +130,20 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
if python_build:
# Include both the include and PC dir to ensure we can find
@@ -142,12 +143,20 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
prefix = plat_specific and EXEC_PREFIX or PREFIX

if os.name == "posix":
@@ -136,7 +136,7 @@ index 0000000..4372ee2
+set -v
+eval $PYTHON_FOR_BUILD ../../Tools/scripts/h2py.py -i "'(u_long)'" $HEADERS/posix/netinet/in.h
diff --git a/Lib/site.py b/Lib/site.py
index ffd132b..9876642 100644
index ad11463..e39080e 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -258,6 +258,14 @@ def _getuserbase():
@@ -215,7 +215,7 @@ index 11180b7..d99f73e 100644
def test_mknod_dir_fd(self):
# Test using mknodat() to create a FIFO (the only use specified
diff --git a/Makefile.pre.in b/Makefile.pre.in
index d912a19..4829a67 100644
index 2d2e11f..b1848a2 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -141,7 +141,7 @@ BINDIR= @bindir@
@@ -228,18 +228,18 @@ index d912a19..4829a67 100644
ABIFLAGS= @ABIFLAGS@

diff --git a/Modules/resource.c b/Modules/resource.c
index 113ad5c..b9de0ab 100644
index e59280f..f1aaef9 100644
--- a/Modules/resource.c
+++ b/Modules/resource.c
@@ -102,6 +102,7 @@ resource_getrusage(PyObject *self, PyObject *args)
@@ -102,6 +102,7 @@ resource_getrusage_impl(PyObject *module, int who)
PyFloat_FromDouble(doubletime(ru.ru_utime)));
PyStructSequence_SET_ITEM(result, 1,
PyFloat_FromDouble(doubletime(ru.ru_stime)));
+#ifndef __HAIKU__
PyStructSequence_SET_ITEM(result, 2, PyLong_FromLong(ru.ru_maxrss));
PyStructSequence_SET_ITEM(result, 3, PyLong_FromLong(ru.ru_ixrss));
PyStructSequence_SET_ITEM(result, 4, PyLong_FromLong(ru.ru_idrss));
@@ -116,7 +117,22 @@ resource_getrusage(PyObject *self, PyObject *args)
@@ -116,7 +117,22 @@ resource_getrusage_impl(PyObject *module, int who)
PyStructSequence_SET_ITEM(result, 13, PyLong_FromLong(ru.ru_nsignals));
PyStructSequence_SET_ITEM(result, 14, PyLong_FromLong(ru.ru_nvcsw));
PyStructSequence_SET_ITEM(result, 15, PyLong_FromLong(ru.ru_nivcsw));
@@ -327,10 +327,10 @@ index 113ad5c..b9de0ab 100644
#endif

diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index ed31667..e1c163e 100644
index 988471e..d1f3bcf 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -7122,7 +7122,9 @@ PyInit__socket(void)
@@ -7142,7 +7142,9 @@ PyInit__socket(void)
/* SOCK_RAW is marked as optional in the POSIX specification */
PyModule_AddIntMacro(m, SOCK_RAW);
#endif
@@ -341,7 +341,7 @@ index ed31667..e1c163e 100644
PyModule_AddIntMacro(m, SOCK_RDM);
#endif
diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
index af7c36a..ca5a873 100644
index 0b2edc1..1ee4fdd 100644
--- a/Modules/socketmodule.h
+++ b/Modules/socketmodule.h
@@ -54,6 +54,10 @@ typedef int socklen_t;
@@ -381,7 +381,7 @@ index 1601ec0..4c98fe8 100644
else
PyErr_SetString(PyExc_KeyError, "getspnam(): name not found");
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index d7b0bbd..ee9bebc 100644
index 6306c3a..847becf 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -17,7 +17,7 @@
@@ -419,7 +419,7 @@ index 4363c0c..40994b0 100755
def main():
global filedict
diff --git a/configure.ac b/configure.ac
index 3f2459a..62bc0c0 100644
index ad0f4d4..80d2649 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1151,6 +1151,16 @@ if test $enable_shared = "yes"; then
@@ -474,7 +474,7 @@ index 3f2459a..62bc0c0 100644
# -u libsys_s pulls in all symbols in libsys
Darwin/*)
LINKFORSHARED="$extra_undefs -framework CoreFoundation"
@@ -2949,6 +2960,12 @@ LDFLAGS="-fsanitize=address $LDFLAGS"
@@ -2949,6 +2960,12 @@ LDFLAGS="-fsanitize=undefined $LDFLAGS"
AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets

@@ -487,7 +487,7 @@ index 3f2459a..62bc0c0 100644
AC_MSG_CHECKING(for --with-libs)
AC_ARG_WITH(libs,
AS_HELP_STRING([--with-libs='lib1 ...'], [link against additional libs]),
@@ -4276,6 +4293,7 @@ fi],
@@ -4293,6 +4310,7 @@ AC_CHECK_FUNC(__fpu_control,
AC_SUBST(LIBM)
case $ac_sys_system in
Darwin) ;;
@@ -571,15 +571,18 @@ index b4357e3..df227d1 100644
return None

libs = []
--
2.21.0


From d9e7a5386b6668d9bf46b1ade6356322ea11fa41 Mon Sep 17 00:00:00 2001
From b06b387748b4a4f7dfc989a02ab3e9b0dd5ad4b6 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sun, 16 Apr 2017 10:05:42 +0200
Subject: fix for negative errnos


diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 290ae44..95ec9d3 100644
index 3c1abb7..5e96075 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -1508,6 +1508,8 @@ class Popen(object):
@@ -592,7 +595,7 @@ index 290ae44..95ec9d3 100644
if child_exec_never_called:
err_msg = ""
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c
index fe0e554..d2a0d52 100644
index 3cf0683..adf3608 100644
--- a/Modules/_posixsubprocess.c
+++ b/Modules/_posixsubprocess.c
@@ -534,6 +534,10 @@ error:
@@ -607,17 +610,17 @@ index fe0e554..d2a0d52 100644
*--cur = Py_hexdigits[saved_errno % 16];
saved_errno /= 16;
--
2.19.1
2.21.0


From f9408c3d0f3242fa21cb06278ded8b684eafd805 Mon Sep 17 00:00:00 2001
From 6bb4b749c391d619d74e9f2c741854878b9527dc Mon Sep 17 00:00:00 2001
From: Philippe Houdoin <philippe.houdoin@gmail.com>
Date: Wed, 24 May 2017 11:09:43 +0000
Subject: Implement CTypes's find_library for Haiku


diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
index 339ae8a..d537963 100644
index 97973bc..b2e4095 100644
--- a/Lib/ctypes/util.py
+++ b/Lib/ctypes/util.py
@@ -252,6 +252,56 @@ elif os.name == "posix":
@@ -691,5 +694,5 @@ index 339ae8a..d537963 100644
print(cdll.LoadLibrary("libm.so"))
print(cdll.LoadLibrary("libcrypt.so"))
--
2.19.1
2.21.0

File renamed without changes.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -13,7 +13,7 @@ COPYRIGHT="1990-2018 Python Software Foundation"
LICENSE="Python"
REVISION="1"
SOURCE_URI="https://www.python.org/ftp/python/$portVersion/Python-$portVersion.tar.xz"
CHECKSUM_SHA256="22d9b1ac5b26135ad2b8c2901a9413537e08749a753356ee913c84dbd2df5574"
CHECKSUM_SHA256="f222ef602647eecb6853681156d32de4450a2c39f4de93bd5b20235f2e660ed7"
SOURCE_DIR="Python-$portVersion"
PATCHES="python-$portVersion.patchset"

@@ -13,7 +13,7 @@ LICENSE="Python"
COPYRIGHT="1990-2018 Python Software Foundation"
REVISION="1"
SOURCE_URI="https://www.python.org/ftp/python/$portVersion/Python-$portVersion.tar.xz"
CHECKSUM_SHA256="d83fe8ce51b1bb48bbcf0550fd265b9a75cdfdfa93f916f9e700aef8444bf1bb"
CHECKSUM_SHA256="da60b54064d4cfcd9c26576f6df2690e62085123826cff2e667e72a91952d318"
SOURCE_DIR="Python-$portVersion"
PATCHES="python3-$portVersion.patchset"
if [ "$secondaryArchSuffix" = _x86 ] ; then

This file was deleted.