From aaa731eca22221465f5e16898d9fe947b2e04a37 Mon Sep 17 00:00:00 2001 From: Scott McCreary Date: Tue, 16 Dec 2008 15:04:24 +0000 Subject: [PATCH] Still not building, but getting closer. Fixed a couple cases in Kaliber's 2.6.1 patch where it was looking for Haiku but found haiku1 instead. Removed the bluetooth workaround as haiku has bluetooth now? (Might have to put that back in if it fails) --- dev-lang/python/python-2.6.1-haiku.diff | 172 ++++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 dev-lang/python/python-2.6.1-haiku.diff diff --git a/dev-lang/python/python-2.6.1-haiku.diff b/dev-lang/python/python-2.6.1-haiku.diff new file mode 100644 index 000000000..7b59bb886 --- /dev/null +++ b/dev-lang/python/python-2.6.1-haiku.diff @@ -0,0 +1,172 @@ +diff -urN Python-2.6.1.orig/configure.in Python-2.6.1/configure.in +--- Python-2.6.1.orig/configure.in 2008-12-14 19:09:28.489629527 +0100 ++++ Python-2.6.1/configure.in 2008-12-14 19:29:07.185629448 +0100 +@@ -704,7 +704,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} +@@ -776,7 +776,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;; +@@ -1672,7 +1672,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 - sp_namp); + SETS(setIndex++, p->sp_pwdp); ++#ifndef __HAIKU__ + SETI(setIndex++, p->sp_lstchg); ++#endif + SETI(setIndex++, p->sp_min); + SETI(setIndex++, p->sp_max); + SETI(setIndex++, p->sp_warn); +diff -urN Python-2.6.1.orig/Modules/timemodule.c Python-2.6.1/Modules/timemodule.c +--- Python-2.6.1.orig/Modules/timemodule.c 2008-12-14 19:10:04.873637365 +0100 ++++ Python-2.6.1/Modules/timemodule.c 2008-12-14 19:25:04.293630616 +0100 +@@ -968,11 +968,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.1.orig/setup.py Python-2.6.1/setup.py +--- Python-2.6.1.orig/setup.py 2008-12-14 19:09:28.489629527 +0100 ++++ Python-2.6.1/setup.py 2008-12-15 20:54:31.957990468 +0100 +@@ -382,6 +382,9 @@ + 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'] ++ + # OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb) + if platform in ['osf1', 'unixware7', 'openunix8']: + lib_dirs += ['/usr/ccs/lib'] +@@ -405,7 +408,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 +@@ -1053,7 +1056,7 @@ + missing.append('resource') + + # Sun yellow pages. Some systems have the functions in libc. +- if platform not in ['cygwin', 'atheos', 'qnx6']: ++ if platform not in ['cygwin', 'atheos', 'qnx6', 'haiku1']: + if (self.compiler.find_library_file(lib_dirs, 'nsl')): + libs = ['nsl'] + else: +diff -urN Python-2.6.1.orig/Tools/scripts/h2py.py Python-2.6.1/Tools/scripts/h2py.py +--- Python-2.6.1.orig/Tools/scripts/h2py.py 2008-12-14 19:09:29.665626727 +0100 ++++ Python-2.6.1/Tools/scripts/h2py.py 2008-12-14 19:25:04.313630203 +0100 +@@ -50,7 +50,7 @@ + searchdirs=os.environ['INCLUDE'].split(';') + except KeyError: + try: +- if sys.platform.find("beos") == 0: ++ if sys.platform.find("beos") == 0 or sys.platform.find("haiku1") == 0: + searchdirs=os.environ['BEINCLUDES'].split(';') + elif sys.platform.startswith("atheos"): + searchdirs=os.environ['C_INCLUDE_PATH'].split(':')