diff --git a/dev-lang/python/python-2.7-haiku.diff b/dev-lang/python/python-2.7-haiku.diff new file mode 100644 index 000000000..49b3c9a41 --- /dev/null +++ b/dev-lang/python/python-2.7-haiku.diff @@ -0,0 +1,422 @@ +Index: configure.in +=================================================================== +--- configure.in (revision 68649) ++++ configure.in (working copy) +@@ -691,7 +691,7 @@ + if test $enable_shared = "yes"; then + AC_DEFINE(Py_ENABLE_SHARED, 1, [Defined if Python is built as a shared library.]) + case $ac_sys_system in +- BeOS*) ++ BeOS*|Haiku*) + LDLIBRARY='libpython$(VERSION).so' + ;; + CYGWIN*) +@@ -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} +@@ -782,7 +782,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;; +@@ -1679,7 +1679,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 2>&1; then + IBM_ARCH=rs6000 +@@ -793,12 +793,15 @@ + exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in +- x86) ++ x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; ++ IA64) ++ echo ia64-unknown-interix${UNAME_RELEASE} ++ exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks +@@ -833,7 +836,14 @@ + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ eval $set_cc_for_build ++ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep -q __ARM_EABI__ ++ then ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ else ++ echo ${UNAME_MACHINE}-unknown-linux-gnueabi ++ fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +@@ -954,8 +964,8 @@ + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; +- xtensa:Linux:*:*) +- echo xtensa-unknown-linux-gnu ++ xtensa*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so +@@ -1206,6 +1216,12 @@ + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; ++ BeMac:Haiku:*:*) ++ echo powerpc-apple-haiku ++ exit ;; ++ BePC:Haiku:*:*) ++ echo i586-pc-haiku ++ exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; +Index: Modules/_ctypes/libffi/config.sub +=================================================================== +--- Modules/_ctypes/libffi/config.sub (revision 68649) ++++ Modules/_ctypes/libffi/config.sub (working copy) +@@ -1,10 +1,10 @@ + #! /bin/sh + # Configuration validation subroutine script. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +-# Inc. ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 ++# Free Software Foundation, Inc. + +-timestamp='2007-04-29' ++timestamp='2008-01-16' + + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software +@@ -72,8 +72,8 @@ + version="\ + GNU config.sub ($timestamp) + +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +-Free Software Foundation, Inc. ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, ++2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +@@ -369,10 +369,14 @@ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ +- | xstormy16-* | xtensa-* \ ++ | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-*) + ;; ++ # Recognize the basic CPU types without company name, with glob match. ++ xtensa*) ++ basic_machine=$basic_machine-unknown ++ ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) +@@ -443,6 +447,14 @@ + basic_machine=ns32k-sequent + os=-dynix + ;; ++ blackfin) ++ basic_machine=bfin-unknown ++ os=-linux ++ ;; ++ blackfin-*) ++ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; + c90) + basic_machine=c90-cray + os=-unicos +@@ -475,8 +487,8 @@ + basic_machine=craynv-cray + os=-unicosmp + ;; +- cr16c) +- basic_machine=cr16c-unknown ++ cr16) ++ basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) +@@ -668,6 +680,14 @@ + basic_machine=m68k-isi + os=-sysv + ;; ++ m68knommu) ++ basic_machine=m68k-unknown ++ os=-linux ++ ;; ++ m68knommu-*) ++ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; + m88k-omron*) + basic_machine=m88k-omron + ;; +@@ -813,6 +833,14 @@ + basic_machine=i860-intel + os=-osf + ;; ++ parisc) ++ basic_machine=hppa-unknown ++ os=-linux ++ ;; ++ parisc-*) ++ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` ++ os=-linux ++ ;; + pbd) + basic_machine=sparc-tti + ;; +@@ -1021,6 +1049,10 @@ + basic_machine=tic6x-unknown + os=-coff + ;; ++ tile*) ++ basic_machine=tile-unknown ++ os=-linux-gnu ++ ;; + tx39) + basic_machine=mipstx39-unknown + ;; +Index: Modules/timemodule.c +=================================================================== +--- Modules/timemodule.c (revision 68649) ++++ Modules/timemodule.c (working copy) +@@ -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 +Index: Modules/resource.c +=================================================================== +--- Modules/resource.c (revision 68649) ++++ Modules/resource.c (working copy) +@@ -86,6 +86,7 @@ + PyFloat_FromDouble(doubletime(ru.ru_utime))); + PyStructSequence_SET_ITEM(result, 1, + PyFloat_FromDouble(doubletime(ru.ru_stime))); ++#ifndef __HAIKU__ + PyStructSequence_SET_ITEM(result, 2, PyInt_FromLong(ru.ru_maxrss)); + PyStructSequence_SET_ITEM(result, 3, PyInt_FromLong(ru.ru_ixrss)); + PyStructSequence_SET_ITEM(result, 4, PyInt_FromLong(ru.ru_idrss)); +@@ -100,6 +101,7 @@ + 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)); ++#endif + + if (PyErr_Occurred()) { + Py_DECREF(result); +Index: Modules/socketmodule.c +=================================================================== +--- Modules/socketmodule.c (revision 68649) ++++ Modules/socketmodule.c (working copy) +@@ -4637,7 +4637,9 @@ + #ifndef __BEOS__ + /* We have incomplete socket support. */ + PyModule_AddIntConstant(m, "SOCK_RAW", SOCK_RAW); ++#ifndef __HAIKU__ + PyModule_AddIntConstant(m, "SOCK_SEQPACKET", SOCK_SEQPACKET); ++#endif + #if defined(SOCK_RDM) + PyModule_AddIntConstant(m, "SOCK_RDM", SOCK_RDM); + #endif +Index: Modules/spwdmodule.c +=================================================================== +--- Modules/spwdmodule.c (revision 68649) ++++ Modules/spwdmodule.c (working copy) +@@ -79,7 +79,9 @@ + + SETS(setIndex++, p->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);