Convert python 2.6.8 recipe to an actual recipe

Some additional patching was required to get things to build (among
other things the bz2, ssl, and related modules). Remove superfluous
Modules/timemodule.c patch.
This commit is contained in:
Ingo Weinhold
2013-05-03 15:39:45 +02:00
parent 2cddf1296e
commit a678bf06bf
2 changed files with 304 additions and 176 deletions

View File

@@ -1,6 +1,101 @@
diff -urN Python-2.6.8/Lib/plat-haiku1/IN.py Python-2.6.8-haiku/Lib/plat-haiku1/IN.py
--- Python-2.6.8/Lib/plat-haiku1/IN.py 1970-01-01 00:00:00.000000000 +0000
+++ Python-2.6.8-haiku/Lib/plat-haiku1/IN.py 2010-08-30 04:52:27.223346688 +0000
diff -urN orig/Python-2.6.8/configure.in Python-2.6.8/configure.in
--- orig/Python-2.6.8/configure.in 2012-04-10 17:32:11.057409536 +0200
+++ Python-2.6.8/configure.in 2013-05-03 15:23:53.332922880 +0200
@@ -745,7 +745,7 @@
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
INSTSONAME="$LDLIBRARY".$SOVERSION
;;
- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|Haiku*)
LDLIBRARY='libpython$(VERSION).so'
BLDLIBRARY='-L. -lpython$(VERSION)'
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
@@ -753,6 +753,9 @@
FreeBSD*)
SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
;;
+ Haiku*)
+ RUNSHARED=LIBRARY_PATH=`pwd`:${LIBRARY_PATH}
+ ;;
esac
INSTSONAME="$LDLIBRARY".$SOVERSION
;;
@@ -823,7 +826,7 @@
AC_SUBST(LN)
if test -z "$LN" ; then
case $ac_sys_system in
- BeOS*) LN="ln -s";;
+ BeOS*|Haiku*) LN="ln -s";;
CYGWIN*) LN="ln -s";;
atheos*) LN="ln -s";;
*) LN=ln;;
@@ -1829,7 +1832,7 @@
fi
fi
;;
- Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
+ Linux*|GNU*|QNX*|Haiku*) LDSHARED='$(CC) -shared';;
BSD/OS*/4*) LDSHARED="gcc -shared";;
FreeBSD*)
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
@@ -1883,7 +1886,7 @@
then CCSHARED="-fPIC";
else CCSHARED="+z";
fi;;
- Linux*|GNU*) CCSHARED="-fPIC";;
+ Linux*|GNU*|Haiku*) CCSHARED="-fPIC";;
BSD/OS*/4*) CCSHARED="-fpic";;
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
OpenUNIX*|UnixWare*)
@@ -1916,7 +1919,7 @@
LINKFORSHARED="-Wl,-E -Wl,+s";;
# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
- Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
+ Linux*|GNU*|Haiku*) LINKFORSHARED="-Xlinker -export-dynamic";;
# -u libsys_s pulls in all symbols in libsys
Darwin/*)
# -u _PyMac_Error is needed to pull in the mac toolbox glue,
@@ -2035,6 +2038,9 @@
BeOS*)
AC_CHECK_LIB(net, socket, [LIBS="-lnet $LIBS"], [], $LIBS) # BeOS
;;
+Haiku*)
+AC_CHECK_LIB(network, socket, [LIBS="-lnetwork $LIBS"], [], $LIBS) # Haiku
+;;
esac
AC_MSG_CHECKING(for --with-libs)
@@ -3265,7 +3271,7 @@
AC_SUBST(LIBM)
case $ac_sys_system in
Darwin) ;;
-BeOS) ;;
+BeOS|Haiku) ;;
*) LIBM=-lm
esac
AC_MSG_CHECKING(for --with-libm=STRING)
diff -urN orig/Python-2.6.8/Lib/distutils/command/build_ext.py Python-2.6.8/Lib/distutils/command/build_ext.py
--- orig/Python-2.6.8/Lib/distutils/command/build_ext.py 2012-04-10 17:32:04.066846720 +0200
+++ Python-2.6.8/Lib/distutils/command/build_ext.py 2013-05-03 15:23:53.334233600 +0200
@@ -234,9 +234,13 @@
# for extensions under Linux or Solaris with a shared Python library,
# Python's library directory must be appended to library_dirs
+ # For Haiku the situation is similar, though more correctly the
+ # develop/lib path should be used. Due to the naming scheme used for the
+ # python library it works nonetheless.
sysconfig.get_config_var('Py_ENABLE_SHARED')
if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu')
- or sys.platform.startswith('sunos'))
+ or sys.platform.startswith('sunos')
+ or sys.platform.startswith('haiku'))
and sysconfig.get_config_var('Py_ENABLE_SHARED')):
if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
# building third party extensions
diff -urN orig/Python-2.6.8/Lib/plat-haiku1/IN.py Python-2.6.8/Lib/plat-haiku1/IN.py
--- orig/Python-2.6.8/Lib/plat-haiku1/IN.py 1970-01-01 01:00:00.000000000 +0100
+++ Python-2.6.8/Lib/plat-haiku1/IN.py 2013-05-03 15:23:53.336330752 +0200
@@ -0,0 +1,327 @@
+# Generated by h2py from /boot/develop/headers/be/net/netinet/in.h
+
@@ -329,9 +424,9 @@ diff -urN Python-2.6.8/Lib/plat-haiku1/IN.py Python-2.6.8-haiku/Lib/plat-haiku1/
+def _FDMSKNO(fd): return ((fd) / NFDBITS)
+
+def _FDBITNO(fd): return ((fd) % NFDBITS)
diff -urN Python-2.6.8/Lib/plat-haiku1/regen Python-2.6.8-haiku/Lib/plat-haiku1/regen
--- Python-2.6.8/Lib/plat-haiku1/regen 1970-01-01 00:00:00.000000000 +0000
+++ Python-2.6.8-haiku/Lib/plat-haiku1/regen 2010-08-30 04:52:27.237502464 +0000
diff -urN orig/Python-2.6.8/Lib/plat-haiku1/regen Python-2.6.8/Lib/plat-haiku1/regen
--- orig/Python-2.6.8/Lib/plat-haiku1/regen 1970-01-01 01:00:00.000000000 +0100
+++ Python-2.6.8/Lib/plat-haiku1/regen 2013-05-03 15:23:53.336855040 +0200
@@ -0,0 +1,7 @@
+#! /bin/sh
+
@@ -340,9 +435,44 @@ diff -urN Python-2.6.8/Lib/plat-haiku1/regen Python-2.6.8-haiku/Lib/plat-haiku1/
+
+set -v
+python $H2PY -i '(u_long)' $HEADERS/posix/netinet/in.h
diff -urN Python-2.6.8/Modules/resource.c Python-2.6.8-haiku/Modules/resource.c
--- Python-2.6.8/Modules/resource.c 2010-05-09 15:15:40.053739520 +0000
+++ Python-2.6.8-haiku/Modules/resource.c 2010-08-30 04:52:24.666370048 +0000
diff -urN orig/Python-2.6.8/Lib/test/test_fileio.py Python-2.6.8/Lib/test/test_fileio.py
--- orig/Python-2.6.8/Lib/test/test_fileio.py 2012-04-10 17:32:07.043515904 +0200
+++ Python-2.6.8/Lib/test/test_fileio.py 2013-05-03 15:23:53.338952192 +0200
@@ -152,6 +152,7 @@
self.assertEquals(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.assertEquals(f.seekable(), False)
diff -urN orig/Python-2.6.8/Makefile.pre.in Python-2.6.8/Makefile.pre.in
--- orig/Python-2.6.8/Makefile.pre.in 2012-04-10 17:32:08.047448064 +0200
+++ Python-2.6.8/Makefile.pre.in 2013-05-03 15:23:53.340000768 +0200
@@ -90,7 +90,7 @@
LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
-CONFINCLUDEDIR= $(exec_prefix)/include
+CONFINCLUDEDIR= $(INCLUDEDIR)
SCRIPTDIR= $(prefix)/lib
# Detailed destination directories
diff -urN orig/Python-2.6.8/Modules/bz2module.c Python-2.6.8/Modules/bz2module.c
--- orig/Python-2.6.8/Modules/bz2module.c 2012-04-10 17:32:09.031457280 +0200
+++ Python-2.6.8/Modules/bz2module.c 2013-05-03 15:28:16.616562688 +0200
@@ -9,7 +9,7 @@
#include "Python.h"
#include <stdio.h>
-#include <bzlib.h>
+#include <bzip2/bzlib.h>
#include "structmember.h"
#ifdef WITH_THREAD
diff -urN orig/Python-2.6.8/Modules/resource.c Python-2.6.8/Modules/resource.c
--- orig/Python-2.6.8/Modules/resource.c 2012-04-10 17:32:10.057147392 +0200
+++ Python-2.6.8/Modules/resource.c 2013-05-03 15:23:53.340787200 +0200
@@ -86,6 +86,7 @@
PyFloat_FromDouble(doubletime(ru.ru_utime)));
PyStructSequence_SET_ITEM(result, 1,
@@ -360,9 +490,9 @@ diff -urN Python-2.6.8/Modules/resource.c Python-2.6.8-haiku/Modules/resource.c
if (PyErr_Occurred()) {
Py_DECREF(result);
return NULL;
diff -urN Python-2.6.8/Modules/socketmodule.c Python-2.6.8-haiku/Modules/socketmodule.c
--- Python-2.6.8/Modules/socketmodule.c 2010-05-23 15:22:08.054525952 +0000
+++ Python-2.6.8-haiku/Modules/socketmodule.c 2010-08-30 04:53:35.429916160 +0000
diff -urN orig/Python-2.6.8/Modules/socketmodule.c Python-2.6.8/Modules/socketmodule.c
--- orig/Python-2.6.8/Modules/socketmodule.c 2012-04-10 17:32:10.066846720 +0200
+++ Python-2.6.8/Modules/socketmodule.c 2013-05-03 15:23:53.342622208 +0200
@@ -4661,7 +4661,9 @@
#ifndef __BEOS__
/* We have incomplete socket support. */
@@ -374,9 +504,9 @@ diff -urN Python-2.6.8/Modules/socketmodule.c Python-2.6.8-haiku/Modules/socketm
#if defined(SOCK_RDM)
PyModule_AddIntConstant(m, "SOCK_RDM", SOCK_RDM);
#endif
diff -urN Python-2.6.8/Modules/socketmodule.h Python-2.6.8-haiku/Modules/socketmodule.h
--- Python-2.6.8/Modules/socketmodule.h 2010-05-09 15:15:40.053739520 +0000
+++ Python-2.6.8-haiku/Modules/socketmodule.h 2010-08-30 04:52:24.667942912 +0000
diff -urN orig/Python-2.6.8/Modules/socketmodule.h Python-2.6.8/Modules/socketmodule.h
--- orig/Python-2.6.8/Modules/socketmodule.h 2012-04-10 17:32:10.006029312 +0200
+++ Python-2.6.8/Modules/socketmodule.h 2013-05-03 15:23:53.343146496 +0200
@@ -47,6 +47,10 @@
# undef AF_NETLINK
#endif
@@ -388,9 +518,9 @@ diff -urN Python-2.6.8/Modules/socketmodule.h Python-2.6.8-haiku/Modules/socketm
#ifdef HAVE_BLUETOOTH_BLUETOOTH_H
#include <bluetooth/bluetooth.h>
#include <bluetooth/rfcomm.h>
diff -urN Python-2.6.8/Modules/spwdmodule.c Python-2.6.8-haiku/Modules/spwdmodule.c
--- Python-2.6.8/Modules/spwdmodule.c 2010-05-09 15:15:40.030408704 +0000
+++ Python-2.6.8-haiku/Modules/spwdmodule.c 2010-08-30 04:52:24.709623808 +0000
diff -urN orig/Python-2.6.8/Modules/spwdmodule.c Python-2.6.8/Modules/spwdmodule.c
--- orig/Python-2.6.8/Modules/spwdmodule.c 2012-04-10 17:32:10.033554432 +0200
+++ Python-2.6.8/Modules/spwdmodule.c 2013-05-03 15:23:53.343670784 +0200
@@ -79,7 +79,9 @@
SETS(setIndex++, p->sp_namp);
@@ -401,35 +531,9 @@ diff -urN Python-2.6.8/Modules/spwdmodule.c Python-2.6.8-haiku/Modules/spwdmodul
SETI(setIndex++, p->sp_min);
SETI(setIndex++, p->sp_max);
SETI(setIndex++, p->sp_warn);
diff -urN Python-2.6.8/Modules/timemodule.c Python-2.6.8-haiku/Modules/timemodule.c
--- Python-2.6.8/Modules/timemodule.c 2010-05-09 15:15:40.015204352 +0000
+++ Python-2.6.8-haiku/Modules/timemodule.c 2010-08-30 04:52:24.721944576 +0000
@@ -972,11 +972,11 @@
return -1;
}
Py_END_ALLOW_THREADS
-#elif defined(__BEOS__)
+#elif defined(__BEOS__) || defined(__HAIKU__)
/* This sleep *CAN BE* interrupted. */
{
if( secs <= 0.0 ) {
- return;
+ return 0;
}
Py_BEGIN_ALLOW_THREADS
diff -urN Python-2.6.8/Parser/asdl_c.py Python-2.6.8-haiku/Parser/asdl_c.py
--- Python-2.6.8/Parser/asdl_c.py 2009-12-13 00:59:01.059768832 +0000
+++ Python-2.6.8-haiku/Parser/asdl_c.py 2010-08-30 04:52:27.169607168 +0000
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /bin/env python
"""Generate C code from an ASDL description."""
# TO DO
diff -urN Python-2.6.8/Python/bltinmodule.c Python-2.6.8-haiku/Python/bltinmodule.c
--- Python-2.6.8/Python/bltinmodule.c 2010-05-09 15:15:40.065011712 +0000
+++ Python-2.6.8-haiku/Python/bltinmodule.c 2010-08-30 04:52:27.186646528 +0000
diff -urN orig/Python-2.6.8/Python/bltinmodule.c Python-2.6.8/Python/bltinmodule.c
--- orig/Python-2.6.8/Python/bltinmodule.c 2012-04-10 17:32:11.047710208 +0200
+++ Python-2.6.8/Python/bltinmodule.c 2013-05-03 15:23:53.344981504 +0200
@@ -18,7 +18,7 @@
*/
#if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)
@@ -439,9 +543,89 @@ diff -urN Python-2.6.8/Python/bltinmodule.c Python-2.6.8-haiku/Python/bltinmodul
const char *Py_FileSystemDefaultEncoding = "utf-8";
#else
const char *Py_FileSystemDefaultEncoding = NULL; /* use default */
diff -urN Python-2.6.8/Tools/scripts/h2py.py Python-2.6.8-haiku/Tools/scripts/h2py.py
--- Python-2.6.8/Tools/scripts/h2py.py 2004-08-09 17:27:55.066584576 +0000
+++ Python-2.6.8-haiku/Tools/scripts/h2py.py 2010-08-30 04:52:27.188219392 +0000
diff -urN orig/Python-2.6.8/setup.py Python-2.6.8/setup.py
--- orig/Python-2.6.8/setup.py 2012-04-10 17:32:11.057147392 +0200
+++ Python-2.6.8/setup.py 2013-05-03 15:23:53.346816512 +0200
@@ -428,6 +428,10 @@
inc_dirs += ['/system/include', '/atheos/autolnk/include']
inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep)
+ if platform == 'haiku1':
+ inc_dirs += ['/boot/common/non-packaged/develop/headers', '/boot/common/develop/headers', '/boot/system/develop/headers/posix', '/boot/system/develop/headers/3rdparty']
+ lib_dirs += ['/boot/common/non-packaged/develop/lib', '/boot/common/develop/lib', '/boot/system/develop/lib']
+
# OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb)
if platform in ['osf1', 'unixware7', 'openunix8']:
lib_dirs += ['/usr/ccs/lib']
@@ -451,7 +455,7 @@
# Check for MacOS X, which doesn't need libm.a at all
math_libs = ['m']
- if platform in ['darwin', 'beos', 'mac']:
+ if platform in ['darwin', 'beos', 'haiku1', 'mac']:
math_libs = []
# XXX Omitted modules: gl, pure, dl, SGI-specific modules
@@ -694,15 +698,22 @@
'/usr/local/ssl/include',
'/usr/contrib/ssl/include/'
]
- ssl_incs = find_file('openssl/ssl.h', inc_dirs,
+ ssl_incs = find_file('openssl/ssl.h', [],
+ inc_dirs + search_for_ssl_incs_in
+ )
+ ssl_incs_to_add = 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'])
if krb5_h:
- ssl_incs += krb5_h
- ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
+ ssl_incs_to_add += krb5_h
+ ssl_libs = find_library_file(self.compiler, 'ssl', [],
+ lib_dirs + ['/usr/local/ssl/lib',
+ '/usr/contrib/ssl/lib/'
+ ] )
+ ssl_libs_to_add = find_library_file(self.compiler, 'ssl', lib_dirs,
['/usr/local/ssl/lib',
'/usr/contrib/ssl/lib/'
] )
@@ -710,8 +721,8 @@
if (ssl_incs is not None and
ssl_libs is not None):
exts.append( Extension('_ssl', ['_ssl.c'],
- include_dirs = ssl_incs,
- library_dirs = ssl_libs,
+ include_dirs = ssl_incs_to_add,
+ library_dirs = ssl_libs_to_add,
libraries = ['ssl', 'crypto'],
depends = ['socketmodule.h']), )
else:
@@ -746,8 +757,8 @@
# The _hashlib module wraps optimized implementations
# of hash functions from the OpenSSL library.
exts.append( Extension('_hashlib', ['_hashopenssl.c'],
- include_dirs = ssl_incs,
- library_dirs = ssl_libs,
+ include_dirs = ssl_incs_to_add,
+ library_dirs = ssl_libs_to_add,
libraries = ['ssl', 'crypto']) )
# these aren't strictly missing since they are unneeded.
#missing.extend(['_sha', '_md5'])
@@ -1176,7 +1187,7 @@
missing.append('resource')
# Sun yellow pages. Some systems have the functions in libc.
- if (platform not in ['cygwin', 'atheos', 'qnx6'] and
+ if (platform not in ['cygwin', 'atheos', 'qnx6', 'haiku1'] and
find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None):
if (self.compiler.find_library_file(lib_dirs, 'nsl')):
libs = ['nsl']
diff -urN orig/Python-2.6.8/Tools/scripts/h2py.py Python-2.6.8/Tools/scripts/h2py.py
--- orig/Python-2.6.8/Tools/scripts/h2py.py 2012-04-10 17:32:11.043253760 +0200
+++ Python-2.6.8/Tools/scripts/h2py.py 2013-05-03 15:23:53.347340800 +0200
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /bin/env python
@@ -457,112 +641,3 @@ diff -urN Python-2.6.8/Tools/scripts/h2py.py Python-2.6.8-haiku/Tools/scripts/h2
searchdirs=os.environ['BEINCLUDES'].split(';')
elif sys.platform.startswith("atheos"):
searchdirs=os.environ['C_INCLUDE_PATH'].split(':')
diff -urN Python-2.6.8/configure.in Python-2.6.8-haiku/configure.in
--- Python-2.6.8/configure.in 2010-05-25 02:27:03.064225280 +0000
+++ Python-2.6.8-haiku/configure.in 2010-08-30 04:52:27.207880192 +0000
@@ -745,7 +745,7 @@
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
INSTSONAME="$LDLIBRARY".$SOVERSION
;;
- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|Haiku*)
LDLIBRARY='libpython$(VERSION).so'
BLDLIBRARY='-L. -lpython$(VERSION)'
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
@@ -823,7 +823,7 @@
AC_SUBST(LN)
if test -z "$LN" ; then
case $ac_sys_system in
- BeOS*) LN="ln -s";;
+ BeOS*|Haiku*) LN="ln -s";;
CYGWIN*) LN="ln -s";;
atheos*) LN="ln -s";;
*) LN=ln;;
@@ -1829,7 +1829,7 @@
fi
fi
;;
- Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
+ Linux*|GNU*|QNX*|Haiku*) LDSHARED='$(CC) -shared';;
BSD/OS*/4*) LDSHARED="gcc -shared";;
FreeBSD*)
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
@@ -1883,7 +1883,7 @@
then CCSHARED="-fPIC";
else CCSHARED="+z";
fi;;
- Linux*|GNU*) CCSHARED="-fPIC";;
+ Linux*|GNU*|Haiku*) CCSHARED="-fPIC";;
BSD/OS*/4*) CCSHARED="-fpic";;
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
OpenUNIX*|UnixWare*)
@@ -1916,7 +1916,7 @@
LINKFORSHARED="-Wl,-E -Wl,+s";;
# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
- Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
+ Linux*|GNU*|Haiku*) LINKFORSHARED="-Xlinker -export-dynamic";;
# -u libsys_s pulls in all symbols in libsys
Darwin/*)
# -u _PyMac_Error is needed to pull in the mac toolbox glue,
@@ -2035,6 +2035,9 @@
BeOS*)
AC_CHECK_LIB(net, socket, [LIBS="-lnet $LIBS"], [], $LIBS) # BeOS
;;
+Haiku*)
+AC_CHECK_LIB(network, socket, [LIBS="-lnetwork $LIBS"], [], $LIBS) # Haiku
+;;
esac
AC_MSG_CHECKING(for --with-libs)
@@ -3265,7 +3268,7 @@
AC_SUBST(LIBM)
case $ac_sys_system in
Darwin) ;;
-BeOS) ;;
+BeOS|Haiku) ;;
*) LIBM=-lm
esac
AC_MSG_CHECKING(for --with-libm=STRING)
diff -urN Python-2.6.8/setup.py Python-2.6.8-haiku/setup.py
--- Python-2.6.8/setup.py 2010-07-17 12:31:09.057147392 +0000
+++ Python-2.6.8-haiku/setup.py 2010-08-30 04:52:27.220463104 +0000
@@ -428,6 +428,10 @@
inc_dirs += ['/system/include', '/atheos/autolnk/include']
inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep)
+ if platform == 'haiku1':
+ inc_dirs += ['/boot/develop/headers/posix', '/boot/develop/headers/3rdparty', '/boot/common/include']
+ lib_dirs += ['/boot/system/lib', '/boot/develop/lib/x86', '/boot/common/lib']
+
# OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb)
if platform in ['osf1', 'unixware7', 'openunix8']:
lib_dirs += ['/usr/ccs/lib']
@@ -451,7 +455,7 @@
# Check for MacOS X, which doesn't need libm.a at all
math_libs = ['m']
- if platform in ['darwin', 'beos', 'mac']:
+ if platform in ['darwin', 'beos', 'haiku1', 'mac']:
math_libs = []
# XXX Omitted modules: gl, pure, dl, SGI-specific modules
@@ -1176,7 +1180,7 @@
missing.append('resource')
# Sun yellow pages. Some systems have the functions in libc.
- if (platform not in ['cygwin', 'atheos', 'qnx6'] and
+ if (platform not in ['cygwin', 'atheos', 'qnx6', 'haiku1'] and
find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None):
if (self.compiler.find_library_file(lib_dirs, 'nsl')):
libs = ['nsl']
--- Python-2.6.8/Lib/test/test_fileio.py 2012-07-26 23:04:42.208666624 +0000
+++ Python-2.6.8-haiku/Lib/test/test_fileio.py 2012-07-26 23:05:09.382730240 +0000
@@ -152,6 +152,7 @@
self.assertEquals(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.assertEquals(f.seekable(), False)