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:
Oliver Tappe
2013-10-15 22:48:02 +02:00
1452 changed files with 31199 additions and 33804 deletions

View File

@@ -5,7 +5,8 @@ CHECKSUM_MD5="8de69094d73d24768844a5017a2bd04b"
REVISION="1"
STATUS_HAIKU="untested"
DEPEND="ocaml"
BUILD {
BUILD()
{
cd camlp5-6.06
COMMON_DOCS=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`
./configure --strict --prefix `finddir B_COMMON_DIRECTORY` \
@@ -13,7 +14,8 @@ BUILD {
make world.opt
}
INSTALL {
INSTALL()
{
cd camlp5-6.06
COMMON_DOCS=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`
make install PREFIX=${DESTDIR}`finddir B_COMMON_DIRECTORY` \

View File

@@ -6,13 +6,15 @@ CHECKSUM_MD5="3d73758a7006397c2e66021532e2ff73"
MESSAGE="This port only builds with gcc4. Use 'setgcc gcc4' before building."
STATUS_HAIKU="stable"
DEPEND=""
BUILD {
BUILD()
{
cd ./dmd/src/dmd
make -f haiku.mak
strip dmd
}
INSTALL {
INSTALL()
{
mkdir -p ${DESTDIR}`finddir B_COMMON_BIN_DIRECTORY`
cp dmd/src/dmd/dmd ${DESTDIR}`finddir B_COMMON_BIN_DIRECTORY`/dmd

View File

@@ -5,7 +5,8 @@ REVISION="1"
STATUS_HAIKU="broken"
DEPEND=""
CHECKSUM_MD5="5292a04556d17ad528d570e02357dfbb"
BUILD {
BUILD()
{
cd otp_src_R14B
mkdir -p m4
echo "AC_CONFIG_MACRO_DIR([m4]) >> configure.in"
@@ -50,7 +51,8 @@ BUILD {
make -s
}
INSTALL {
INSTALL()
{
cd otp_src_R14B
make -s install
}

View File

@@ -6,13 +6,15 @@ REVISION="1"
STATUS_HAIKU="unstable"
DEPEND=""
BUILD {
BUILD()
{
cd fpc-2.4.0
make
}
INSTALL {
INSTALL()
{
cd fpc-2.4.0
make install

View File

@@ -14,12 +14,14 @@ REVISION="1"
STATUS_HAIKU="untested"
DEPEND="dev-lang/fpc"
BUILD {
BUILD()
{
cd fpc-2.6.0
make build
}
INSTALL {
INSTALL()
{
cd fpc-2.6.0
make install INSTALL_PREFIX=${DESTDIR}`finddir B_USER_CONFIG_DIRECTORY` \
FPCDIR=${DESTDIR}`finddir B_USER_LIB_DIRECTORY`/fpc/2.6.0
@@ -28,7 +30,8 @@ INSTALL {
${DESTDIR}`finddir B_USER_CONFIG_DIRECTORY`/bin
}
TEST {
TEST()
{
cd fpc-2.6.0/tests
make full TEST_FPC=${DESTDIR}`finddir B_USER_CONFIG_DIRECTORY`/bin/fpc
}

View File

@@ -1,21 +0,0 @@
DESCRIPTION="Lua is a powerful, fast, light-weight, embeddable scripting language."
HOMEPAGE="http://www.lua.org"
SRC_URI="http://www.lua.org/ftp/lua-5.1.4.tar.gz"
CHECKSUM_MD5="d0870f2de55d59c1c8419f36e8fac150"
REVISION="3"
STATUS_HAIKU="stable"
DEPEND="pkgconfig >= 0.25"
BUILD {
cd lua-5.1.4
make haiku
}
INSTALL {
cd lua-5.1.4
make install INSTALL_TOP="${DESTDIR}`finddir B_COMMON_DIRECTORY`" \
INSTALL_MAN="${DESTDIR}`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man"
mkdir -p ${DESTDIR}`finddir B_COMMON_LIB_DIRECTORY`/pkgconfig
cp etc/lua.pc ${DESTDIR}`finddir B_COMMON_LIB_DIRECTORY`/pkgconfig/lua.pc
}
LICENSE="MIT"
COPYRIGHT="1994-2009, Lua.org, PUC-Rio"

View File

@@ -1,21 +0,0 @@
DESCRIPTION="Lua is a powerful, fast, light-weight, embeddable scripting language."
HOMEPAGE="http://www.lua.org"
SRC_URI="http://www.lua.org/ftp/lua-5.1.4.tar.gz"
CHECKSUM_MD5="d0870f2de55d59c1c8419f36e8fac150"
REVISION="3"
STATUS_HAIKU="stable"
DEPEND="pkgconfig >= 0.25"
BUILD {
cd lua-5.1.4
make haiku
}
INSTALL {
cd lua-5.1.4
make install INSTALL_TOP="${DESTDIR}`finddir B_COMMON_DIRECTORY`" \
INSTALL_MAN="${DESTDIR}`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man"
mkdir -p ${DESTDIR}`finddir B_COMMON_LIB_DIRECTORY`/pkgconfig
cp etc/lua.pc ${DESTDIR}`finddir B_COMMON_LIB_DIRECTORY`/pkgconfig/lua.pc
}
LICENSE="MIT"
COPYRIGHT="1994-2009, Lua.org, PUC-Rio"

View File

@@ -0,0 +1,50 @@
SUMMARY="Lua is a powerful, fast, light-weight, embeddable scripting language."
HOMEPAGE="http://www.lua.org"
SRC_URI="http://www.lua.org/ftp/lua-5.1.4.tar.gz"
CHECKSUM_MD5="d0870f2de55d59c1c8419f36e8fac150"
REVISION="3"
ARCHITECTURES="x86 x86_gcc2"
PROVIDES="
lua = $portVersion compat = 5.1
cmd:lua = $portVersion compat = 5.1
cmd:luac = $portVersion
lib:liblua = $portVersion compat = 5.2
devel:liblua = $portVersion compat = 5.2
"
REQUIRES="
haiku >= $haikuVersion
"
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
cmd:make
cmd:gcc
"
PATCHES="lua-5.1.4.patchset"
BUILD()
{
make haiku
}
INSTALL()
{
make install INSTALL_TOP="$prefix" INSTALL_MAN="$manDir" \
INSTALL_INC="$includeDir" INSTALL_LMOD="$dataDir/lua/$V"
mkdir -p $libDir/pkgconfig
cp etc/lua.pc $libDir/pkgconfig/lua.pc
prepareInstalledDevelLib liblua
fixPkgconfig
}
LICENSE="MIT"
COPYRIGHT="1994-2009, Lua.org, PUC-Rio"
DESCRIPTION="
Lua combines simple procedural syntax with powerful data description
constructs based on associative arrays and extensible semantics. Lua is
dynamically typed, runs by interpreting bytecode for a register-based
virtual machine, and has automatic memory management with incremental
garbage collection, making it ideal for configuration, scripting, and rapid
prototyping.
"

View File

@@ -1,18 +0,0 @@
DESCRIPTION="Lua is a powerful, fast, light-weight, embeddable scripting language."
HOMEPAGE="http://www.lua.org"
SRC_URI="http://www.lua.org/ftp/lua-5.2.1.tar.gz"
CHECKSUM_MD5="ae08f641b45d737d12d30291a5e5f6e3"
REVISION="3"
STATUS_HAIKU="stable"
BUILD {
cd lua-5.2.1
make haiku
}
INSTALL {
cd lua-5.2.1
make install INSTALL_TOP="${DESTDIR}`finddir B_COMMON_DIRECTORY`" \
INSTALL_MAN="${DESTDIR}`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man"
}
LICENSE="MIT"
COPYRIGHT="1994-2012, Lua.org, PUC-Rio"

View File

@@ -0,0 +1,46 @@
SUMMARY="Lua is a powerful, fast, light-weight, embeddable scripting language."
HOMEPAGE="http://www.lua.org"
SRC_URI="http://www.lua.org/ftp/lua-$portVersion.tar.gz"
CHECKSUM_MD5="ae08f641b45d737d12d30291a5e5f6e3"
REVISION="3"
ARCHITECTURES="x86 x86_gcc2"
PROVIDES="
lua = $portVersion compat = 5.2
cmd:lua = $portVersion compat = 5.2
cmd:luac = $portVersion
lib:liblua = $portVersion compat = 5.2
devel:liblua = $portVersion compat = 5.2
"
REQUIRES="
haiku >= $haikuVersion
"
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
cmd:make
cmd:gcc
"
PATCHES="lua-$portVersion.patchset"
BUILD()
{
make haiku
}
INSTALL()
{
make install INSTALL_TOP="$prefix" INSTALL_MAN="$manDir" \
INSTALL_INC="$includeDir" INSTALL_LMOD="$dataDir/lua/$V"
prepareInstalledDevelLib liblua
}
LICENSE="MIT"
COPYRIGHT="1994-2012, Lua.org, PUC-Rio"
DESCRIPTION="
Lua combines simple procedural syntax with powerful data description
constructs based on associative arrays and extensible semantics. Lua is
dynamically typed, runs by interpreting bytecode for a register-based
virtual machine, and has automatic memory management with incremental
garbage collection, making it ideal for configuration, scripting, and rapid
prototyping.
"

View File

@@ -1,92 +0,0 @@
diff -up lua-5.1.4/Makefile.orig lua-5.1.4/Makefile
--- lua-5.1.4/Makefile.orig 2010-04-27 22:29:15.068419584 -0600
+++ lua-5.1.4/Makefile 2010-04-27 22:29:20.697303040 -0600
@@ -38,12 +38,12 @@ RANLIB= ranlib
# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
# Convenience platforms targets.
-PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
+PLATS= aix ansi bsd freebsd generic haiku linux macosx mingw posix solaris
# What to install.
TO_BIN= lua luac
TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
-TO_LIB= liblua.a
+TO_LIB= liblua.a liblua.so
TO_MAN= lua.1 luac.1
# Lua version and release.
diff -up lua-5.1.4/src/Makefile.orig lua-5.1.4/src/Makefile
--- lua-5.1.4/src/Makefile.orig 2010-04-27 22:29:26.027787264 -0600
+++ lua-5.1.4/src/Makefile 2010-04-27 22:29:38.680525824 -0600
@@ -20,9 +20,10 @@ MYLIBS=
# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
-PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
+PLATS= aix ansi bsd freebsd generic haiku linux macosx mingw posix solaris
LUA_A= liblua.a
+LUA_SO= liblua.so
CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
lundump.o lvm.o lzio.o
@@ -36,7 +37,7 @@ LUAC_T= luac
LUAC_O= luac.o print.o
ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
+ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
ALL_A= $(LUA_A)
default: $(PLAT)
@@ -57,6 +58,9 @@ $(LUA_T): $(LUA_O) $(LUA_A)
$(LUAC_T): $(LUAC_O) $(LUA_A)
$(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
+$(LUA_SO): $(CORE_O) $(LIB_O)
+ $(CC) -o $@ -shared -fPIC $(MYLDFLAGS) $? $(LIBS)
+
clean:
$(RM) $(ALL_T) $(ALL_O)
@@ -95,6 +99,9 @@ freebsd:
generic:
$(MAKE) all MYCFLAGS=
+haiku:
+ $(MAKE) all MYCFLAGS=-DLUA_USE_HAIKU LIBS=
+
linux:
$(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
diff -up lua-5.1.4/src/luaconf.h.orig lua-5.1.4/src/luaconf.h
--- lua-5.1.4/src/luaconf.h.orig 2010-04-27 22:29:48.387448832 -0600
+++ lua-5.1.4/src/luaconf.h 2010-04-27 22:29:58.184025088 -0600
@@ -33,6 +33,13 @@
#define LUA_WIN
#endif
+#if defined(LUA_USE_HAIKU)
+#define LUA_USE_MKSTEMP
+#define LUA_USE_ISATTY
+#define LUA_USE_POPEN
+#define LUA_USE_DLOPEN
+#endif
+
#if defined(LUA_USE_LINUX)
#define LUA_USE_POSIX
#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
@@ -94,7 +101,11 @@
".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
#else
-#define LUA_ROOT "/usr/local/"
+# if defined(LUA_USE_HAIKU)
+# define LUA_ROOT "/boot/common/"
+# else
+# define LUA_ROOT "/usr/local/"
+# endif
#define LUA_LDIR LUA_ROOT "share/lua/5.1/"
#define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
#define LUA_PATH_DEFAULT \

View File

@@ -0,0 +1,295 @@
From 5944289e129f60d26f71646bc4e3404f93de138f Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sat, 5 Oct 2013 22:01:42 +0200
Subject: Import existing haikuport patch.
diff --git a/Makefile b/Makefile
index 6e78f66..8b8fbfc 100644
--- a/Makefile
+++ b/Makefile
@@ -13,11 +13,11 @@ INSTALL_TOP= /usr/local
INSTALL_BIN= $(INSTALL_TOP)/bin
INSTALL_INC= $(INSTALL_TOP)/include
INSTALL_LIB= $(INSTALL_TOP)/lib
-INSTALL_MAN= $(INSTALL_TOP)/man/man1
+INSTALL_MAN= `finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man/man1
#
# You probably want to make INSTALL_LMOD and INSTALL_CMOD consistent with
# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h (and also with etc/lua.pc).
-INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
+INSTALL_LMOD= `finddir B_COMMON_DATA_DIRECTORY`/lua/$V
INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
# How to install. If your install program does not support "-p", then you
@@ -38,12 +38,12 @@ RANLIB= ranlib
# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
# Convenience platforms targets.
-PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
+PLATS= aix ansi bsd freebsd generic haiku linux macosx mingw posix solaris
# What to install.
TO_BIN= lua luac
TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
-TO_LIB= liblua.a
+TO_LIB= liblua.a liblua.so
TO_MAN= lua.1 luac.1
# Lua version and release.
diff --git a/src/Makefile b/src/Makefile
index e4a3cd6..86bd1ce 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -20,9 +20,10 @@ MYLIBS=
# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
-PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
+PLATS= aix ansi bsd freebsd generic haiku linux macosx mingw posix solaris
LUA_A= liblua.a
+LUA_SO= liblua.so
CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
lundump.o lvm.o lzio.o
@@ -36,7 +37,7 @@ LUAC_T= luac
LUAC_O= luac.o print.o
ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
+ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
ALL_A= $(LUA_A)
default: $(PLAT)
@@ -57,6 +58,9 @@ $(LUA_T): $(LUA_O) $(LUA_A)
$(LUAC_T): $(LUAC_O) $(LUA_A)
$(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
+$(LUA_SO): $(CORE_O) $(LIB_O)
+ $(CC) -o $@ -shared -fPIC -Wl,-soname=liblua.so.$V $(MYLDFLAGS) $? $(LIBS)
+
clean:
$(RM) $(ALL_T) $(ALL_O)
@@ -95,6 +99,9 @@ freebsd:
generic:
$(MAKE) all MYCFLAGS=
+haiku:
+ $(MAKE) all MYCFLAGS=-DLUA_USE_HAIKU LIBS=
+
linux:
$(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
diff --git a/src/lcode.c b/src/lcode.c
index cff626b..679cb9c 100644
--- a/src/lcode.c
+++ b/src/lcode.c
@@ -1,5 +1,5 @@
/*
-** $Id: lcode.c,v 2.25.1.3 2007/12/28 15:32:23 roberto Exp $
+** $Id: lcode.c,v 2.25.1.5 2011/01/31 14:53:16 roberto Exp $
** Code generator for Lua
** See Copyright Notice in lua.h
*/
@@ -544,10 +544,6 @@ void luaK_goiftrue (FuncState *fs, expdesc *e) {
pc = NO_JUMP; /* always true; do nothing */
break;
}
- case VFALSE: {
- pc = luaK_jump(fs); /* always jump */
- break;
- }
case VJMP: {
invertjump(fs, e);
pc = e->u.s.info;
@@ -572,10 +568,6 @@ static void luaK_goiffalse (FuncState *fs, expdesc *e) {
pc = NO_JUMP; /* always false; do nothing */
break;
}
- case VTRUE: {
- pc = luaK_jump(fs); /* always jump */
- break;
- }
case VJMP: {
pc = e->u.s.info;
break;
diff --git a/src/ldblib.c b/src/ldblib.c
index 67de122..2027eda 100644
--- a/src/ldblib.c
+++ b/src/ldblib.c
@@ -1,5 +1,5 @@
/*
-** $Id: ldblib.c,v 1.104.1.3 2008/01/21 13:11:21 roberto Exp $
+** $Id: ldblib.c,v 1.104.1.4 2009/08/04 18:50:18 roberto Exp $
** Interface from Lua to its debug API
** See Copyright Notice in lua.h
*/
@@ -45,6 +45,7 @@ static int db_setmetatable (lua_State *L) {
static int db_getfenv (lua_State *L) {
+ luaL_checkany(L, 1);
lua_getfenv(L, 1);
return 1;
}
diff --git a/src/liolib.c b/src/liolib.c
index e79ed1c..649f9a5 100644
--- a/src/liolib.c
+++ b/src/liolib.c
@@ -1,5 +1,5 @@
/*
-** $Id: liolib.c,v 2.73.1.3 2008/01/18 17:47:43 roberto Exp $
+** $Id: liolib.c,v 2.73.1.4 2010/05/14 15:33:51 roberto Exp $
** Standard I/O (and system) library
** See Copyright Notice in lua.h
*/
@@ -276,7 +276,10 @@ static int read_number (lua_State *L, FILE *f) {
lua_pushnumber(L, d);
return 1;
}
- else return 0; /* read fails */
+ else {
+ lua_pushnil(L); /* "result" to be removed */
+ return 0; /* read fails */
+ }
}
diff --git a/src/llex.c b/src/llex.c
index 6dc3193..88c6790 100644
--- a/src/llex.c
+++ b/src/llex.c
@@ -1,5 +1,5 @@
/*
-** $Id: llex.c,v 2.20.1.1 2007/12/27 13:02:25 roberto Exp $
+** $Id: llex.c,v 2.20.1.2 2009/11/23 14:58:22 roberto Exp $
** Lexical Analyzer
** See Copyright Notice in lua.h
*/
@@ -118,8 +118,10 @@ TString *luaX_newstring (LexState *ls, const char *str, size_t l) {
lua_State *L = ls->L;
TString *ts = luaS_newlstr(L, str, l);
TValue *o = luaH_setstr(L, ls->fs->h, ts); /* entry for `str' */
- if (ttisnil(o))
+ if (ttisnil(o)) {
setbvalue(o, 1); /* make sure `str' will not be collected */
+ luaC_checkGC(L);
+ }
return ts;
}
diff --git a/src/loadlib.c b/src/loadlib.c
index 0d401eb..6158c53 100644
--- a/src/loadlib.c
+++ b/src/loadlib.c
@@ -1,5 +1,5 @@
/*
-** $Id: loadlib.c,v 1.52.1.3 2008/08/06 13:29:28 roberto Exp $
+** $Id: loadlib.c,v 1.52.1.4 2009/09/09 13:17:16 roberto Exp $
** Dynamic library loader for Lua
** See Copyright Notice in lua.h
**
@@ -639,7 +639,7 @@ LUALIB_API int luaopen_package (lua_State *L) {
lua_pushvalue(L, -1);
lua_replace(L, LUA_ENVIRONINDEX);
/* create `loaders' table */
- lua_createtable(L, 0, sizeof(loaders)/sizeof(loaders[0]) - 1);
+ lua_createtable(L, sizeof(loaders)/sizeof(loaders[0]) - 1, 0);
/* fill it with pre-defined loaders */
for (i=0; loaders[i] != NULL; i++) {
lua_pushcfunction(L, loaders[i]);
diff --git a/src/lstrlib.c b/src/lstrlib.c
index 1b4763d..7a03489 100644
--- a/src/lstrlib.c
+++ b/src/lstrlib.c
@@ -1,5 +1,5 @@
/*
-** $Id: lstrlib.c,v 1.132.1.4 2008/07/11 17:27:21 roberto Exp $
+** $Id: lstrlib.c,v 1.132.1.5 2010/05/14 15:34:19 roberto Exp $
** Standard library for string operations and pattern-matching
** See Copyright Notice in lua.h
*/
@@ -754,6 +754,7 @@ static void addintlen (char *form) {
static int str_format (lua_State *L) {
+ int top = lua_gettop(L);
int arg = 1;
size_t sfl;
const char *strfrmt = luaL_checklstring(L, arg, &sfl);
@@ -768,7 +769,8 @@ static int str_format (lua_State *L) {
else { /* format item */
char form[MAX_FORMAT]; /* to store the format (`%...') */
char buff[MAX_ITEM]; /* to store the formatted item */
- arg++;
+ if (++arg > top)
+ luaL_argerror(L, arg, "no value");
strfrmt = scanformat(L, strfrmt, form);
switch (*strfrmt++) {
case 'c': {
diff --git a/src/luaconf.h b/src/luaconf.h
index e2cb261..9f28f41 100644
--- a/src/luaconf.h
+++ b/src/luaconf.h
@@ -33,6 +33,13 @@
#define LUA_WIN
#endif
+#if defined(LUA_USE_HAIKU)
+#define LUA_USE_MKSTEMP
+#define LUA_USE_ISATTY
+#define LUA_USE_POPEN
+#define LUA_USE_DLOPEN
+#endif
+
#if defined(LUA_USE_LINUX)
#define LUA_USE_POSIX
#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
@@ -94,7 +101,11 @@
".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
#else
-#define LUA_ROOT "/usr/local/"
+# if defined(LUA_USE_HAIKU)
+# define LUA_ROOT "/boot/common/"
+# else
+# define LUA_ROOT "/usr/local/"
+# endif
#define LUA_LDIR LUA_ROOT "share/lua/5.1/"
#define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
#define LUA_PATH_DEFAULT \
diff --git a/src/lvm.c b/src/lvm.c
index ee3256a..8aeafda 100644
--- a/src/lvm.c
+++ b/src/lvm.c
@@ -1,5 +1,5 @@
/*
-** $Id: lvm.c,v 2.63.1.3 2007/12/28 15:32:23 roberto Exp $
+** $Id: lvm.c,v 2.63.1.4 2009/07/01 21:10:33 roberto Exp $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -133,6 +133,7 @@ void luaV_gettable (lua_State *L, const TValue *t, TValue *key, StkId val) {
void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) {
int loop;
+ TValue temp;
for (loop = 0; loop < MAXTAGLOOP; loop++) {
const TValue *tm;
if (ttistable(t)) { /* `t' is a table? */
@@ -152,7 +153,9 @@ void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) {
callTM(L, tm, t, key, val);
return;
}
- t = tm; /* else repeat with `tm' */
+ /* else repeat with `tm' */
+ setobj(L, &temp, tm); /* avoid pointing inside table (may rehash) */
+ t = &temp;
}
luaG_runerror(L, "loop in settable");
}
--
1.8.3.4

View File

@@ -0,0 +1,127 @@
From 4130bdecfcb78e60b64a8ade8689aa02158eda46 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 6 Oct 2013 10:13:45 +0200
Subject: Import existing patch.
diff --git a/Makefile b/Makefile
index bd9515f..22d3a62 100644
--- a/Makefile
+++ b/Makefile
@@ -36,12 +36,12 @@ RM= rm -f
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
# Convenience platforms targets.
-PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
+PLATS= aix ansi bsd freebsd generic haiku linux macosx mingw posix solaris
# What to install.
TO_BIN= lua luac
TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
-TO_LIB= liblua.a
+TO_LIB= liblua.a liblua.so
TO_MAN= lua.1 luac.1
# Lua version and release.
diff --git a/src/Makefile b/src/Makefile
index 8c9ee67..2f7065c 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -26,9 +26,10 @@ MYOBJS=
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
-PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
+PLATS= aix ansi bsd freebsd generic haiku linux macosx mingw posix solaris
LUA_A= liblua.a
+LUA_SO= liblua.so
CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \
lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \
ltm.o lundump.o lvm.o lzio.o
@@ -43,7 +44,7 @@ LUAC_T= luac
LUAC_O= luac.o
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
+ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
ALL_A= $(LUA_A)
# Targets start here.
@@ -65,6 +66,9 @@ $(LUA_T): $(LUA_O) $(LUA_A)
$(LUAC_T): $(LUAC_O) $(LUA_A)
$(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
+$(LUA_SO): $(CORE_O) $(LIB_O)
+ $(CC) -o $@ -shared -fPIC $(LDFLAGS) $? $(LIBS)
+
clean:
$(RM) $(ALL_T) $(ALL_O)
@@ -102,6 +106,9 @@ freebsd:
generic: $(ALL)
+haiku:
+ $(MAKE) all MUCFLAGS=-DLUA_USE_HAIKU LIBS=
+
linux:
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline -lncurses"
diff --git a/src/luaconf.h b/src/luaconf.h
index e4335df..cef74a7 100644
--- a/src/luaconf.h
+++ b/src/luaconf.h
@@ -40,6 +40,13 @@
+#if defined(LUA_USE_HAIKU)
+#define LUA_USE_MKSTEMP
+#define LUA_USE_ISATTY
+#define LUA_USE_POPEN
+#define LUA_USE_DLOPEN
+#endif
+
#if defined(LUA_USE_LINUX)
#define LUA_USE_POSIX
#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
@@ -100,7 +107,11 @@
#else /* }{ */
#define LUA_VDIR LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "/"
+#if defined(LUA_USE_HAIKU)
+#define LUA_ROOT "/boot/common/"
+#else
#define LUA_ROOT "/usr/local/"
+#endif
#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR
#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR
#define LUA_PATH_DEFAULT \
--
1.8.3.4
From 5fbc99c965898e393a34cff6bfb14b29dc77426b Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 6 Oct 2013 10:25:23 +0200
Subject: Set the library soname
* prepareInstalledDevelLib will fail if there is no soname.
diff --git a/src/Makefile b/src/Makefile
index 2f7065c..b279d4b 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -67,7 +67,7 @@ $(LUAC_T): $(LUAC_O) $(LUA_A)
$(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
$(LUA_SO): $(CORE_O) $(LIB_O)
- $(CC) -o $@ -shared -fPIC $(LDFLAGS) $? $(LIBS)
+ $(CC) -o $@ -shared -fPIC -Wl,-soname=liblua.so.$V $(LDFLAGS) $? $(LIBS)
clean:
$(RM) $(ALL_T) $(ALL_O)
--
1.8.3.4

View File

@@ -1,19 +0,0 @@
DESCRIPTION="nasm assembler"
HOMEPAGE="http://www.nasm.us/"
SRC_URI="http://www.nasm.us/pub/nasm/releasebuilds/2.08.01/nasm-2.08.01.tar.bz2"
CHECKSUM_MD5="1e3ebc1289c2be5963571c0937b7a211"
REVISION="1"
STATUS_HAIKU="untested"
DEPEND=""
BUILD {
cd nasm-2.08.01
./configure --prefix=`finddir B_COMMON_DIRECTORY`
make
}
INSTALL {
cd nasm-2.08.01
make install INSTALLROOT=${DESTDIR}
}
LICENSE="BSD (2-clause)"
COPYRIGHT="1996 Simon Tatham and Julian Hall."

View File

@@ -0,0 +1,41 @@
SUMMARY="The Nasm assembler"
DESCRIPTION="The Nasm assembler"
HOMEPAGE="http://www.nasm.us/"
SRC_URI="http://www.nasm.us/pub/nasm/releasebuilds/2.08.01/nasm-2.08.01.tar.bz2"
CHECKSUM_MD5="1e3ebc1289c2be5963571c0937b7a211"
LICENSE="BSD (2-clause)"
COPYRIGHT="1996 Simon Tatham and Julian Hall."
REVISION="1"
ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
nasm = $portVersion compat >= 1
cmd:nasm = $portVersion compat >= 1
cmd:ndisasm = $portVersion compat >= 1
"
REQUIRES="
haiku >= $haikuVersion
"
BUILD_REQUIRES=""
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
cmd:gcc
cmd:ld
cmd:make
cmd:perl
"
SOURCE_DIR="$portVersionedName"
BUILD()
{
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
}

View File

@@ -5,7 +5,8 @@ CHECKSUM_MD5="fa11560a45793bd9fa45c1295a6f4a91"
REVISION="1"
STATUS_HAIKU="untested"
DEPEND=""
BUILD {
BUILD()
{
cd ocaml-4.00.0
COMMON_DOCS=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`
./configure --prefix `finddir B_COMMON_DIRECTORY` \
@@ -13,7 +14,8 @@ BUILD {
make world.opt
}
INSTALL {
INSTALL()
{
cd ocaml-4.00.0
COMMON_DOCS=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`
make install PREFIX=${DESTDIR}`finddir B_COMMON_DIRECTORY` \

View File

@@ -5,7 +5,8 @@ REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
CHECKSUM_MD5="e482932e544c847761449b106ecbc483"
BUILD {
BUILD()
{
cd orc-0.4.16
autoconf
COMMON_DOCS=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`
@@ -15,7 +16,8 @@ BUILD {
make
}
INSTALL {
INSTALL()
{
cd orc-0.4.16
make install
}

View File

@@ -1,659 +0,0 @@
diff -urN perl-5.10.0.orig/Configure perl-5.10.0/Configure
--- perl-5.10.0.orig/Configure 2007-12-18 10:47:07.000000000 +0000
+++ perl-5.10.0/Configure 2008-10-25 22:26:22.000000000 +0000
@@ -7864,6 +7864,7 @@
case "$lddlflags" in
'') case "$osname" in
beos) dflt='-nostart' ;;
+ haiku) dflt='-shared' ;;
hpux) dflt='-b';
case "$gccversion" in
'') dflt="$dflt +vnocompatwarnings" ;;
@@ -7946,7 +7947,7 @@
;;
*) case "$useshrplib" in
'') case "$osname" in
- svr4*|nonstopux|dgux|dynixptx|esix|powerux|beos|cygwin*)
+ svr4*|nonstopux|dgux|dynixptx|esix|powerux|beos|cygwin*|haiku)
dflt=y
also='Building a shared libperl is required for dynamic loading to work on your system.'
;;
@@ -8109,6 +8110,9 @@
beos)
# beos doesn't like the default, either.
;;
+ haiku)
+ # Haiku doesn't like the default, either.
+ ;;
hpux*)
# hpux doesn't like the default, either.
tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
diff -urN perl-5.10.0.orig/MANIFEST perl-5.10.0/MANIFEST
--- perl-5.10.0.orig/MANIFEST 2007-12-18 10:47:07.000000000 +0000
+++ perl-5.10.0/MANIFEST 2008-10-28 15:56:53.000000000 +0000
@@ -664,6 +664,9 @@
ext/GDBM_File/Makefile.PL GDBM extension makefile writer
ext/GDBM_File/t/gdbm.t See if GDBM_File works
ext/GDBM_File/typemap GDBM extension interface types
+ext/Haiku/Haiku.pm Haiku extension Perl module
+ext/Haiku/Haiku.xs Haiku extension external subroutines
+ext/Haiku/Makefile.PL Haiku extension makefile writer
ext/Hash/Util/Changes Change history of Hash::Util
ext/Hash/Util/FieldHash/Changes Changes for Hash::Util::FieldHash
ext/Hash/Util/FieldHash/FieldHash.xs XS portion
@@ -1272,6 +1275,7 @@
h2pl/README How to turn .ph files into .pl files
h2pl/tcbreak cbreak test routine using .ph
h2pl/tcbreak2 cbreak test routine using .pl
+haiku/haikuish.h Header for the Haiku port
handy.h Handy definitions
hints/3b1cc Hints for named architecture
hints/3b1.sh Hints for named architecture
@@ -1307,6 +1311,7 @@
hints/gnuknetbsd.sh Hints for named architecture
hints/gnu.sh Hints for named architecture
hints/greenhills.sh Hints for named architecture
+hints/haiku.sh Hints for named architecture
hints/hpux.sh Hints for named architecture
hints/i386.sh Hints for named architecture
hints/interix.sh Hints for named architecture
@@ -1763,6 +1768,7 @@
lib/ExtUtils/MM_BeOS.pm MakeMaker methods for BeOS
lib/ExtUtils/MM_Cygwin.pm MakeMaker methods for Cygwin
lib/ExtUtils/MM_DOS.pm MakeMaker methods for DOS
+lib/ExtUtils/MM_Haiku.pm MakeMaker methods for Haiku
lib/ExtUtils/MM_MacOS.pm MakeMaker methods for MacOS
lib/ExtUtils/MM_NW5.pm MakeMaker methods for NetWare
lib/ExtUtils/MM_OS2.pm MakeMaker methods for OS/2
@@ -3282,6 +3288,7 @@
README.dos Perl notes for DOS
README.epoc Perl notes for EPOC
README.freebsd Perl notes for FreeBSD
+README.haiku Perl notes for Haiku
README.hpux Perl notes for HP-UX
README.hurd Perl notes for Hurd
README.irix Perl notes for Irix
diff -urN perl-5.10.0.orig/README.haiku perl-5.10.0/README.haiku
--- perl-5.10.0.orig/README.haiku 1970-01-01 00:00:00.000000000 +0000
+++ perl-5.10.0/README.haiku 2008-10-28 15:33:37.000000000 +0000
@@ -0,0 +1,64 @@
+If you read this file _as_is_, just ignore the funny characters you see.
+It is written in the POD format (see pod/perlpod.pod) which is specially
+designed to be readable as is.
+
+=head1 NAME
+
+README.haiku - Perl version 5.10+ on Haiku
+
+=head1 DESCRIPTION
+
+This file contains instructions how to build Perl for Haiku and lists
+known problems.
+
+=head1 BUILD AND INSTALL
+
+The build procedure is completely standard:
+
+ ./Configure -de
+ make
+ make install
+
+Make perl executable and create a symlink for libperl:
+
+ chmod a+x /boot/common/bin/perl
+ cd /boot/common/lib; ln -s perl5/5.10.0/BePC-haiku/CORE/libperl.so .
+
+Replace C<5.10.0> with your respective version of Perl.
+
+=head1 KNOWN PROBLEMS
+
+The following problems are encountered with Haiku revision 28311:
+
+=over 4
+
+=item *
+
+Perl cannot be compiled with threading support ATM.
+
+=item *
+
+The C<ext/Socket/t/socketpair.t> test fails. More precisely: the subtests
+using datagram sockets fail. Unix datagram sockets aren't implemented in
+Haiku yet.
+
+=item *
+
+A subtest of the C<ext/Sys/Syslog/t/syslog.t> test fails. This is due to Haiku
+not implementing C</dev/log> support yet.
+
+=item *
+
+The tests C<lib/Net/Ping/t/450_service.t> and C<lib/Net/Ping/t/510_ping_udp.t>
+fail. This is due to bugs in Haiku's network stack implementation.
+
+=back
+
+=head1 CONTACT
+
+For Haiku specific problems contact the HaikuPorts developers:
+http://ports.haiku-files.org/
+
+The initial Haiku port was done by Ingo Weinhold <ingo_weinhold@gmx.de>.
+
+Last update: 2008-10-29
diff -urN perl-5.10.0.orig/ext/Errno/Errno_pm.PL perl-5.10.0/ext/Errno/Errno_pm.PL
--- perl-5.10.0.orig/ext/Errno/Errno_pm.PL 2007-12-18 10:47:07.000000000 +0000
+++ perl-5.10.0/ext/Errno/Errno_pm.PL 2008-10-25 20:30:48.000000000 +0000
@@ -155,7 +155,7 @@
# we might miss out on compiler-specific ones
$file{"$ENV{GUSI}include:sys:errno.h"} = 1;
- } elsif ($^O eq 'beos') {
+ } elsif ($^O eq 'beos' || $^O eq 'haiku') {
# hidden in a special place
$file{'/boot/develop/headers/posix/errno.h'} = 1;
diff -urN perl-5.10.0.orig/ext/Haiku/Haiku.pm perl-5.10.0/ext/Haiku/Haiku.pm
--- perl-5.10.0.orig/ext/Haiku/Haiku.pm 1970-01-01 00:00:00.000000000 +0000
+++ perl-5.10.0/ext/Haiku/Haiku.pm 2008-10-24 17:09:59.000000000 +0000
@@ -0,0 +1,54 @@
+package Haiku;
+
+BEGIN {
+ use strict;
+ use vars qw|$VERSION $XS_VERSION @ISA @EXPORT @EXPORT_OK|;
+
+ require Exporter;
+ require DynaLoader;
+
+ @ISA = qw|Exporter DynaLoader|;
+ $VERSION = '0.34';
+ $XS_VERSION = $VERSION;
+ $VERSION = eval $VERSION;
+
+ @EXPORT = qw(
+ );
+ @EXPORT_OK = qw(
+ );
+}
+
+bootstrap Haiku;
+
+1;
+
+__END__
+
+=head1 NAME
+
+Haiku - Interfaces to some Haiku API Functions
+
+=head1 DESCRIPTION
+
+The Haiku module contains functions to access Haiku APIs.
+
+=head2 Alphabetical Listing of Haiku Functions
+
+=over
+
+=item Haiku::debug_printf(FORMAT,...)
+
+Similar to printf, but prints to system debug output.
+
+=item Haiku::debugger(FORMAT,...)
+
+Drops the program into the debugger. The printf like arguments define the
+debugger message.
+
+=item Haiku::ktrace_printf(FORMAT,...)
+
+Similar to printf, but prints to a kernel tracing entry.
+
+=back
+
+=cut
diff -urN perl-5.10.0.orig/ext/Haiku/Haiku.xs perl-5.10.0/ext/Haiku/Haiku.xs
--- perl-5.10.0.orig/ext/Haiku/Haiku.xs 1970-01-01 00:00:00.000000000 +0000
+++ perl-5.10.0/ext/Haiku/Haiku.xs 2008-10-25 20:33:27.000000000 +0000
@@ -0,0 +1,137 @@
+#define PERL_NO_GET_CONTEXT
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#include <stdarg.h>
+
+#include <OS.h>
+
+static void
+haiku_do_debugger(const char* format,...)
+{
+ char buffer[1024];
+ va_list args;
+ va_start(args, format);
+ my_vsnprintf(buffer, sizeof(buffer), format, args);
+ va_end(args);
+
+ debugger(buffer);
+}
+
+static void
+haiku_do_debug_printf(pTHX_ register SV *sv,
+ void (*printfFunc)(const char*,...))
+{
+ dVAR;
+
+ if (!sv)
+ return;
+ if (SvTYPE(sv) == SVt_IV && SvIOK(sv)) {
+ assert(!SvGMAGICAL(sv));
+ if (SvIsUV(sv))
+ (*printfFunc)("%"UVuf, (UV)SvUVX(sv));
+ else
+ (*printfFunc)("%"IVdf, (IV)SvIVX(sv));
+ return;
+ }
+ else {
+ STRLEN len;
+ /* Do this first to trigger any overloading. */
+ const char *tmps = SvPV_const(sv, len);
+ U8 *tmpbuf = NULL;
+
+ if (!SvUTF8(sv)) {
+ /* We don't modify the original scalar. */
+ tmpbuf = bytes_to_utf8((const U8*) tmps, &len);
+ tmps = (char *) tmpbuf;
+ }
+
+ if (len)
+ (*printfFunc)("%.*s", (int)len, tmps);
+ Safefree(tmpbuf);
+ }
+}
+
+XS(haiku_debug_printf)
+{
+ dVAR;
+ dXSARGS;
+ dORIGMARK;
+ SV *sv;
+
+ if (items < 1)
+ Perl_croak(aTHX_ "usage: Haiku::debug_printf($format,...)");
+
+ sv = newSV(0);
+
+ if (SvTAINTED(MARK[1]))
+ TAINT_PROPER("debug_printf");
+ do_sprintf(sv, SP - MARK, MARK + 1);
+
+ haiku_do_debug_printf(sv, &debug_printf);
+
+ SvREFCNT_dec(sv);
+ SP = ORIGMARK;
+ PUSHs(&PL_sv_yes);
+}
+
+XS(haiku_ktrace_printf)
+{
+ dVAR;
+ dXSARGS;
+ dORIGMARK;
+ SV *sv;
+
+ if (items < 1)
+ Perl_croak(aTHX_ "usage: Haiku::debug_printf($format,...)");
+
+ sv = newSV(0);
+
+ if (SvTAINTED(MARK[1]))
+ TAINT_PROPER("ktrace_printf");
+ do_sprintf(sv, SP - MARK, MARK + 1);
+
+ haiku_do_debug_printf(sv, &ktrace_printf);
+
+ SvREFCNT_dec(sv);
+ SP = ORIGMARK;
+ PUSHs(&PL_sv_yes);
+}
+
+XS(haiku_debugger)
+{
+ dVAR;
+ dXSARGS;
+ dORIGMARK;
+ SV *sv;
+
+ if (items < 1)
+ Perl_croak(aTHX_ "usage: Haiku::debugger($format,...)");
+
+ sv = newSV(0);
+
+ if (SvTAINTED(MARK[1]))
+ TAINT_PROPER("debugger");
+ do_sprintf(sv, SP - MARK, MARK + 1);
+
+ haiku_do_debug_printf(sv, &haiku_do_debugger);
+
+ SvREFCNT_dec(sv);
+ SP = ORIGMARK;
+ PUSHs(&PL_sv_yes);
+}
+
+MODULE = Haiku PACKAGE = Haiku
+
+PROTOTYPES: DISABLE
+
+BOOT:
+{
+ char *file = __FILE__;
+
+ newXS("Haiku::debug_printf", haiku_debug_printf, file);
+ newXS("Haiku::ktrace_printf", haiku_ktrace_printf, file);
+ newXS("Haiku::debugger", haiku_debugger, file);
+ XSRETURN_YES;
+}
diff -urN perl-5.10.0.orig/ext/Haiku/Makefile.PL perl-5.10.0/ext/Haiku/Makefile.PL
--- perl-5.10.0.orig/ext/Haiku/Makefile.PL 1970-01-01 00:00:00.000000000 +0000
+++ perl-5.10.0/ext/Haiku/Makefile.PL 2008-10-24 17:09:59.000000000 +0000
@@ -0,0 +1,20 @@
+use 5.006;
+use ExtUtils::MakeMaker;
+
+unless ($^O eq "haiku") {
+ die "OS unsupported\n";
+}
+
+#my @libs;
+#push @libs, '-L/lib/w32api -lole32 -lversion' if $^O eq "cygwin";
+
+WriteMakefile(
+ NAME => 'Haiku',
+ VERSION_FROM => 'Haiku.pm',
+# LIBS => \@libs,
+ INSTALLDIRS => ($] >= 5.008004 ? 'perl' : 'site'),
+ NO_META => 1,
+
+ AUTHOR => 'Ingo Weinhold <ingo_weinhold@gmx.de>',
+ ABSTRACT_FROM => 'Haiku.pm',
+);
diff -urN perl-5.10.0.orig/ext/POSIX/POSIX.xs perl-5.10.0/ext/POSIX/POSIX.xs
--- perl-5.10.0.orig/ext/POSIX/POSIX.xs 2007-12-18 10:47:07.000000000 +0000
+++ perl-5.10.0/ext/POSIX/POSIX.xs 2008-10-25 23:00:29.000000000 +0000
@@ -379,7 +379,7 @@
* to follow the traditional. However, to make the POSIX
* wait W*() macros to work in BeOS, we need to unbend the
* reality back in place. --jhi */
-#ifdef __BEOS__
+#if defined(__BEOS__) || defined(__HAIKU__)
# define WMUNGE(x) (((x) & 0xFF00) >> 8 | ((x) & 0x00FF) << 8)
#else
# define WMUNGE(x) (x)
diff -urN perl-5.10.0.orig/ext/Time/HiRes/t/HiRes.t perl-5.10.0/ext/Time/HiRes/t/HiRes.t
--- perl-5.10.0.orig/ext/Time/HiRes/t/HiRes.t 2007-12-18 10:47:07.000000000 +0000
+++ perl-5.10.0/ext/Time/HiRes/t/HiRes.t 2008-10-24 17:09:59.000000000 +0000
@@ -337,7 +337,8 @@
&& defined &Time::HiRes::getitimer
&& has_symbol('ITIMER_VIRTUAL')
&& $Config{sig_name} =~ m/\bVTALRM\b/
- && $^O !~ /^(nto)$/) { # nto: QNX 6 has the API but no implementation
+ && $^O !~ /^(nto)$/ # nto: QNX 6 has the API but no implementation
+ && $^O ne 'haiku') { # same for Haiku
for (18..19) {
print "ok $_ # Skip: no virtual interval timers\n";
}
diff -urN perl-5.10.0.orig/haiku/haikuish.h perl-5.10.0/haiku/haikuish.h
--- perl-5.10.0.orig/haiku/haikuish.h 1970-01-01 00:00:00.000000000 +0000
+++ perl-5.10.0/haiku/haikuish.h 2008-10-24 17:09:59.000000000 +0000
@@ -0,0 +1,11 @@
+#ifndef PERL_HAIKU_HAIKUISH_H
+#define PERL_HAIKU_HAIKUISH_H
+
+#include "../unixish.h"
+
+/* We need <sys/wait.h> or else the W* macros aren't defined in perl.h. */
+
+#include <sys/wait.h>
+
+#endif
+
diff -urN perl-5.10.0.orig/hints/haiku.sh perl-5.10.0/hints/haiku.sh
--- perl-5.10.0.orig/hints/haiku.sh 1970-01-01 00:00:00.000000000 +0000
+++ perl-5.10.0/hints/haiku.sh 2008-10-28 02:50:53.000000000 +0000
@@ -0,0 +1,34 @@
+# Haiku hints file
+# $Id$
+
+prefix="/boot/common"
+
+libpth='/boot/home/config/lib /boot/common/lib /system/lib'
+usrinc='/boot/develop/headers/posix'
+locinc='/boot/home/config/include /boot/common/include /boot/develop/headers'
+
+libc='/system/lib/libroot.so'
+libs='-lnetwork'
+
+# Use Haiku's malloc() by default.
+case "$usemymalloc" in
+'') usemymalloc='n' ;;
+esac
+
+# Haiku generally supports hard links, but the default file system (BFS)
+# doesn't. So better avoid using hard links.
+d_link='undef'
+dont_use_nlink='define'
+
+# The array syserrlst[] is useless for the most part.
+# Large negative numbers really kind of suck in arrays.
+d_syserrlst='undef'
+
+# Haiku uses gcc.
+cc="gcc"
+ld='gcc'
+
+# The runtime loader library path variable is LIBRARY_PATH.
+case "$ldlibpthname" in
+'') ldlibpthname=LIBRARY_PATH ;;
+esac
diff -urN perl-5.10.0.orig/lib/CPANPLUS/Internals/Constants/Report.pm perl-5.10.0/lib/CPANPLUS/Internals/Constants/Report.pm
--- perl-5.10.0.orig/lib/CPANPLUS/Internals/Constants/Report.pm 2007-12-18 10:47:08.000000000 +0000
+++ perl-5.10.0/lib/CPANPLUS/Internals/Constants/Report.pm 2008-10-24 17:09:59.000000000 +0000
@@ -29,6 +29,7 @@
Cygwin => 'cygwin',
Darwin => 'darwin',
EBCDIC => 'os390|os400|posix-bc|vmesa',
+ Haiku => 'haiku',
HPUX => 'hpux',
Linux => 'linux',
MSDOS => 'dos|os2|MSWin32|cygwin',
diff -urN perl-5.10.0.orig/lib/ExtUtils/CBuilder.pm perl-5.10.0/lib/ExtUtils/CBuilder.pm
--- perl-5.10.0.orig/lib/ExtUtils/CBuilder.pm 2007-12-18 10:47:07.000000000 +0000
+++ perl-5.10.0/lib/ExtUtils/CBuilder.pm 2008-10-28 02:42:24.000000000 +0000
@@ -36,6 +36,7 @@
sunos Unix
cygwin Unix
os2 Unix
+ haiku Unix
dos Windows
MSWin32 Windows
diff -urN perl-5.10.0.orig/lib/ExtUtils/MM.pm perl-5.10.0/lib/ExtUtils/MM.pm
--- perl-5.10.0.orig/lib/ExtUtils/MM.pm 2007-12-18 10:47:07.000000000 +0000
+++ perl-5.10.0/lib/ExtUtils/MM.pm 2008-10-24 17:09:59.000000000 +0000
@@ -69,6 +69,7 @@
$Is{VOS} = $^O eq 'vos';
$Is{QNX} = $^O eq 'qnx';
$Is{AIX} = $^O eq 'aix';
+$Is{Haiku} = $^O eq 'haiku';
$Is{Unix} = !grep { $_ } values %Is;
diff -urN perl-5.10.0.orig/lib/ExtUtils/MM_Haiku.pm perl-5.10.0/lib/ExtUtils/MM_Haiku.pm
--- perl-5.10.0.orig/lib/ExtUtils/MM_Haiku.pm 1970-01-01 00:00:00.000000000 +0000
+++ perl-5.10.0/lib/ExtUtils/MM_Haiku.pm 2008-10-24 17:09:59.000000000 +0000
@@ -0,0 +1,62 @@
+package ExtUtils::MM_Haiku;
+
+use strict;
+
+=head1 NAME
+
+ExtUtils::MM_Haiku - methods to override UN*X behaviour in ExtUtils::MakeMaker
+
+=head1 SYNOPSIS
+
+ use ExtUtils::MM_Haiku; # Done internally by ExtUtils::MakeMaker if needed
+
+=head1 DESCRIPTION
+
+See ExtUtils::MM_Unix for a documentation of the methods provided
+there. This package overrides the implementation of these methods, not
+the semantics.
+
+=over 4
+
+=cut
+
+use ExtUtils::MakeMaker::Config;
+use File::Spec;
+require ExtUtils::MM_Any;
+require ExtUtils::MM_Unix;
+
+use vars qw(@ISA $VERSION);
+@ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
+$VERSION = '6.42';
+
+
+=item os_flavor
+
+Haiku is Haiku.
+
+=cut
+
+sub os_flavor {
+ return('Haiku');
+}
+
+=item init_linker
+
+libperl.a equivalent to be linked to dynamic extensions.
+
+=cut
+
+sub init_linker {
+ my($self) = shift;
+
+ $self->{PERL_ARCHIVE} ||=
+ File::Spec->catdir('$(PERL_INC)',$Config{libperl});
+ $self->{PERL_ARCHIVE_AFTER} ||= '';
+ $self->{EXPORT_LIST} ||= '';
+}
+
+=back
+
+1;
+__END__
+
diff -urN perl-5.10.0.orig/lib/Module/Build.pm perl-5.10.0/lib/Module/Build.pm
--- perl-5.10.0.orig/lib/Module/Build.pm 2007-12-18 10:47:07.000000000 +0000
+++ perl-5.10.0/lib/Module/Build.pm 2008-10-24 17:09:59.000000000 +0000
@@ -30,6 +30,7 @@
dynixptx Unix
freebsd Unix
linux Unix
+ haiku Unix
hpux Unix
irix Unix
darwin Unix
diff -urN perl-5.10.0.orig/perl.h perl-5.10.0/perl.h
--- perl-5.10.0.orig/perl.h 2007-12-18 10:47:08.000000000 +0000
+++ perl-5.10.0/perl.h 2008-10-25 20:42:31.000000000 +0000
@@ -1520,15 +1520,15 @@
# define S_IRWXO (S_IROTH|S_IWOTH|S_IXOTH)
#endif
-/* BeOS 5.0 seems to define S_IREAD and S_IWRITE in <posix/fcntl.h>
+/* BeOS 5.0 and Haiku R1 seem to define S_IREAD and S_IWRITE in <posix/fcntl.h>
* which would get included through <sys/file.h >, but that is 3000
* lines in the future. --jhi */
-#if !defined(S_IREAD) && !defined(__BEOS__)
+#if !defined(S_IREAD) && !(defined(__BEOS__) || defined(__HAIKU__))
# define S_IREAD S_IRUSR
#endif
-#if !defined(S_IWRITE) && !defined(__BEOS__)
+#if !defined(S_IWRITE) && !(defined(__BEOS__) || defined(__HAIKU__))
# define S_IWRITE S_IWUSR
#endif
@@ -2551,7 +2551,10 @@
# define ISHISH "macos classic"
#endif
-#if defined(__BEOS__)
+#if defined(__HAIKU__)
+# include "haiku/haikuish.h"
+# define ISHISH "haiku"
+#elif defined(__BEOS__)
# include "beos/beosish.h"
# define ISHISH "beos"
#endif
@@ -5609,9 +5612,10 @@
#if O_TEXT != O_BINARY
/* If you have different O_TEXT and O_BINARY and you are a CLRF shop,
* that is, you are somehow DOSish. */
-# if defined(__BEOS__) || defined(__VOS__) || defined(__CYGWIN__)
- /* BeOS has O_TEXT != O_BINARY but O_TEXT and O_BINARY have no effect;
- * BeOS is always UNIXoid (LF), not DOSish (CRLF). */
+# if defined(__BEOS__) || defined(__HAIKU__) || defined(__VOS__) || \
+ defined(__CYGWIN__)
+ /* BeOS/Haiku has O_TEXT != O_BINARY but O_TEXT and O_BINARY have no effect;
+ * BeOS/Haiku is always UNIXoid (LF), not DOSish (CRLF). */
/* VOS has O_TEXT != O_BINARY, and they have effect,
* but VOS always uses LF, never CRLF. */
/* If you have O_TEXT different from your O_BINARY but you still are
diff -urN perl-5.10.0.orig/pod/perlport.pod perl-5.10.0/pod/perlport.pod
--- perl-5.10.0.orig/pod/perlport.pod 2007-12-18 10:47:08.000000000 +0000
+++ perl-5.10.0/pod/perlport.pod 2008-10-28 02:37:44.000000000 +0000
@@ -815,6 +815,7 @@
dgux dgux AViiON-dgux
DYNIX/ptx dynixptx i386-dynixptx
FreeBSD freebsd freebsd-i386
+ Haiku haiku BePC-haiku
Linux linux arm-linux
Linux linux i386-linux
Linux linux i586-linux
diff -urN perl-5.10.0.orig/t/io/fs.t perl-5.10.0/t/io/fs.t
--- perl-5.10.0.orig/t/io/fs.t 2007-12-18 10:47:08.000000000 +0000
+++ perl-5.10.0/t/io/fs.t 2008-10-24 17:09:59.000000000 +0000
@@ -275,7 +275,7 @@
is( $atime, 500000001, 'atime' );
is( $mtime, 500000000 + $delta, 'mtime' );
}
- elsif ($^O eq 'beos') {
+ elsif ($^O eq 'beos' || $^O eq 'haiku') {
SKIP: {
skip "atime not updated", 1;
}
diff -urN perl-5.10.1/Configure perl-5.10.1-haiku/Configure
--- perl-5.10.1/Configure 2009-08-18 19:03:53.024117248 +0000
+++ perl-5.10.1-haiku/Configure 2012-09-07 13:57:19.000000000 +0000
@@ -5139,18 +5139,6 @@
eval $checkccflag
;;
esac
-
- # on x86_64 (at least) we require an extra library (libssp) in the
- # link command line. This library is not named, so I infer that it is
- # an implementation detail that may change. Hence the safest approach
- # is to add the flag to the flags passed to the compiler at link time,
- # as that way the compiler can do the right implementation dependant
- # thing. (NWC)
- case "$gccversion" in
- ?*) set stack-protector -fstack-protector
- eval $checkccflag
- ;;
- esac
;;
esac

View File

@@ -1,7 +1,65 @@
diff -up perl-5.10.1/installperl.orig perl-5.10.1/installperl
--- perl-5.10.1/installperl.orig 2009-08-13 16:40:10.023330816 -0600
+++ perl-5.10.1/installperl 2010-04-22 19:31:00.720633856 -0600
@@ -409,6 +409,11 @@ elsif ($Is_Cygwin) { # On Cygwin symlink
diff -ruw perl-5.10.1/ext/Errno/Errno_pm.PL perl-5.10.1-haiku/ext/Errno/Errno_pm.PL
--- perl-5.10.1/ext/Errno/Errno_pm.PL 2009-06-27 16:09:45.059768832 +0000
+++ perl-5.10.1-haiku/ext/Errno/Errno_pm.PL 2011-03-01 18:01:57.984350720 +0000
@@ -159,10 +159,14 @@
# we might miss out on compiler-specific ones
$file{"$ENV{GUSI}include:sys:errno.h"} = 1;
- } elsif ($^O eq 'beos' || $^O eq 'haiku') {
+ } elsif ($^O eq 'beos') {
# hidden in a special place
$file{'/boot/develop/headers/posix/errno.h'} = 1;
+ } elsif ($^O eq 'haiku') {
+ # hidden in a special place
+ $file{'/boot/system/develop/headers/posix/errno.h'} = 1;
+
} elsif ($^O eq 'vos') {
# avoid problem where cpp returns non-POSIX pathnames
$file{'/system/include_library/errno.h'} = 1;
diff -ruw perl-5.10.1/hints/haiku.sh perl-5.10.1-haiku/hints/haiku.sh
--- perl-5.10.1/hints/haiku.sh 2009-02-12 23:58:12.063176704 +0100
+++ perl-5.10.1-haiku/hints/haiku.sh 1970-01-01 01:00:00.000000000 +0100
@@ -1,34 +1 @@
-# Haiku hints file
-# $Id$
-
-prefix="/boot/common"
-
-libpth='/boot/home/config/lib /boot/common/lib /system/lib'
-usrinc='/boot/develop/headers/posix'
-locinc='/boot/home/config/include /boot/common/include /boot/develop/headers'
-
-libc='/system/lib/libroot.so'
-libs='-lnetwork'
-
-# Use Haiku's malloc() by default.
-case "$usemymalloc" in
-'') usemymalloc='n' ;;
-esac
-
-# Haiku generally supports hard links, but the default file system (BFS)
-# doesn't. So better avoid using hard links.
-d_link='undef'
-dont_use_nlink='define'
-
-# The array syserrlst[] is useless for the most part.
-# Large negative numbers really kind of suck in arrays.
-d_syserrlst='undef'
-
-# Haiku uses gcc.
-cc="gcc"
-ld='gcc'
-
-# The runtime loader library path variable is LIBRARY_PATH.
-case "$ldlibpthname" in
-'') ldlibpthname=LIBRARY_PATH ;;
-esac
+# haiku sets all its specifics via Configure
diff -ruw perl-5.10.1/installperl perl-5.10.1-haiku/installperl
--- perl-5.10.1/installperl 2009-08-13 22:40:10.066846720 +0000
+++ perl-5.10.1-haiku/installperl 2011-02-28 17:24:45.324272128 +0000
@@ -409,6 +409,11 @@
mkpath("$installarchlib/CORE/mpeix", $opts{verbose}, 0777);
push(@corefiles,'mpeix/mpeixish.h');
}
@@ -13,23 +71,10 @@ diff -up perl-5.10.1/installperl.orig perl-5.10.1/installperl
# If they have built sperl.o...
push(@corefiles,'sperl.o') if -f 'sperl.o';
}
diff -up perl-5.10.1/lib/File/Temp.pm.orig perl-5.10.1/lib/File/Temp.pm
--- perl-5.10.1/lib/File/Temp.pm.orig 2009-06-30 07:13:54.062914560 -0600
+++ perl-5.10.1/lib/File/Temp.pm 2010-04-22 19:25:11.867172352 -0600
@@ -1978,7 +1978,8 @@ sub unlink0 {
# on Win9x the link count remains 1
# On NFS the link count may still be 1 but we cant know that
# we are on NFS
- return ( $fh[3] == 0 or $^O eq 'cygwin' ? 1 : 0);
+ # On haiku, the link count seems to be always 1 (at least for BFS)
+ return ( $fh[3] == 0 or $^O eq 'cygwin' or $^O eq 'haiku' ? 1 : 0);
} else {
_deferred_unlink($fh, $path, 0);
diff -up perl-5.10.1/lib/File/Temp/t/lock.t.orig perl-5.10.1/lib/File/Temp/t/lock.t
--- perl-5.10.1/lib/File/Temp/t/lock.t.orig 2009-02-12 15:58:13.059506688 -0700
+++ perl-5.10.1/lib/File/Temp/t/lock.t 2010-04-22 19:25:11.860094464 -0600
@@ -8,7 +8,8 @@ use Fcntl;
diff -ruw perl-5.10.1/lib/File/Temp/t/lock.t perl-5.10.1-haiku/lib/File/Temp/t/lock.t
--- perl-5.10.1/lib/File/Temp/t/lock.t 2009-02-12 22:58:13.009699328 +0000
+++ perl-5.10.1-haiku/lib/File/Temp/t/lock.t 2011-02-28 17:24:45.354418688 +0000
@@ -8,7 +8,8 @@
BEGIN {
# see if we have O_EXLOCK
eval { &Fcntl::O_EXLOCK; };
@@ -39,10 +84,23 @@ diff -up perl-5.10.1/lib/File/Temp/t/lock.t.orig perl-5.10.1/lib/File/Temp/t/loc
plan skip_all => 'Do not seem to have O_EXLOCK';
} else {
plan tests => 4;
diff -up perl-5.10.1/t/run/exit.t.orig perl-5.10.1/t/run/exit.t
--- perl-5.10.1/t/run/exit.t.orig 2009-08-04 09:48:30.001310720 -0600
+++ perl-5.10.1/t/run/exit.t 2010-04-22 19:25:11.870580224 -0600
@@ -57,18 +57,18 @@ is( ${^CHILD_ERROR_NATIVE}, $native_succ
diff -ruw perl-5.10.1/lib/File/Temp.pm perl-5.10.1-haiku/lib/File/Temp.pm
--- perl-5.10.1/lib/File/Temp.pm 2009-06-30 13:13:54.013369344 +0000
+++ perl-5.10.1-haiku/lib/File/Temp.pm 2011-02-28 17:24:45.347602944 +0000
@@ -1978,7 +1978,8 @@
# on Win9x the link count remains 1
# On NFS the link count may still be 1 but we cant know that
# we are on NFS
- return ( $fh[3] == 0 or $^O eq 'cygwin' ? 1 : 0);
+ # On haiku, the link count seems to be always 1 (at least for BFS)
+ return ( $fh[3] == 0 or $^O eq 'cygwin' or $^O eq 'haiku' ? 1 : 0);
} else {
_deferred_unlink($fh, $path, 0);
diff -ruw perl-5.10.1/t/run/exit.t perl-5.10.1-haiku/t/run/exit.t
--- perl-5.10.1/t/run/exit.t 2009-08-04 15:48:30.014155776 +0000
+++ perl-5.10.1-haiku/t/run/exit.t 2011-02-28 17:24:45.362283008 +0000
@@ -57,18 +57,18 @@
if (!$vms_exit_mode) {
my $posix_ok = eval { require POSIX; };
my $wait_macros_ok = defined &POSIX::WIFEXITED;
@@ -66,7 +124,7 @@ diff -up perl-5.10.1/t/run/exit.t.orig perl-5.10.1/t/run/exit.t
}
SKIP: {
@@ -87,9 +87,9 @@ if (!$vms_exit_mode) {
@@ -87,9 +87,9 @@
SKIP: {
skip("No POSIX", 3) unless $posix_ok;
skip("No POSIX wait macros", 3) unless $wait_macros_ok;

View File

@@ -0,0 +1,546 @@
From 4bef2ada1d8a38b4dff88f0659a3b9e181bf1950 Mon Sep 17 00:00:00 2001
From: Oliver Tappe <zooey@hirschkaefer.de>
Date: Sun, 22 Sep 2013 14:52:03 +0200
Subject: Tell perl that BFS has a link count of 1
diff --git a/cpan/File-Temp/lib/File/Temp.pm b/cpan/File-Temp/lib/File/Temp.pm
index ac57c26..759690c 100644
--- a/cpan/File-Temp/lib/File/Temp.pm
+++ b/cpan/File-Temp/lib/File/Temp.pm
@@ -2051,7 +2051,8 @@ sub unlink0 {
# On NFS the link count may still be 1 but we can't know that
# we are on NFS. Since we can't be sure, we'll defer it
- return 1 if $fh[3] == 0 || $^O eq 'cygwin';
+ # On haiku, the link count seems to be always 1 (at least for BFS)
+ return 1 if $fh[3] == 0 || $^O eq 'cygwin' || $^O eq 'haiku';
}
# fall-through if we can't unlink now
_deferred_unlink($fh, $path, 0);
--
1.8.3.4
From e54a8f98abfea2be3eec53b4bbe2cbaaf9f39139 Mon Sep 17 00:00:00 2001
From: Oliver Tappe <zooey@hirschkaefer.de>
Date: Sun, 22 Sep 2013 14:52:53 +0200
Subject: Haiku defines, but does not implement O_EXLOCK
diff --git a/cpan/File-Temp/t/lock.t b/cpan/File-Temp/t/lock.t
index ff8c7f9..4364bf6 100644
--- a/cpan/File-Temp/t/lock.t
+++ b/cpan/File-Temp/t/lock.t
@@ -8,7 +8,8 @@ use Fcntl;
BEGIN {
# see if we have O_EXLOCK
eval { &Fcntl::O_EXLOCK; };
- if ($@) {
+ if ($@ || $^O eq 'haiku') {
+ # haiku doesn't implement O_EXLOCK yet (but it defines the value)
plan skip_all => 'Do not seem to have O_EXLOCK';
} else {
plan tests => 4;
--
1.8.3.4
From 30f81dcecdfb9c49ad8824314348cd23ef43ec0f Mon Sep 17 00:00:00 2001
From: Oliver Tappe <zooey@hirschkaefer.de>
Date: Sun, 22 Sep 2013 14:53:40 +0200
Subject: haiku sets all its specifics via Configure
diff --git a/hints/haiku.sh b/hints/haiku.sh
index fa8ebe5..0f09f53 100644
--- a/hints/haiku.sh
+++ b/hints/haiku.sh
@@ -1,44 +1 @@
-# Haiku hints file
-# $Id$
-
-case "$prefix" in
-'') prefix="/boot/common" ;;
-*) ;; # pass the user supplied value through
-esac
-
-libpth='/boot/home/config/lib /boot/common/lib /system/lib'
-usrinc='/boot/develop/headers/posix'
-locinc='/boot/home/config/include /boot/common/include /boot/develop/headers'
-
-libc='/system/lib/libroot.so'
-libs='-lnetwork'
-
-# Use Haiku's malloc() by default.
-case "$usemymalloc" in
-'') usemymalloc='n' ;;
-esac
-
-# Haiku generally supports hard links, but the default file system (BFS)
-# doesn't. So better avoid using hard links.
-d_link='undef'
-dont_use_nlink='define'
-
-# The array syserrlst[] is useless for the most part.
-# Large negative numbers really kind of suck in arrays.
-d_syserrlst='undef'
-
-# Haiku uses gcc.
-cc="gcc"
-ld='gcc'
-
-# The runtime loader library path variable is LIBRARY_PATH.
-case "$ldlibpthname" in
-'') ldlibpthname=LIBRARY_PATH ;;
-esac
-
-# as of alpha 4.1 (at the latest) some symbols are versioned,
-# confusing the nm lookup
-case "$usenm" in
-'') usenm='undef' ;;
-esac
-
+# haiku sets all its specifics via Configure
--
1.8.3.4
From 187343906d2ed78aa5e5b4b3a6cfb7ad199c726f Mon Sep 17 00:00:00 2001
From: Oliver Tappe <zooey@hirschkaefer.de>
Date: Sun, 22 Sep 2013 14:54:15 +0200
Subject: Tell perl that Haiku needs haikuish.h installed as well
diff --git a/installperl b/installperl
index e64b1c3..8ae20cc 100755
--- a/installperl
+++ b/installperl
@@ -379,6 +379,11 @@ elsif ($Is_Cygwin) { # On Cygwin symlink it to CORE to make Makefile happy
# AIX needs perl.exp installed as well.
push(@corefiles,'perl.exp') if $^O eq 'aix';
+ if ($^O eq 'haiku') {
+ # Haiku needs haikuish.h installed as well.
+ mkpath("$installarchlib/CORE/haiku", $opts{verbose}, 0777);
+ push(@corefiles,'haiku/haikuish.h');
+ }
}
foreach my $file (@corefiles) {
# HP-UX (at least) needs to maintain execute permissions
--
1.8.3.4
From 936c1f0486788b814578ea469f4441d1755dac71 Mon Sep 17 00:00:00 2001
From: Oliver Tappe <zooey@hirschkaefer.de>
Date: Sun, 22 Sep 2013 14:55:13 +0200
Subject: Fix handling of exit codes on Haiku
diff --git a/t/run/exit.t b/t/run/exit.t
index 02e57c6..e836410 100644
--- a/t/run/exit.t
+++ b/t/run/exit.t
@@ -55,18 +55,18 @@ is( ${^CHILD_ERROR_NATIVE}, $native_success, 'Normal exit ${^CHILD_ERROR_NATIVE
if (!$vms_exit_mode) {
my $posix_ok = eval { require POSIX; };
my $wait_macros_ok = defined &POSIX::WIFEXITED;
- eval { POSIX::WIFEXITED(${^CHILD_ERROR_NATIVE}) };
+ eval { POSIX::WIFEXITED($?) };
$wait_macros_ok = 0 if $@;
$exit = run('exit 42');
is( $exit >> 8, 42, 'Non-zero exit' );
is( $exit, $?, 'Non-zero exit $?' );
- isnt( !${^CHILD_ERROR_NATIVE}, 0, 'Non-zero exit ${^CHILD_ERROR_NATIVE}' );
+ isnt( ${^CHILD_ERROR_NATIVE}, 0, 'Non-zero exit ${^CHILD_ERROR_NATIVE}' );
SKIP: {
skip("No POSIX", 3) unless $posix_ok;
skip("No POSIX wait macros", 3) unless $wait_macros_ok;
- ok(POSIX::WIFEXITED(${^CHILD_ERROR_NATIVE}), "WIFEXITED");
- ok(!POSIX::WIFSIGNALED(${^CHILD_ERROR_NATIVE}), "WIFSIGNALED");
- is(POSIX::WEXITSTATUS(${^CHILD_ERROR_NATIVE}), 42, "WEXITSTATUS");
+ ok(POSIX::WIFEXITED($?), "WIFEXITED");
+ ok(!POSIX::WIFSIGNALED($?), "WIFSIGNALED");
+ is(POSIX::WEXITSTATUS($?), 42, "WEXITSTATUS");
}
SKIP: {
@@ -85,9 +85,9 @@ if (!$vms_exit_mode) {
SKIP: {
skip("No POSIX", 3) unless $posix_ok;
skip("No POSIX wait macros", 3) unless $wait_macros_ok;
- ok(!POSIX::WIFEXITED(${^CHILD_ERROR_NATIVE}), "WIFEXITED");
- ok(POSIX::WIFSIGNALED(${^CHILD_ERROR_NATIVE}), "WIFSIGNALED");
- is(POSIX::WTERMSIG(${^CHILD_ERROR_NATIVE}), 15, "WTERMSIG");
+ ok(!POSIX::WIFEXITED($?), "WIFEXITED");
+ ok(POSIX::WIFSIGNALED($?), "WIFSIGNALED");
+ is(POSIX::WTERMSIG($?), 15, "WTERMSIG");
}
}
--
1.8.3.4
From c8c19c0e4b6493dd5122749ba0f0d7d8b1b89117 Mon Sep 17 00:00:00 2001
From: Oliver Tappe <zooey@hirschkaefer.de>
Date: Sun, 22 Sep 2013 15:00:44 +0200
Subject: Fix include path of errno.h
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index b707911..7999ae4 100644
--- a/ext/Errno/Errno_pm.PL
+++ b/ext/Errno/Errno_pm.PL
@@ -143,7 +143,7 @@ sub get_files {
$file{$linux_errno_h} = 1;
} elsif ($^O eq 'haiku') {
# hidden in a special place
- $file{'/boot/develop/headers/posix/errno.h'} = 1;
+ $file{'/boot/system/develop/headers/posix/errno.h'} = 1;
} elsif ($^O eq 'vos') {
# avoid problem where cpp returns non-POSIX pathnames
--
1.8.3.4
From 46ed1ae1bc678bda0d0fe3efb589847798afab58 Mon Sep 17 00:00:00 2001
From: Oliver Tappe <zooey@hirschkaefer.de>
Date: Sat, 28 Sep 2013 13:46:42 +0200
Subject: Adjust ExtUtils::MakeMaker for PM-Haiku.
* MakeMaker-projects trying to install into 'site-perl' while specifying
PREFIX would end up using a wrong 'site-perl' prefix.
* Split MM_Haiku.pm off MM_BeOS.pm, implementing Haiku-specific overrides
for MakeMaker.
diff --git a/cpan/ExtUtils-MakeMaker/MANIFEST b/cpan/ExtUtils-MakeMaker/MANIFEST
index 72feb7d..8eb81f3 100644
--- a/cpan/ExtUtils-MakeMaker/MANIFEST
+++ b/cpan/ExtUtils-MakeMaker/MANIFEST
@@ -48,6 +48,7 @@ lib/ExtUtils/MM_BeOS.pm
lib/ExtUtils/MM_Cygwin.pm
lib/ExtUtils/MM_Darwin.pm
lib/ExtUtils/MM_DOS.pm
+lib/ExtUtils/MM_Haiku.pm
lib/ExtUtils/MM_MacOS.pm
lib/ExtUtils/MM_NW5.pm
lib/ExtUtils/MM_OS2.pm
diff --git a/cpan/ExtUtils-MakeMaker/NOTES b/cpan/ExtUtils-MakeMaker/NOTES
index cb29aec..bfa628c 100644
--- a/cpan/ExtUtils-MakeMaker/NOTES
+++ b/cpan/ExtUtils-MakeMaker/NOTES
@@ -80,9 +80,9 @@ The MM_* hierarchy
MM_Win95 MM_NW5
\ /
-MM_BeOS MM_Cygwin MM_OS2 MM_VMS MM_Win32 MM_DOS MM_UWIN
- \ | | | / / /
- ------------------------------------------------
+MM_BeOS MM_Cygwin MM_OS2 MM_VMS MM_Win32 MM_DOS MM_UWIN MM_Haiku
+ \ | | | / / / /
+ --------------------------------------------------------
| |
MM_Unix |
| |
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm
index 26ed594..dfeea45 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm
@@ -59,7 +59,8 @@ if( $^O eq 'MSWin32' ) {
$Is{UWIN} = $^O =~ /^uwin(-nt)?$/;
$Is{Cygwin} = $^O eq 'cygwin';
$Is{NW5} = $Config{osname} eq 'NetWare'; # intentional
-$Is{BeOS} = ($^O =~ /beos/i or $^O eq 'haiku');
+$Is{BeOS} = $^O =~ /beos/i;
+$Is{Haiku} = $^O eq 'haiku';
$Is{DOS} = $^O eq 'dos';
if( $Is{NW5} ) {
$^O = 'NetWare';
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Haiku.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Haiku.pm
new file mode 100644
index 0000000..81e5f99
--- /dev/null
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Haiku.pm
@@ -0,0 +1,70 @@
+package ExtUtils::MM_Haiku;
+
+use strict;
+
+=head1 NAME
+
+ExtUtils::MM_Haiku - methods to override UN*X behaviour in ExtUtils::MakeMaker
+
+=head1 SYNOPSIS
+
+ use ExtUtils::MM_Haiku; # Done internally by ExtUtils::MakeMaker if needed
+
+=head1 DESCRIPTION
+
+See ExtUtils::MM_Unix for a documentation of the methods provided
+there. This package overrides the implementation of these methods, not
+the semantics.
+
+=over 4
+
+=cut
+
+use ExtUtils::MakeMaker::Config;
+use File::Spec;
+require ExtUtils::MM_Any;
+require ExtUtils::MM_Unix;
+
+our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
+our $VERSION = '6.66';
+
+
+=item os_flavor
+
+Haiku is Haiku.
+
+=cut
+
+sub os_flavor {
+ return('Haiku');
+}
+
+=head3 init_INSTALL_from_PREFIX
+
+ $mm->init_INSTALL_from_PREFIX;
+
+=cut
+
+sub init_INSTALL_from_PREFIX {
+ my $self = shift;
+
+ # If a prefix has been given from outside, the default implementation
+ # will set PERLPREFIX, SITEPREFIX and VENDORPREFIX to identical values,
+ # but due to the way how Haiku's package management works, PERLPREFIX
+ # and VENDORPREFIX are not writable at all (as they're being populated
+ # from installed packages via package-fs). SITEPREFIX, however needs to
+ # be set to a path which can be written to (since site packages are
+ # expected to be installed "manually") - so we make sure it points
+ # to a 'non-packaged'-folder:
+ my $prefixGiven = $self->{PREFIX};
+ $self->SUPER::init_INSTALL_from_PREFIX();
+ if ($prefixGiven) {
+ $self->{SITEPREFIX} = '$(PREFIX)/non-packaged';
+ }
+}
+
+=back
+
+1;
+__END__
+
--
1.8.3.4
From f9458e30c41213d315721183c9f10c3605812f57 Mon Sep 17 00:00:00 2001
From: Oliver Tappe <zooey@hirschkaefer.de>
Date: Tue, 8 Oct 2013 22:16:37 +0200
Subject: Avoid using -rpath for dynamic modules.
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Haiku.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Haiku.pm
index 81e5f99..25ace13 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Haiku.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Haiku.pm
@@ -65,6 +65,33 @@ sub init_INSTALL_from_PREFIX {
=back
+=head3 init_others
+
+ $MM->init_others();
+
+Initializes the macro definitions having to do with compiling and
+linking used by tools_other() and places them in the $MM object.
+
+If there is no description, its the same as the parameter to
+WriteMakefile() documented in ExtUtils::MakeMaker.
+
+=cut
+
+sub init_others {
+ my $self = shift;
+
+ $self->SUPER::init_others();
+
+ # Don't use run-time paths for libraries required by dynamic
+ # modules on Haiku, as that wouldn't work should a library be moved
+ # (for instance because the package has been activated somewhere else).
+ $self->{LD_RUN_PATH} = "";
+
+ return;
+}
+
+=back
+
1;
__END__
--
1.8.3.4
From 5d6dde9cb0022bdeee490b383ff1991eacc3b9cc Mon Sep 17 00:00:00 2001
From: Oliver Tappe <zooey@hirschkaefer.de>
Date: Tue, 8 Oct 2013 22:17:26 +0200
Subject: Add script sitecustomize.pl for setting up @INC as we need it.
diff --git a/sitecustomize.pl b/sitecustomize.pl
new file mode 100644
index 0000000..a321e51
--- /dev/null
+++ b/sitecustomize.pl
@@ -0,0 +1,36 @@
+#! perl
+
+use Config;
+
+# Remove all compiled-in paths referring to Perl's installation dir
+# and replace them with a static set of paths that implement the intended
+# searching order:
+my @ourINC = (
+ "/boot/home/config/lib/perl5/$Config{version}/$Config{archname}",
+ "/boot/home/config/lib/perl5/$Config{version}",
+ "/boot/home/config/non-packaged/lib/perl5/site_perl/$Config{version}/$Config{archname}",
+ "/boot/home/config/non-packaged/lib/perl5/site_perl/$Config{version}",
+ "/boot/home/config/lib/perl5/vendor_perl/$Config{version}/$Config{archname}",
+ "/boot/home/config/lib/perl5/vendor_perl/$Config{version}",
+ "/boot/home/config/lib/perl5/vendor_perl",
+ "/boot/system/lib/perl5/$Config{version}/$Config{archname}",
+ "/boot/system/lib/perl5/$Config{version}",
+ "/boot/system/non-packaged/lib/perl5/site_perl/$Config{version}/$Config{archname}",
+ "/boot/system/non-packaged/lib/perl5/site_perl/$Config{version}",
+ "/boot/system/lib/perl5/vendor_perl/$Config{version}/$Config{archname}",
+ "/boot/system/lib/perl5/vendor_perl/$Config{version}",
+ "/boot/system/lib/perl5/vendor_perl",
+);
+my @newINC;
+my $removedPerlPaths;
+foreach my $inc (@INC) {
+ if ($inc =~ m[^/packages/perl-$Config{version}-\d+/.self/]o) {
+ if (! $removedPerlPaths) {
+ push @newINC, @ourINC;
+ $removedPerlPaths = 1;
+ }
+ next;
+ }
+ push @newINC, $inc;
+}
+@INC = @newINC;
--
1.8.3.4
From f33151a4535dd22acaae24d4b16da3115b6cef64 Mon Sep 17 00:00:00 2001
From: Oliver Tappe <zooey@hirschkaefer.de>
Date: Wed, 9 Oct 2013 20:29:38 +0200
Subject: Fix initialization check for CPAN.
* On Haiku, only the site-lib directories will ever be writable,
as the others read-only. This avoids CPAN asking for a way to
circumvent unwritable lib dirs.
diff --git a/cpan/CPAN/lib/CPAN/FirstTime.pm b/cpan/CPAN/lib/CPAN/FirstTime.pm
index b099b04..55bf194 100644
--- a/cpan/CPAN/lib/CPAN/FirstTime.pm
+++ b/cpan/CPAN/lib/CPAN/FirstTime.pm
@@ -2010,6 +2010,12 @@ sub _print_urllist {
}
sub _can_write_to_libdirs {
+ if ($^O eq 'haiku') {
+ # on Haiku, the other dirs are never writable, as they are
+ # being populated by packagefs
+ return -w $Config{installsitelib}
+ && -w $Config{installsitearch}
+ }
return -w $Config{installprivlib}
&& -w $Config{installarchlib}
&& -w $Config{installsitelib}
--
1.8.3.4
From 6fbbb6e99558e992f373cddd6ae02a3656ad7ce0 Mon Sep 17 00:00:00 2001
From: Oliver Tappe <zooey@hirschkaefer.de>
Date: Sun, 13 Oct 2013 17:32:50 +0200
Subject: Add support for HAIKU_USE_VENDOR_DIRECTORIES.
* Adjust MakeMaker to automatically switch to vendor directories if
requested via HAIKU_USE_VENDOR_DIRECTORIES.
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Haiku.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Haiku.pm
index 25ace13..0be8c3d 100644
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Haiku.pm
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Haiku.pm
@@ -29,21 +29,20 @@ our @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix );
our $VERSION = '6.66';
-=item os_flavor
-
-Haiku is Haiku.
-
-=cut
-
sub os_flavor {
return('Haiku');
}
-=head3 init_INSTALL_from_PREFIX
+sub init_main {
+ my $self = shift;
- $mm->init_INSTALL_from_PREFIX;
+ # switch to vendor directories if requested.
+ if ($ENV{'HAIKU_USE_VENDOR_DIRECTORIES'} eq '1') {
+ $self->{INSTALLDIRS} ||= 'vendor';
+ }
-=cut
+ $self->SUPER::init_main();
+}
sub init_INSTALL_from_PREFIX {
my $self = shift;
@@ -63,20 +62,6 @@ sub init_INSTALL_from_PREFIX {
}
}
-=back
-
-=head3 init_others
-
- $MM->init_others();
-
-Initializes the macro definitions having to do with compiling and
-linking used by tools_other() and places them in the $MM object.
-
-If there is no description, its the same as the parameter to
-WriteMakefile() documented in ExtUtils::MakeMaker.
-
-=cut
-
sub init_others {
my $self = shift;
@@ -90,8 +75,6 @@ sub init_others {
return;
}
-=back
-
1;
__END__
--
1.8.3.4

View File

@@ -1,24 +0,0 @@
DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
HOMEPAGE="http://www.perl.org/"
SRC_URI="http://www.cpan.org/src/perl-5.10.1.tar.gz"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
CHECKSUM_MD5="b9b2fdb957f50ada62d73f43ee75d044"
BUILD {
cd perl-5.10.1
./Configure -Dcf_email=zooey@hirschkaefer.de -Uusenm -de
make
}
INSTALL {
cd perl-5.10.1
make install
cd "${DESTDIR}`finddir B_COMMON_BIN_DIRECTORY`"
chmod a+x perl psed pstruct perlthanks
cd "${DESTDIR}`finddir B_COMMON_LIB_DIRECTORY`"
ln -sf perl5/5.10.1/BePC-haiku/CORE/libperl.so .
}
LICENSE="GNU GPL v1
Artistic (Perl)"
COPYRIGHT="1993-2009 Larry Wall and others"

View File

@@ -0,0 +1,128 @@
SUMMARY="Larry Wall's Practical Extraction and Report Language"
DESCRIPTION="
Perl was originally developed by Larry Wall in 1987 as a general-purpose
Unix scripting language to make report processing easier.
Perl borrows features from other programming languages including C, shell
scripting (sh), AWK, and sed. The language provides powerful text
processing facilities without the arbitrary data-length limits of many
contemporary Unix tools, facilitating easy manipulation of text files.
In addition to CGI, Perl is used for graphics programming, system
administration, network programming, finance, bioinformatics, and other
applications. Perl is nicknamed 'the Swiss Army chainsaw of scripting
languages' because of its flexibility and power, and possibly also
because of its perceived 'ugliness'.
"
HOMEPAGE="http://www.perl.org/"
COPYRIGHT="1993-2009 Larry Wall and others"
LICENSE="GNU GPL v1
Artistic (Perl)"
SRC_URI="http://www.cpan.org/src/perl-5.10.1.tar.gz"
CHECKSUM_MD5="b9b2fdb957f50ada62d73f43ee75d044"
REVISION="6"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PATCHES="perl-5.10.1.patch"
PROVIDES="
perl = $portVersion compat >= 5
cmd:a2p = $portVersion compat >= 5
cmd:c2ph = $portVersion compat >= 5
cmd:config_data = $portVersion compat >= 5
cmd:corelist = $portVersion compat >= 5
cmd:cpan = $portVersion compat >= 5
cmd:cpan2dist = $portVersion compat >= 5
cmd:cpanp = $portVersion compat >= 5
cmd:cpanp_run_perl = $portVersion compat >= 5
cmd:dprofpp = $portVersion compat >= 5
cmd:enc2xs = $portVersion compat >= 5
cmd:find2perl = $portVersion compat >= 5
cmd:h2ph = $portVersion compat >= 5
cmd:h2xs = $portVersion compat >= 5
cmd:instmodsh = $portVersion compat >= 5
cmd:libnetcfg = $portVersion compat >= 5
cmd:perl = $portVersion compat >= 5
cmd:perl5.10.1 = $portVersion compat >= 5
cmd:perlbug = $portVersion compat >= 5
cmd:perldoc = $portVersion compat >= 5
cmd:perlivp = $portVersion compat >= 5
cmd:perlthanks = $portVersion compat >= 5
cmd:piconv = $portVersion compat >= 5
cmd:pl2pm = $portVersion compat >= 5
cmd:pod2html = $portVersion compat >= 5
cmd:pod2latex = $portVersion compat >= 5
cmd:pod2man = $portVersion compat >= 5
cmd:pod2text = $portVersion compat >= 5
cmd:pod2usage = $portVersion compat >= 5
cmd:podchecker = $portVersion compat >= 5
cmd:podselect = $portVersion compat >= 5
cmd:prove = $portVersion compat >= 5
cmd:psed = $portVersion compat >= 5
cmd:pstruct = $portVersion compat >= 5
cmd:ptar = $portVersion compat >= 5
cmd:ptardiff = $portVersion compat >= 5
cmd:s2p = $portVersion compat >= 5
cmd:shasum = $portVersion compat >= 5
cmd:splain = $portVersion compat >= 5
cmd:xsubpp = $portVersion compat >= 5
lib:libperl = $portVersion compat >= 5
"
REQUIRES="
haiku >= $haikuVersion
"
BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
cmd:gcc
cmd:ld
cmd:make
cmd:sed
"
GLOBAL_WRITABLE_FILES="
non-packaged/lib/perl5/site_perl/5.10.1/BePC-haiku directory
"
SOURCE_DIR="$portVersionedName"
BUILD_PACKAGE_ACTIVATION_PHASE=INSTALL
BUILD()
{
./Configure \
-Dprefix=$prefix \
-Dprivlib=$prefix/lib/perl5/core_perl/$portVersion \
-Dsiteprefix=$prefix/non-packaged \
-Dsitelib=$prefix/non-packaged/lib/perl5/site_perl/$portVersion \
-Dvendorprefix=$prefix \
-Dvendorlib=$prefix/lib/perl5/vendor_perl/$portVersion \
-Dcf_email=zooey@hirschkaefer.de \
-Uusenm -Duseshrplib -Uusemymalloc \
-Dlibpth="$(finddir B_USER_LIB_DIRECTORY) $(finddir B_COMMON_LIB_DIRECTORY) $(finddir B_SYSTEM_LIB_DIRECTORY)" \
-Dusrinc="$(finddir B_SYSTEM_DEVELOP_DIRECTORY)/headers/posix" \
-Dlocinc="$(finddir B_USER_CONFIG_DIRECTORY)/develop/headers $(finddir B_COMMON_DEVELOP_DIRECTORY)/headers $(finddir B_SYSTEM_DEVELOP_DIRECTORY)/headers" \
-Dlibc="$(finddir B_SYSTEM_LIB_DIRECTORY)/libroot.so" \
-Dlibs=-lnetwork -Dcc=gcc -Dld=gcc \
-Ud_link -Ddont_use_nlink -Ud_syserrlst \
-Dldlibpthname=LIBRARY_PATH -Dstartperl="#! perl" -de
# force-remove path from sed
sed -i -e 's/LOC_SED\s*"\/boot\/common\/bin\/sed/LOC_SED "sed/' config.h
make $jobArgs
}
INSTALL()
{
eval $(./miniperl "-I$relativeLibDir" -V:archname)
make install
cd "$binDir"
chmod a+x perl psed pstruct perlthanks
cd "$libDir"
ln -sf perl5/core_perl/5.10.1/$archname/CORE/libperl.so .
# The "site-perl" stuff is automatically created, when necessary, so we can
# as well remove it.
rm -r $prefix/non-packaged
}

View File

@@ -0,0 +1,143 @@
SUMMARY="Larry Wall's Practical Extraction and Report Language"
DESCRIPTION="
Perl was originally developed by Larry Wall in 1987 as a general-purpose
Unix scripting language to make report processing easier.
Perl borrows features from other programming languages including C, shell
scripting (sh), AWK, and sed. The language provides powerful text
processing facilities without the arbitrary data-length limits of many
contemporary Unix tools, facilitating easy manipulation of text files.
In addition to CGI, Perl is used for graphics programming, system
administration, network programming, finance, bioinformatics, and other
applications. Perl is nicknamed 'the Swiss Army chainsaw of scripting
languages' because of its flexibility and power, and possibly also
because of its perceived 'ugliness'.
"
HOMEPAGE="http://www.perl.org/"
COPYRIGHT="1993-2009 Larry Wall and others"
LICENSE="GNU GPL v1
Artistic (Perl)"
SRC_URI="http://www.cpan.org/src/perl-5.18.1.tar.gz"
CHECKSUM_MD5="304cb5bd18e48c44edd6053337d3386d"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PATCHES="perl-5.18.1.patchset"
PROVIDES="
# assume that any perl commands are backwards compatible to version 5.
perl = $portVersion compat >= 5
cmd:a2p = $portVersion compat >= 5
cmd:c2ph = $portVersion compat >= 5
cmd:config_data = $portVersion compat >= 5
cmd:corelist = $portVersion compat >= 5
cmd:cpan = $portVersion compat >= 5
cmd:cpan2dist = $portVersion compat >= 5
cmd:cpanp = $portVersion compat >= 5
cmd:cpanp_run_perl = $portVersion compat >= 5
cmd:dprofpp = $portVersion compat >= 5
cmd:enc2xs = $portVersion compat >= 5
cmd:find2perl = $portVersion compat >= 5
cmd:h2ph = $portVersion compat >= 5
cmd:h2xs = $portVersion compat >= 5
cmd:instmodsh = $portVersion compat >= 5
cmd:json_pp = $portVersion compat >= 5
cmd:libnetcfg = $portVersion compat >= 5
cmd:perl = $portVersion compat >= 5
cmd:perl$portVersion = $portVersion compat >= 5
cmd:perlbug = $portVersion compat >= 5
cmd:perldoc = $portVersion compat >= 5
cmd:perlivp = $portVersion compat >= 5
cmd:perlthanks = $portVersion compat >= 5
cmd:piconv = $portVersion compat >= 5
cmd:pl2pm = $portVersion compat >= 5
cmd:pod2html = $portVersion compat >= 5
cmd:pod2latex = $portVersion compat >= 5
cmd:pod2man = $portVersion compat >= 5
cmd:pod2text = $portVersion compat >= 5
cmd:pod2usage = $portVersion compat >= 5
cmd:podchecker = $portVersion compat >= 5
cmd:podselect = $portVersion compat >= 5
cmd:prove = $portVersion compat >= 5
cmd:psed = $portVersion compat >= 5
cmd:pstruct = $portVersion compat >= 5
cmd:ptar = $portVersion compat >= 5
cmd:ptardiff = $portVersion compat >= 5
cmd:ptargrep = $portVersion compat >= 5
cmd:s2p = $portVersion compat >= 5
cmd:shasum = $portVersion compat >= 5
cmd:splain = $portVersion compat >= 5
cmd:xsubpp = $portVersion compat >= 5
cmd:zipdetails = $portVersion compat >= 5
# vendor_perl refers to the path to packaged perl modules, which includes
# the full perl version, so it isn't backwards compatible to anything else.
vendor_perl = $portVersion
# It is unclear which kind of backwards compatibility libperl.so
# implements, so we assume none.
lib:libperl = $portVersion
"
REQUIRES="
haiku >= $haikuVersion
"
BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
cmd:gcc
cmd:ld
cmd:make
cmd:sed
"
perlArchName="$(uname -m)-haiku"
GLOBAL_WRITABLE_FILES="
non-packaged/lib/perl5/site_perl/$portVersion/sitecustomize.pl keep-old
non-packaged/lib/perl5/site_perl/$portVersion/$perlArchName directory keep-old
"
SOURCE_DIR="$portVersionedName"
BUILD_PACKAGE_ACTIVATION_PHASE=INSTALL
BUILD()
{
./Configure \
-Dprefix=$prefix \
-Dprivlib=$prefix/lib/perl5/$portVersion \
-Dsiteprefix=$prefix/non-packaged \
-Dsitelib=$prefix/non-packaged/lib/perl5/site_perl/$portVersion \
-Dvendorprefix=$prefix \
-Dvendorlib=$prefix/lib/perl5/vendor_perl/$portVersion \
-Dcf_email=zooey@hirschkaefer.de \
-Uusenm -Duseshrplib -Uusemymalloc \
-Dlibpth="$(finddir B_USER_DEVELOP_DIRECTORY)/lib $(finddir B_SYSTEM_DEVELOP_DIRECTORY)/lib" \
-Dusrinc="$(finddir B_SYSTEM_DEVELOP_DIRECTORY)/headers/posix" \
-Dlocinc="$(finddir B_USER_CONFIG_DIRECTORY)/develop/headers $(finddir B_SYSTEM_DEVELOP_DIRECTORY)/headers" \
-Dlibc="'$(finddir B_SYSTEM_LIB_DIRECTORY)/libroot.so'" \
-Dlibs=-lnetwork -Dcc=gcc -Dld=gcc \
-Ud_link -Ddont_use_nlink -Ud_syserrlst \
-Dldlibpthname=LIBRARY_PATH -Dstartperl="#! perl" \
-Dccdlflags="-Wl,-rpath=$libDir/perl5/$portVersion/$perlArchName/CORE" \
-Dusesitecustomize \
-de
# force-remove path from sed
sed -i -e 's/LOC_SED\s*"\/bin\/sed/LOC_SED "sed/' config.h
make $jobArgs
}
INSTALL()
{
make install
chmod a+x $binDir/{perl,psed,pstruct,perlthanks}
# copy script into site_perl that takes care of massaging @INC into what we need.
cp sitecustomize.pl $prefix/non-packaged/lib/perl5/site_perl/$portVersion/
}
TEST()
{
make test
}

View File

@@ -5,7 +5,8 @@ CHECKSUM_MD5="2c069d8f690933e3bf6a8741ed818150"
REVISION="1"
STATUS_HAIKU="broken"
DEPEND="dev-libs/libpcre >= 8.00"
BUILD {
BUILD()
{
cd php-5.3.4
cat $(aclocal --print-ac-dir)/libtool.m4 > build/libtool.m4
autoreconf
@@ -13,7 +14,8 @@ BUILD {
make
}
INSTALL {
INSTALL()
{
cd php-5.3.4
make install
}

View File

@@ -6,7 +6,8 @@ REVISION="1"
STATUS_HAIKU="stable"
DEPEND="dev-libs/libpcre >= 8.00
"
BUILD {
BUILD()
{
cd php-5.3.5
libtoolize --force --copy --install
aclocal
@@ -40,12 +41,14 @@ BUILD {
make
}
INSTALL {
INSTALL()
{
cd php-5.3.5
make install INSTALL_ROOT=${DESTDIR}
}
TEST {
TEST()
{
cd php-5.3.5
make test
}

View File

@@ -1,2 +0,0 @@
#!/bin/sh
find . -name '*.py' -exec sed -i -e 's|/usr/bin/env|/bin/env|g' {} \;

View File

@@ -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:

View File

@@ -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:

View File

@@ -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(':')

View File

@@ -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']

View 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

View File

@@ -1,26 +0,0 @@
DESCRIPTION="python - An interpreted, interactive, object-oriented programming language"
HOMEPAGE="http://www.python.org"
LICENSE="Python"
COPYRIGHT="1990-2008, Python Software Foundation"
SRC_URI="http://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz"
CHECKSUM_MD5="ad47b23778f64edadaaa8b5534986eed"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
BUILD {
cd Python-2.5.4/Modules/_ctypes/libffi
libtoolize --force --copy --install
aclocal
autoconf
cd ../../..
libtoolize --force --copy --install
aclocal
autoconf
./configure --prefix=`finddir B_COMMON_DIRECTORY` --enable-shared LDFLAGS=-L/boot/common/lib CFLAGS=-I/boot/develop/headers/3rdparty
make
}
INSTALL {
cd Python-2.5.4
make install
}

View File

@@ -1,25 +0,0 @@
DESCRIPTION="python - An interpreted, interactive, object-oriented programming language"
HOMEPAGE="http://www.python.org"
SRC_URI="http://www.python.org/ftp/python/2.6.4/Python-2.6.4.tgz"
CHECKSUM_MD5="17dcac33e4f3adb69a57c2607b6de246"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
BUILD {
cd Python-2.6.4/Modules/_ctypes/libffi
libtoolize --force --copy --install
cd ../../..
echo "AC_CONFIG_MACRO_DIR([m4])" >> configure.in
libtoolize --force --copy --install
aclocal
autoconf
./configure --prefix=`finddir B_COMMON_DIRECTORY` --enable-shared CFLAGS=-I/boot/develop/headers/3rdparty
make
}
INSTALL {
cd Python-2.6.4
make install
}
LICENSE="Python"
COPYRIGHT="1990-2010, Python Software Foundation"

View File

@@ -1,25 +0,0 @@
DESCRIPTION="python - An interpreted, interactive, object-oriented programming language"
HOMEPAGE="http://www.python.org"
SRC_URI="http://www.python.org/ftp/python/2.6.5/Python-2.6.5.tgz"
CHECKSUM_MD5="cd04b5b9383b6c1fccdaa991af762cf4"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
BUILD {
cd Python-2.6.5/Modules/_ctypes/libffi
libtoolize --force --copy --install
cd ../../..
echo "AC_CONFIG_MACRO_DIR([m4])" >> configure.in
libtoolize --force --copy --install
aclocal
autoconf
./configure --prefix=`finddir B_COMMON_DIRECTORY` --enable-shared LDFLAGS=-L/boot/common/lib CFLAGS=-I/boot/develop/headers/3rdparty
make
}
INSTALL {
cd Python-2.6.5
make install
}
LICENSE="Python"
COPYRIGHT="1990-2010, Python Software Foundation"

View File

@@ -1,38 +0,0 @@
DESCRIPTION="python - An interpreted, interactive, object-oriented programming language"
HOMEPAGE="http://www.python.org"
SRC_URI="http://www.python.org/ftp/python/2.6.6/Python-2.6.6.tar.bz2"
CHECKSUM_MD5="cf4e6881bb84a7ce6089e4a307f71f14"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="sys-libs/readline >= 6.0"
BUILD {
cd Python-2.6.6/Modules/_ctypes/libffi
libtoolize --force --copy --install
cd ../../..
echo "AC_CONFIG_MACRO_DIR([m4])" >> configure.in
libtoolize --force --copy --install
aclocal
autoconf
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
--enable-shared LDFLAGS=-L/boot/common/lib \
--mandir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man \
CFLAGS=-I/boot/develop/headers/3rdparty
make
}
INSTALL {
cd Python-2.6.6
make install
}
TEST {
cd Python-2.6.6
cd Lib/test
rm test_asynchat.py # this one stalls, so skip it for now
rm test_multiprocessing.py # this one stalls, so skip it for now
python regrtest.py
}
LICENSE="Python"
COPYRIGHT="1990-2010, Python Software Foundation"

View File

@@ -1,38 +0,0 @@
DESCRIPTION="python - An interpreted, interactive, object-oriented programming language"
HOMEPAGE="http://www.python.org"
SRC_URI="http://www.python.org/ftp/python/2.6.7/Python-2.6.7.tar.bz2"
CHECKSUM_MD5="d40ef58ed88438a870bbeb0ac5d4217b"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="sys-libs/readline >= 6.0"
BUILD {
cd Python-2.6.7/Modules/_ctypes/libffi
libtoolize --force --copy --install
cd ../../..
echo "AC_CONFIG_MACRO_DIR([m4])" >> configure.in
libtoolize --force --copy --install
aclocal
autoconf
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
--enable-shared LDFLAGS=-L/boot/common/lib \
--mandir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man \
CFLAGS=-I/boot/develop/headers/3rdparty
make
}
INSTALL {
cd Python-2.6.7
make install
}
TEST {
cd Python-2.6.7
cd Lib/test
rm test_asynchat.py # this one stalls, so skip it for now
rm test_multiprocessing.py # this one stalls, so skip it for now
python regrtest.py
}
LICENSE="Python"
COPYRIGHT="1990-2011, Python Software Foundation"

View File

@@ -1,38 +0,0 @@
DESCRIPTION="python - An interpreted, interactive, object-oriented programming language"
HOMEPAGE="http://www.python.org"
SRC_URI="http://www.python.org/ftp/python/2.6.8/Python-2.6.8.tar.bz2"
CHECKSUM_MD5="c6e0420a21d8b23dee8b0195c9b9a125"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="sys-libs/readline >= 6.0"
BUILD {
cd Python-2.6.8/Modules/_ctypes/libffi
libtoolize --force --copy --install
cd ../../..
echo "AC_CONFIG_MACRO_DIR([m4])" >> configure.in
libtoolize --force --copy --install
aclocal
autoconf
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
--enable-shared LDFLAGS=-L/boot/common/lib \
--mandir=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`/man \
CFLAGS=-I/boot/develop/headers/3rdparty
make
}
INSTALL {
cd Python-2.6.8
make install
}
TEST {
cd Python-2.6.8
cd Lib/test
rm test_asynchat.py # this one stalls, so skip it for now
rm test_multiprocessing.py # this one stalls, so skip it for now
python regrtest.py
}
LICENSE="Python"
COPYRIGHT="1990-2012, Python Software Foundation"

View File

@@ -0,0 +1,112 @@
SUMMARY="An interpreted, interactive, object-oriented programming language"
DESCRIPTION="Python is a programming language that lets you work more quickly and integrate your systems more effectively. You can learn to use Python and see almost immediate gains in productivity and lower maintenance costs.
Python runs on Windows, Linux/Unix, Mac OS X, and has been ported to the Java and .NET virtual machines.
Python is free to use, even for commercial products, because of its OSI-approved open source license."
HOMEPAGE="http://www.python.org"
LICENSE="Python"
COPYRIGHT="1990-2012, Python Software Foundation"
SRC_URI="http://www.python.org/ftp/python/2.6.8/Python-2.6.8.tar.bz2"
CHECKSUM_MD5="c6e0420a21d8b23dee8b0195c9b9a125"
REVISION="6"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PATCHES="python-2.6.8.patchset"
PROVIDES="
python = $portVersion compat >= 2.6
cmd:2to3 = $portVersion compat >= 2.6
cmd:idle = $portVersion compat >= 2.6
cmd:pydoc = $portVersion compat >= 2.6
cmd:python = $portVersion compat >= 2.6
cmd:python2.6 = $portVersion compat >= 2.6
cmd:python2.6_config = $portVersion compat >= 2.6
cmd:python_config = $portVersion compat >= 2.6
cmd:smtpd.py = $portVersion compat >= 2.6
devel:libpython2.6 = 1.0
lib:libpython2.6 = 1.0
"
REQUIRES="
haiku >= $haikuVersion
cmd:nano
lib:libbz2
lib:libncurses
lib:libssl
lib:libreadline
lib:libsqlite3
lib:libz
"
BUILD_REQUIRES="
devel:libbz2
devel:libncurses
devel:libssl
devel:libreadline
devel:libsqlite3
devel:libz
"
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
cmd:aclocal
cmd:autoconf
cmd:find
cmd:gcc
cmd:ld
cmd:libtoolize
cmd:make
cmd:nano
"
SOURCE_DIR="Python-2.6.8"
GLOBAL_WRITABLE_FILES="
non-packaged/lib/python2.6/site-packages directory keep-old
"
PATCH()
{
echo "AC_CONFIG_MACRO_DIR([m4])" >> configure.in
find . -name '*.py' -exec sed -i -e 's|/usr/bin/env|/bin/env|g' {} \;
}
BUILD()
{
cd Modules/_ctypes/libffi
libtoolize --force --copy --install
cd ../../..
libtoolize --force --copy --install
aclocal
autoconf
runConfigure ./configure \
--enable-shared \
--enable-unicode=ucs4
# prevent make from rebuilding stuff that requires python
touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLibs libpython2.6
mkdir -p $prefix/lib/python2.6/vendor-packages
echo 'This directory contains packaged python modules.' \
>$prefix/lib/python2.6/vendor-packages/README
mkdir -p $prefix/non-packaged/lib/python2.6
mv $prefix/lib/python2.6/site-packages $prefix/non-packaged/lib/python2.6/
}
TEST()
{
cd Lib/test
rm test_asynchat.py # this one stalls, so skip it for now
rm test_multiprocessing.py # this one stalls, so skip it for now
python regrtest.py
}

View File

@@ -5,7 +5,8 @@ CHECKSUM_MD5="aa27bc25725137ba155910bd8e5ddc4f"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="sys-libs/readline >= 6.0"
BUILD {
BUILD()
{
cd Python-2.7.1/Modules/_ctypes/libffi
libtoolize --force --copy --install
cd ../../..
@@ -20,12 +21,14 @@ BUILD {
make
}
INSTALL {
INSTALL()
{
cd Python-2.7.1
make install
}
TEST {
TEST()
{
cd Python-2.7.1
cd Lib/test
rm test_asynchat.py # this one stalls, so skip it for now

View File

@@ -5,7 +5,8 @@ CHECKSUM_MD5="92e94b5b6652b96349d6362b8337811d"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="sys-libs/readline >= 6.0"
BUILD {
BUILD()
{
cd Python-3.2/Modules/_ctypes/libffi
libtoolize --force --copy --install
cd ../../..
@@ -21,12 +22,14 @@ BUILD {
make
}
INSTALL {
INSTALL()
{
cd Python-3.2
make install
}
TEST {
TEST()
{
cd Python-3.2
cd Lib/test
rm test_asynchat.py # this one stalls, so skip it for now

View File

@@ -6,7 +6,8 @@ REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
BUILD {
BUILD()
{
cd r3-master/make
wget http://metaeducation.com/media/shared/haiku/r3-make.zip
unzip r3-make.zip
@@ -15,13 +16,15 @@ BUILD {
make
}
INSTALL {
INSTALL()
{
cd r3-master/make
mkdir -p $DESTDIR`finddir B_COMMON_BIN_DIRECTORY`
install -m 0755 r3 $DESTDIR`finddir B_COMMON_BIN_DIRECTORY`/rebol
}
TEST {
TEST()
{
mkdir -p tests
cd tests
wget -N https://github.com/rebolsource/rebol-test/archive/master.zip

View File

@@ -5,7 +5,8 @@ CHECKSUM_MD5="515bfd965814e718c0943abf3dde5494"
REVISION="2"
STATUS_HAIKU="stable"
DEPEND="dev-libs/libedit >= 20100424"
BUILD {
BUILD()
{
cd ruby-1.9.1-p243
autoconf
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
@@ -14,7 +15,8 @@ BUILD {
make
}
INSTALL {
INSTALL()
{
cd ruby-1.9.1-p243
make install
}

View File

@@ -0,0 +1,5 @@
The SWI-Prolog Prolog libraries
Lacking a satisfactory technical solution to handle article 6 of the LGPL, this license cannot be used for the Prolog source code that is part of the SWI-Prolog system (both libraries and kernel code). This situation is comparable to libgcc, the runtime library used with the GNU C-compiler. Therefore, we use the same proven license terms as this library. The libgcc license is the GPL, accompanied with a special exception. Below we rephrased this exception adjusted to our needs:
As a special exception, if you link this library with other files, compiled with a Free Software compiler, to produce an executable, this library does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License.

View File

@@ -0,0 +1,68 @@
diff -Naur pl-6.0.2/src/configure.in pl-6.0.2-haiku/src/configure.in
--- pl-6.0.2/src/configure.in 2012-03-04 13:12:01.001835008 +0000
+++ pl-6.0.2-haiku/src/configure.in 2012-08-20 21:39:21.649330688 +0100
@@ -689,6 +689,10 @@
AC_DEFINE(_THREAD_SAFE, 1,
[Required in FreeBSD for compiling thread-safe code])
;;
+ *haiku*)
+ pthread_ok=true
+ CFLAGS="$CFLAGS -lroot"
+ ;;
*-win32|*-win64)
pthread_ok=true
AC_CHECK_LIB(pthreadGC2, pthread_create)
diff -Naur pl-6.0.2/src/os/pl-files.c pl-6.0.2-haiku/src/os/pl-files.c
--- pl-6.0.2/src/os/pl-files.c 2012-03-04 13:12:01.011272192 +0000
+++ pl-6.0.2-haiku/src/os/pl-files.c 2012-08-23 14:45:48.981204992 +0100
@@ -239,7 +239,7 @@
return TRUE;
}
-#ifdef __unix__ /* doesn't work on most not Unix's */
+#if defined(__unix__) || defined(__HAIKU__) /* doesn't work on most not Unix's */
{ statstruct buf1;
statstruct buf2;
char tmp[MAXPATHLEN];
diff -Naur pl-6.0.2/src/os/pl-os.c pl-6.0.2-haiku/src/os/pl-os.c
--- pl-6.0.2/src/os/pl-os.c 2012-03-04 13:12:01.011796480 +0000
+++ pl-6.0.2-haiku/src/os/pl-os.c 2012-08-23 16:02:11.794034176 +0100
@@ -590,7 +590,7 @@
}
retry:
-#ifdef __unix__
+#if defined(__unix__) || defined(__HAIKU__)
{ static int MTOK_temp_counter = 0;
const char *sep = id[0] ? "_" : "";
@@ -732,7 +732,7 @@
}
#endif /* O_HPFS */
-#ifdef __unix__
+#if defined(__unix__) || defined(__HAIKU__)
char *
PrologPath(const char *p, char *buf, size_t len)
{ strncpy(buf, p, len);
@@ -2436,7 +2436,7 @@
return strcpy(buffer, file ? file : buf);
}
-#ifdef __unix__
+#if defined(__unix__) || defined(__HAIKU__)
static char *
okToExec(const char *s)
{ statstruct stbuff;
diff -Naur pl-6.0.2/src/pl-term.c pl-6.0.2-haiku/src/pl-term.c
--- pl-6.0.2/src/pl-term.c 2012-03-04 13:12:01.023592960 +0000
+++ pl-6.0.2-haiku/src/pl-term.c 2012-08-08 20:03:23.111673344 +0100
@@ -296,7 +296,7 @@
term_t r = A1;
term_t c = A2;
-#ifdef __unix__
+#if defined(__unix__) || defined(__HAIKU__)
int iorval;
#ifdef TIOCGSIZE

View File

@@ -0,0 +1,67 @@
diff -Naur pl-6.2.0/src/configure.in pl-6.2.0-haiku/src/configure.in
--- pl-6.2.0/src/configure.in 2012-08-21 13:12:53.016777216 +0100
+++ pl-6.2.0-haiku/src/configure.in 2012-08-23 17:06:25.987758592 +0100
@@ -728,6 +728,9 @@
AC_DEFINE(_THREAD_SAFE, 1,
[Required in FreeBSD for compiling thread-safe code])
;;
+ *-haiku*)
+ pthread_ok=true
+ ;;
*-win32|*-win64)
pthread_ok=true
AC_CHECK_LIB(pthreadGC2, pthread_create)
diff -Naur pl-6.2.0/src/os/pl-files.c pl-6.2.0-haiku/src/os/pl-files.c
--- pl-6.2.0/src/os/pl-files.c 2012-08-21 13:12:53.026214400 +0100
+++ pl-6.2.0-haiku/src/os/pl-files.c 2012-08-23 17:07:04.695992320 +0100
@@ -302,7 +302,7 @@
return TRUE;
}
-#ifdef __unix__ /* doesn't work on most not Unix's */
+#if defined(__unix__) || defined(__HAIKU__) /* doesn't work on most not Unix's */
{ statstruct buf1;
statstruct buf2;
char tmp[MAXPATHLEN];
diff -Naur pl-6.2.0/src/os/pl-os.c pl-6.2.0-haiku/src/os/pl-os.c
--- pl-6.2.0/src/os/pl-os.c 2012-08-21 13:12:53.027000832 +0100
+++ pl-6.2.0-haiku/src/os/pl-os.c 2012-08-23 17:09:14.962330624 +0100
@@ -601,7 +601,7 @@
}
retry:
-#ifdef __unix__
+#if defined(__unix__) || defined(__HAIKU__)
{ static int MTOK_temp_counter = 0;
const char *sep = id[0] ? "_" : "";
@@ -743,7 +743,7 @@
}
#endif /* O_HPFS */
-#ifdef __unix__
+#if defined(__unix__) || defined(__HAIKU__)
char *
PrologPath(const char *p, char *buf, size_t len)
{ strncpy(buf, p, len);
@@ -2507,7 +2507,7 @@
return strcpy(buffer, file ? file : buf);
}
-#ifdef __unix__
+#if defined(__unix__) || defined(__HAIKU__)
static char *
okToExec(const char *s)
{ statstruct stbuff;
diff -Naur pl-6.2.0/src/pl-term.c pl-6.2.0-haiku/src/pl-term.c
--- pl-6.2.0/src/pl-term.c 2012-08-21 13:12:53.038535168 +0100
+++ pl-6.2.0-haiku/src/pl-term.c 2012-08-23 17:09:57.306708480 +0100
@@ -296,7 +296,7 @@
term_t r = A1;
term_t c = A2;
-#ifdef __unix__
+#if defined(__unix__) || defined(__HAIKU__)
int iorval;
#ifdef TIOCGSIZE

View File

@@ -6,7 +6,8 @@ REVISION="1"
STATUS_HAIKU="stable"
DEPEND="dev-libs/gmp >= 5.0.5
sys-libs/readline >= 6.2"
BUILD {
BUILD()
{
cd pl-6.0.2/src
libtoolize -fci
autoreconf
@@ -14,12 +15,14 @@ BUILD {
make
}
INSTALL {
INSTALL()
{
cd pl-6.0.2/src
make install
}
TEST {
TEST()
{
cd pl-6.0.2/src
make check
}

View File

@@ -6,7 +6,8 @@ REVISION="1"
STATUS_HAIKU="stable"
DEPEND="dev-libs/gmp >= 5.0.5
sys-libs/readline >= 6.2"
BUILD {
BUILD()
{
cd pl-6.2.0/src
libtoolize -fci
autoreconf
@@ -14,12 +15,14 @@ BUILD {
make
}
INSTALL {
INSTALL()
{
cd pl-6.2.0/src
make install
}
TEST {
TEST()
{
cd pl-6.2.0/src
make check
}

View File

@@ -5,14 +5,16 @@ CHECKSUM_MD5="2df766c9e03e02811b1ab4bba1c7b9cc"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
BUILD {
BUILD()
{
cd swig-1.3.40
libtoolize -fci
./configure --prefix=`finddir B_COMMON_DIRECTORY`
make
}
INSTALL {
INSTALL()
{
cd swig-1.3.40
make install
}

View File

@@ -5,14 +5,16 @@ CHECKSUM_MD5="eaf619a4169886923e5f828349504a29"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
BUILD {
BUILD()
{
cd swig-2.0.2
libtoolize -fci
./configure --prefix=`finddir B_COMMON_DIRECTORY`
make
}
INSTALL {
INSTALL()
{
cd swig-2.0.2
make install
}

View File

@@ -5,7 +5,8 @@ REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
CHECKSUM_MD5="8512d8db3233041dd68a81476906012a"
BUILD {
BUILD()
{
cd tcl8.5.9/unix
autoconf -f
./configure --prefix=$(finddir B_COMMON_DIRECTORY) \
@@ -13,13 +14,15 @@ BUILD {
make
}
INSTALL {
INSTALL()
{
cd tcl8.5.9/unix
make install
ln -s tclsh8.5 "$(finddir B_COMMON_BIN_DIRECTORY)/tclsh"
}
TEST {
TEST()
{
cd tcl8.5.9/unix
make test
}

View File

@@ -6,7 +6,8 @@ STATUS_HAIKU="unstable"
DEPEND=""
#CHECKSUM_MD5=""
MESSAGE="This port only builds with gcc4. Use 'setgcc gcc4' before building."
BUILD {
BUILD()
{
gyp_patch_path=$(dirname ${PWD})/patches/gyp-r1501.patch
cd v8-r13067
cd build
@@ -17,12 +18,14 @@ BUILD {
make library=shared ia32.debug
}
TEST {
TEST()
{
cd v8-r13067
make ia32.debug.check
}
INSTALL {
INSTALL()
{
cd v8-r13067
includedir=${DESTDIR}/`finddir B_COMMON_HEADERS_DIRECTORY`/v8
mkdir -p ${includedir}

View File

@@ -1,28 +0,0 @@
DESCRIPTION="Yasm assembler"
HOMEPAGE="http://www.tortall.net/projects/yasm/"
SRC_URI="http://www.tortall.net/projects/yasm/releases/yasm-1.1.0.tar.gz"
CHECKSUM_MD5="8392e5f2235c2c2a981e1a633f2698cb"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
BUILD {
cd yasm-1.1.0
libtoolize --force --copy --install
COMMON_DOCS=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
--mandir=$COMMON_DOCS/man \
--disable-nls
make
}
INSTALL {
cd yasm-1.1.0
make install
}
LICENSE="Artistic
BSD (2-clause)
BSD (3-clause)
GNU GPL v2
GNU LGPL v2"
COPYRIGHT="2001-2010 Peter Johnson and other Yasm developers."

View File

@@ -0,0 +1,54 @@
SUMMARY="The Yasm modular assembler"
HOMEPAGE="http://www.tortall.net/projects/yasm/"
SRC_URI="http://www.tortall.net/projects/yasm/releases/yasm-1.1.0.tar.gz"
CHECKSUM_MD5="8392e5f2235c2c2a981e1a633f2698cb"
LICENSE="
Artistic
BSD (2-clause)
BSD (3-clause)
GNU GPL v2
GNU LGPL v2
"
COPYRIGHT="2001-2010 Peter Johnson and other Yasm developers."
REVISION="2"
ARCHITECTURES="x86_gcc2 ?x86"
PROVIDES="
yasm = $portVersion compat >= 1
cmd:yasm = 1.1.0 compat >= 1
lib:libyasm = 1.1.0 compat >= 1.1
"
REQUIRES="
haiku >= $haikuVersion
"
BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
cmd:gcc
cmd:ld
cmd:libtoolize
cmd:make
"
SOURCE_DIR="$portVersionedName"
BUILD()
{
libtoolize --force --copy --install
./configure $configureDirArgs \
--disable-nls
make
}
INSTALL()
{
make install
}
DESCRIPTION="Yasm is a complete rewrite of the NASM assembler under the “new” BSD License (some portions are under other licenses, see COPYING for details).
Yasm currently supports the x86 and AMD64 instruction sets, accepts NASM and GAS assembler syntaxes, outputs binary, ELF32, ELF64, 32 and 64-bit Mach-O, RDOFF2, COFF, Win32, and Win64 object formats, and generates source debugging information in STABS, DWARF 2, and CodeView 8 formats.
Yasm can be easily integrated into Visual Studio 2005/2008 and 2010 for assembly of NASM or GAS syntax code into Win32 or Win64 object files."

View File

@@ -1,28 +0,0 @@
DESCRIPTION="Yasm assembler"
HOMEPAGE="http://www.tortall.net/projects/yasm/"
SRC_URI="http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz"
CHECKSUM_MD5="4cfc0686cf5350dd1305c4d905eb55a6"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
BUILD {
cd yasm-1.2.0
libtoolize --force --copy --install
COMMON_DOCS=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
--mandir=$COMMON_DOCS/man \
--disable-nls
make
}
INSTALL {
cd yasm-1.2.0
make install
}
LICENSE="Artistic
BSD (2-clause)
BSD (3-clause)
GNU GPL v2
GNU LGPL v2"
COPYRIGHT="2001-2011 Peter Johnson and other Yasm developers."

View File

@@ -0,0 +1,59 @@
SUMMARY="The Yasm modular assembler"
HOMEPAGE="http://www.tortall.net/projects/yasm/"
SRC_URI="http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz"
CHECKSUM_MD5="4cfc0686cf5350dd1305c4d905eb55a6"
LICENSE="
Artistic
BSD (2-clause)
BSD (3-clause)
GNU GPL v2
GNU LGPL v2
"
COPYRIGHT="2001-2011 Peter Johnson and other Yasm developers."
REVISION="3"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PROVIDES="
yasm = $portVersion compat >= 1
cmd:vsyasm = $portVersion compat >= 1
cmd:yasm = $portVersion compat >= 1
cmd:ytasm = $portVersion compat >= 1
devel:libyasm = $portVersion compat >= 1.2
"
REQUIRES="
haiku >= $haikuVersion
"
BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
cmd:gcc
cmd:ld
cmd:libtoolize
cmd:make
"
SOURCE_DIR="$portVersionedName"
BUILD()
{
libtoolize --force --copy --install
runConfigure ./configure \
--disable-nls
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLibs libyasm
}
DESCRIPTION="Yasm is a complete rewrite of the NASM assembler under the “new” BSD License (some portions are under other licenses, see COPYING for details).
Yasm currently supports the x86 and AMD64 instruction sets, accepts NASM and GAS assembler syntaxes, outputs binary, ELF32, ELF64, 32 and 64-bit Mach-O, RDOFF2, COFF, Win32, and Win64 object formats, and generates source debugging information in STABS, DWARF 2, and CodeView 8 formats.
Yasm can be easily integrated into Visual Studio 2005/2008 and 2010 for assembly of NASM or GAS syntax code into Win32 or Win64 object files."