mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
Merge branch 'package-management'
Conflicts: app-arch/p7zip/p7zip-9.04.bep app-arch/p7zip/p7zip-9.13.bep app-arch/tar/tar-1.22.bep app-arch/tar/tar-1.23.bep app-arch/tar/tar-1.25.bep app-arch/xz-utils/xz-utils-4.999.9.bep app-cdr/bchunk/bchunk-1.2.0.bep app-cdr/cdrtools/cdrtools-2.01.01a66.bep app-cdr/cdrtools/cdrtools-3.01a01.bep app-crypt/gnupg/gnupg-1.4.11.bep app-doc/doxygen/doxygen-1.6.3.bep app-editors/nano/nano-2.2.6.bep app-editors/vim/vim-7.3.bep app-text/antiword/antiword-0.37.bep app-text/libpaper/libpaper-1.1.23.bep app-text/libpaper/libpaper-1.1.24.bep app-text/rman/rman-3.2.bep dev-db/sqlite/sqlite-3.6.22.bep dev-db/sqlite/sqlite-3.6.23.bep dev-db/sqlite/sqlite-3.7.2.bep dev-db/sqlite/sqlite-3.7.3.bep dev-db/sqlite/sqlite-3.7.4.bep dev-db/sqlite/sqlite-3.7.5.bep dev-lang/lua/lua-5.1.4.bep dev-lang/nasm/nasm-2.08.01.bep dev-lang/perl/patches/perl-5.10.0.patch dev-lang/python/python-2.5.4.bep dev-lang/python/python-2.6.4.bep dev-lang/python/python-2.6.5.bep dev-lang/python/python-2.6.6.bep dev-lang/python/python-2.6.7.bep dev-lang/python/python-2.6.8.bep dev-lang/python/python-3.2.bep dev-lang/python/python-3.2.recipe dev-lang/python/python-3.2a4.bep dev-lang/yasm/yasm-1.1.0.bep dev-libs/apr-util/apr-util-1.3.10.bep dev-libs/apr-util/apr-util-1.3.9.bep dev-libs/apr/apr-1.3.8.bep dev-libs/apr/apr-1.3.9.bep dev-libs/apr/apr-1.4.2.bep dev-libs/apr/patches/apr-1.4.2.patch dev-libs/expat/expat-2.0.1.bep dev-libs/fribidi/fribidi-0.19.2.bep dev-libs/icu/icu-4.4.1.bep dev-libs/libedit/libedit-20090923.bep dev-libs/libedit/libedit-20100424.bep dev-libs/libevent/libevent-1.4.11.bep dev-libs/libevent/libevent-1.4.13.bep dev-libs/libevent/libevent-1.4.14b.bep dev-libs/libevent/libevent-2.0.10.bep dev-libs/libiconv/libiconv-1.12.bep dev-libs/libiconv/libiconv-1.13.1.bep dev-libs/libpcre/libpcre-8.00.bep dev-libs/libpcre/libpcre-8.02.bep dev-libs/libpcre/libpcre-8.12.bep dev-libs/libxml2/libxml2-2.7.3.bep dev-libs/libxml2/libxml2-2.7.6.bep dev-libs/libxml2/libxml2-2.7.7.bep dev-libs/libxml2/libxml2-2.7.8.bep dev-libs/openssl/openssl-0.9.8l.bep dev-libs/openssl/openssl-0.9.8m.bep dev-libs/openssl/openssl-1.0.0.bep dev-libs/openssl/openssl-1.0.0a.bep dev-libs/openssl/openssl-1.0.0c.bep dev-qt/qtcore/qtcore-4.8.x-git.bep dev-qt/qtcore/qtcore-4.8.x.recipe dev-util/ccache/ccache-3.0.1.bep dev-util/cmake/cmake-2.6.4.bep dev-util/cmake/cmake-2.8.0.bep dev-util/cmake/cmake-2.8.1.bep dev-util/cmake/cmake-2.8.2.bep dev-util/cmake/cmake-2.8.3.bep dev-util/cmake/cmake-2.8.4.bep dev-util/ctags/ctags-5.8.bep dev-util/fastdep/fastdep-0.16.bep dev-util/gperf/gperf-3.0.4.bep dev-util/pkgconfig/pkgconfig-0.23.bep dev-util/pkgconfig/pkgconfig-0.25.bep dev-vcs/cvs/cvs-1.12.13.1.bep dev-vcs/cvs/cvs-1.12.13.bep dev-vcs/subversion/subversion-1.6.11.bep dev-vcs/subversion/subversion-1.6.12.bep dev-vcs/subversion/subversion-1.6.13.bep dev-vcs/subversion/subversion-1.6.15.bep dev-vcs/subversion/subversion-1.6.6.bep dev-vcs/subversion/subversion-1.6.9.bep dev-vcs/subversion/subversion-1.7.xx-svn.bep haiku-apps/bepdf/bepdf-1.1.1b4.bep haiku-apps/libwalter/libwalter-97.bep haiku-apps/paladin/paladin-1.3-hg.bep haiku-apps/pe/pe-2.4.3-600.bep haiku-apps/vision/patches/vision-908-gcc4.patch haiku-apps/vision/vision-0.9.7.bep haiku-libs/libwalter/libwalter-97.bep haiku-libs/libwalter/libwalter-97.recipe media-gfx/graphviz/graphviz-2.24.bep media-gfx/graphviz/graphviz-2.26.3.bep media-libs/flac/flac-1.2.1.bep media-libs/freetype/freetype-2.3.11.bep media-libs/freetype/freetype-2.4.2.bep media-libs/freetype/freetype-2.4.4.bep media-libs/ftgl/ftgl-2.1-svn.bep media-libs/guilib/guilib-1.2.1.bep media-libs/jpeg/jpeg-7.bep media-libs/jpeg/jpeg-8b.bep media-libs/jpeg/jpeg-8c.bep media-libs/libao/libao-1.0.0.bep media-libs/libmad/libmad-0.15.1b.bep media-libs/libmng/libmng-1.0.10.bep media-libs/libogg/libogg-1.1.4.bep media-libs/libogg/libogg-1.2.0.bep media-libs/libogg/libogg-1.2.2.bep media-libs/libpng/libpng-1.2.29.bep media-libs/libpng/libpng-1.2.30.bep media-libs/libpng/libpng-1.2.40.bep media-libs/libpng/libpng-1.2.41.bep media-libs/libpng/libpng-1.2.43.bep media-libs/libpng/libpng-1.2.44.bep media-libs/libpng/libpng-1.4.1.bep media-libs/libpng/libpng-1.4.2.bep media-libs/libpng/libpng-1.4.3.bep media-libs/libpng/libpng-1.4.4.bep media-libs/libpng/libpng-1.5.0.bep media-libs/libsdl/patches/libsdl-1.2-hg.patch media-libs/libtheora/libtheora-1.1.1.bep media-libs/libvorbis/libvorbis-1.2.3.bep media-libs/libvorbis/libvorbis-1.3.1.bep media-libs/libvorbis/libvorbis-1.3.2.bep media-libs/libvpx/libvpx-0.9.2-git.bep media-libs/smpeg/smpeg-0.4.5.bep media-libs/speex/speex-1.2-git.bep media-libs/speex/speex-1.2rc1.bep media-sound/lame/lame-3.98.4.bep media-sound/lame/lame-398-2.bep media-sound/vorbis-tools/vorbis-tools-1.2.0.bep media-sound/vorbis-tools/vorbis-tools-1.4.0.bep media-video/ffmpeg/ffmpeg-0.5.bep media-video/ffmpeg/ffmpeg-0.6.bep net-misc/curl/curl-7.18.2.bep net-misc/curl/curl-7.19.1.bep net-misc/curl/curl-7.19.2.bep net-misc/curl/curl-7.19.5.bep net-misc/curl/curl-7.19.7.bep net-misc/curl/curl-7.20.0.bep net-misc/curl/curl-7.20.1.bep net-misc/curl/curl-7.21.1.bep net-misc/curl/curl-7.21.2.bep net-misc/curl/curl-7.21.3.bep net-misc/openssh/openssh-5.4p1.bep net-misc/openssh/openssh-5.5p1.bep net-misc/openssh/openssh-5.6p1.bep net-misc/openssh/openssh-5.7p1.bep net-misc/openssh/openssh-5.8p1.bep net-wireless/b43-fwcutter/b43-fwcutter-012.bep sci-libs/gsl/gsl-1.14.bep sys-apps/ed/ed-1.4.bep sys-apps/gawk/gawk-3.1.8.bep sys-apps/grep/grep-2.5.4.bep sys-apps/grep/grep-2.7.bep sys-apps/groff/groff-1.20.1.bep sys-apps/man/man-1.6f.bep sys-apps/sed/sed-4.2.1.bep sys-apps/texinfo/texinfo-4.13a.bep sys-devel/autoconf/autoconf-2.68.bep sys-devel/automake/automake-1.11.1.bep sys-devel/bison/bison-2.4.1.bep sys-devel/bison/bison-2.4.bep sys-devel/flex/flex-2.5.35.bep sys-devel/gettext/gettext-0.18.1.1-dev.bep sys-devel/gettext/gettext-0.18.1.1.bep sys-devel/jam/jam-2.5.bep sys-devel/m4/m4-1.4.14.bep sys-libs/ncurses/ncurses-5.6.bep sys-libs/ncurses/ncurses-5.7.bep sys-libs/readline/readline-5.2.bep sys-libs/readline/readline-6.0.bep sys-libs/readline/readline-6.1.bep sys-libs/zlib/zlib-1.2.3.bep sys-libs/zlib/zlib-1.2.5.bep x11-libs/qt/qt-4.8.x-git.bep
This commit is contained in:
@@ -1,203 +0,0 @@
|
||||
diff -X excludes-for-diff -Naur ./Python-2.5.4.orig/Modules/_ctypes/libffi/configure.ac ./Python-2.5.4/Modules/_ctypes/libffi/configure.ac
|
||||
--- ./Python-2.5.4.orig/Modules/_ctypes/libffi/configure.ac 2007-09-05 01:47:16.942407680 +0200
|
||||
+++ ./Python-2.5.4/Modules/_ctypes/libffi/configure.ac 2010-06-07 16:42:39.216006656 +0200
|
||||
@@ -8,16 +8,16 @@
|
||||
AC_CANONICAL_SYSTEM
|
||||
target_alias=${target_alias-$host_alias}
|
||||
|
||||
-m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
|
||||
+#m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
|
||||
m4_define([_AC_ARG_VAR_PRECIOUS],[])
|
||||
AC_PROG_CC
|
||||
-m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
|
||||
+#m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
|
||||
|
||||
AC_SUBST(CFLAGS)
|
||||
|
||||
AC_CHECK_HEADERS(sys/mman.h)
|
||||
AC_CHECK_FUNCS(mmap)
|
||||
-AC_FUNC_MMAP_BLACKLIST
|
||||
+#AC_FUNC_MMAP_BLACKLIST
|
||||
|
||||
TARGETDIR="unknown"
|
||||
case "$host" in
|
||||
@@ -34,6 +34,7 @@
|
||||
i*86-*-solaris2.1[[0-9]]*) TARGET=X86_64; TARGETDIR=x86;;
|
||||
i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;;
|
||||
i*86-*-beos*) TARGET=X86; TARGETDIR=x86;;
|
||||
+i*86-*-haiku*) TARGET=X86; TARGETDIR=x86;;
|
||||
i*86-*-freebsd* | i*86-*-kfreebsd*-gnu) TARGET=X86; TARGETDIR=x86;;
|
||||
i*86-*-netbsdelf* | i*86-*-knetbsd*-gnu) TARGET=X86; TARGETDIR=x86;;
|
||||
i*86-*-openbsd*) TARGET=X86; TARGETDIR=x86;;
|
||||
diff -X excludes-for-diff -Naur ./Python-2.5.4.orig/Modules/resource.c ./Python-2.5.4/Modules/resource.c
|
||||
--- ./Python-2.5.4.orig/Modules/resource.c 2006-05-29 23:04:52.942407680 +0200
|
||||
+++ ./Python-2.5.4/Modules/resource.c 2010-06-03 18:12:58.990380032 +0200
|
||||
@@ -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);
|
||||
diff -X excludes-for-diff -Naur ./Python-2.5.4.orig/Modules/socketmodule.h ./Python-2.5.4/Modules/socketmodule.h
|
||||
--- ./Python-2.5.4.orig/Modules/socketmodule.h 2006-12-03 12:24:00.942407680 +0100
|
||||
+++ ./Python-2.5.4/Modules/socketmodule.h 2010-06-03 18:12:58.991952896 +0200
|
||||
@@ -41,6 +41,10 @@
|
||||
# undef AF_NETLINK
|
||||
#endif
|
||||
|
||||
+#if defined(__HAIKU__)
|
||||
+#undef HAVE_BLUETOOTH_BLUETOOTH_H
|
||||
+#endif
|
||||
+
|
||||
#ifdef HAVE_BLUETOOTH_BLUETOOTH_H
|
||||
#include <bluetooth/bluetooth.h>
|
||||
#include <bluetooth/rfcomm.h>
|
||||
diff -X excludes-for-diff -Naur ./Python-2.5.4.orig/Modules/spwdmodule.c ./Python-2.5.4/Modules/spwdmodule.c
|
||||
--- ./Python-2.5.4.orig/Modules/spwdmodule.c 2006-08-02 08:15:10.942407680 +0200
|
||||
+++ ./Python-2.5.4/Modules/spwdmodule.c 2010-06-03 18:12:58.994312192 +0200
|
||||
@@ -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);
|
||||
diff -X excludes-for-diff -Naur ./Python-2.5.4.orig/Modules/timemodule.c ./Python-2.5.4/Modules/timemodule.c
|
||||
--- ./Python-2.5.4.orig/Modules/timemodule.c 2007-12-24 21:00:42.942407680 +0100
|
||||
+++ ./Python-2.5.4/Modules/timemodule.c 2010-06-03 18:12:59.021757952 +0200
|
||||
@@ -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 -X excludes-for-diff -Naur ./Python-2.5.4.orig/Tools/scripts/h2py.py ./Python-2.5.4/Tools/scripts/h2py.py
|
||||
--- ./Python-2.5.4.orig/Tools/scripts/h2py.py 2004-08-09 19:27:55.942407680 +0200
|
||||
+++ ./Python-2.5.4/Tools/scripts/h2py.py 2010-06-06 11:00:49.436731904 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /bin/env python
|
||||
|
||||
# Read #define's and translate to Python code.
|
||||
# Handle #include statements.
|
||||
@@ -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(':')
|
||||
diff -X excludes-for-diff -Naur ./Python-2.5.4.orig/configure.in ./Python-2.5.4/configure.in
|
||||
--- ./Python-2.5.4.orig/configure.in 2008-12-13 15:13:52.942407680 +0100
|
||||
+++ ./Python-2.5.4/configure.in 2010-06-07 16:53:42.874250240 +0200
|
||||
@@ -7,6 +7,7 @@
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(python, PYTHON_VERSION, http://www.python.org/python-bugs)
|
||||
AC_CONFIG_SRCDIR([Include/object.h])
|
||||
+AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_HEADER(pyconfig.h)
|
||||
|
||||
dnl This is for stuff that absolutely must end up in pyconfig.h.
|
||||
@@ -627,6 +628,11 @@
|
||||
BeOS*)
|
||||
LDLIBRARY='libpython$(VERSION).so'
|
||||
;;
|
||||
+ Haiku*)
|
||||
+ LDLIBRARY='libpython$(VERSION).so'
|
||||
+ BLDLIBRARY='-L. -lpython$(VERSION)'
|
||||
+ RUNSHARED=LIBRARY_PATH=`pwd`:${LIBRARY_PATH}
|
||||
+ ;;
|
||||
CYGWIN*)
|
||||
LDLIBRARY='libpython$(VERSION).dll.a'
|
||||
DLLLIBRARY='libpython$(VERSION).dll'
|
||||
@@ -709,7 +715,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;;
|
||||
@@ -1445,6 +1451,10 @@
|
||||
BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
|
||||
LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
|
||||
;;
|
||||
+ Haiku*)
|
||||
+ LDFLAGS="-L." # help ld find libpythonX.Y.so in root directory
|
||||
+ LDSHARED="gcc -shared"
|
||||
+ ;;
|
||||
IRIX/5*) LDSHARED="ld -shared";;
|
||||
IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
|
||||
SunOS/5*)
|
||||
@@ -1585,6 +1595,7 @@
|
||||
*) CCSHARED="";;
|
||||
esac;;
|
||||
atheos*) CCSHARED="-fPIC";;
|
||||
+ Haiku*) CCSHARED="-fPIC";;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT($CCSHARED)
|
||||
@@ -1710,6 +1721,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)
|
||||
@@ -2879,7 +2893,7 @@
|
||||
AC_SUBST(LIBM)
|
||||
case $ac_sys_system in
|
||||
Darwin) ;;
|
||||
-BeOS) ;;
|
||||
+BeOS|Haiku) ;;
|
||||
*) LIBM=-lm
|
||||
esac
|
||||
AC_MSG_CHECKING(for --with-libm=STRING)
|
||||
diff -X excludes-for-diff -Naur ./Python-2.5.4.orig/setup.py ./Python-2.5.4/setup.py
|
||||
--- ./Python-2.5.4.orig/setup.py 2008-10-16 20:58:19.942407680 +0200
|
||||
+++ ./Python-2.5.4/setup.py 2010-06-03 18:12:59.056885248 +0200
|
||||
@@ -338,7 +338,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
|
||||
@@ -912,7 +912,7 @@
|
||||
exts.append( Extension('resource', ['resource.c']) )
|
||||
|
||||
# Sun yellow pages. Some systems have the functions in libc.
|
||||
- if platform not in ['cygwin', 'atheos']:
|
||||
+ if platform not in ['cygwin', 'atheos', 'haiku1']:
|
||||
if (self.compiler.find_library_file(lib_dirs, 'nsl')):
|
||||
libs = ['nsl']
|
||||
else:
|
||||
@@ -1,544 +0,0 @@
|
||||
diff -ruN Python-2.6.4/Lib/plat-haiku1/IN.py Python-2.6.4-haiku/Lib/plat-haiku1/IN.py
|
||||
--- Python-2.6.4/Lib/plat-haiku1/IN.py 1969-12-31 17:00:00.000000000 -0700
|
||||
+++ Python-2.6.4-haiku/Lib/plat-haiku1/IN.py 2009-10-27 13:31:08.000000000 -0600
|
||||
@@ -0,0 +1,327 @@
|
||||
+# Generated by h2py from /boot/develop/headers/be/net/netinet/in.h
|
||||
+
|
||||
+# Included from socket.h
|
||||
+
|
||||
+# Included from BeBuild.h
|
||||
+B_BEOS_VERSION_4 = 0x0400
|
||||
+B_BEOS_VERSION_4_5 = 0x0450
|
||||
+B_BEOS_VERSION_5 = 0x0500
|
||||
+B_BEOS_VERSION = B_BEOS_VERSION_5
|
||||
+B_BEOS_VERSION_MAUI = B_BEOS_VERSION_5
|
||||
+_PR2_COMPATIBLE_ = 1
|
||||
+_PR3_COMPATIBLE_ = 1
|
||||
+_R4_COMPATIBLE_ = 1
|
||||
+_R4_5_COMPATIBLE_ = 1
|
||||
+_PR2_COMPATIBLE_ = 0
|
||||
+_PR3_COMPATIBLE_ = 0
|
||||
+_R4_COMPATIBLE_ = 1
|
||||
+_R4_5_COMPATIBLE_ = 1
|
||||
+def _UNUSED(x): return x
|
||||
+
|
||||
+
|
||||
+# Included from sys/types.h
|
||||
+
|
||||
+# Included from time.h
|
||||
+
|
||||
+# Included from be_setup.h
|
||||
+def __std(ref): return ref
|
||||
+
|
||||
+__be_os = 2
|
||||
+__dest_os = __be_os
|
||||
+__MSL__ = 0x4011
|
||||
+__GLIBC__ = -2
|
||||
+__GLIBC_MINOR__ = 1
|
||||
+
|
||||
+# Included from null.h
|
||||
+NULL = (0)
|
||||
+NULL = 0L
|
||||
+
|
||||
+# Included from size_t.h
|
||||
+
|
||||
+# Included from stddef.h
|
||||
+
|
||||
+# Included from wchar_t.h
|
||||
+CLOCKS_PER_SEC = 1000
|
||||
+CLK_TCK = CLOCKS_PER_SEC
|
||||
+MAX_TIMESTR = 70
|
||||
+
|
||||
+# Included from sys/time.h
|
||||
+
|
||||
+# Included from ByteOrder.h
|
||||
+
|
||||
+# Included from endian.h
|
||||
+__LITTLE_ENDIAN = 1234
|
||||
+LITTLE_ENDIAN = __LITTLE_ENDIAN
|
||||
+__BYTE_ORDER = __LITTLE_ENDIAN
|
||||
+BYTE_ORDER = __BYTE_ORDER
|
||||
+__BIG_ENDIAN = 0
|
||||
+BIG_ENDIAN = 0
|
||||
+__BIG_ENDIAN = 4321
|
||||
+BIG_ENDIAN = __BIG_ENDIAN
|
||||
+__BYTE_ORDER = __BIG_ENDIAN
|
||||
+BYTE_ORDER = __BYTE_ORDER
|
||||
+__LITTLE_ENDIAN = 0
|
||||
+LITTLE_ENDIAN = 0
|
||||
+__PDP_ENDIAN = 3412
|
||||
+PDP_ENDIAN = __PDP_ENDIAN
|
||||
+
|
||||
+# Included from SupportDefs.h
|
||||
+
|
||||
+# Included from Errors.h
|
||||
+
|
||||
+# Included from limits.h
|
||||
+
|
||||
+# Included from float.h
|
||||
+FLT_ROUNDS = 1
|
||||
+FLT_RADIX = 2
|
||||
+FLT_MANT_DIG = 24
|
||||
+FLT_DIG = 6
|
||||
+FLT_MIN_EXP = (-125)
|
||||
+FLT_MIN_10_EXP = (-37)
|
||||
+FLT_MAX_EXP = 128
|
||||
+FLT_MAX_10_EXP = 38
|
||||
+DBL_MANT_DIG = 53
|
||||
+DBL_DIG = 15
|
||||
+DBL_MIN_EXP = (-1021)
|
||||
+DBL_MIN_10_EXP = (-308)
|
||||
+DBL_MAX_EXP = 1024
|
||||
+DBL_MAX_10_EXP = 308
|
||||
+LDBL_MANT_DIG = DBL_MANT_DIG
|
||||
+LDBL_DIG = DBL_DIG
|
||||
+LDBL_MIN_EXP = DBL_MIN_EXP
|
||||
+LDBL_MIN_10_EXP = DBL_MIN_10_EXP
|
||||
+LDBL_MAX_EXP = DBL_MAX_EXP
|
||||
+LDBL_MAX_10_EXP = DBL_MAX_10_EXP
|
||||
+CHAR_BIT = (8)
|
||||
+SCHAR_MIN = (-127-1)
|
||||
+SCHAR_MAX = (127)
|
||||
+CHAR_MIN = SCHAR_MIN
|
||||
+CHAR_MAX = SCHAR_MAX
|
||||
+MB_LEN_MAX = (1)
|
||||
+SHRT_MIN = (-32767-1)
|
||||
+SHRT_MAX = (32767)
|
||||
+LONG_MIN = (-2147483647L-1)
|
||||
+LONG_MAX = (2147483647L)
|
||||
+INT_MIN = LONG_MIN
|
||||
+INT_MAX = LONG_MAX
|
||||
+ARG_MAX = (32768)
|
||||
+ATEXIT_MAX = (32)
|
||||
+CHILD_MAX = (1024)
|
||||
+IOV_MAX = (256)
|
||||
+FILESIZEBITS = (64)
|
||||
+LINK_MAX = (1)
|
||||
+LOGIN_NAME_MAX = (32)
|
||||
+MAX_CANON = (255)
|
||||
+MAX_INPUT = (255)
|
||||
+NAME_MAX = (256)
|
||||
+NGROUPS_MAX = (32)
|
||||
+OPEN_MAX = (128)
|
||||
+PATH_MAX = (1024)
|
||||
+PIPE_MAX = (512)
|
||||
+SSIZE_MAX = (2147483647L)
|
||||
+TTY_NAME_MAX = (256)
|
||||
+TZNAME_MAX = (32)
|
||||
+SYMLINKS_MAX = (16)
|
||||
+_POSIX_ARG_MAX = (32768)
|
||||
+_POSIX_CHILD_MAX = (1024)
|
||||
+_POSIX_LINK_MAX = (1)
|
||||
+_POSIX_LOGIN_NAME_MAX = (9)
|
||||
+_POSIX_MAX_CANON = (255)
|
||||
+_POSIX_MAX_INPUT = (255)
|
||||
+_POSIX_NAME_MAX = (255)
|
||||
+_POSIX_NGROUPS_MAX = (0)
|
||||
+_POSIX_OPEN_MAX = (128)
|
||||
+_POSIX_PATH_MAX = (1024)
|
||||
+_POSIX_PIPE_BUF = (512)
|
||||
+_POSIX_SSIZE_MAX = (2147483647L)
|
||||
+_POSIX_STREAM_MAX = (8)
|
||||
+_POSIX_TTY_NAME_MAX = (256)
|
||||
+_POSIX_TZNAME_MAX = (3)
|
||||
+B_GENERAL_ERROR_BASE = LONG_MIN
|
||||
+B_OS_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x1000
|
||||
+B_APP_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x2000
|
||||
+B_INTERFACE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x3000
|
||||
+B_MEDIA_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4000
|
||||
+B_TRANSLATION_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4800
|
||||
+B_MIDI_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x5000
|
||||
+B_STORAGE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x6000
|
||||
+B_POSIX_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x7000
|
||||
+B_MAIL_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x8000
|
||||
+B_PRINT_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x9000
|
||||
+B_DEVICE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0xa000
|
||||
+B_ERRORS_END = (B_GENERAL_ERROR_BASE + 0xffff)
|
||||
+E2BIG = (B_POSIX_ERROR_BASE + 1)
|
||||
+ECHILD = (B_POSIX_ERROR_BASE + 2)
|
||||
+EDEADLK = (B_POSIX_ERROR_BASE + 3)
|
||||
+EFBIG = (B_POSIX_ERROR_BASE + 4)
|
||||
+EMLINK = (B_POSIX_ERROR_BASE + 5)
|
||||
+ENFILE = (B_POSIX_ERROR_BASE + 6)
|
||||
+ENODEV = (B_POSIX_ERROR_BASE + 7)
|
||||
+ENOLCK = (B_POSIX_ERROR_BASE + 8)
|
||||
+ENOSYS = (B_POSIX_ERROR_BASE + 9)
|
||||
+ENOTTY = (B_POSIX_ERROR_BASE + 10)
|
||||
+ENXIO = (B_POSIX_ERROR_BASE + 11)
|
||||
+ESPIPE = (B_POSIX_ERROR_BASE + 12)
|
||||
+ESRCH = (B_POSIX_ERROR_BASE + 13)
|
||||
+EFPOS = (B_POSIX_ERROR_BASE + 14)
|
||||
+ESIGPARM = (B_POSIX_ERROR_BASE + 15)
|
||||
+EDOM = (B_POSIX_ERROR_BASE + 16)
|
||||
+ERANGE = (B_POSIX_ERROR_BASE + 17)
|
||||
+EPROTOTYPE = (B_POSIX_ERROR_BASE + 18)
|
||||
+EPROTONOSUPPORT = (B_POSIX_ERROR_BASE + 19)
|
||||
+EPFNOSUPPORT = (B_POSIX_ERROR_BASE + 20)
|
||||
+EAFNOSUPPORT = (B_POSIX_ERROR_BASE + 21)
|
||||
+EADDRINUSE = (B_POSIX_ERROR_BASE + 22)
|
||||
+EADDRNOTAVAIL = (B_POSIX_ERROR_BASE + 23)
|
||||
+ENETDOWN = (B_POSIX_ERROR_BASE + 24)
|
||||
+ENETUNREACH = (B_POSIX_ERROR_BASE + 25)
|
||||
+ENETRESET = (B_POSIX_ERROR_BASE + 26)
|
||||
+ECONNABORTED = (B_POSIX_ERROR_BASE + 27)
|
||||
+ECONNRESET = (B_POSIX_ERROR_BASE + 28)
|
||||
+EISCONN = (B_POSIX_ERROR_BASE + 29)
|
||||
+ENOTCONN = (B_POSIX_ERROR_BASE + 30)
|
||||
+ESHUTDOWN = (B_POSIX_ERROR_BASE + 31)
|
||||
+ECONNREFUSED = (B_POSIX_ERROR_BASE + 32)
|
||||
+EHOSTUNREACH = (B_POSIX_ERROR_BASE + 33)
|
||||
+ENOPROTOOPT = (B_POSIX_ERROR_BASE + 34)
|
||||
+ENOBUFS = (B_POSIX_ERROR_BASE + 35)
|
||||
+EINPROGRESS = (B_POSIX_ERROR_BASE + 36)
|
||||
+EALREADY = (B_POSIX_ERROR_BASE + 37)
|
||||
+EILSEQ = (B_POSIX_ERROR_BASE + 38)
|
||||
+ENOMSG = (B_POSIX_ERROR_BASE + 39)
|
||||
+ESTALE = (B_POSIX_ERROR_BASE + 40)
|
||||
+EOVERFLOW = (B_POSIX_ERROR_BASE + 41)
|
||||
+EMSGSIZE = (B_POSIX_ERROR_BASE + 42)
|
||||
+EOPNOTSUPP = (B_POSIX_ERROR_BASE + 43)
|
||||
+ENOTSOCK = (B_POSIX_ERROR_BASE + 44)
|
||||
+false = 0
|
||||
+true = 1
|
||||
+NULL = (0)
|
||||
+FALSE = 0
|
||||
+TRUE = 1
|
||||
+
|
||||
+# Included from TypeConstants.h
|
||||
+B_HOST_IS_LENDIAN = 1
|
||||
+B_HOST_IS_BENDIAN = 0
|
||||
+def B_HOST_TO_LENDIAN_DOUBLE(arg): return (double)(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_FLOAT(arg): return (float)(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT64(arg): return (uint64)(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT32(arg): return (uint32)(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT16(arg): return (uint16)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_FLOAT(arg): return (float)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT64(arg): return (uint64)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT32(arg): return (uint32)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT16(arg): return (uint16)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+B_HOST_IS_LENDIAN = 0
|
||||
+B_HOST_IS_BENDIAN = 1
|
||||
+def B_HOST_TO_LENDIAN_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_DOUBLE(arg): return (double)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_FLOAT(arg): return (float)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT64(arg): return (uint64)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT32(arg): return (uint32)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT16(arg): return (uint16)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_FLOAT(arg): return (float)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT64(arg): return (uint64)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT32(arg): return (uint32)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT16(arg): return (uint16)(arg)
|
||||
+
|
||||
+def B_SWAP_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_SWAP_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_SWAP_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_SWAP_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_SWAP_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+def htonl(x): return B_HOST_TO_BENDIAN_INT32(x)
|
||||
+
|
||||
+def ntohl(x): return B_BENDIAN_TO_HOST_INT32(x)
|
||||
+
|
||||
+def htons(x): return B_HOST_TO_BENDIAN_INT16(x)
|
||||
+
|
||||
+def ntohs(x): return B_BENDIAN_TO_HOST_INT16(x)
|
||||
+
|
||||
+AF_INET = 1
|
||||
+INADDR_ANY = 0x00000000
|
||||
+INADDR_BROADCAST = 0xffffffff
|
||||
+INADDR_LOOPBACK = 0x7f000001
|
||||
+SOL_SOCKET = 1
|
||||
+SO_DEBUG = 1
|
||||
+SO_REUSEADDR = 2
|
||||
+SO_NONBLOCK = 3
|
||||
+SO_REUSEPORT = 4
|
||||
+MSG_OOB = 0x1
|
||||
+SOCK_DGRAM = 1
|
||||
+SOCK_STREAM = 2
|
||||
+IPPROTO_UDP = 1
|
||||
+IPPROTO_TCP = 2
|
||||
+IPPROTO_ICMP = 3
|
||||
+B_UDP_MAX_SIZE = (65536 - 1024)
|
||||
+FD_SETSIZE = 256
|
||||
+FDSETSIZE = FD_SETSIZE
|
||||
+NFDBITS = 32
|
||||
+def _FDMSKNO(fd): return ((fd) / NFDBITS)
|
||||
+
|
||||
+def _FDBITNO(fd): return ((fd) % NFDBITS)
|
||||
diff -ruN Python-2.6.4/Lib/plat-haiku1/regen Python-2.6.4-haiku/Lib/plat-haiku1/regen
|
||||
--- Python-2.6.4/Lib/plat-haiku1/regen 1969-12-31 17:00:00.000000000 -0700
|
||||
+++ Python-2.6.4-haiku/Lib/plat-haiku1/regen 2009-10-27 13:31:08.000000000 -0600
|
||||
@@ -0,0 +1,7 @@
|
||||
+#! /bin/sh
|
||||
+
|
||||
+H2PY=../../Tools/scripts/h2py.py
|
||||
+HEADERS=/boot/develop/headers
|
||||
+
|
||||
+set -v
|
||||
+python $H2PY -i '(u_long)' $HEADERS/posix/netinet/in.h
|
||||
diff -ruN Python-2.6.4/Modules/resource.c Python-2.6.4-haiku/Modules/resource.c
|
||||
--- Python-2.6.4/Modules/resource.c 2009-05-08 14:59:57.000000000 -0600
|
||||
+++ Python-2.6.4-haiku/Modules/resource.c 2009-10-27 13:31:08.000000000 -0600
|
||||
@@ -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);
|
||||
diff -ruN Python-2.6.4/Modules/socketmodule.c Python-2.6.4-haiku/Modules/socketmodule.c
|
||||
--- Python-2.6.4/Modules/socketmodule.c 2009-09-19 01:46:24.000000000 -0600
|
||||
+++ Python-2.6.4-haiku/Modules/socketmodule.c 2009-10-27 13:31:08.000000000 -0600
|
||||
@@ -4640,7 +4640,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
|
||||
diff -ruN Python-2.6.4/Modules/socketmodule.h Python-2.6.4-haiku/Modules/socketmodule.h
|
||||
--- Python-2.6.4/Modules/socketmodule.h 2008-06-14 02:36:07.000000000 -0600
|
||||
+++ Python-2.6.4-haiku/Modules/socketmodule.h 2009-10-27 13:31:08.000000000 -0600
|
||||
@@ -47,6 +47,10 @@
|
||||
# undef AF_NETLINK
|
||||
#endif
|
||||
|
||||
+#if defined(__HAIKU__)
|
||||
+#undef HAVE_BLUETOOTH_BLUETOOTH_H
|
||||
+#endif
|
||||
+
|
||||
#ifdef HAVE_BLUETOOTH_BLUETOOTH_H
|
||||
#include <bluetooth/bluetooth.h>
|
||||
#include <bluetooth/rfcomm.h>
|
||||
diff -ruN Python-2.6.4/Modules/spwdmodule.c Python-2.6.4-haiku/Modules/spwdmodule.c
|
||||
--- Python-2.6.4/Modules/spwdmodule.c 2008-06-08 22:58:54.000000000 -0600
|
||||
+++ Python-2.6.4-haiku/Modules/spwdmodule.c 2009-10-27 13:31:08.000000000 -0600
|
||||
@@ -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);
|
||||
diff -ruN Python-2.6.4/Modules/timemodule.c Python-2.6.4-haiku/Modules/timemodule.c
|
||||
--- Python-2.6.4/Modules/timemodule.c 2008-07-05 13:19:50.000000000 -0600
|
||||
+++ Python-2.6.4-haiku/Modules/timemodule.c 2009-10-27 13:31:08.000000000 -0600
|
||||
@@ -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 -ruN Python-2.6.4/Parser/asdl_c.py Python-2.6.4-haiku/Parser/asdl_c.py
|
||||
--- Python-2.6.4/Parser/asdl_c.py 2008-11-07 01:56:27.000000000 -0700
|
||||
+++ Python-2.6.4-haiku/Parser/asdl_c.py 2009-10-27 13:31:08.000000000 -0600
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /bin/env python
|
||||
"""Generate C code from an ASDL description."""
|
||||
|
||||
# TO DO
|
||||
diff -ruN Python-2.6.4/Tools/scripts/h2py.py Python-2.6.4-haiku/Tools/scripts/h2py.py
|
||||
--- Python-2.6.4/Tools/scripts/h2py.py 2004-08-09 11:27:55.000000000 -0600
|
||||
+++ Python-2.6.4-haiku/Tools/scripts/h2py.py 2009-10-27 13:31:08.000000000 -0600
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /bin/env python
|
||||
|
||||
# Read #define's and translate to Python code.
|
||||
# Handle #include statements.
|
||||
@@ -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(':')
|
||||
diff -ruN Python-2.6.4/configure.in Python-2.6.4-haiku/configure.in
|
||||
--- Python-2.6.4/configure.in 2009-09-29 07:01:59.000000000 -0600
|
||||
+++ Python-2.6.4-haiku/configure.in 2009-10-27 13:31:08.000000000 -0600
|
||||
@@ -715,7 +715,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}
|
||||
@@ -793,7 +793,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;;
|
||||
@@ -1766,7 +1766,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__`" != "" ]]
|
||||
@@ -1820,7 +1820,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*)
|
||||
@@ -1853,7 +1853,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,
|
||||
@@ -1972,6 +1972,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)
|
||||
@@ -3190,7 +3193,7 @@
|
||||
AC_SUBST(LIBM)
|
||||
case $ac_sys_system in
|
||||
Darwin) ;;
|
||||
-BeOS) ;;
|
||||
+BeOS|Haiku) ;;
|
||||
*) LIBM=-lm
|
||||
esac
|
||||
AC_MSG_CHECKING(for --with-libm=STRING)
|
||||
diff -ruN Python-2.6.4/setup.py Python-2.6.4-haiku/setup.py
|
||||
--- Python-2.6.4/setup.py 2009-10-08 03:48:32.000000000 -0600
|
||||
+++ Python-2.6.4-haiku/setup.py 2009-10-27 13:33:59.000000000 -0600
|
||||
@@ -382,6 +382,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']
|
||||
@@ -405,7 +409,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
|
||||
@@ -1065,7 +1069,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:
|
||||
@@ -1,556 +0,0 @@
|
||||
diff -up Python-2.6.5/configure.in.orig Python-2.6.5/configure.in
|
||||
--- Python-2.6.5/configure.in.orig 2010-03-09 14:47:28.011272192 -0700
|
||||
+++ Python-2.6.5/configure.in 2010-04-26 15:46:56.072613888 -0600
|
||||
@@ -747,7 +747,7 @@ if test $enable_shared = "yes"; then
|
||||
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}
|
||||
@@ -825,7 +825,7 @@ AC_PROG_INSTALL
|
||||
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;;
|
||||
@@ -1813,7 +1813,7 @@ then
|
||||
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__`" != "" ]]
|
||||
@@ -1867,7 +1867,7 @@ then
|
||||
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*)
|
||||
@@ -1900,7 +1900,7 @@ then
|
||||
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,
|
||||
@@ -2019,6 +2019,9 @@ case "$ac_sys_system" in
|
||||
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)
|
||||
@@ -3249,7 +3252,7 @@ fi],
|
||||
AC_SUBST(LIBM)
|
||||
case $ac_sys_system in
|
||||
Darwin) ;;
|
||||
-BeOS) ;;
|
||||
+BeOS|Haiku) ;;
|
||||
*) LIBM=-lm
|
||||
esac
|
||||
AC_MSG_CHECKING(for --with-libm=STRING)
|
||||
diff -up Python-2.6.5/setup.py.orig Python-2.6.5/setup.py
|
||||
--- Python-2.6.5/setup.py.orig 2010-03-08 00:08:25.000000000 -0700
|
||||
+++ Python-2.6.5/setup.py 2010-04-26 15:46:56.095682560 -0600
|
||||
@@ -382,6 +382,10 @@ class PyBuildExt(build_ext):
|
||||
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']
|
||||
@@ -405,7 +409,7 @@ class PyBuildExt(build_ext):
|
||||
|
||||
# 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
|
||||
@@ -1068,7 +1072,7 @@ class PyBuildExt(build_ext):
|
||||
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 -up Python-2.6.5/Lib/plat-haiku1/IN.py.orig Python-2.6.5/Lib/plat-haiku1/IN.py
|
||||
--- Python-2.6.5/Lib/plat-haiku1/IN.py.orig 2010-04-26 15:46:55.865337344 -0600
|
||||
+++ Python-2.6.5/Lib/plat-haiku1/IN.py 2010-04-26 15:46:55.884736000 -0600
|
||||
@@ -0,0 +1,327 @@
|
||||
+# Generated by h2py from /boot/develop/headers/be/net/netinet/in.h
|
||||
+
|
||||
+# Included from socket.h
|
||||
+
|
||||
+# Included from BeBuild.h
|
||||
+B_BEOS_VERSION_4 = 0x0400
|
||||
+B_BEOS_VERSION_4_5 = 0x0450
|
||||
+B_BEOS_VERSION_5 = 0x0500
|
||||
+B_BEOS_VERSION = B_BEOS_VERSION_5
|
||||
+B_BEOS_VERSION_MAUI = B_BEOS_VERSION_5
|
||||
+_PR2_COMPATIBLE_ = 1
|
||||
+_PR3_COMPATIBLE_ = 1
|
||||
+_R4_COMPATIBLE_ = 1
|
||||
+_R4_5_COMPATIBLE_ = 1
|
||||
+_PR2_COMPATIBLE_ = 0
|
||||
+_PR3_COMPATIBLE_ = 0
|
||||
+_R4_COMPATIBLE_ = 1
|
||||
+_R4_5_COMPATIBLE_ = 1
|
||||
+def _UNUSED(x): return x
|
||||
+
|
||||
+
|
||||
+# Included from sys/types.h
|
||||
+
|
||||
+# Included from time.h
|
||||
+
|
||||
+# Included from be_setup.h
|
||||
+def __std(ref): return ref
|
||||
+
|
||||
+__be_os = 2
|
||||
+__dest_os = __be_os
|
||||
+__MSL__ = 0x4011
|
||||
+__GLIBC__ = -2
|
||||
+__GLIBC_MINOR__ = 1
|
||||
+
|
||||
+# Included from null.h
|
||||
+NULL = (0)
|
||||
+NULL = 0L
|
||||
+
|
||||
+# Included from size_t.h
|
||||
+
|
||||
+# Included from stddef.h
|
||||
+
|
||||
+# Included from wchar_t.h
|
||||
+CLOCKS_PER_SEC = 1000
|
||||
+CLK_TCK = CLOCKS_PER_SEC
|
||||
+MAX_TIMESTR = 70
|
||||
+
|
||||
+# Included from sys/time.h
|
||||
+
|
||||
+# Included from ByteOrder.h
|
||||
+
|
||||
+# Included from endian.h
|
||||
+__LITTLE_ENDIAN = 1234
|
||||
+LITTLE_ENDIAN = __LITTLE_ENDIAN
|
||||
+__BYTE_ORDER = __LITTLE_ENDIAN
|
||||
+BYTE_ORDER = __BYTE_ORDER
|
||||
+__BIG_ENDIAN = 0
|
||||
+BIG_ENDIAN = 0
|
||||
+__BIG_ENDIAN = 4321
|
||||
+BIG_ENDIAN = __BIG_ENDIAN
|
||||
+__BYTE_ORDER = __BIG_ENDIAN
|
||||
+BYTE_ORDER = __BYTE_ORDER
|
||||
+__LITTLE_ENDIAN = 0
|
||||
+LITTLE_ENDIAN = 0
|
||||
+__PDP_ENDIAN = 3412
|
||||
+PDP_ENDIAN = __PDP_ENDIAN
|
||||
+
|
||||
+# Included from SupportDefs.h
|
||||
+
|
||||
+# Included from Errors.h
|
||||
+
|
||||
+# Included from limits.h
|
||||
+
|
||||
+# Included from float.h
|
||||
+FLT_ROUNDS = 1
|
||||
+FLT_RADIX = 2
|
||||
+FLT_MANT_DIG = 24
|
||||
+FLT_DIG = 6
|
||||
+FLT_MIN_EXP = (-125)
|
||||
+FLT_MIN_10_EXP = (-37)
|
||||
+FLT_MAX_EXP = 128
|
||||
+FLT_MAX_10_EXP = 38
|
||||
+DBL_MANT_DIG = 53
|
||||
+DBL_DIG = 15
|
||||
+DBL_MIN_EXP = (-1021)
|
||||
+DBL_MIN_10_EXP = (-308)
|
||||
+DBL_MAX_EXP = 1024
|
||||
+DBL_MAX_10_EXP = 308
|
||||
+LDBL_MANT_DIG = DBL_MANT_DIG
|
||||
+LDBL_DIG = DBL_DIG
|
||||
+LDBL_MIN_EXP = DBL_MIN_EXP
|
||||
+LDBL_MIN_10_EXP = DBL_MIN_10_EXP
|
||||
+LDBL_MAX_EXP = DBL_MAX_EXP
|
||||
+LDBL_MAX_10_EXP = DBL_MAX_10_EXP
|
||||
+CHAR_BIT = (8)
|
||||
+SCHAR_MIN = (-127-1)
|
||||
+SCHAR_MAX = (127)
|
||||
+CHAR_MIN = SCHAR_MIN
|
||||
+CHAR_MAX = SCHAR_MAX
|
||||
+MB_LEN_MAX = (1)
|
||||
+SHRT_MIN = (-32767-1)
|
||||
+SHRT_MAX = (32767)
|
||||
+LONG_MIN = (-2147483647L-1)
|
||||
+LONG_MAX = (2147483647L)
|
||||
+INT_MIN = LONG_MIN
|
||||
+INT_MAX = LONG_MAX
|
||||
+ARG_MAX = (32768)
|
||||
+ATEXIT_MAX = (32)
|
||||
+CHILD_MAX = (1024)
|
||||
+IOV_MAX = (256)
|
||||
+FILESIZEBITS = (64)
|
||||
+LINK_MAX = (1)
|
||||
+LOGIN_NAME_MAX = (32)
|
||||
+MAX_CANON = (255)
|
||||
+MAX_INPUT = (255)
|
||||
+NAME_MAX = (256)
|
||||
+NGROUPS_MAX = (32)
|
||||
+OPEN_MAX = (128)
|
||||
+PATH_MAX = (1024)
|
||||
+PIPE_MAX = (512)
|
||||
+SSIZE_MAX = (2147483647L)
|
||||
+TTY_NAME_MAX = (256)
|
||||
+TZNAME_MAX = (32)
|
||||
+SYMLINKS_MAX = (16)
|
||||
+_POSIX_ARG_MAX = (32768)
|
||||
+_POSIX_CHILD_MAX = (1024)
|
||||
+_POSIX_LINK_MAX = (1)
|
||||
+_POSIX_LOGIN_NAME_MAX = (9)
|
||||
+_POSIX_MAX_CANON = (255)
|
||||
+_POSIX_MAX_INPUT = (255)
|
||||
+_POSIX_NAME_MAX = (255)
|
||||
+_POSIX_NGROUPS_MAX = (0)
|
||||
+_POSIX_OPEN_MAX = (128)
|
||||
+_POSIX_PATH_MAX = (1024)
|
||||
+_POSIX_PIPE_BUF = (512)
|
||||
+_POSIX_SSIZE_MAX = (2147483647L)
|
||||
+_POSIX_STREAM_MAX = (8)
|
||||
+_POSIX_TTY_NAME_MAX = (256)
|
||||
+_POSIX_TZNAME_MAX = (3)
|
||||
+B_GENERAL_ERROR_BASE = LONG_MIN
|
||||
+B_OS_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x1000
|
||||
+B_APP_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x2000
|
||||
+B_INTERFACE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x3000
|
||||
+B_MEDIA_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4000
|
||||
+B_TRANSLATION_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4800
|
||||
+B_MIDI_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x5000
|
||||
+B_STORAGE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x6000
|
||||
+B_POSIX_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x7000
|
||||
+B_MAIL_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x8000
|
||||
+B_PRINT_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x9000
|
||||
+B_DEVICE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0xa000
|
||||
+B_ERRORS_END = (B_GENERAL_ERROR_BASE + 0xffff)
|
||||
+E2BIG = (B_POSIX_ERROR_BASE + 1)
|
||||
+ECHILD = (B_POSIX_ERROR_BASE + 2)
|
||||
+EDEADLK = (B_POSIX_ERROR_BASE + 3)
|
||||
+EFBIG = (B_POSIX_ERROR_BASE + 4)
|
||||
+EMLINK = (B_POSIX_ERROR_BASE + 5)
|
||||
+ENFILE = (B_POSIX_ERROR_BASE + 6)
|
||||
+ENODEV = (B_POSIX_ERROR_BASE + 7)
|
||||
+ENOLCK = (B_POSIX_ERROR_BASE + 8)
|
||||
+ENOSYS = (B_POSIX_ERROR_BASE + 9)
|
||||
+ENOTTY = (B_POSIX_ERROR_BASE + 10)
|
||||
+ENXIO = (B_POSIX_ERROR_BASE + 11)
|
||||
+ESPIPE = (B_POSIX_ERROR_BASE + 12)
|
||||
+ESRCH = (B_POSIX_ERROR_BASE + 13)
|
||||
+EFPOS = (B_POSIX_ERROR_BASE + 14)
|
||||
+ESIGPARM = (B_POSIX_ERROR_BASE + 15)
|
||||
+EDOM = (B_POSIX_ERROR_BASE + 16)
|
||||
+ERANGE = (B_POSIX_ERROR_BASE + 17)
|
||||
+EPROTOTYPE = (B_POSIX_ERROR_BASE + 18)
|
||||
+EPROTONOSUPPORT = (B_POSIX_ERROR_BASE + 19)
|
||||
+EPFNOSUPPORT = (B_POSIX_ERROR_BASE + 20)
|
||||
+EAFNOSUPPORT = (B_POSIX_ERROR_BASE + 21)
|
||||
+EADDRINUSE = (B_POSIX_ERROR_BASE + 22)
|
||||
+EADDRNOTAVAIL = (B_POSIX_ERROR_BASE + 23)
|
||||
+ENETDOWN = (B_POSIX_ERROR_BASE + 24)
|
||||
+ENETUNREACH = (B_POSIX_ERROR_BASE + 25)
|
||||
+ENETRESET = (B_POSIX_ERROR_BASE + 26)
|
||||
+ECONNABORTED = (B_POSIX_ERROR_BASE + 27)
|
||||
+ECONNRESET = (B_POSIX_ERROR_BASE + 28)
|
||||
+EISCONN = (B_POSIX_ERROR_BASE + 29)
|
||||
+ENOTCONN = (B_POSIX_ERROR_BASE + 30)
|
||||
+ESHUTDOWN = (B_POSIX_ERROR_BASE + 31)
|
||||
+ECONNREFUSED = (B_POSIX_ERROR_BASE + 32)
|
||||
+EHOSTUNREACH = (B_POSIX_ERROR_BASE + 33)
|
||||
+ENOPROTOOPT = (B_POSIX_ERROR_BASE + 34)
|
||||
+ENOBUFS = (B_POSIX_ERROR_BASE + 35)
|
||||
+EINPROGRESS = (B_POSIX_ERROR_BASE + 36)
|
||||
+EALREADY = (B_POSIX_ERROR_BASE + 37)
|
||||
+EILSEQ = (B_POSIX_ERROR_BASE + 38)
|
||||
+ENOMSG = (B_POSIX_ERROR_BASE + 39)
|
||||
+ESTALE = (B_POSIX_ERROR_BASE + 40)
|
||||
+EOVERFLOW = (B_POSIX_ERROR_BASE + 41)
|
||||
+EMSGSIZE = (B_POSIX_ERROR_BASE + 42)
|
||||
+EOPNOTSUPP = (B_POSIX_ERROR_BASE + 43)
|
||||
+ENOTSOCK = (B_POSIX_ERROR_BASE + 44)
|
||||
+false = 0
|
||||
+true = 1
|
||||
+NULL = (0)
|
||||
+FALSE = 0
|
||||
+TRUE = 1
|
||||
+
|
||||
+# Included from TypeConstants.h
|
||||
+B_HOST_IS_LENDIAN = 1
|
||||
+B_HOST_IS_BENDIAN = 0
|
||||
+def B_HOST_TO_LENDIAN_DOUBLE(arg): return (double)(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_FLOAT(arg): return (float)(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT64(arg): return (uint64)(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT32(arg): return (uint32)(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT16(arg): return (uint16)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_FLOAT(arg): return (float)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT64(arg): return (uint64)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT32(arg): return (uint32)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT16(arg): return (uint16)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+B_HOST_IS_LENDIAN = 0
|
||||
+B_HOST_IS_BENDIAN = 1
|
||||
+def B_HOST_TO_LENDIAN_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_DOUBLE(arg): return (double)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_FLOAT(arg): return (float)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT64(arg): return (uint64)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT32(arg): return (uint32)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT16(arg): return (uint16)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_FLOAT(arg): return (float)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT64(arg): return (uint64)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT32(arg): return (uint32)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT16(arg): return (uint16)(arg)
|
||||
+
|
||||
+def B_SWAP_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_SWAP_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_SWAP_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_SWAP_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_SWAP_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+def htonl(x): return B_HOST_TO_BENDIAN_INT32(x)
|
||||
+
|
||||
+def ntohl(x): return B_BENDIAN_TO_HOST_INT32(x)
|
||||
+
|
||||
+def htons(x): return B_HOST_TO_BENDIAN_INT16(x)
|
||||
+
|
||||
+def ntohs(x): return B_BENDIAN_TO_HOST_INT16(x)
|
||||
+
|
||||
+AF_INET = 1
|
||||
+INADDR_ANY = 0x00000000
|
||||
+INADDR_BROADCAST = 0xffffffff
|
||||
+INADDR_LOOPBACK = 0x7f000001
|
||||
+SOL_SOCKET = 1
|
||||
+SO_DEBUG = 1
|
||||
+SO_REUSEADDR = 2
|
||||
+SO_NONBLOCK = 3
|
||||
+SO_REUSEPORT = 4
|
||||
+MSG_OOB = 0x1
|
||||
+SOCK_DGRAM = 1
|
||||
+SOCK_STREAM = 2
|
||||
+IPPROTO_UDP = 1
|
||||
+IPPROTO_TCP = 2
|
||||
+IPPROTO_ICMP = 3
|
||||
+B_UDP_MAX_SIZE = (65536 - 1024)
|
||||
+FD_SETSIZE = 256
|
||||
+FDSETSIZE = FD_SETSIZE
|
||||
+NFDBITS = 32
|
||||
+def _FDMSKNO(fd): return ((fd) / NFDBITS)
|
||||
+
|
||||
+def _FDBITNO(fd): return ((fd) % NFDBITS)
|
||||
diff -up Python-2.6.5/Lib/plat-haiku1/regen.orig Python-2.6.5/Lib/plat-haiku1/regen
|
||||
--- Python-2.6.5/Lib/plat-haiku1/regen.orig 2010-04-26 15:46:55.886833152 -0600
|
||||
+++ Python-2.6.5/Lib/plat-haiku1/regen 2010-04-26 15:46:55.887095296 -0600
|
||||
@@ -0,0 +1,7 @@
|
||||
+#! /bin/sh
|
||||
+
|
||||
+H2PY=../../Tools/scripts/h2py.py
|
||||
+HEADERS=/boot/develop/headers
|
||||
+
|
||||
+set -v
|
||||
+python $H2PY -i '(u_long)' $HEADERS/posix/netinet/in.h
|
||||
diff -up Python-2.6.5/Modules/resource.c.orig Python-2.6.5/Modules/resource.c
|
||||
--- Python-2.6.5/Modules/resource.c.orig 2009-05-08 14:59:57.064225280 -0600
|
||||
+++ Python-2.6.5/Modules/resource.c 2010-04-26 15:46:55.908853248 -0600
|
||||
@@ -86,6 +86,7 @@ resource_getrusage(PyObject *self, PyObj
|
||||
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 @@ resource_getrusage(PyObject *self, PyObj
|
||||
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);
|
||||
diff -up Python-2.6.5/Modules/socketmodule.c.orig Python-2.6.5/Modules/socketmodule.c
|
||||
--- Python-2.6.5/Modules/socketmodule.c.orig 2010-02-04 13:26:34.065011712 -0700
|
||||
+++ Python-2.6.5/Modules/socketmodule.c 2010-04-26 15:46:55.934805504 -0600
|
||||
@@ -4647,7 +4647,9 @@ init_socket(void)
|
||||
#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
|
||||
diff -up Python-2.6.5/Modules/socketmodule.h.orig Python-2.6.5/Modules/socketmodule.h
|
||||
--- Python-2.6.5/Modules/socketmodule.h.orig 2008-06-14 02:36:07.063963136 -0600
|
||||
+++ Python-2.6.5/Modules/socketmodule.h 2010-04-26 15:46:55.948174848 -0600
|
||||
@@ -47,6 +47,10 @@ typedef int socklen_t;
|
||||
# undef AF_NETLINK
|
||||
#endif
|
||||
|
||||
+#if defined(__HAIKU__)
|
||||
+#undef HAVE_BLUETOOTH_BLUETOOTH_H
|
||||
+#endif
|
||||
+
|
||||
#ifdef HAVE_BLUETOOTH_BLUETOOTH_H
|
||||
#include <bluetooth/bluetooth.h>
|
||||
#include <bluetooth/rfcomm.h>
|
||||
diff -up Python-2.6.5/Modules/spwdmodule.c.orig Python-2.6.5/Modules/spwdmodule.c
|
||||
--- Python-2.6.5/Modules/spwdmodule.c.orig 2008-06-08 22:58:54.041418752 -0600
|
||||
+++ Python-2.6.5/Modules/spwdmodule.c 2010-04-26 15:46:55.977534976 -0600
|
||||
@@ -79,7 +79,9 @@ static PyObject *mkspent(struct spwd *p)
|
||||
|
||||
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);
|
||||
diff -up Python-2.6.5/Modules/timemodule.c.orig Python-2.6.5/Modules/timemodule.c
|
||||
--- Python-2.6.5/Modules/timemodule.c.orig 2008-07-05 13:19:50.026214400 -0600
|
||||
+++ Python-2.6.5/Modules/timemodule.c 2010-04-26 15:46:56.001048576 -0600
|
||||
@@ -968,11 +968,11 @@ floatsleep(double secs)
|
||||
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 -up Python-2.6.5/Parser/asdl_c.py.orig Python-2.6.5/Parser/asdl_c.py
|
||||
--- Python-2.6.5/Parser/asdl_c.py.orig 2009-12-12 17:59:01.002621440 -0700
|
||||
+++ Python-2.6.5/Parser/asdl_c.py 2010-04-26 15:46:56.004456448 -0600
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /bin/env python
|
||||
"""Generate C code from an ASDL description."""
|
||||
|
||||
# TO DO
|
||||
diff -up Python-2.6.5/Python/bltinmodule.c.orig Python-2.6.5/Python/bltinmodule.c
|
||||
--- Python-2.6.5/Python/bltinmodule.c.orig 2010-04-26 15:47:08.138936320 -0600
|
||||
+++ Python-2.6.5/Python/bltinmodule.c 2010-04-26 15:47:23.016777216 -0600
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
#if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)
|
||||
const char *Py_FileSystemDefaultEncoding = "mbcs";
|
||||
-#elif defined(__APPLE__)
|
||||
+#elif defined(__APPLE__) || defined(__HAIKU__)
|
||||
const char *Py_FileSystemDefaultEncoding = "utf-8";
|
||||
#else
|
||||
const char *Py_FileSystemDefaultEncoding = NULL; /* use default */
|
||||
diff -up Python-2.6.5/Tools/scripts/h2py.py.orig Python-2.6.5/Tools/scripts/h2py.py
|
||||
--- Python-2.6.5/Tools/scripts/h2py.py.orig 2004-08-09 11:27:55.006815744 -0600
|
||||
+++ Python-2.6.5/Tools/scripts/h2py.py 2010-04-26 15:46:56.047710208 -0600
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /bin/env python
|
||||
|
||||
# Read #define's and translate to Python code.
|
||||
# Handle #include statements.
|
||||
@@ -50,7 +50,7 @@ except KeyError:
|
||||
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(':')
|
||||
@@ -1,558 +0,0 @@
|
||||
diff -urN Python-2.6.6/Lib/plat-haiku1/IN.py Python-2.6.6-haiku/Lib/plat-haiku1/IN.py
|
||||
--- Python-2.6.6/Lib/plat-haiku1/IN.py 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ Python-2.6.6-haiku/Lib/plat-haiku1/IN.py 2010-08-30 04:52:27.223346688 +0000
|
||||
@@ -0,0 +1,327 @@
|
||||
+# Generated by h2py from /boot/develop/headers/be/net/netinet/in.h
|
||||
+
|
||||
+# Included from socket.h
|
||||
+
|
||||
+# Included from BeBuild.h
|
||||
+B_BEOS_VERSION_4 = 0x0400
|
||||
+B_BEOS_VERSION_4_5 = 0x0450
|
||||
+B_BEOS_VERSION_5 = 0x0500
|
||||
+B_BEOS_VERSION = B_BEOS_VERSION_5
|
||||
+B_BEOS_VERSION_MAUI = B_BEOS_VERSION_5
|
||||
+_PR2_COMPATIBLE_ = 1
|
||||
+_PR3_COMPATIBLE_ = 1
|
||||
+_R4_COMPATIBLE_ = 1
|
||||
+_R4_5_COMPATIBLE_ = 1
|
||||
+_PR2_COMPATIBLE_ = 0
|
||||
+_PR3_COMPATIBLE_ = 0
|
||||
+_R4_COMPATIBLE_ = 1
|
||||
+_R4_5_COMPATIBLE_ = 1
|
||||
+def _UNUSED(x): return x
|
||||
+
|
||||
+
|
||||
+# Included from sys/types.h
|
||||
+
|
||||
+# Included from time.h
|
||||
+
|
||||
+# Included from be_setup.h
|
||||
+def __std(ref): return ref
|
||||
+
|
||||
+__be_os = 2
|
||||
+__dest_os = __be_os
|
||||
+__MSL__ = 0x4011
|
||||
+__GLIBC__ = -2
|
||||
+__GLIBC_MINOR__ = 1
|
||||
+
|
||||
+# Included from null.h
|
||||
+NULL = (0)
|
||||
+NULL = 0L
|
||||
+
|
||||
+# Included from size_t.h
|
||||
+
|
||||
+# Included from stddef.h
|
||||
+
|
||||
+# Included from wchar_t.h
|
||||
+CLOCKS_PER_SEC = 1000
|
||||
+CLK_TCK = CLOCKS_PER_SEC
|
||||
+MAX_TIMESTR = 70
|
||||
+
|
||||
+# Included from sys/time.h
|
||||
+
|
||||
+# Included from ByteOrder.h
|
||||
+
|
||||
+# Included from endian.h
|
||||
+__LITTLE_ENDIAN = 1234
|
||||
+LITTLE_ENDIAN = __LITTLE_ENDIAN
|
||||
+__BYTE_ORDER = __LITTLE_ENDIAN
|
||||
+BYTE_ORDER = __BYTE_ORDER
|
||||
+__BIG_ENDIAN = 0
|
||||
+BIG_ENDIAN = 0
|
||||
+__BIG_ENDIAN = 4321
|
||||
+BIG_ENDIAN = __BIG_ENDIAN
|
||||
+__BYTE_ORDER = __BIG_ENDIAN
|
||||
+BYTE_ORDER = __BYTE_ORDER
|
||||
+__LITTLE_ENDIAN = 0
|
||||
+LITTLE_ENDIAN = 0
|
||||
+__PDP_ENDIAN = 3412
|
||||
+PDP_ENDIAN = __PDP_ENDIAN
|
||||
+
|
||||
+# Included from SupportDefs.h
|
||||
+
|
||||
+# Included from Errors.h
|
||||
+
|
||||
+# Included from limits.h
|
||||
+
|
||||
+# Included from float.h
|
||||
+FLT_ROUNDS = 1
|
||||
+FLT_RADIX = 2
|
||||
+FLT_MANT_DIG = 24
|
||||
+FLT_DIG = 6
|
||||
+FLT_MIN_EXP = (-125)
|
||||
+FLT_MIN_10_EXP = (-37)
|
||||
+FLT_MAX_EXP = 128
|
||||
+FLT_MAX_10_EXP = 38
|
||||
+DBL_MANT_DIG = 53
|
||||
+DBL_DIG = 15
|
||||
+DBL_MIN_EXP = (-1021)
|
||||
+DBL_MIN_10_EXP = (-308)
|
||||
+DBL_MAX_EXP = 1024
|
||||
+DBL_MAX_10_EXP = 308
|
||||
+LDBL_MANT_DIG = DBL_MANT_DIG
|
||||
+LDBL_DIG = DBL_DIG
|
||||
+LDBL_MIN_EXP = DBL_MIN_EXP
|
||||
+LDBL_MIN_10_EXP = DBL_MIN_10_EXP
|
||||
+LDBL_MAX_EXP = DBL_MAX_EXP
|
||||
+LDBL_MAX_10_EXP = DBL_MAX_10_EXP
|
||||
+CHAR_BIT = (8)
|
||||
+SCHAR_MIN = (-127-1)
|
||||
+SCHAR_MAX = (127)
|
||||
+CHAR_MIN = SCHAR_MIN
|
||||
+CHAR_MAX = SCHAR_MAX
|
||||
+MB_LEN_MAX = (1)
|
||||
+SHRT_MIN = (-32767-1)
|
||||
+SHRT_MAX = (32767)
|
||||
+LONG_MIN = (-2147483647L-1)
|
||||
+LONG_MAX = (2147483647L)
|
||||
+INT_MIN = LONG_MIN
|
||||
+INT_MAX = LONG_MAX
|
||||
+ARG_MAX = (32768)
|
||||
+ATEXIT_MAX = (32)
|
||||
+CHILD_MAX = (1024)
|
||||
+IOV_MAX = (256)
|
||||
+FILESIZEBITS = (64)
|
||||
+LINK_MAX = (1)
|
||||
+LOGIN_NAME_MAX = (32)
|
||||
+MAX_CANON = (255)
|
||||
+MAX_INPUT = (255)
|
||||
+NAME_MAX = (256)
|
||||
+NGROUPS_MAX = (32)
|
||||
+OPEN_MAX = (128)
|
||||
+PATH_MAX = (1024)
|
||||
+PIPE_MAX = (512)
|
||||
+SSIZE_MAX = (2147483647L)
|
||||
+TTY_NAME_MAX = (256)
|
||||
+TZNAME_MAX = (32)
|
||||
+SYMLINKS_MAX = (16)
|
||||
+_POSIX_ARG_MAX = (32768)
|
||||
+_POSIX_CHILD_MAX = (1024)
|
||||
+_POSIX_LINK_MAX = (1)
|
||||
+_POSIX_LOGIN_NAME_MAX = (9)
|
||||
+_POSIX_MAX_CANON = (255)
|
||||
+_POSIX_MAX_INPUT = (255)
|
||||
+_POSIX_NAME_MAX = (255)
|
||||
+_POSIX_NGROUPS_MAX = (0)
|
||||
+_POSIX_OPEN_MAX = (128)
|
||||
+_POSIX_PATH_MAX = (1024)
|
||||
+_POSIX_PIPE_BUF = (512)
|
||||
+_POSIX_SSIZE_MAX = (2147483647L)
|
||||
+_POSIX_STREAM_MAX = (8)
|
||||
+_POSIX_TTY_NAME_MAX = (256)
|
||||
+_POSIX_TZNAME_MAX = (3)
|
||||
+B_GENERAL_ERROR_BASE = LONG_MIN
|
||||
+B_OS_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x1000
|
||||
+B_APP_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x2000
|
||||
+B_INTERFACE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x3000
|
||||
+B_MEDIA_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4000
|
||||
+B_TRANSLATION_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4800
|
||||
+B_MIDI_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x5000
|
||||
+B_STORAGE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x6000
|
||||
+B_POSIX_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x7000
|
||||
+B_MAIL_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x8000
|
||||
+B_PRINT_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x9000
|
||||
+B_DEVICE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0xa000
|
||||
+B_ERRORS_END = (B_GENERAL_ERROR_BASE + 0xffff)
|
||||
+E2BIG = (B_POSIX_ERROR_BASE + 1)
|
||||
+ECHILD = (B_POSIX_ERROR_BASE + 2)
|
||||
+EDEADLK = (B_POSIX_ERROR_BASE + 3)
|
||||
+EFBIG = (B_POSIX_ERROR_BASE + 4)
|
||||
+EMLINK = (B_POSIX_ERROR_BASE + 5)
|
||||
+ENFILE = (B_POSIX_ERROR_BASE + 6)
|
||||
+ENODEV = (B_POSIX_ERROR_BASE + 7)
|
||||
+ENOLCK = (B_POSIX_ERROR_BASE + 8)
|
||||
+ENOSYS = (B_POSIX_ERROR_BASE + 9)
|
||||
+ENOTTY = (B_POSIX_ERROR_BASE + 10)
|
||||
+ENXIO = (B_POSIX_ERROR_BASE + 11)
|
||||
+ESPIPE = (B_POSIX_ERROR_BASE + 12)
|
||||
+ESRCH = (B_POSIX_ERROR_BASE + 13)
|
||||
+EFPOS = (B_POSIX_ERROR_BASE + 14)
|
||||
+ESIGPARM = (B_POSIX_ERROR_BASE + 15)
|
||||
+EDOM = (B_POSIX_ERROR_BASE + 16)
|
||||
+ERANGE = (B_POSIX_ERROR_BASE + 17)
|
||||
+EPROTOTYPE = (B_POSIX_ERROR_BASE + 18)
|
||||
+EPROTONOSUPPORT = (B_POSIX_ERROR_BASE + 19)
|
||||
+EPFNOSUPPORT = (B_POSIX_ERROR_BASE + 20)
|
||||
+EAFNOSUPPORT = (B_POSIX_ERROR_BASE + 21)
|
||||
+EADDRINUSE = (B_POSIX_ERROR_BASE + 22)
|
||||
+EADDRNOTAVAIL = (B_POSIX_ERROR_BASE + 23)
|
||||
+ENETDOWN = (B_POSIX_ERROR_BASE + 24)
|
||||
+ENETUNREACH = (B_POSIX_ERROR_BASE + 25)
|
||||
+ENETRESET = (B_POSIX_ERROR_BASE + 26)
|
||||
+ECONNABORTED = (B_POSIX_ERROR_BASE + 27)
|
||||
+ECONNRESET = (B_POSIX_ERROR_BASE + 28)
|
||||
+EISCONN = (B_POSIX_ERROR_BASE + 29)
|
||||
+ENOTCONN = (B_POSIX_ERROR_BASE + 30)
|
||||
+ESHUTDOWN = (B_POSIX_ERROR_BASE + 31)
|
||||
+ECONNREFUSED = (B_POSIX_ERROR_BASE + 32)
|
||||
+EHOSTUNREACH = (B_POSIX_ERROR_BASE + 33)
|
||||
+ENOPROTOOPT = (B_POSIX_ERROR_BASE + 34)
|
||||
+ENOBUFS = (B_POSIX_ERROR_BASE + 35)
|
||||
+EINPROGRESS = (B_POSIX_ERROR_BASE + 36)
|
||||
+EALREADY = (B_POSIX_ERROR_BASE + 37)
|
||||
+EILSEQ = (B_POSIX_ERROR_BASE + 38)
|
||||
+ENOMSG = (B_POSIX_ERROR_BASE + 39)
|
||||
+ESTALE = (B_POSIX_ERROR_BASE + 40)
|
||||
+EOVERFLOW = (B_POSIX_ERROR_BASE + 41)
|
||||
+EMSGSIZE = (B_POSIX_ERROR_BASE + 42)
|
||||
+EOPNOTSUPP = (B_POSIX_ERROR_BASE + 43)
|
||||
+ENOTSOCK = (B_POSIX_ERROR_BASE + 44)
|
||||
+false = 0
|
||||
+true = 1
|
||||
+NULL = (0)
|
||||
+FALSE = 0
|
||||
+TRUE = 1
|
||||
+
|
||||
+# Included from TypeConstants.h
|
||||
+B_HOST_IS_LENDIAN = 1
|
||||
+B_HOST_IS_BENDIAN = 0
|
||||
+def B_HOST_TO_LENDIAN_DOUBLE(arg): return (double)(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_FLOAT(arg): return (float)(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT64(arg): return (uint64)(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT32(arg): return (uint32)(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT16(arg): return (uint16)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_FLOAT(arg): return (float)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT64(arg): return (uint64)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT32(arg): return (uint32)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT16(arg): return (uint16)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+B_HOST_IS_LENDIAN = 0
|
||||
+B_HOST_IS_BENDIAN = 1
|
||||
+def B_HOST_TO_LENDIAN_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_DOUBLE(arg): return (double)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_FLOAT(arg): return (float)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT64(arg): return (uint64)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT32(arg): return (uint32)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT16(arg): return (uint16)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_FLOAT(arg): return (float)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT64(arg): return (uint64)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT32(arg): return (uint32)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT16(arg): return (uint16)(arg)
|
||||
+
|
||||
+def B_SWAP_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_SWAP_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_SWAP_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_SWAP_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_SWAP_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+def htonl(x): return B_HOST_TO_BENDIAN_INT32(x)
|
||||
+
|
||||
+def ntohl(x): return B_BENDIAN_TO_HOST_INT32(x)
|
||||
+
|
||||
+def htons(x): return B_HOST_TO_BENDIAN_INT16(x)
|
||||
+
|
||||
+def ntohs(x): return B_BENDIAN_TO_HOST_INT16(x)
|
||||
+
|
||||
+AF_INET = 1
|
||||
+INADDR_ANY = 0x00000000
|
||||
+INADDR_BROADCAST = 0xffffffff
|
||||
+INADDR_LOOPBACK = 0x7f000001
|
||||
+SOL_SOCKET = 1
|
||||
+SO_DEBUG = 1
|
||||
+SO_REUSEADDR = 2
|
||||
+SO_NONBLOCK = 3
|
||||
+SO_REUSEPORT = 4
|
||||
+MSG_OOB = 0x1
|
||||
+SOCK_DGRAM = 1
|
||||
+SOCK_STREAM = 2
|
||||
+IPPROTO_UDP = 1
|
||||
+IPPROTO_TCP = 2
|
||||
+IPPROTO_ICMP = 3
|
||||
+B_UDP_MAX_SIZE = (65536 - 1024)
|
||||
+FD_SETSIZE = 256
|
||||
+FDSETSIZE = FD_SETSIZE
|
||||
+NFDBITS = 32
|
||||
+def _FDMSKNO(fd): return ((fd) / NFDBITS)
|
||||
+
|
||||
+def _FDBITNO(fd): return ((fd) % NFDBITS)
|
||||
diff -urN Python-2.6.6/Lib/plat-haiku1/regen Python-2.6.6-haiku/Lib/plat-haiku1/regen
|
||||
--- Python-2.6.6/Lib/plat-haiku1/regen 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ Python-2.6.6-haiku/Lib/plat-haiku1/regen 2010-08-30 04:52:27.237502464 +0000
|
||||
@@ -0,0 +1,7 @@
|
||||
+#! /bin/sh
|
||||
+
|
||||
+H2PY=../../Tools/scripts/h2py.py
|
||||
+HEADERS=/boot/develop/headers
|
||||
+
|
||||
+set -v
|
||||
+python $H2PY -i '(u_long)' $HEADERS/posix/netinet/in.h
|
||||
diff -urN Python-2.6.6/Modules/resource.c Python-2.6.6-haiku/Modules/resource.c
|
||||
--- Python-2.6.6/Modules/resource.c 2010-05-09 15:15:40.053739520 +0000
|
||||
+++ Python-2.6.6-haiku/Modules/resource.c 2010-08-30 04:52:24.666370048 +0000
|
||||
@@ -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,7 +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);
|
||||
return NULL;
|
||||
diff -urN Python-2.6.6/Modules/socketmodule.c Python-2.6.6-haiku/Modules/socketmodule.c
|
||||
--- Python-2.6.6/Modules/socketmodule.c 2010-05-23 15:22:08.054525952 +0000
|
||||
+++ Python-2.6.6-haiku/Modules/socketmodule.c 2010-08-30 04:53:35.429916160 +0000
|
||||
@@ -4661,7 +4661,9 @@
|
||||
#ifndef __BEOS__
|
||||
/* We have incomplete socket support. */
|
||||
PyModule_AddIntConstant(m, "SOCK_RAW", SOCK_RAW);
|
||||
- PyModule_AddIntConstant(m, "SOCK_SEQPACKET", SOCK_SEQPACKET);
|
||||
+#ifndef __HAIKU__
|
||||
+ PyModule_AddIntConstant(m, "SOCK_SEQPACKET", SOCK_SEQPACKET);
|
||||
+#endif
|
||||
#if defined(SOCK_RDM)
|
||||
PyModule_AddIntConstant(m, "SOCK_RDM", SOCK_RDM);
|
||||
#endif
|
||||
diff -urN Python-2.6.6/Modules/socketmodule.h Python-2.6.6-haiku/Modules/socketmodule.h
|
||||
--- Python-2.6.6/Modules/socketmodule.h 2010-05-09 15:15:40.053739520 +0000
|
||||
+++ Python-2.6.6-haiku/Modules/socketmodule.h 2010-08-30 04:52:24.667942912 +0000
|
||||
@@ -47,6 +47,10 @@
|
||||
# undef AF_NETLINK
|
||||
#endif
|
||||
|
||||
+#if defined(__HAIKU__)
|
||||
+#undef HAVE_BLUETOOTH_BLUETOOTH_H
|
||||
+#endif
|
||||
+
|
||||
#ifdef HAVE_BLUETOOTH_BLUETOOTH_H
|
||||
#include <bluetooth/bluetooth.h>
|
||||
#include <bluetooth/rfcomm.h>
|
||||
diff -urN Python-2.6.6/Modules/spwdmodule.c Python-2.6.6-haiku/Modules/spwdmodule.c
|
||||
--- Python-2.6.6/Modules/spwdmodule.c 2010-05-09 15:15:40.030408704 +0000
|
||||
+++ Python-2.6.6-haiku/Modules/spwdmodule.c 2010-08-30 04:52:24.709623808 +0000
|
||||
@@ -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);
|
||||
diff -urN Python-2.6.6/Modules/timemodule.c Python-2.6.6-haiku/Modules/timemodule.c
|
||||
--- Python-2.6.6/Modules/timemodule.c 2010-05-09 15:15:40.015204352 +0000
|
||||
+++ Python-2.6.6-haiku/Modules/timemodule.c 2010-08-30 04:52:24.721944576 +0000
|
||||
@@ -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.6/Parser/asdl_c.py Python-2.6.6-haiku/Parser/asdl_c.py
|
||||
--- Python-2.6.6/Parser/asdl_c.py 2009-12-13 00:59:01.059768832 +0000
|
||||
+++ Python-2.6.6-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.6/Python/bltinmodule.c Python-2.6.6-haiku/Python/bltinmodule.c
|
||||
--- Python-2.6.6/Python/bltinmodule.c 2010-05-09 15:15:40.065011712 +0000
|
||||
+++ Python-2.6.6-haiku/Python/bltinmodule.c 2010-08-30 04:52:27.186646528 +0000
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
#if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)
|
||||
const char *Py_FileSystemDefaultEncoding = "mbcs";
|
||||
-#elif defined(__APPLE__)
|
||||
+#elif defined(__APPLE__) || defined(__HAIKU__)
|
||||
const char *Py_FileSystemDefaultEncoding = "utf-8";
|
||||
#else
|
||||
const char *Py_FileSystemDefaultEncoding = NULL; /* use default */
|
||||
diff -urN Python-2.6.6/Tools/scripts/h2py.py Python-2.6.6-haiku/Tools/scripts/h2py.py
|
||||
--- Python-2.6.6/Tools/scripts/h2py.py 2004-08-09 17:27:55.066584576 +0000
|
||||
+++ Python-2.6.6-haiku/Tools/scripts/h2py.py 2010-08-30 04:52:27.188219392 +0000
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /bin/env python
|
||||
|
||||
# Read #define's and translate to Python code.
|
||||
# Handle #include statements.
|
||||
@@ -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(':')
|
||||
diff -urN Python-2.6.6/configure.in Python-2.6.6-haiku/configure.in
|
||||
--- Python-2.6.6/configure.in 2010-05-25 02:27:03.064225280 +0000
|
||||
+++ Python-2.6.6-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.6/setup.py Python-2.6.6-haiku/setup.py
|
||||
--- Python-2.6.6/setup.py 2010-07-17 12:31:09.057147392 +0000
|
||||
+++ Python-2.6.6-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']
|
||||
865
dev-lang/python/patches/python-2.6.8.patchset
Normal file
865
dev-lang/python/patches/python-2.6.8.patchset
Normal file
@@ -0,0 +1,865 @@
|
||||
From 5ccf5800d437d3abbfd13b4f2ccf86b1606deb8c Mon Sep 17 00:00:00 2001
|
||||
From: Oliver Tappe <zooey@hirschkaefer.de>
|
||||
Date: Sat, 12 Oct 2013 17:37:25 +0200
|
||||
Subject: applying patch python-2.6.8.patch
|
||||
|
||||
|
||||
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
|
||||
index aeb6b74..2edcc48 100644
|
||||
--- a/Lib/distutils/command/build_ext.py
|
||||
+++ b/Lib/distutils/command/build_ext.py
|
||||
@@ -234,9 +234,13 @@ class build_ext (Command):
|
||||
|
||||
# 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 --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
|
||||
index 46d23ec..5354cf1 100644
|
||||
--- a/Lib/distutils/sysconfig.py
|
||||
+++ b/Lib/distutils/sysconfig.py
|
||||
@@ -85,7 +85,8 @@ def get_python_inc(plat_specific=0, prefix=None):
|
||||
# Include is located in the srcdir
|
||||
inc_dir = os.path.join(srcdir, "Include")
|
||||
return inc_dir
|
||||
- return os.path.join(prefix, "include", "python" + get_python_version())
|
||||
+ inc_dir = "include" if sys.platform != "haiku1" else "develop/headers"
|
||||
+ return os.path.join(prefix, inc_dir, "python" + get_python_version())
|
||||
elif os.name == "nt":
|
||||
return os.path.join(prefix, "include")
|
||||
elif os.name == "mac":
|
||||
diff --git a/Lib/plat-haiku1/IN.py b/Lib/plat-haiku1/IN.py
|
||||
new file mode 100644
|
||||
index 0000000..362cb41
|
||||
--- /dev/null
|
||||
+++ b/Lib/plat-haiku1/IN.py
|
||||
@@ -0,0 +1,327 @@
|
||||
+# Generated by h2py from /boot/develop/headers/be/net/netinet/in.h
|
||||
+
|
||||
+# Included from socket.h
|
||||
+
|
||||
+# Included from BeBuild.h
|
||||
+B_BEOS_VERSION_4 = 0x0400
|
||||
+B_BEOS_VERSION_4_5 = 0x0450
|
||||
+B_BEOS_VERSION_5 = 0x0500
|
||||
+B_BEOS_VERSION = B_BEOS_VERSION_5
|
||||
+B_BEOS_VERSION_MAUI = B_BEOS_VERSION_5
|
||||
+_PR2_COMPATIBLE_ = 1
|
||||
+_PR3_COMPATIBLE_ = 1
|
||||
+_R4_COMPATIBLE_ = 1
|
||||
+_R4_5_COMPATIBLE_ = 1
|
||||
+_PR2_COMPATIBLE_ = 0
|
||||
+_PR3_COMPATIBLE_ = 0
|
||||
+_R4_COMPATIBLE_ = 1
|
||||
+_R4_5_COMPATIBLE_ = 1
|
||||
+def _UNUSED(x): return x
|
||||
+
|
||||
+
|
||||
+# Included from sys/types.h
|
||||
+
|
||||
+# Included from time.h
|
||||
+
|
||||
+# Included from be_setup.h
|
||||
+def __std(ref): return ref
|
||||
+
|
||||
+__be_os = 2
|
||||
+__dest_os = __be_os
|
||||
+__MSL__ = 0x4011
|
||||
+__GLIBC__ = -2
|
||||
+__GLIBC_MINOR__ = 1
|
||||
+
|
||||
+# Included from null.h
|
||||
+NULL = (0)
|
||||
+NULL = 0L
|
||||
+
|
||||
+# Included from size_t.h
|
||||
+
|
||||
+# Included from stddef.h
|
||||
+
|
||||
+# Included from wchar_t.h
|
||||
+CLOCKS_PER_SEC = 1000
|
||||
+CLK_TCK = CLOCKS_PER_SEC
|
||||
+MAX_TIMESTR = 70
|
||||
+
|
||||
+# Included from sys/time.h
|
||||
+
|
||||
+# Included from ByteOrder.h
|
||||
+
|
||||
+# Included from endian.h
|
||||
+__LITTLE_ENDIAN = 1234
|
||||
+LITTLE_ENDIAN = __LITTLE_ENDIAN
|
||||
+__BYTE_ORDER = __LITTLE_ENDIAN
|
||||
+BYTE_ORDER = __BYTE_ORDER
|
||||
+__BIG_ENDIAN = 0
|
||||
+BIG_ENDIAN = 0
|
||||
+__BIG_ENDIAN = 4321
|
||||
+BIG_ENDIAN = __BIG_ENDIAN
|
||||
+__BYTE_ORDER = __BIG_ENDIAN
|
||||
+BYTE_ORDER = __BYTE_ORDER
|
||||
+__LITTLE_ENDIAN = 0
|
||||
+LITTLE_ENDIAN = 0
|
||||
+__PDP_ENDIAN = 3412
|
||||
+PDP_ENDIAN = __PDP_ENDIAN
|
||||
+
|
||||
+# Included from SupportDefs.h
|
||||
+
|
||||
+# Included from Errors.h
|
||||
+
|
||||
+# Included from limits.h
|
||||
+
|
||||
+# Included from float.h
|
||||
+FLT_ROUNDS = 1
|
||||
+FLT_RADIX = 2
|
||||
+FLT_MANT_DIG = 24
|
||||
+FLT_DIG = 6
|
||||
+FLT_MIN_EXP = (-125)
|
||||
+FLT_MIN_10_EXP = (-37)
|
||||
+FLT_MAX_EXP = 128
|
||||
+FLT_MAX_10_EXP = 38
|
||||
+DBL_MANT_DIG = 53
|
||||
+DBL_DIG = 15
|
||||
+DBL_MIN_EXP = (-1021)
|
||||
+DBL_MIN_10_EXP = (-308)
|
||||
+DBL_MAX_EXP = 1024
|
||||
+DBL_MAX_10_EXP = 308
|
||||
+LDBL_MANT_DIG = DBL_MANT_DIG
|
||||
+LDBL_DIG = DBL_DIG
|
||||
+LDBL_MIN_EXP = DBL_MIN_EXP
|
||||
+LDBL_MIN_10_EXP = DBL_MIN_10_EXP
|
||||
+LDBL_MAX_EXP = DBL_MAX_EXP
|
||||
+LDBL_MAX_10_EXP = DBL_MAX_10_EXP
|
||||
+CHAR_BIT = (8)
|
||||
+SCHAR_MIN = (-127-1)
|
||||
+SCHAR_MAX = (127)
|
||||
+CHAR_MIN = SCHAR_MIN
|
||||
+CHAR_MAX = SCHAR_MAX
|
||||
+MB_LEN_MAX = (1)
|
||||
+SHRT_MIN = (-32767-1)
|
||||
+SHRT_MAX = (32767)
|
||||
+LONG_MIN = (-2147483647L-1)
|
||||
+LONG_MAX = (2147483647L)
|
||||
+INT_MIN = LONG_MIN
|
||||
+INT_MAX = LONG_MAX
|
||||
+ARG_MAX = (32768)
|
||||
+ATEXIT_MAX = (32)
|
||||
+CHILD_MAX = (1024)
|
||||
+IOV_MAX = (256)
|
||||
+FILESIZEBITS = (64)
|
||||
+LINK_MAX = (1)
|
||||
+LOGIN_NAME_MAX = (32)
|
||||
+MAX_CANON = (255)
|
||||
+MAX_INPUT = (255)
|
||||
+NAME_MAX = (256)
|
||||
+NGROUPS_MAX = (32)
|
||||
+OPEN_MAX = (128)
|
||||
+PATH_MAX = (1024)
|
||||
+PIPE_MAX = (512)
|
||||
+SSIZE_MAX = (2147483647L)
|
||||
+TTY_NAME_MAX = (256)
|
||||
+TZNAME_MAX = (32)
|
||||
+SYMLINKS_MAX = (16)
|
||||
+_POSIX_ARG_MAX = (32768)
|
||||
+_POSIX_CHILD_MAX = (1024)
|
||||
+_POSIX_LINK_MAX = (1)
|
||||
+_POSIX_LOGIN_NAME_MAX = (9)
|
||||
+_POSIX_MAX_CANON = (255)
|
||||
+_POSIX_MAX_INPUT = (255)
|
||||
+_POSIX_NAME_MAX = (255)
|
||||
+_POSIX_NGROUPS_MAX = (0)
|
||||
+_POSIX_OPEN_MAX = (128)
|
||||
+_POSIX_PATH_MAX = (1024)
|
||||
+_POSIX_PIPE_BUF = (512)
|
||||
+_POSIX_SSIZE_MAX = (2147483647L)
|
||||
+_POSIX_STREAM_MAX = (8)
|
||||
+_POSIX_TTY_NAME_MAX = (256)
|
||||
+_POSIX_TZNAME_MAX = (3)
|
||||
+B_GENERAL_ERROR_BASE = LONG_MIN
|
||||
+B_OS_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x1000
|
||||
+B_APP_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x2000
|
||||
+B_INTERFACE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x3000
|
||||
+B_MEDIA_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4000
|
||||
+B_TRANSLATION_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x4800
|
||||
+B_MIDI_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x5000
|
||||
+B_STORAGE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x6000
|
||||
+B_POSIX_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x7000
|
||||
+B_MAIL_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x8000
|
||||
+B_PRINT_ERROR_BASE = B_GENERAL_ERROR_BASE + 0x9000
|
||||
+B_DEVICE_ERROR_BASE = B_GENERAL_ERROR_BASE + 0xa000
|
||||
+B_ERRORS_END = (B_GENERAL_ERROR_BASE + 0xffff)
|
||||
+E2BIG = (B_POSIX_ERROR_BASE + 1)
|
||||
+ECHILD = (B_POSIX_ERROR_BASE + 2)
|
||||
+EDEADLK = (B_POSIX_ERROR_BASE + 3)
|
||||
+EFBIG = (B_POSIX_ERROR_BASE + 4)
|
||||
+EMLINK = (B_POSIX_ERROR_BASE + 5)
|
||||
+ENFILE = (B_POSIX_ERROR_BASE + 6)
|
||||
+ENODEV = (B_POSIX_ERROR_BASE + 7)
|
||||
+ENOLCK = (B_POSIX_ERROR_BASE + 8)
|
||||
+ENOSYS = (B_POSIX_ERROR_BASE + 9)
|
||||
+ENOTTY = (B_POSIX_ERROR_BASE + 10)
|
||||
+ENXIO = (B_POSIX_ERROR_BASE + 11)
|
||||
+ESPIPE = (B_POSIX_ERROR_BASE + 12)
|
||||
+ESRCH = (B_POSIX_ERROR_BASE + 13)
|
||||
+EFPOS = (B_POSIX_ERROR_BASE + 14)
|
||||
+ESIGPARM = (B_POSIX_ERROR_BASE + 15)
|
||||
+EDOM = (B_POSIX_ERROR_BASE + 16)
|
||||
+ERANGE = (B_POSIX_ERROR_BASE + 17)
|
||||
+EPROTOTYPE = (B_POSIX_ERROR_BASE + 18)
|
||||
+EPROTONOSUPPORT = (B_POSIX_ERROR_BASE + 19)
|
||||
+EPFNOSUPPORT = (B_POSIX_ERROR_BASE + 20)
|
||||
+EAFNOSUPPORT = (B_POSIX_ERROR_BASE + 21)
|
||||
+EADDRINUSE = (B_POSIX_ERROR_BASE + 22)
|
||||
+EADDRNOTAVAIL = (B_POSIX_ERROR_BASE + 23)
|
||||
+ENETDOWN = (B_POSIX_ERROR_BASE + 24)
|
||||
+ENETUNREACH = (B_POSIX_ERROR_BASE + 25)
|
||||
+ENETRESET = (B_POSIX_ERROR_BASE + 26)
|
||||
+ECONNABORTED = (B_POSIX_ERROR_BASE + 27)
|
||||
+ECONNRESET = (B_POSIX_ERROR_BASE + 28)
|
||||
+EISCONN = (B_POSIX_ERROR_BASE + 29)
|
||||
+ENOTCONN = (B_POSIX_ERROR_BASE + 30)
|
||||
+ESHUTDOWN = (B_POSIX_ERROR_BASE + 31)
|
||||
+ECONNREFUSED = (B_POSIX_ERROR_BASE + 32)
|
||||
+EHOSTUNREACH = (B_POSIX_ERROR_BASE + 33)
|
||||
+ENOPROTOOPT = (B_POSIX_ERROR_BASE + 34)
|
||||
+ENOBUFS = (B_POSIX_ERROR_BASE + 35)
|
||||
+EINPROGRESS = (B_POSIX_ERROR_BASE + 36)
|
||||
+EALREADY = (B_POSIX_ERROR_BASE + 37)
|
||||
+EILSEQ = (B_POSIX_ERROR_BASE + 38)
|
||||
+ENOMSG = (B_POSIX_ERROR_BASE + 39)
|
||||
+ESTALE = (B_POSIX_ERROR_BASE + 40)
|
||||
+EOVERFLOW = (B_POSIX_ERROR_BASE + 41)
|
||||
+EMSGSIZE = (B_POSIX_ERROR_BASE + 42)
|
||||
+EOPNOTSUPP = (B_POSIX_ERROR_BASE + 43)
|
||||
+ENOTSOCK = (B_POSIX_ERROR_BASE + 44)
|
||||
+false = 0
|
||||
+true = 1
|
||||
+NULL = (0)
|
||||
+FALSE = 0
|
||||
+TRUE = 1
|
||||
+
|
||||
+# Included from TypeConstants.h
|
||||
+B_HOST_IS_LENDIAN = 1
|
||||
+B_HOST_IS_BENDIAN = 0
|
||||
+def B_HOST_TO_LENDIAN_DOUBLE(arg): return (double)(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_FLOAT(arg): return (float)(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT64(arg): return (uint64)(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT32(arg): return (uint32)(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT16(arg): return (uint16)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_FLOAT(arg): return (float)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT64(arg): return (uint64)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT32(arg): return (uint32)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT16(arg): return (uint16)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+B_HOST_IS_LENDIAN = 0
|
||||
+B_HOST_IS_BENDIAN = 1
|
||||
+def B_HOST_TO_LENDIAN_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_HOST_TO_LENDIAN_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_DOUBLE(arg): return (double)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_FLOAT(arg): return (float)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT64(arg): return (uint64)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT32(arg): return (uint32)(arg)
|
||||
+
|
||||
+def B_HOST_TO_BENDIAN_INT16(arg): return (uint16)(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_LENDIAN_TO_HOST_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_DOUBLE(arg): return (double)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_FLOAT(arg): return (float)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT64(arg): return (uint64)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT32(arg): return (uint32)(arg)
|
||||
+
|
||||
+def B_BENDIAN_TO_HOST_INT16(arg): return (uint16)(arg)
|
||||
+
|
||||
+def B_SWAP_DOUBLE(arg): return __swap_double(arg)
|
||||
+
|
||||
+def B_SWAP_FLOAT(arg): return __swap_float(arg)
|
||||
+
|
||||
+def B_SWAP_INT64(arg): return __swap_int64(arg)
|
||||
+
|
||||
+def B_SWAP_INT32(arg): return __swap_int32(arg)
|
||||
+
|
||||
+def B_SWAP_INT16(arg): return __swap_int16(arg)
|
||||
+
|
||||
+def htonl(x): return B_HOST_TO_BENDIAN_INT32(x)
|
||||
+
|
||||
+def ntohl(x): return B_BENDIAN_TO_HOST_INT32(x)
|
||||
+
|
||||
+def htons(x): return B_HOST_TO_BENDIAN_INT16(x)
|
||||
+
|
||||
+def ntohs(x): return B_BENDIAN_TO_HOST_INT16(x)
|
||||
+
|
||||
+AF_INET = 1
|
||||
+INADDR_ANY = 0x00000000
|
||||
+INADDR_BROADCAST = 0xffffffff
|
||||
+INADDR_LOOPBACK = 0x7f000001
|
||||
+SOL_SOCKET = 1
|
||||
+SO_DEBUG = 1
|
||||
+SO_REUSEADDR = 2
|
||||
+SO_NONBLOCK = 3
|
||||
+SO_REUSEPORT = 4
|
||||
+MSG_OOB = 0x1
|
||||
+SOCK_DGRAM = 1
|
||||
+SOCK_STREAM = 2
|
||||
+IPPROTO_UDP = 1
|
||||
+IPPROTO_TCP = 2
|
||||
+IPPROTO_ICMP = 3
|
||||
+B_UDP_MAX_SIZE = (65536 - 1024)
|
||||
+FD_SETSIZE = 256
|
||||
+FDSETSIZE = FD_SETSIZE
|
||||
+NFDBITS = 32
|
||||
+def _FDMSKNO(fd): return ((fd) / NFDBITS)
|
||||
+
|
||||
+def _FDBITNO(fd): return ((fd) % NFDBITS)
|
||||
diff --git a/Lib/plat-haiku1/regen b/Lib/plat-haiku1/regen
|
||||
new file mode 100644
|
||||
index 0000000..d9da80c
|
||||
--- /dev/null
|
||||
+++ b/Lib/plat-haiku1/regen
|
||||
@@ -0,0 +1,7 @@
|
||||
+#! /bin/sh
|
||||
+
|
||||
+H2PY=../../Tools/scripts/h2py.py
|
||||
+HEADERS=/boot/develop/headers
|
||||
+
|
||||
+set -v
|
||||
+python $H2PY -i '(u_long)' $HEADERS/posix/netinet/in.h
|
||||
diff --git a/Lib/test/test_fileio.py b/Lib/test/test_fileio.py
|
||||
index 7eeef7b..b1938fd 100644
|
||||
--- a/Lib/test/test_fileio.py
|
||||
+++ b/Lib/test/test_fileio.py
|
||||
@@ -152,6 +152,7 @@ class OtherFileTests(unittest.TestCase):
|
||||
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 --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index ce4fbdc..aba9464 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -90,7 +90,7 @@ BINDIR= @bindir@
|
||||
LIBDIR= @libdir@
|
||||
MANDIR= @mandir@
|
||||
INCLUDEDIR= @includedir@
|
||||
-CONFINCLUDEDIR= $(exec_prefix)/include
|
||||
+CONFINCLUDEDIR= $(INCLUDEDIR)
|
||||
SCRIPTDIR= $(prefix)/lib
|
||||
|
||||
# Detailed destination directories
|
||||
diff --git a/Modules/bz2module.c b/Modules/bz2module.c
|
||||
index cfd8d71..89d9002 100644
|
||||
--- a/Modules/bz2module.c
|
||||
+++ b/Modules/bz2module.c
|
||||
@@ -9,7 +9,7 @@ Copyright (c) 2002 Python Software Foundation; All Rights Reserved
|
||||
|
||||
#include "Python.h"
|
||||
#include <stdio.h>
|
||||
-#include <bzlib.h>
|
||||
+#include <bzip2/bzlib.h>
|
||||
#include "structmember.h"
|
||||
|
||||
#ifdef WITH_THREAD
|
||||
diff --git a/Modules/resource.c b/Modules/resource.c
|
||||
index 9993b93..f8befde 100644
|
||||
--- a/Modules/resource.c
|
||||
+++ b/Modules/resource.c
|
||||
@@ -86,6 +86,7 @@ resource_getrusage(PyObject *self, PyObject *args)
|
||||
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,7 +101,7 @@ resource_getrusage(PyObject *self, PyObject *args)
|
||||
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);
|
||||
return NULL;
|
||||
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
|
||||
index a28116c..62c5813 100644
|
||||
--- a/Modules/socketmodule.c
|
||||
+++ b/Modules/socketmodule.c
|
||||
@@ -4661,7 +4661,9 @@ init_socket(void)
|
||||
#ifndef __BEOS__
|
||||
/* We have incomplete socket support. */
|
||||
PyModule_AddIntConstant(m, "SOCK_RAW", SOCK_RAW);
|
||||
- PyModule_AddIntConstant(m, "SOCK_SEQPACKET", SOCK_SEQPACKET);
|
||||
+#ifndef __HAIKU__
|
||||
+ PyModule_AddIntConstant(m, "SOCK_SEQPACKET", SOCK_SEQPACKET);
|
||||
+#endif
|
||||
#if defined(SOCK_RDM)
|
||||
PyModule_AddIntConstant(m, "SOCK_RDM", SOCK_RDM);
|
||||
#endif
|
||||
diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
|
||||
index 9b85773..8e35a64 100644
|
||||
--- a/Modules/socketmodule.h
|
||||
+++ b/Modules/socketmodule.h
|
||||
@@ -47,6 +47,10 @@ typedef int socklen_t;
|
||||
# undef AF_NETLINK
|
||||
#endif
|
||||
|
||||
+#if defined(__HAIKU__)
|
||||
+#undef HAVE_BLUETOOTH_BLUETOOTH_H
|
||||
+#endif
|
||||
+
|
||||
#ifdef HAVE_BLUETOOTH_BLUETOOTH_H
|
||||
#include <bluetooth/bluetooth.h>
|
||||
#include <bluetooth/rfcomm.h>
|
||||
diff --git a/Modules/spwdmodule.c b/Modules/spwdmodule.c
|
||||
index 957de58..69be5bb 100644
|
||||
--- a/Modules/spwdmodule.c
|
||||
+++ b/Modules/spwdmodule.c
|
||||
@@ -79,7 +79,9 @@ static PyObject *mkspent(struct spwd *p)
|
||||
|
||||
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);
|
||||
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
|
||||
index 57d9df8..83c9a2e 100644
|
||||
--- a/Python/bltinmodule.c
|
||||
+++ b/Python/bltinmodule.c
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
#if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)
|
||||
const char *Py_FileSystemDefaultEncoding = "mbcs";
|
||||
-#elif defined(__APPLE__)
|
||||
+#elif defined(__APPLE__) || defined(__HAIKU__)
|
||||
const char *Py_FileSystemDefaultEncoding = "utf-8";
|
||||
#else
|
||||
const char *Py_FileSystemDefaultEncoding = NULL; /* use default */
|
||||
diff --git a/Tools/scripts/h2py.py b/Tools/scripts/h2py.py
|
||||
index 63e7336..65cd21f 100755
|
||||
--- a/Tools/scripts/h2py.py
|
||||
+++ b/Tools/scripts/h2py.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /bin/env python
|
||||
|
||||
# Read #define's and translate to Python code.
|
||||
# Handle #include statements.
|
||||
@@ -50,7 +50,7 @@ except KeyError:
|
||||
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(':')
|
||||
diff --git a/configure.in b/configure.in
|
||||
index f3d34f2..aedd433 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -745,7 +745,7 @@ if test $enable_shared = "yes"; then
|
||||
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 @@ if test $enable_shared = "yes"; then
|
||||
FreeBSD*)
|
||||
SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
|
||||
;;
|
||||
+ Haiku*)
|
||||
+ RUNSHARED=LIBRARY_PATH=`pwd`:${LIBRARY_PATH}
|
||||
+ ;;
|
||||
esac
|
||||
INSTSONAME="$LDLIBRARY".$SOVERSION
|
||||
;;
|
||||
@@ -823,7 +826,7 @@ AC_PROG_INSTALL
|
||||
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 @@ then
|
||||
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
|
||||
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 @@ then
|
||||
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 @@ case "$ac_sys_system" in
|
||||
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 @@ fi],
|
||||
AC_SUBST(LIBM)
|
||||
case $ac_sys_system in
|
||||
Darwin) ;;
|
||||
-BeOS) ;;
|
||||
+BeOS|Haiku) ;;
|
||||
*) LIBM=-lm
|
||||
esac
|
||||
AC_MSG_CHECKING(for --with-libm=STRING)
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 4fe1f45..930a368 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -428,6 +428,15 @@ class PyBuildExt(build_ext):
|
||||
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']
|
||||
+ 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 +460,7 @@ class PyBuildExt(build_ext):
|
||||
|
||||
# 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 +703,22 @@ class PyBuildExt(build_ext):
|
||||
'/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 +726,8 @@ class PyBuildExt(build_ext):
|
||||
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 +762,8 @@ class PyBuildExt(build_ext):
|
||||
# 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 +1192,7 @@ class PyBuildExt(build_ext):
|
||||
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']
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From a47dd1d32150a36714bdf527f0153d387ebff8c9 Mon Sep 17 00:00:00 2001
|
||||
From: Oliver Tappe <zooey@hirschkaefer.de>
|
||||
Date: Sun, 13 Oct 2013 17:01:30 +0200
|
||||
Subject: Adjust package folders for Python modules.
|
||||
|
||||
* move standard site-packaged into non-packaged hierarchy, as it has to
|
||||
be writable
|
||||
* rename directory for packaged python modules to 'vendor-packages'
|
||||
* add support for automatically switching to 'vendor-packages' directory
|
||||
when environment variable 'HAIKU_USE_VENDOR_DIRECTORIES' is set
|
||||
|
||||
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
|
||||
index 44c7692..ff8c01e 100644
|
||||
--- a/Lib/distutils/command/install.py
|
||||
+++ b/Lib/distutils/command/install.py
|
||||
@@ -97,6 +97,34 @@ INSTALL_SCHEMES = {
|
||||
'scripts': '$userbase/bin',
|
||||
'data' : '$userbase',
|
||||
},
|
||||
+ 'haiku': {
|
||||
+ 'purelib': '$base/non-packaged/lib/python$py_version_short/site-packages',
|
||||
+ 'platlib': '$platbase/non-packaged/lib/python$py_version_short/site-packages',
|
||||
+ 'headers': '$base/non-packaged/develop/headers/python$py_version_short/$dist_name',
|
||||
+ 'scripts': '$base/non-packaged/bin',
|
||||
+ 'data' : '$base/non-packaged',
|
||||
+ },
|
||||
+ 'haiku_vendor': {
|
||||
+ 'purelib': '$base/lib/python$py_version_short/vendor-packages',
|
||||
+ 'platlib': '$platbase/lib/python$py_version_short/vendor-packages',
|
||||
+ 'headers': '$base/develop/headers/python$py_version_short/$dist_name',
|
||||
+ 'scripts': '$base/bin',
|
||||
+ 'data' : '$base',
|
||||
+ },
|
||||
+ 'haiku_home': {
|
||||
+ 'purelib': '$base/lib/python',
|
||||
+ 'platlib': '$base/lib/python',
|
||||
+ 'headers': '$base/develop/headers/python/$dist_name',
|
||||
+ 'scripts': '$base/bin',
|
||||
+ 'data' : '$base',
|
||||
+ },
|
||||
+ 'haiku_user': {
|
||||
+ 'purelib': '$usersite',
|
||||
+ 'platlib': '$usersite',
|
||||
+ 'headers': '$userbase/develop/headers/python$py_version_short/$dist_name',
|
||||
+ 'scripts': '$userbase/bin',
|
||||
+ 'data' : '$userbase',
|
||||
+ },
|
||||
}
|
||||
|
||||
# The keys to an installation scheme; if any new types of files are to be
|
||||
@@ -430,10 +458,16 @@ class install (Command):
|
||||
raise DistutilsPlatformError(
|
||||
"User base directory is not specified")
|
||||
self.install_base = self.install_platbase = self.install_userbase
|
||||
- self.select_scheme("unix_user")
|
||||
+ if sys.platform.startswith('haiku'):
|
||||
+ self.select_scheme("haiku_user")
|
||||
+ else:
|
||||
+ self.select_scheme("unix_user")
|
||||
elif self.home is not None:
|
||||
self.install_base = self.install_platbase = self.home
|
||||
- self.select_scheme("unix_home")
|
||||
+ if sys.platform.startswith('haiku'):
|
||||
+ self.select_scheme("haiku_home")
|
||||
+ else:
|
||||
+ self.select_scheme("unix_home")
|
||||
else:
|
||||
if self.prefix is None:
|
||||
if self.exec_prefix is not None:
|
||||
@@ -449,7 +483,13 @@ class install (Command):
|
||||
|
||||
self.install_base = self.prefix
|
||||
self.install_platbase = self.exec_prefix
|
||||
- self.select_scheme("unix_prefix")
|
||||
+ if sys.platform.startswith('haiku'):
|
||||
+ if os.environ.get('HAIKU_USE_VENDOR_DIRECTORIES') == '1':
|
||||
+ self.select_scheme("haiku_vendor")
|
||||
+ else:
|
||||
+ self.select_scheme("haiku")
|
||||
+ else:
|
||||
+ self.select_scheme("unix_prefix")
|
||||
|
||||
# finalize_unix ()
|
||||
|
||||
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
|
||||
index 5354cf1..017a94c 100644
|
||||
--- a/Lib/distutils/sysconfig.py
|
||||
+++ b/Lib/distutils/sysconfig.py
|
||||
@@ -120,12 +120,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":
|
||||
- libpython = os.path.join(prefix,
|
||||
- "lib", "python" + get_python_version())
|
||||
- if standard_lib:
|
||||
- return libpython
|
||||
+ if sys.platform.startswith('haiku'):
|
||||
+ if standard_lib:
|
||||
+ return os.path.join(prefix,
|
||||
+ "lib", "python" + get_python_version())
|
||||
+ return os.path.join(prefix, "non-packaged",
|
||||
+ "lib", "python" + get_python_version(),
|
||||
+ "site-packages")
|
||||
else:
|
||||
- return os.path.join(libpython, "site-packages")
|
||||
+ libpython = os.path.join(prefix,
|
||||
+ "lib", "python" + get_python_version())
|
||||
+ if standard_lib:
|
||||
+ return libpython
|
||||
+ else:
|
||||
+ return os.path.join(libpython, "site-packages")
|
||||
|
||||
elif os.name == "nt":
|
||||
if standard_lib:
|
||||
diff --git a/Lib/site.py b/Lib/site.py
|
||||
index 66c56c2..304f994 100644
|
||||
--- a/Lib/site.py
|
||||
+++ b/Lib/site.py
|
||||
@@ -241,6 +241,11 @@ def addusersitepackages(known_paths):
|
||||
USER_SITE = os.path.join(USER_BASE,
|
||||
"Python" + sys.version[0] + sys.version[2],
|
||||
"site-packages")
|
||||
+ elif sys.platform.startswith('haiku'):
|
||||
+ USER_BASE = env_base if env_base else joinuser("~", "non-packaged")
|
||||
+ USER_SITE = os.path.join(USER_BASE, "lib",
|
||||
+ "python" + sys.version[:3],
|
||||
+ "site-packages")
|
||||
else:
|
||||
USER_BASE = env_base if env_base else joinuser("~", ".local")
|
||||
USER_SITE = os.path.join(USER_BASE, "lib",
|
||||
@@ -264,6 +269,13 @@ def addsitepackages(known_paths):
|
||||
|
||||
if sys.platform in ('os2emx', 'riscos'):
|
||||
sitedirs.append(os.path.join(prefix, "Lib", "site-packages"))
|
||||
+ elif sys.platform.startswith('haiku'):
|
||||
+ sitedirs.append(os.path.join(prefix, "non-packaged", "lib",
|
||||
+ "python" + sys.version[:3],
|
||||
+ "site-packages"))
|
||||
+ sitedirs.append(os.path.join(prefix, "lib",
|
||||
+ "python" + sys.version[:3],
|
||||
+ "vendor-packages"))
|
||||
elif os.sep == '/':
|
||||
sitedirs.append(os.path.join(prefix, "lib",
|
||||
"python" + sys.version[:3],
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 17c8d2590189838ef19b08fb0ce7976d03b1cabc Mon Sep 17 00:00:00 2001
|
||||
From: Oliver Tappe <zooey@hirschkaefer.de>
|
||||
Date: Sun, 13 Oct 2013 17:06:48 +0200
|
||||
Subject: Drop references to common hierarchy.
|
||||
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 930a368..41a16a2 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -429,13 +429,9 @@ class PyBuildExt(build_ext):
|
||||
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',
|
||||
+ inc_dirs += ['/boot/system/develop/headers/posix',
|
||||
'/boot/system/develop/headers']
|
||||
- lib_dirs += ['/boot/common/non-packaged/develop/lib',
|
||||
- '/boot/common/develop/lib',
|
||||
- '/boot/system/develop/lib']
|
||||
+ lib_dirs += ['/boot/system/develop/lib']
|
||||
|
||||
# OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb)
|
||||
if platform in ['osf1', 'unixware7', 'openunix8']:
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
Reference in New Issue
Block a user