Merged haikuports/haikuports into master

This commit is contained in:
humdinger
2014-01-26 06:55:06 +01:00
50 changed files with 6277 additions and 620 deletions

View File

@@ -0,0 +1,66 @@
SUMMARY="Midnight Commander — a powerful file manager."
DESCRIPTION="
GNU Midnight Commander is a text-mode full-screen file manager. It uses a two panel interface and a subshell for command execution. It includes an internal editor with syntax highlighting and an internal viewer with support for binary files. Also included is Virtual Filesystem (VFS), that allows files on remote systems (e.g. FTP, SSH servers) and files inside archives to be manipulated like real files."
HOMEPAGE="http://www.midnight-commander.org/"
SRC_URI="git+https://github.com/MidnightCommander/mc#d26b7dd6ee49211f4d18fdfbe193023a3e480389"
REVISION="1"
LICENSE="GNU GPL v2"
COPYRIGHT="2007 MC Team"
ARCHITECTURES="x86 x86_gcc2"
PATCHES="mc.patch"
SOURCE_DIR="mc-4.8.11"
COOK="Maxim Sokhatsky <maxim@synrc.com>"
GLOBAL_WRITABLE_FILES="
settings/mc directory keep-old
"
PROVIDES="
mc = $portVersion
cmd:mc = $portVersion
cmd:mcedit = $portVersion
cmd:mcdiff = $portVersion
cmd:mcview = $portVersion
"
REQUIRES="
haiku >= $haikuVersion
lib:libncurses
lib:libintl
lib:libiconv
lib:libglib_2.0
"
BUILD_REQUIRES="
devel:libncurses
devel:libintl
devel:libiconv
devel:libglib_2.0
"
BUILD_PREREQUIRES="
cmd:pkg_config
haiku_devel >= $haikuVersion
cmd:gettext
cmd:make
cmd:tar
cmd:libtoolize
cmd:aclocal
cmd:autom4te
cmd:autoconf
cmd:automake
cmd:autoheader
cmd:gcc
"
BUILD()
{
autogen.sh
runConfigure configure --prefix="$prefix" --datarootdir="$dataRootDir" --with-screen=ncurses
make
}
INSTALL()
{
make install
}

View File

@@ -0,0 +1,12 @@
diff --git mc-4.8.11/lib/tty/tty-ncurses.c mc-4.8.11-haiku/lib/tty/tty-ncurses.c
--- mc-4.8.11/lib/tty/tty-ncurses.c
+++ mc-4.8.11-haiku/lib/tty/tty-ncurses.c
@@ -66,7 +66,7 @@
/*** file scope macro definitions ****************************************************************/
-#if defined(_AIX) && !defined(CTRL)
+#if !defined(CTRL)
#define CTRL(x) ((x) & 0x1f)
#endif

View File

@@ -0,0 +1,53 @@
SUMMARY="srm - secure file deletion for posix systems"
DESCRIPTION="
A command-line compatible rm which destroys file contents before unlinking.
"
HOMEPAGE="http://srm.sourceforge.net/"
SRC_URI="http://sourceforge.net/projects/srm/files/1.2.12/srm-1.2.12.tar.bz2"
CHECKSUM_MD5="5c89c96f53ea1a3d671678bec52959a1"
REVISION="1"
LICENSE="MIT (no promotion)"
COPYRIGHT="2000 Matthew D. Gauthier"
ARCHITECTURES="x86_gcc2 x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
srm$secondaryArchSuffix = $portVersion
cmd:srm = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:make
cmd:gcc$secondaryArchSuffix
"
BUILD()
{
#./autogen.sh ...
#aclocal
#autoheader
#automake --add-missing
#autoconf
runConfigure ./configure
make
}
INSTALL()
{
make install
}
# Beware, needs at least 5GB of free disk space.
TEST()
{
make test
}

View File

@@ -3,13 +3,13 @@ DESCRIPTION="
A command-line compatible rm which destroys file contents before unlinking.
"
HOMEPAGE="http://srm.sourceforge.net/"
SRC_URI="cvs://:pserver:anonymous@srm.cvs.sourceforge.net:/cvsroot/srm/srm"
SRC_URI="svn://svn.code.sf.net/p/srm/srm/trunk"
REVISION="1"
LICENSE="MIT (no promotion)"
COPYRIGHT="2000 Matthew D. Gauthier"
ARCHITECTURES="x86_gcc2 x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86"
PROVIDES="
srm$secondaryArchSuffix = $portVersion

View File

@@ -20,6 +20,7 @@ if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"
PATCHES="avrdude-6.0.1.patch"
GLOBAL_WRITABLE_FILES="
settings/avrdude.conf keep-old
@@ -33,9 +34,13 @@ PROVIDES="
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libusb_1.0$secondaryArchSuffix
lib:libftdi1$secondaryArchSuffix
lib:libelf$secondaryArchSuffix
"
BUILD_REQUIRES="
devel:libusb_1.0$secondaryArchSuffix
devel:libftdi1$secondaryArchSuffix
devel:libelf$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
@@ -46,12 +51,14 @@ BUILD_PREREQUIRES="
cmd:make
cmd:yacc
cmd:flex
cmd:pkg_config$secondaryArchSuffix
cmd:pkg_config
"
BUILD()
{
export PKG_CONFIG_LIBDIR=/system/develop/lib/x86/pkgconfig/
aclocal
autoconf
automake
runConfigure ./configure
make $jobArgs

View File

@@ -0,0 +1,37 @@
diff -Naur avrdude-6.0.1/configure.ac avrdude-6.0.1-haiku/configure.ac
--- avrdude-6.0.1/configure.ac 2013-09-18 06:19:42.038010880 +0000
+++ avrdude-6.0.1-haiku/configure.ac 2014-01-13 23:01:38.477102080 +0000
@@ -96,6 +96,7 @@
AC_SEARCH_LIBS([gethostent], [nsl])
AC_SEARCH_LIBS([setsockopt], [socket])
+AC_SEARCH_LIBS(socket, socket network)
AH_TEMPLATE([HAVE_LIBUSB],
[Define if USB support is enabled via libusb])
AC_CHECK_LIB([usb], [usb_get_string_simple], [have_libusb=yes])
@@ -176,11 +177,8 @@
fi
AC_CHECK_HEADERS([pthread.h])
# as there exits header file only pthread implementations for Windows, check if we have a library
-AC_CHECK_LIB([pthread], [pthread_create], [have_pthread=yes])
-if test x$have_pthread = xyes; then
- LIBPTHREAD="-lpthread"
-fi
-AC_SUBST(LIBPTHREAD, $LIBPTHREAD)
+AC_SEARCH_LIBS([pthread_create], [pthread], [have_pthread=yes])
+
# Checks for header files.
AC_CHECK_HEADERS([limits.h stdlib.h string.h])
AC_CHECK_HEADERS([fcntl.h sys/ioctl.h sys/time.h termios.h unistd.h])
diff -Naur avrdude-6.0.1/Makefile.am avrdude-6.0.1-haiku/Makefile.am
--- avrdude-6.0.1/Makefile.am 2013-09-18 05:59:07.037224448 +0000
+++ avrdude-6.0.1-haiku/Makefile.am 2014-01-13 21:50:05.837550080 +0000
@@ -63,7 +63,7 @@
libavrdude_a_CFLAGS = @ENABLE_WARNINGS@
-avrdude_LDADD = $(top_builddir)/$(noinst_LIBRARIES) @LIBUSB_1_0@ @LIBUSB@ @LIBFTDI1@ @LIBFTDI@ @LIBHID@ @LIBELF@ @LIBPTHREAD@ -lm
+avrdude_LDADD = $(top_builddir)/$(noinst_LIBRARIES) @LIBUSB_1_0@ @LIBUSB@ @LIBFTDI1@ @LIBFTDI@ @LIBHID@ @LIBELF@
bin_PROGRAMS = avrdude

View File

@@ -0,0 +1,67 @@
SUMMARY="Erlang/OTP"
DESCRIPTION="
Erlang is a programming language used to
build massively scalable soft real-time systems with
requirements on high availability. Some of its uses
are in telecoms, banking, e-commerce, computer
telephony and instant messaging. Erlang's runtime
system has built-in support for concurrency, distribution and fault tolerance."
HOMEPAGE="http://www.erlang.org"
SRC_URI="http://www.erlang.org/download/otp_src_R16B03.tar.gz"
CHECKSUM_MD5="c330150913556a0fe73e57a441cb6375"
ARCHITECTURES="x86_gcc2 x86"
LICENSE="EPL"
REVISION="1"
COPYRIGHT="1997-2013 Ericsson AB"
SOURCE_DIR="otp_src_R16B03"
PATCHES="erlang_R16B03_haiku.patch"
PROVIDES="
erl = $portVersion
cmd:erl = $portVersion
cmd:ct_run = $portVersion
cmd:dialyzer = $portVersion
cmd:epmd = $portVersion
cmd:erlc = $portVersion
cmd:escript = $portVersion
cmd:run_erl = $portVersion
cmd:to_erl = $portVersion
cmd:typer = $portVersion
"
REQUIRES="
haiku >= $haikuVersion
cmd:libtool
cmd:perl
cmd:gcc
"
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
cmd:perl
cmd:make
cmd:gcc
cmd:tar
cmd:uname
devel:libncurses
devel:libssl
devel:libcrypto
"
ERLANG_CFLAGS="-DETHR_X86_OUT_OF_ORDER -DHAVE_NET_IF_DL_H -DETHR_HAVE_ETHREAD_DEFINES -DETHR_PTHREADS -DETHR_SIZEOF_PTR=4 -DHAVE_CONFIG_H -I../i586-pc-haiku -I../../i586-pc-haiku -I../include/internal -I../../include/internal -I../../emulator/sys/unix -I../../include/i586-pc-haiku -I../../emulator/beam -I../../../erts/include/internal/i586-pc-haiku -I../../../erts/i586-pc-haiku -Imisc -I../include -Iepmd -Iconnect -I../../../erts/emulator/beam -I../../../erts/include/i586-pc-haiku -I../../../../erts/emulator/beam -I../../../../erts/include/i586-pc-haiku -I../../../../erts/i586-pc-haiku"
BUILD()
{
rm -rf `finddir B_SYSTEM_SETTINGS_DIRECTORY`/network
mkdir -p `finddir B_SYSTEM_SETTINGS_DIRECTORY`/network
touch `finddir B_SYSTEM_SETTINGS_DIRECTORY`/network/hostname
runConfigure --omit-dirs "docDir dataRootDir" configure --prefix="$prefix" --disable-ipv6 --disable-hipe LDFLAGS="-lnetwork"
echo "#undef ERTS_SMP" >> erts/i586-pc-haiku/config.h
echo "#undef USE_THREADS" >> erts/i586-pc-haiku/config.h
echo "Skip" > lib/megaco/SKIP
HOME=/boot/home make CFLAGS="$ERLANG_CFLAGS"
}
INSTALL()
{
HOME=/boot/home make CFLAGS="$ERLANG_CFLAGS" install
}

View File

@@ -1,61 +0,0 @@
DESCRIPTION="erlang"
HOMEPAGE="http://www.erlang.org"
SRC_URI="http://www.erlang.org/download/otp_src_R14B.tar.gz"
REVISION="1"
STATUS_HAIKU="broken"
DEPEND=""
CHECKSUM_MD5="5292a04556d17ad528d570e02357dfbb"
BUILD()
{
cd otp_src_R14B
mkdir -p m4
echo "AC_CONFIG_MACRO_DIR([m4]) >> configure.in"
echo "AC_CHECK_LIBM" >> configure.in
rm -f erts/autoconf/config.guess
rm -f erts/autoconf/config.sub
rm -f erts/autoconf/install-sh
rm -f erts/autoconf/ltmain.sh
cp -v /boot/common/share/libtool/config/config.guess erts/autoconf
cp -v /boot/common/share/libtool/config/config.sub erts/autoconf
cp -v /boot/common/share/libtool/config/install-sh erts/autoconf
cp -v /boot/common/share/libtool/config/ltmain.sh erts/autoconf
cp -v /boot/common/share/libtool/config/config.guess lib/common_test/priv/auxdir
cp -v /boot/common/share/libtool/config/config.sub lib/common_test/priv/auxdir
cp -v /boot/common/share/libtool/config/install-sh lib/common_test/priv/auxdir
cp -v /boot/common/share/libtool/config/ltmain.sh lib/common_test/priv/auxdir
cp -v /boot/common/share/libtool/config/config.guess lib/erl_interface/src/auxdir
cp -v /boot/common/share/libtool/config/config.sub lib/erl_interface/src/auxdir
cp -v /boot/common/share/libtool/config/install-sh lib/erl_interface/src/auxdir
cp -v /boot/common/share/libtool/config/ltmain.sh lib/erl_interface/src/auxdir
cp -v /boot/common/share/libtool/config/config.guess lib/test_server/src
cp -v /boot/common/share/libtool/config/config.sub lib/test_server/src
cp -v /boot/common/share/libtool/config/install-sh lib/test_server/src
cp -v /boot/common/share/libtool/config/ltmain.sh lib/test_server/src
cp -v /boot/common/share/aclocal/libtool.m4 m4
cp -v /boot/common/share/aclocal/ltoptions.m4 m4
cp -v /boot/common/share/aclocal/ltversion.m4 m4
cp -v /boot/common/share/aclocal/ltsugar.m4 m4
cp -v /boot/common/share/aclocal/lt~obsolete.m4 m4
rm -f aclocal.m4
# libtoolize --copy --force --install # this fails?! so have to delete and copy files in instead
cd lib/test_server/src
autoconf
cd ../../..
aclocal -I m4
autoconf
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
--with-ssl=`finddir B_COMMON_DIRECTORY` \
--disable-ipv6 \
--disable-hipe \
LDFLAGS="-lnetwork"
make -s
}
INSTALL()
{
cd otp_src_R14B
make -s install
}
LICENSE="EPL v1.1"
COPYRIGHT="1997-2010 Ericsson AB"

View File

@@ -1,287 +0,0 @@
diff -urN otp_src_R14B/lib/test_server/src/configure.in otp_src_R14B-haiku/lib/test_server/src/configure.in
--- otp_src_R14B/lib/test_server/src/configure.in 2010-09-13 17:00:22.037748736 +0000
+++ otp_src_R14B-haiku/lib/test_server/src/configure.in 2010-10-04 13:15:31.969932800 +0000
@@ -279,6 +279,10 @@
LIBS="$LIBS -lsocket -lnsl"
AC_CHECK_FUNC(accept, erl_checkNsl=0, [LIBS=$tk_oldLibs])
fi
+
+# Haiku uses -lnetwork instead of -lsocket
+AC_CHECK_LIB(network, socket, LIBS="$LIBS -lnetwork", LIBS="$LIBS")
+
AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"]))
dnl Checks for library functions.
diff -urN otp_src_R14B/erts/emulator/drivers/common/inet_drv.c otp_src_R14B-haiku/erts/emulator/drivers/common/inet_drv.c
--- otp_src_R14B/erts/emulator/drivers/common/inet_drv.c 2010-02-19 13:03:42.000000000 -0500
+++ otp_src_R14B-haiku/erts/emulator/drivers/common/inet_drv.c 2010-10-08 15:13:14.000000000 -0400
@@ -621,6 +621,7 @@
#define INET_IFF_NPOINTTOPOINT 0x0800
/* #define INET_IFF_NRUNNING 0x1000 */
/* #define INET_IFF_NMULTICAST 0x2000 */
+#define IFF_RUNNING 0x0001
/* Flags for "sctp_sndrcvinfo". Used in a bitmask -- must be powers of 2:
** INET_REQ_SETOPTS:SCTP_OPT_DEFAULT_SEND_PARAM
diff -urN otp_src_R14B/erts/emulator/sys/unix/sys.c otp_src_R14B-haiku/erts/emulator/sys/unix/sys.c
--- otp_src_R14B/erts/emulator/sys/unix/sys.c 2010-02-19 13:03:16.000000000 -0500
+++ otp_src_R14B-haiku/erts/emulator/sys/unix/sys.c 2010-10-08 15:13:14.000000000 -0400
@@ -709,7 +709,7 @@
if (nice_val > 39) {
nice_val = 39;
}
- erts_silence_warn_unused_result(nice(nice_val));
+ erts_silence_warn_unused_result(nice_val);
}
envsz = sizeof(env);
diff -urN otp_src_R14B/lib/appmon/SKIP otp_src_R14B-haiku/lib/appmon/SKIP
--- otp_src_R14B/lib/appmon/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/appmon/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/asn1/SKIP otp_src_R14B-haiku/lib/asn1/SKIP
--- otp_src_R14B/lib/asn1/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/asn1/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/common_test/SKIP otp_src_R14B-haiku/lib/common_test/SKIP
--- otp_src_R14B/lib/common_test/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/common_test/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/cosEvent/SKIP otp_src_R14B-haiku/lib/cosEvent/SKIP
--- otp_src_R14B/lib/cosEvent/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/cosEvent/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/cosEventDomain/SKIP otp_src_R14B-haiku/lib/cosEventDomain/SKIP
--- otp_src_R14B/lib/cosEventDomain/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/cosEventDomain/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/cosFileTransfer/SKIP otp_src_R14B-haiku/lib/cosFileTransfer/SKIP
--- otp_src_R14B/lib/cosFileTransfer/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/cosFileTransfer/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/cosNotification/SKIP otp_src_R14B-haiku/lib/cosNotification/SKIP
--- otp_src_R14B/lib/cosNotification/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/cosNotification/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/cosProperty/SKIP otp_src_R14B-haiku/lib/cosProperty/SKIP
--- otp_src_R14B/lib/cosProperty/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/cosProperty/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/cosTime/SKIP otp_src_R14B-haiku/lib/cosTime/SKIP
--- otp_src_R14B/lib/cosTime/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/cosTime/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/cosTransactions/SKIP otp_src_R14B-haiku/lib/cosTransactions/SKIP
--- otp_src_R14B/lib/cosTransactions/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/cosTransactions/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/crypto/SKIP otp_src_R14B-haiku/lib/crypto/SKIP
--- otp_src_R14B/lib/crypto/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/crypto/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/debugger/SKIP otp_src_R14B-haiku/lib/debugger/SKIP
--- otp_src_R14B/lib/debugger/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/debugger/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/dialyzer/SKIP otp_src_R14B-haiku/lib/dialyzer/SKIP
--- otp_src_R14B/lib/dialyzer/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/dialyzer/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/docbuilder/SKIP otp_src_R14B-haiku/lib/docbuilder/SKIP
--- otp_src_R14B/lib/docbuilder/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/docbuilder/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/edoc/SKIP otp_src_R14B-haiku/lib/edoc/SKIP
--- otp_src_R14B/lib/edoc/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/edoc/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/erl_docgen/SKIP otp_src_R14B-haiku/lib/erl_docgen/SKIP
--- otp_src_R14B/lib/erl_docgen/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/erl_docgen/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/erl_interface/SKIP otp_src_R14B-haiku/lib/erl_interface/SKIP
--- otp_src_R14B/lib/erl_interface/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/erl_interface/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/et/SKIP otp_src_R14B-haiku/lib/et/SKIP
--- otp_src_R14B/lib/et/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/et/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/eunit/SKIP otp_src_R14B-haiku/lib/eunit/SKIP
--- otp_src_R14B/lib/eunit/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/eunit/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/gs/SKIP otp_src_R14B-haiku/lib/gs/SKIP
--- otp_src_R14B/lib/gs/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/gs/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/hipe/SKIP otp_src_R14B-haiku/lib/hipe/SKIP
--- otp_src_R14B/lib/hipe/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/hipe/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/ic/SKIP otp_src_R14B-haiku/lib/ic/SKIP
--- otp_src_R14B/lib/ic/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/ic/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/inets/SKIP otp_src_R14B-haiku/lib/inets/SKIP
--- otp_src_R14B/lib/inets/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/inets/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/inviso/SKIP otp_src_R14B-haiku/lib/inviso/SKIP
--- otp_src_R14B/lib/inviso/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/inviso/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/jinterface/SKIP otp_src_R14B-haiku/lib/jinterface/SKIP
--- otp_src_R14B/lib/jinterface/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/jinterface/SKIP 2010-10-08 15:13:14.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/megaco/SKIP otp_src_R14B-haiku/lib/megaco/SKIP
--- otp_src_R14B/lib/megaco/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/megaco/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/mnesia/SKIP otp_src_R14B-haiku/lib/mnesia/SKIP
--- otp_src_R14B/lib/mnesia/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/mnesia/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/observer/SKIP otp_src_R14B-haiku/lib/observer/SKIP
--- otp_src_R14B/lib/observer/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/observer/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/odbc/SKIP otp_src_R14B-haiku/lib/odbc/SKIP
--- otp_src_R14B/lib/odbc/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/odbc/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/orber/SKIP otp_src_R14B-haiku/lib/orber/SKIP
--- otp_src_R14B/lib/orber/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/orber/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/os_mon/SKIP otp_src_R14B-haiku/lib/os_mon/SKIP
--- otp_src_R14B/lib/os_mon/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/os_mon/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/otp_mibs/SKIP otp_src_R14B-haiku/lib/otp_mibs/SKIP
--- otp_src_R14B/lib/otp_mibs/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/otp_mibs/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/parsetools/SKIP otp_src_R14B-haiku/lib/parsetools/SKIP
--- otp_src_R14B/lib/parsetools/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/parsetools/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/percept/SKIP otp_src_R14B-haiku/lib/percept/SKIP
--- otp_src_R14B/lib/percept/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/percept/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/pman/SKIP otp_src_R14B-haiku/lib/pman/SKIP
--- otp_src_R14B/lib/pman/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/pman/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/public_key/SKIP otp_src_R14B-haiku/lib/public_key/SKIP
--- otp_src_R14B/lib/public_key/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/public_key/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/reltool/SKIP otp_src_R14B-haiku/lib/reltool/SKIP
--- otp_src_R14B/lib/reltool/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/reltool/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/runtime_tools/SKIP otp_src_R14B-haiku/lib/runtime_tools/SKIP
--- otp_src_R14B/lib/runtime_tools/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/runtime_tools/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/sasl/SKIP otp_src_R14B-haiku/lib/sasl/SKIP
--- otp_src_R14B/lib/sasl/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/sasl/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/snmp/SKIP otp_src_R14B-haiku/lib/snmp/SKIP
--- otp_src_R14B/lib/snmp/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/snmp/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/ssh/SKIP otp_src_R14B-haiku/lib/ssh/SKIP
--- otp_src_R14B/lib/ssh/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/ssh/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/ssl/SKIP otp_src_R14B-haiku/lib/ssl/SKIP
--- otp_src_R14B/lib/ssl/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/ssl/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/syntax_tools/SKIP otp_src_R14B-haiku/lib/syntax_tools/SKIP
--- otp_src_R14B/lib/syntax_tools/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/syntax_tools/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/test_server/SKIP otp_src_R14B-haiku/lib/test_server/SKIP
--- otp_src_R14B/lib/test_server/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/test_server/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/toolbar/SKIP otp_src_R14B-haiku/lib/toolbar/SKIP
--- otp_src_R14B/lib/toolbar/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/toolbar/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/tools/SKIP otp_src_R14B-haiku/lib/tools/SKIP
--- otp_src_R14B/lib/tools/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/tools/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/tv/SKIP otp_src_R14B-haiku/lib/tv/SKIP
--- otp_src_R14B/lib/tv/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/tv/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/typer/SKIP otp_src_R14B-haiku/lib/typer/SKIP
--- otp_src_R14B/lib/typer/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/typer/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/webtool/SKIP otp_src_R14B-haiku/lib/webtool/SKIP
--- otp_src_R14B/lib/webtool/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/webtool/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation
diff -urN otp_src_R14B/lib/wx/SKIP otp_src_R14B-haiku/lib/wx/SKIP
--- otp_src_R14B/lib/wx/SKIP 1969-12-31 19:00:00.000000000 -0500
+++ otp_src_R14B-haiku/lib/wx/SKIP 2010-10-08 15:13:16.000000000 -0400
@@ -0,0 +1 @@
+Minimal installation

View File

@@ -0,0 +1,146 @@
diff --git otp_src_R16B03/erts/configure otp_src_R16B03-haiku/erts/configure
--- otp_src_R16B03/erts/configure
+++ otp_src_R16B03-haiku/erts/configure
@@ -6648,7 +6648,7 @@ if test "${ac_cv_lib_m_sin+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm $LIBS"
+LIBS=" $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -6711,7 +6711,7 @@ if test $ac_cv_lib_m_sin = yes; then
#define HAVE_LIBM 1
_ACEOF
- LIBS="-lm $LIBS"
+ LIBS=" $LIBS"
fi
@@ -17872,7 +17872,9 @@ echo "${ECHO_T}$gcc_dw_cmpxchg_asm" >&6
if test "$gcc_dw_cmpxchg_asm" = "yes"; then
cat >>confdefs.h <<\_ACEOF
-#define ETHR_GCC_HAVE_DW_CMPXCHG_ASM_SUPPORT 1
+#undef ETHR_GCC_HAVE_DW_CMPXCHG_ASM_SUPPORT
+#undef ERTS_SMP
+#undef USE_THREADS
_ACEOF
fi;;
diff --git otp_src_R16B03/erts/emulator/sys/unix/sys.c otp_src_R16B03-haiku/erts/emulator/sys/unix/sys.c
--- otp_src_R16B03/erts/emulator/sys/unix/sys.c
+++ otp_src_R16B03-haiku/erts/emulator/sys/unix/sys.c
@@ -767,7 +767,7 @@ prepare_crash_dump(int secs)
if (nice_val > 39) {
nice_val = 39;
}
- erts_silence_warn_unused_result(nice(nice_val));
+ erts_silence_warn_unused_result(nice_val);
}
UnUseTmpHeapNoproc(NUFBUF);
diff --git otp_src_R16B03/erts/epmd/src/Makefile.in otp_src_R16B03-haiku/erts/epmd/src/Makefile.in
--- otp_src_R16B03/erts/epmd/src/Makefile.in
+++ otp_src_R16B03-haiku/erts/epmd/src/Makefile.in
@@ -64,7 +64,7 @@ else
ifeq ($(findstring vxworks,$(TARGET)),vxworks)
ERTS_INTERNAL_LIBS=-L../../lib/internal/$(TARGET) -lerts_internal$(ERTS_LIB_TYPEMARKER) @ERTS_INTERNAL_X_LIBS@
else
-ERTS_INTERNAL_LIBS=-L../../lib/internal/$(TARGET) -lerts_internal$(ERTS_LIB_TYPEMARKER) @ERTS_INTERNAL_X_LIBS@ -lm
+ERTS_INTERNAL_LIBS=-L../../lib/internal/$(TARGET) -lerts_internal$(ERTS_LIB_TYPEMARKER) @ERTS_INTERNAL_X_LIBS@
endif
endif
diff --git otp_src_R16B03/erts/etc/common/Makefile.in otp_src_R16B03-haiku/erts/etc/common/Makefile.in
--- otp_src_R16B03/erts/etc/common/Makefile.in
+++ otp_src_R16B03-haiku/erts/etc/common/Makefile.in
@@ -91,7 +91,7 @@ endif
ifeq ($(TARGET),win32)
ERTS_INTERNAL_LIBS=-L../../lib/internal/$(TARGET) -lerts_internal_r$(ERTS_LIB_TYPEMARKER) @ERTS_INTERNAL_X_LIBS@
else
-ERTS_INTERNAL_LIBS=-L../../lib/internal/$(TARGET) -lerts_internal$(ERTS_LIB_TYPEMARKER) @ERTS_INTERNAL_X_LIBS@ -lm
+ERTS_INTERNAL_LIBS=-L../../lib/internal/$(TARGET) -lerts_internal$(ERTS_LIB_TYPEMARKER) @ERTS_INTERNAL_X_LIBS@
endif
ERTS_LIB = $(ERL_TOP)/erts/lib_src/obj/$(TARGET)/$(TYPE)/MADE
diff --git otp_src_R16B03/erts/etc/common/erlexec.c otp_src_R16B03-haiku/erts/etc/common/erlexec.c
--- otp_src_R16B03/erts/etc/common/erlexec.c
+++ otp_src_R16B03-haiku/erts/etc/common/erlexec.c
@@ -1989,7 +1989,7 @@ initial_argv_massage(int *argc, char ***argv)
vix = 0;
- av = build_args_from_env("ERL_" OTP_SYSTEM_VERSION "_FLAGS");
+ av = build_args_from_env("ERL_HAIKU_FLAGS");
if (av)
avv[vix++].argv = av;
diff --git otp_src_R16B03/erts/include/internal/ethread.h otp_src_R16B03-haiku/erts/include/internal/ethread.h
--- otp_src_R16B03/erts/include/internal/ethread.h
+++ otp_src_R16B03-haiku/erts/include/internal/ethread.h
@@ -26,9 +26,7 @@
#ifndef ETHREAD_H__
#define ETHREAD_H__
-#ifndef ETHR_HAVE_ETHREAD_DEFINES
-# include "ethread_header_config.h"
-#endif
+#include "ethread_header_config.h"
#include <stdlib.h>
#include "erl_errno.h"
diff --git otp_src_R16B03/erts/include/internal/i386/ethr_dw_atomic.h otp_src_R16B03-haiku/erts/include/internal/i386/ethr_dw_atomic.h
--- otp_src_R16B03/erts/include/internal/i386/ethr_dw_atomic.h
+++ otp_src_R16B03-haiku/erts/include/internal/i386/ethr_dw_atomic.h
@@ -25,6 +25,8 @@
#ifndef ETHR_X86_DW_ATOMIC_H__
#define ETHR_X86_DW_ATOMIC_H__
+#include "ethread_header_config.h"
+
#ifdef ETHR_GCC_HAVE_DW_CMPXCHG_ASM_SUPPORT
#define ETHR_HAVE_NATIVE_DW_ATOMIC
diff --git otp_src_R16B03/lib/asn1/c_src/Makefile otp_src_R16B03-haiku/lib/asn1/c_src/Makefile
--- otp_src_R16B03/lib/asn1/c_src/Makefile
+++ otp_src_R16B03-haiku/lib/asn1/c_src/Makefile
@@ -67,7 +67,7 @@ CLIB_FLAGS =
LN=cp
else
NIF_SHARED_OBJ_FILE = $(LIBDIR)/asn1_erl_nif.so
-CLIB_FLAGS = -lc
+CLIB_FLAGS =
LN= ln -s
endif
diff --git otp_src_R16B03/lib/runtime_tools/c_src/Makefile.in otp_src_R16B03-haiku/lib/runtime_tools/c_src/Makefile.in
--- otp_src_R16B03/lib/runtime_tools/c_src/Makefile.in
+++ otp_src_R16B03-haiku/lib/runtime_tools/c_src/Makefile.in
@@ -149,10 +149,10 @@ $(OBJDIR)/%.o: %.c
$(V_CC) -c -o $@ $(ALL_CFLAGS) $<
$(LIBDIR)/trace_ip_drv.so: $(TRACE_IP_DRV_OBJS)
- $(V_LD) $(LDFLAGS) -o $@ $^ -lc $(LIBS)
+ $(V_LD) $(LDFLAGS) -o $@ $^ $(LIBS)
$(LIBDIR)/trace_file_drv.so: $(TRACE_FILE_DRV_OBJS)
- $(V_LD) $(LDFLAGS) -o $@ $^ -lc $(LIBS)
+ $(V_LD) $(LDFLAGS) -o $@ $^ $(LIBS)
$(LIBDIR)/trace_ip_drv.dll: $(TRACE_IP_DRV_OBJS)
$(V_LD) $(LDFLAGS) -o $@ $^ $(LIBS)
diff --git otp_src_R16B03/lib/erl_interface/src/connect/ei_connect.c otp_src_R16B03-haiku/lib/erl_interface/src/connect/ei_connect.c
--- otp_src_R16B03/lib/erl_interface/src/connect/ei_connect.c
+++ otp_src_R16B03-haiku/lib/erl_interface/src/connect/ei_connect.c
@@ -1149,6 +1149,8 @@ static unsigned int gen_challenge(void)
#else /* some unix */
+int gethostid() { return 108; }
+
static unsigned int gen_challenge(void)
{
struct {

View File

@@ -2,27 +2,27 @@ 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"
REVISION="5"
ARCHITECTURES="x86 x86_gcc2"
SECONDARY_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
lua${secondaryArchSuffix} = $portVersion compat >= 5.1
cmd:lua${secondaryArchSuffix} = $portVersion compat >= 5.1
cmd:luac${secondaryArchSuffix} = $portVersion compat >= 5.1
lib:liblua${secondaryArchSuffix} = $portVersion compat >= 5.1
"
REQUIRES="
haiku >= $haikuVersion
haiku${secondaryArchSuffix} >= $haikuVersion
"
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
haiku${secondaryArchSuffix}_devel >= $haikuVersion
cmd:make
cmd:gcc
cmd:gcc${secondaryArchSuffix}
"
PATCHES="lua-5.1.4.patchset"
BUILD()
{
make haiku
@@ -30,14 +30,30 @@ BUILD()
INSTALL()
{
make install INSTALL_TOP="$prefix" INSTALL_MAN="$manDir" \
INSTALL_INC="$includeDir" INSTALL_LMOD="$dataDir/lua/$V"
make install INSTALL_TOP="$prefix" INSTALL_MAN="$manDir/man1" \
INSTALL_INC="$includeDir" INSTALL_LMOD="$dataDir/lua/5.1" \
INSTALL_LIB="$libDir" INSTALL_BIN="$binDir"
mkdir -p $libDir/pkgconfig
cp etc/lua.pc $libDir/pkgconfig/lua.pc
ln -s $libDir/liblua.so $libDir/liblua.so.5.1
prepareInstalledDevelLib liblua
fixPkgconfig
packageEntries devel $developDir
}
PROVIDES_devel="
lua${secondaryArchSuffix}_devel = $portVersion compat >= 5.1
devel:liblua$secondaryArchSuffix = $portVersion compat >= 5.1
"
REQUIRES_devel="
lua$secondaryArchSuffix == $portVersion
"
LICENSE="MIT"
COPYRIGHT="1994-2009, Lua.org, PUC-Rio"
DESCRIPTION="

View File

@@ -1,27 +1,20 @@
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.
From 0ba6279d1bee18e580206f0f86e3410f65db73c5 Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Wed, 15 Jan 2014 15:33:52 -0600
Subject: [PATCH] lua: fix 5.1 runtime issues
* Thanks to the work of Chris Roberts and
Adrien Destugues
---
Makefile | 6 +++---
src/Makefile | 13 ++++++++++---
src/luaconf.h | 11 +++++++++++
3 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 6e78f66..8b8fbfc 100644
index 6e78f66..b2e3868 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 =========
@@ -37,8 +30,17 @@ index 6e78f66..8b8fbfc 100644
TO_MAN= lua.1 luac.1
# Lua version and release.
@@ -53,7 +53,7 @@ R= 5.1.4
all: $(PLAT)
$(PLATS) clean:
- cd src && $(MAKE) $@
+ cd src && $(MAKE) V=$(V) $@
test: dummy
src/lua test/hello.lua
diff --git a/src/Makefile b/src/Makefile
index e4a3cd6..86bd1ce 100644
index e4a3cd6..9df0326 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -20,9 +20,10 @@ MYLIBS=
@@ -49,7 +51,7 @@ index e4a3cd6..86bd1ce 100644
+PLATS= aix ansi bsd freebsd generic haiku linux macosx mingw posix solaris
LUA_A= liblua.a
+LUA_SO= liblua.so
+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
@@ -62,175 +64,31 @@ index e4a3cd6..86bd1ce 100644
ALL_A= $(LUA_A)
default: $(PLAT)
@@ -57,6 +58,9 @@ $(LUA_T): $(LUA_O) $(LUA_A)
@@ -57,8 +58,11 @@ $(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)
+ $(CC) -o $@ -shared -fPIC -Wl,-soname=liblua.so.$(V) $(LDFLAGS) $? $(LIBS)
+
clean:
$(RM) $(ALL_T) $(ALL_O)
- $(RM) $(ALL_T) $(ALL_O)
+ $(RM) $(ALL_T) $(ALL_O) $(ALL_SO)
depend:
@$(CC) $(CFLAGS) -MM l*.c print.c
@@ -95,6 +99,9 @@ freebsd:
generic:
$(MAKE) all MYCFLAGS=
+haiku:
+ $(MAKE) all MYCFLAGS=-DLUA_USE_HAIKU LIBS=
+ $(MAKE) all SYSCFLAGS="-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
index e2cb261..96c4d45 100644
--- a/src/luaconf.h
+++ b/src/luaconf.h
@@ -33,6 +33,13 @@
@@ -247,49 +105,19 @@ index e2cb261..9f28f41 100644
#if defined(LUA_USE_LINUX)
#define LUA_USE_POSIX
#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
@@ -94,7 +101,11 @@
@@ -94,8 +101,12 @@
".\\?.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
+#ifndef LUA_ROOT
#define LUA_ROOT "/usr/local/"
+#endif
+#ifndef LUA_LDIR
#define LUA_LDIR LUA_ROOT "share/lua/5.1/"
+#endif
#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");
}
"./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \
--
1.8.3.4

View File

@@ -2,7 +2,7 @@ SUMMARY="LuaJIT is a Just-In-Time Compiler (JIT) for the Lua programming languag
HOMEPAGE="http://luajit.org/luajit.html"
SRC_URI="http://luajit.org/download/LuaJIT-$portVersion.tar.gz"
CHECKSUM_MD5="112dfb82548b03377fbefbba2e0e3a5b"
REVISION="1"
REVISION="2"
ARCHITECTURES="x86 x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
@@ -46,7 +46,14 @@ INSTALL()
INSTALL_MAN="$manDir/man1" INSTALL_LMOD="$dataDir/lua/5.1"
ln -s $libDir/libluajit-5.1.so.2.0.2 $libDir/libluajit-5.1.so.2
# the pkg-config is for 5.1 comapt
mkdir -p $libDir/pkgconfig
cp etc/luajit.pc $libDir/pkgconfig/luajit.pc
prepareInstalledDevelLib libluajit-5.1
fixPkgconfig
packageEntries devel $developDir
}
LICENSE="MIT"

View File

@@ -0,0 +1,877 @@
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/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
From 65db0c5cdfce63260e3b0f7f171a51273e18a40d Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Wed, 22 Jan 2014 00:08:14 +0000
Subject: [PATCH] haiku: Fix home non-packaged dir
---
Lib/site.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Lib/site.py b/Lib/site.py
index 304f994..74b0785 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -242,7 +242,7 @@ def addusersitepackages(known_paths):
"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_BASE = env_base if env_base else joinuser("~", "config", "non-packaged")
USER_SITE = os.path.join(USER_BASE, "lib",
"python" + sys.version[:3],
"site-packages")
--
1.8.3.4

View File

@@ -0,0 +1,116 @@
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.9/Python-2.6.9.tar.xz"
CHECKSUM_MD5="933a811f11e3db3d73ae492f6c3a7a76"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PATCHES="python-2.6.9.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.9"
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

@@ -141,6 +141,11 @@ INSTALL()
packageEntries wave $libDir/libboost_wave*
}
TEST() {
cd status
../bjam $jobArgs
}
PROVIDES_devel="
boost_devel$secondaryArchSuffix = $portVersion
devel:libboost_atomic$secondaryArchSuffix = $portVersion

View File

@@ -5,8 +5,8 @@ COPYRIGHT="1998-2013 Daniel Veillard. All Rights Reserved."
SRC_URI="ftp://xmlsoft.org/libxml2/libxml2-2.9.1.tar.gz"
CHECKSUM_MD5="9c0cfef285d5c4a5c80d00904ddab380"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
ARCHITECTURES="!x86_gcc2 !x86 !x86_64"
SECONDARY_ARCHITECTURES="!x86_gcc2 !x86"
PATCHES="libxml2-2.9.1.patchset"
@@ -36,7 +36,7 @@ BUILD_REQUIRES="
"
if $pythonModuleEnabled; then
BUILD_REQUIRES="$BUILD_REQUIRES
python
python >= 2.7
"
# Note: We don't use "cmd:python" here to avoid issues with the
# python search path.

View File

@@ -10,9 +10,9 @@ you have).
HOMEPAGE="http://www.idsoftware.com"
COPYRIGHT="Copyright (C) 1999-2005 Id Software, Inc."
LICENSE="GNU GPL v2"
SRC_URI="http://github.com/kallisti5/quake3/archive/$portVersion.tar.gz"
SRC_URI="https://github.com/kallisti5/quake3/archive/$portVersion.tar.gz"
CHECKSUM_MD5="d7f6106605ccd06ec94a3715f8aa34c5"
REVISION="1"
REVISION="2"
ARCHITECTURES="x86_gcc2 x86"
SECONDARY_ARCHITECTURES="x86"
@@ -21,6 +21,7 @@ PROVIDES="
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libGL$secondaryArchSuffix
"
BUILD_REQUIRES="
"
@@ -30,8 +31,8 @@ BUILD_PREREQUIRES="
cmd:ld$secondaryArchSuffix
cmd:make
cmd:nasm
devel:libGL$secondaryArchSuffix
"
#lib:libGL
SOURCE_DIR="quake3-$portVersion"
BUILD()

View File

@@ -0,0 +1,66 @@
SUMMARY="a top down Formula One Racing game"
HOMEPAGE="http://www2.braingames.getput.com/f1spirit/"
LICENSE="GNU GPL v2"
COPYRIGHT="2002-2008 Brain Games"
SRC_URI="http://braingames.jorito.net/f1spirit/f1spirit.src_0.rc9-1615.tgz"
CHECKSUM_MD5="304935124a1bf48a4de9b39077655fe9"
REVISION="1"
ARCHITECTURES="x86_gcc2"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libcurl$secondaryArchSuffix
lib:libglu$secondaryArchSuffix
lib:libsdl$secondaryArchSuffix
lib:libSDL_image$secondaryArchSuffix
lib:libSDL_mixer$secondaryArchSuffix
lib:libSDL_net_1.2$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
devel:libcurl$secondaryArchSuffix
devel:libglu$secondaryArchSuffix
devel:libsdl$secondaryArchSuffix
devel:libSDL_image$secondaryArchSuffix
devel:libSDL_mixer$secondaryArchSuffix
devel:libSDL_net_1.2$secondaryArchSuffix
lib:libSDL_net_1.2$secondaryArchSuffix
# Why is that required?
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
haiku_devel >= $haikuVersion
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
PATCHES="$portName-$portVersion.patchset"
BUILD()
{
make $jobArgs
}
INSTALL()
{
installDir=$appsDir/"F-1 Spirit"
mkdir -p "$installDir"
make install PREFIX="$installDir" GAMEDIR="$installDir"
cd "$installDir"
echo -e "#!/bin/sh\ncd \"$installDir\"/share/games/f1spirit && ./f1spirit" > f1spirit
addAppDeskbarSymlink "$installDir/$portName" "F-1 Spirit"
}
DESCRIPTION="
Race against your opponents on 21 tracks. Features online high scores, realtime
rain effect, split-screen multiplayer, and more!
"

View File

@@ -0,0 +1,21 @@
From 1ddc81cdd051fabb1e56e861f5fd5a9da429029c Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Tue, 21 Jan 2014 22:40:24 +0100
Subject: Remove outdated include.
diff --git a/sources/F1Shttp.cpp b/sources/F1Shttp.cpp
index 59a213c..9cb48cc 100644
--- a/sources/F1Shttp.cpp
+++ b/sources/F1Shttp.cpp
@@ -3,7 +3,6 @@
#include "string.h"
#include <curl/curl.h>
-#include <curl/types.h>
#include <curl/easy.h>
#include "F1Shttp.h"
--
1.8.3.4

View File

@@ -0,0 +1,67 @@
SUMMARY="The Maze of Galious."
HOMEPAGE="http://www2.braingames.getput.com/mog/"
LICENSE="GNU GPL v2"
COPYRIGHT="2002-2009 Brain Games"
SRC_URI="http://braingames.jorito.net/mog/downloads/mog.src_0.63-1548.tgz"
CHECKSUM_MD5="68604c258ce7347662777d853d895769"
REVISION="1"
ARCHITECTURES="x86_gcc2"
PROVIDES="
mog = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libsdl$secondaryArchSuffix
lib:libSDL_image$secondaryArchSuffix
lib:libSDL_mixer$secondaryArchSuffix
lib:libSDL_sound$secondaryArchSuffix
"
BUILD_REQUIRES="
devel:libsdl$secondaryArchSuffix
devel:libSDL_image$secondaryArchSuffix
devel:libSDL_mixer$secondaryArchSuffix
devel:libSDL_sound$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
haiku_devel >= $haikuVersion
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
BUILD()
{
make $jobArgs
}
INSTALL()
{
installDir=$appsDir/"Maze of Galious"
mkdir -p "$installDir"
make install PREFIX="$installDir" GAMEDIR="$installDir"
addAppDeskbarSymlink "$installDir/mog" "Maze of Galious"
}
DESCRIPTION="
The Maze of Galious (MoG in short) was originally a Konami game for the MSX
computer system. Its real name is Knightmare II: The Maze of Galious and is the
sequel of another Konami game called Knightmare.
MoG is a very addictive game where you have to kill thousands of enemies,
collect items in order to obtain new powers and defeat some really great demons
at the end of each level. The gameplay of MoG is not the boring linear one. In
MoG you are free to go everywhere you want from the beginning of the game. You
have to be very careful of the order in which you visit all the rooms in the
HUGE map if you want to keep your character alive. The map is structured in a
main map (called the castle) and 10 submaps (called the worlds). Initially you
are in the castle and you have to find the keys that open the doors to go to
each of the worlds. To complete the game you have to defeat the boss at the end
of each one of the 10 worlds. You are free to revisit each world as often as
you want in order to see if you have missed something. To defeat all 10 demons
you control two characters: Popolon and Aphrodite. Each one has special
abilities, i.e. Popolon has a greater ability to jump and Aphrodite is able to
dive.
"

View File

@@ -0,0 +1,58 @@
SUMMARY="A 2d racing game. Can you finish the race in time?"
HOMEPAGE="http://www2.braingames.getput.com/roadf/"
LICENSE="GNU GPL v2"
COPYRIGHT="2003-2009 Brain Games"
SRC_URI="http://braingames.jorito.net/roadfighter/downloads/roadfighter.src_1.0.1269.tgz"
CHECKSUM_MD5="a1626dda4d17ae30bbdd9c1ede2cd555"
REVISION="1"
ARCHITECTURES="x86_gcc2"
PROVIDES="
roadfighter = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libsdl$secondaryArchSuffix
lib:libSDL_image$secondaryArchSuffix
lib:libSDL_mixer$secondaryArchSuffix
lib:libSDL_sound$secondaryArchSuffix
lib:libSDL_ttf$secondaryArchSuffix
"
BUILD_REQUIRES="
devel:libsdl$secondaryArchSuffix
devel:libSDL_image$secondaryArchSuffix
devel:libSDL_mixer$secondaryArchSuffix
devel:libSDL_sound$secondaryArchSuffix
devel:libSDL_ttf$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
haiku_devel >= $haikuVersion
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
BUILD()
{
make $jobArgs
}
INSTALL()
{
installDir=$appsDir/"Road Fighter"
mkdir -p "$installDir"
make install PREFIX="$installDir" GAMEDIR="$installDir"
cd "$installDir"
echo -e "#!/bin/sh\n`cat roadfighter`" > roadfighter
addAppDeskbarSymlink "$installDir/roadfighter" "Road Fighter"
}
DESCRIPTION="
The goal is to reach the finish line within the stages without running out of
time, hitting other cars or running out of fuel (fuel is refilled by hitting a
special type of car).
"

View File

@@ -0,0 +1,671 @@
From d5e22939a27c71bc0e55a56623b7ea83dceca155 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 19 Jan 2014 17:50:47 +0100
Subject: Split writable files to writable directory
* Patch adapted from the Debian package.
* Rename "pause" to "paused" to avoid conflict with unistd.h pause().
diff --git a/sources/Makefile b/sources/Makefile
index 08a898f..779f7bd 100644
--- a/sources/Makefile
+++ b/sources/Makefile
@@ -12,11 +12,11 @@ OBJS := \
all: stransball2
%.o: %.cpp
- c++ -c -g3 -O3 $< -o $@ `sdl-config --cflags` -I/usr/local/include/SDL
+ c++ -c -g3 -O3 $< -o $@ `sdl-config --cflags`
# dynamically linked binary:
stransball2: $(OBJS)
- c++ $^ -o $@ `sdl-config --libs` -lSDL_image -lSDL_mixer -lSDL_sound -lSDL_sound -lSGE -I/usr/local/include/SDL
+ c++ $^ -o $@ `sdl-config --libs` -lSDL_image -lSDL_mixer -lSDL_sound -lSDL_sound -lSGE -lbe
mv ./stransball2 ..
clean:
diff --git a/sources/configuration.cpp b/sources/configuration.cpp
index b39fdc2..8ef89f9 100644
--- a/sources/configuration.cpp
+++ b/sources/configuration.cpp
@@ -1,4 +1,5 @@
#include "stdio.h"
+#include <unistd.h>
#include "SDL.h"
@@ -9,13 +10,17 @@ extern SDLKey PAUSE_KEY;
extern bool fullscreen;
extern int PIXEL_SIZE;
+extern char *datadir;
+extern char *confdir;
bool load_configuration(void)
{
int a,b,c,d,e,f,g;
FILE *fp;
+ chdir(confdir);
fp=fopen("transball.cfg","r");
+ chdir(datadir);
if (fp==0) return false;
@@ -46,7 +51,9 @@ void save_configuration(void)
{
FILE *fp;
+ chdir(confdir);
fp=fopen("transball.cfg","w");
+ chdir(datadir);
if (fp==0) return;
diff --git a/sources/encoder.cpp b/sources/encoder.cpp
index f2d4945..9780520 100644
--- a/sources/encoder.cpp
+++ b/sources/encoder.cpp
@@ -1,4 +1,8 @@
#include "stdio.h"
+#include "unistd.h"
+
+extern char *confdir;
+extern char *datadir;
void encode(char *in,char *out)
{
@@ -9,8 +13,11 @@ void encode(char *in,char *out)
FILE *fpin;
FILE *fpout;
+ chdir(datadir);
fpin=fopen(in,"rb");
+ chdir(confdir);
fpout=fopen(out,"wb");
+ chdir(datadir);
if (fpin==0 || fpout==0) return;
do{
@@ -40,8 +47,11 @@ void decode(char *in,char *out)
FILE *fpin;
FILE *fpout;
+ chdir(datadir);
fpin=fopen(in,"rb");
+ chdir(confdir);
fpout=fopen(out,"wb");
+ chdir(datadir);
if (fpin==0 || fpout==0) return;
do{
diff --git a/sources/game.cpp b/sources/game.cpp
index 6429e2d..901e3ee 100644
--- a/sources/game.cpp
+++ b/sources/game.cpp
@@ -8,6 +8,7 @@
#endif
#include <stdio.h>
+#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include "SDL/SDL.h"
@@ -84,6 +85,9 @@ extern TRANSBALL *game;
/* Frames per second counter: */
extern int frames_per_sec;
+extern char *datadir;
+extern char *confdir;
+
FILE *replayfile;
int replaynum;
int replay_source=0;
@@ -92,7 +96,7 @@ int replay_source=0;
SDLKey THRUST_KEY=SDLK_q,ANTITHRUST_KEY=SDLK_a,LEFT_KEY=SDLK_o,RIGHT_KEY=SDLK_p;
SDLKey FIRE_KEY=SDLK_SPACE,ATRACTOR_KEY=SDLK_RETURN;
SDLKey PAUSE_KEY=SDLK_F1;
-bool pause=false;
+bool paused=false;
unsigned char old_keyboard[SDLK_LAST];
SDL_Surface *image=0,*image2=0; /* For the tittle screen, etc. */
@@ -133,8 +137,10 @@ bool gamecycle(SDL_Surface *screen,int sx,int sy)
strcpy(tmp,"maps/");
strcat(tmp,levelpack);
+ chdir(datadir);
decode(tmp,"decoding.tmp");
+ chdir(confdir);
fp=fopen("decoding.tmp","r+");
if (fp!=0) {
fscanf(fp,"%i",&NLEVELS);
@@ -167,6 +173,8 @@ bool gamecycle(SDL_Surface *screen,int sx,int sy)
if (NLEVELS==-1) return false;
+ chdir(datadir);
+
switch(STATE) {
case 0: if (!state_logo_cycle(screen,sx,sy,keyboard)) return false;
break;
diff --git a/sources/main.cpp b/sources/main.cpp
index 285740a..b633601 100644
--- a/sources/main.cpp
+++ b/sources/main.cpp
@@ -12,6 +12,14 @@
#include "SDL_mixer.h"
#include "sge.h"
+#include <libgen.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <storage/FindDirectory.h>
+#include <storage/Path.h>
+
#include "fonts.h"
#include "list.h"
@@ -42,6 +50,8 @@ int frames_per_sec=0;
int frames_per_sec_tmp=0;
int init_time=0;
+char *datadir;
+char *confdir;
/* Surfaces: */
SDL_Surface *screen_sfc=0,*buffer_screen_sfc=0;
@@ -126,6 +136,33 @@ int main(int argc, char** argv)
setupTickCount();
#endif
+ mode_t mode;
+ FILE *cfg;
+
+ datadir=dirname(argv[0]);
+ BPath confPath;
+ find_directory(B_USER_SETTINGS_DIRECTORY, &confPath, true);
+ confdir = (char*) malloc(strlen(confPath.Path()) + 17);
+ strcpy(confdir, confPath.Path());
+ strcat(confdir,"/supertransball2");
+
+ mode=S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP;
+ mkdir(confdir,mode);
+ chdir(confdir);
+ mkdir("replays",mode);
+ mkdir("high",mode);
+
+ cfg=fopen("transball.cfg", "r");
+ if (!cfg)
+ {
+ cfg=fopen("transball.cfg", "w");
+ fprintf(cfg,"%s","113 97 111 112 32 13 282");
+ }
+
+ fclose(cfg);
+
+ chdir(datadir);
+
int time,act_time;
SDL_Event event;
bool quit = false;
diff --git a/sources/maps.cpp b/sources/maps.cpp
index 56df6f7..f1506c7 100644
--- a/sources/maps.cpp
+++ b/sources/maps.cpp
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <unistd.h>
#include <stdlib.h>
#include "SDL/SDL.h"
#include "SDL_mixer.h"
@@ -13,6 +14,8 @@
#define EMPTY_ROWS 8
#define FACTOR 512
+extern char *datadir;
+extern char *confdir;
TRANSBALL_MAP::TRANSBALL_MAP(char *file)
{
@@ -25,6 +28,7 @@ TRANSBALL_MAP::TRANSBALL_MAP(char *file)
S_enemyhit=0;
S_switch=0;
+ chdir(datadir);
fp=fopen(file,"r");
if (fp==0) {
sx=0;
diff --git a/sources/replays.cpp b/sources/replays.cpp
index 1d4e885..5d95fc5 100644
--- a/sources/replays.cpp
+++ b/sources/replays.cpp
@@ -1,5 +1,8 @@
#include "stdio.h"
+#include "unistd.h"
+extern char* datadir;
+extern char* confdir;
int replay_parameters(char *file, int *ship, int *length, char *levelname)
{
@@ -8,7 +11,9 @@ int replay_parameters(char *file, int *ship, int *length, char *levelname)
int l,end;
int v1,v2,fuel;
+ chdir(confdir);
fp=fopen(file,"rb");
+ chdir(datadir);
if (fp==0) return -1;
v1=fgetc(fp);
v2=fgetc(fp);
@@ -35,8 +40,11 @@ void replay_copy(char *f1,char *f2)
FILE *fp1,*fp2;
+ chdir(confdir);
fp1=fopen(f1,"rb");
+ /* chdir(confdir); */
fp2=fopen(f2,"wb");
+ chdir(datadir);
do{
fputc(fgetc(fp1),fp2);
diff --git a/sources/state_changepack.cpp b/sources/state_changepack.cpp
index 41c28da..0b56928 100644
--- a/sources/state_changepack.cpp
+++ b/sources/state_changepack.cpp
@@ -8,6 +8,7 @@
#endif
#include <stdio.h>
+#include "unistd.h"
#include <stdlib.h>
#include <string.h>
#include "SDL/SDL.h"
@@ -43,7 +44,7 @@ extern int replay_source;
extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY;
extern SDLKey FIRE_KEY,ATRACTOR_KEY;
extern SDLKey PAUSE_KEY;
-extern bool pause;
+extern bool paused;
extern unsigned char old_keyboard[SDLK_LAST];
extern SDL_Surface *image,*image2;
extern char edit_text[80];
@@ -63,6 +64,8 @@ extern char *leveltext[MAXLEVELS];
extern char *levelcode[MAXLEVELS];
extern int initialfuel[MAXLEVELS];
+extern char *confdir;
+extern char *datadir;
bool state_changepack_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *keyboard)
{
@@ -97,7 +100,8 @@ bool state_changepack_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *key
#else
DIR *dp;
struct dirent *ep;
-
+
+ chdir(datadir);
dp = opendir ("maps");
if (dp != NULL)
{
diff --git a/sources/state_chooseship.cpp b/sources/state_chooseship.cpp
index 6de61e2..7262269 100644
--- a/sources/state_chooseship.cpp
+++ b/sources/state_chooseship.cpp
@@ -43,7 +43,7 @@ extern int replay_source;
extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY;
extern SDLKey FIRE_KEY,ATRACTOR_KEY;
extern SDLKey PAUSE_KEY;
-extern bool pause;
+extern bool paused;
extern unsigned char old_keyboard[SDLK_LAST];
extern SDL_Surface *image,*image2;
extern char edit_text[80];
diff --git a/sources/state_endsequence.cpp b/sources/state_endsequence.cpp
index 963a9f7..ed3d3ad 100644
--- a/sources/state_endsequence.cpp
+++ b/sources/state_endsequence.cpp
@@ -43,7 +43,7 @@ extern int replay_source;
extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY;
extern SDLKey FIRE_KEY,ATRACTOR_KEY;
extern SDLKey PAUSE_KEY;
-extern bool pause;
+extern bool paused;
extern unsigned char old_keyboard[SDLK_LAST];
extern SDL_Surface *image,*image2;
extern char edit_text[80];
diff --git a/sources/state_game.cpp b/sources/state_game.cpp
index 10f515f..43856a2 100644
--- a/sources/state_game.cpp
+++ b/sources/state_game.cpp
@@ -43,7 +43,7 @@ extern int replay_source;
extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY;
extern SDLKey FIRE_KEY,ATRACTOR_KEY;
extern SDLKey PAUSE_KEY;
-extern bool pause;
+extern bool paused;
extern unsigned char old_keyboard[SDLK_LAST];
extern SDL_Surface *image,*image2;
extern char edit_text[80];
@@ -69,11 +69,11 @@ bool state_game_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *keyboard)
int retval=0;
if (keyboard[PAUSE_KEY] && !old_keyboard[PAUSE_KEY]) {
- if (pause) pause=false;
- else pause=true;
+ if (paused) paused=false;
+ else paused=true;
} /* if */
- if (!pause) {
+ if (!paused) {
retval=game->cycle(keyboard);
if (replayfile!=0) {
fputc(keyboard[THRUST_KEY],replayfile);
@@ -88,7 +88,7 @@ bool state_game_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *keyboard)
game->render(screen,sx,sy);
- if (pause) {
+ if (paused) {
surface_fader(screen,0.5F,0.5F,0.5F,-1,0);
font_print(sx/2,sy/2-16,"PAUSE",screen);
} else {
diff --git a/sources/state_gameover.cpp b/sources/state_gameover.cpp
index 7c02012..4b280b5 100644
--- a/sources/state_gameover.cpp
+++ b/sources/state_gameover.cpp
@@ -43,7 +43,7 @@ extern int replay_source;
extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY;
extern SDLKey FIRE_KEY,ATRACTOR_KEY;
extern SDLKey PAUSE_KEY;
-extern bool pause;
+extern bool paused;
extern unsigned char old_keyboard[SDLK_LAST];
extern SDL_Surface *image,*image2;
extern char edit_text[80];
diff --git a/sources/state_instructions.cpp b/sources/state_instructions.cpp
index acd6e03..882db1c 100644
--- a/sources/state_instructions.cpp
+++ b/sources/state_instructions.cpp
@@ -41,7 +41,7 @@ extern int replay_source;
extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY;
extern SDLKey FIRE_KEY,ATRACTOR_KEY;
extern SDLKey PAUSE_KEY;
-extern bool pause;
+extern bool paused;
extern unsigned char old_keyboard[SDLK_LAST];
extern SDL_Surface *image,*image2;
extern char edit_text[80];
diff --git a/sources/state_interphase.cpp b/sources/state_interphase.cpp
index 41a7810..24a0ecf 100644
--- a/sources/state_interphase.cpp
+++ b/sources/state_interphase.cpp
@@ -8,6 +8,7 @@
#endif
#include <stdio.h>
+#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include "SDL/SDL.h"
@@ -43,7 +44,7 @@ extern int replay_source;
extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY;
extern SDLKey FIRE_KEY,ATRACTOR_KEY;
extern SDLKey PAUSE_KEY;
-extern bool pause;
+extern bool paused;
extern unsigned char old_keyboard[SDLK_LAST];
extern SDL_Surface *image,*image2;
extern char edit_text[80];
@@ -63,6 +64,8 @@ extern char *leveltext[MAXLEVELS];
extern char *levelcode[MAXLEVELS];
extern int initialfuel[MAXLEVELS];
+extern char *datadir;
+extern char *confdir;
bool state_interphase_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *keyboard)
{
@@ -92,7 +95,9 @@ bool state_interphase_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *key
if (game=0) delete game;
game=new TRANSBALL("graphics/","sound/","maps/",initialfuel[level],levelnames[level],ship_type);
sprintf(tmp,"replays/replay%.3i.rpl",replaynum++);
+ chdir(confdir);
replayfile=fopen(tmp,"wb+");
+ chdir(datadir);
fputc(32,replayfile);
fputc(0,replayfile);
/* level name: */
diff --git a/sources/state_keyredefinition.cpp b/sources/state_keyredefinition.cpp
index b062e62..11355b6 100644
--- a/sources/state_keyredefinition.cpp
+++ b/sources/state_keyredefinition.cpp
@@ -43,7 +43,7 @@ extern int replay_source;
extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY;
extern SDLKey FIRE_KEY,ATRACTOR_KEY;
extern SDLKey PAUSE_KEY;
-extern bool pause;
+extern bool paused;
extern unsigned char old_keyboard[SDLK_LAST];
extern SDL_Surface *image,*image2;
extern char edit_text[80];
diff --git a/sources/state_levelfinished.cpp b/sources/state_levelfinished.cpp
index 31ccd8a..16993ec 100644
--- a/sources/state_levelfinished.cpp
+++ b/sources/state_levelfinished.cpp
@@ -43,7 +43,7 @@ extern int replay_source;
extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY;
extern SDLKey FIRE_KEY,ATRACTOR_KEY;
extern SDLKey PAUSE_KEY;
-extern bool pause;
+extern bool paused;
extern unsigned char old_keyboard[SDLK_LAST];
extern SDL_Surface *image,*image2;
extern char edit_text[80];
diff --git a/sources/state_logo.cpp b/sources/state_logo.cpp
index 1487e8b..4518429 100644
--- a/sources/state_logo.cpp
+++ b/sources/state_logo.cpp
@@ -41,7 +41,7 @@ extern int replay_source;
extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY;
extern SDLKey FIRE_KEY,ATRACTOR_KEY;
extern SDLKey PAUSE_KEY;
-extern bool pause;
+extern bool paused;
extern unsigned char old_keyboard[SDLK_LAST];
extern SDL_Surface *image,*image2;
extern char edit_text[80];
diff --git a/sources/state_mainmenu.cpp b/sources/state_mainmenu.cpp
index e689caf..9d6f86b 100644
--- a/sources/state_mainmenu.cpp
+++ b/sources/state_mainmenu.cpp
@@ -8,6 +8,7 @@
#endif
#include <stdio.h>
+#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include "SDL/SDL.h"
@@ -41,7 +42,7 @@ extern int replay_source;
extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY;
extern SDLKey FIRE_KEY,ATRACTOR_KEY;
extern SDLKey PAUSE_KEY;
-extern bool pause;
+extern bool paused;
extern unsigned char old_keyboard[SDLK_LAST];
extern SDL_Surface *image,*image2;
extern char edit_text[80];
@@ -57,6 +58,8 @@ extern List<char> levelpacks;
extern int act_levelpack;
extern char levelpack[256];
+extern char *datadir;
+extern char *confdir;
bool state_mainmenu_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *keyboard)
{
@@ -157,6 +160,7 @@ bool state_mainmenu_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *keybo
tittle_alpha=255;
sprintf(tmp,"demos/demo%i.rpl",((rand()%40)/10)+1);
+ chdir(datadir);
replayfile=fopen(tmp,"rb");
v1=fgetc(replayfile);
v2=fgetc(replayfile); // To maintain compatibility with a previous version
diff --git a/sources/state_replay.cpp b/sources/state_replay.cpp
index a38ac37..f8d2ba8 100644
--- a/sources/state_replay.cpp
+++ b/sources/state_replay.cpp
@@ -43,7 +43,7 @@ extern int replay_source;
extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY;
extern SDLKey FIRE_KEY,ATRACTOR_KEY;
extern SDLKey PAUSE_KEY;
-extern bool pause;
+extern bool paused;
extern unsigned char old_keyboard[SDLK_LAST];
extern SDL_Surface *image,*image2;
extern char edit_text[80];
@@ -71,11 +71,11 @@ bool state_replay_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *keyboar
SUBSTATE++;
if (keyboard[PAUSE_KEY] && !old_keyboard[PAUSE_KEY]) {
- if (pause) pause=false;
- else pause=true;
+ if (paused) paused=false;
+ else paused=true;
} /* if */
- if (!pause) {
+ if (!paused) {
int i;
unsigned char tmp[SDLK_LAST];
for(i=0;i<SDLK_LAST;i++) tmp[i]=0;
@@ -91,7 +91,7 @@ bool state_replay_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *keyboar
game->render(screen,sx,sy);
- if (pause) {
+ if (paused) {
surface_fader(screen,0.5F,0.5F,0.5F,-1,0);
font_print(sx/2,sy/2-16,"PAUSE",screen);
} else {
diff --git a/sources/state_replaymanager.cpp b/sources/state_replaymanager.cpp
index e767de2..7eb324c 100644
--- a/sources/state_replaymanager.cpp
+++ b/sources/state_replaymanager.cpp
@@ -8,6 +8,7 @@
#endif
#include <stdio.h>
+#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include "SDL/SDL.h"
@@ -43,7 +44,7 @@ extern int replay_source;
extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY;
extern SDLKey FIRE_KEY,ATRACTOR_KEY;
extern SDLKey PAUSE_KEY;
-extern bool pause;
+extern bool paused;
extern unsigned char old_keyboard[SDLK_LAST];
extern SDL_Surface *image,*image2;
extern char edit_text[80];
@@ -63,6 +64,8 @@ extern char *leveltext[MAXLEVELS];
extern char *levelcode[MAXLEVELS];
extern int initialfuel[MAXLEVELS];
+extern char *datadir;
+extern char *confdir;
bool state_replaymanager_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *keyboard)
{
@@ -103,6 +106,7 @@ bool state_replaymanager_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *
DIR *dp;
struct dirent *ep;
+ chdir(confdir);
if (replay_source==0) dp = opendir ("replays");
else dp = opendir ("high");
if (dp != NULL)
@@ -124,6 +128,7 @@ bool state_replaymanager_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *
}
(void) closedir (dp);
}
+ chdir(datadir);
#endif
first_file=0;
act_file=0;
@@ -210,7 +215,9 @@ bool state_replaymanager_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *
if (replay_source==0) sprintf(tmp,"replays/%s",files[act_file]);
else sprintf(tmp,"high/%s",files[act_file]);
+ chdir(confdir);
replayfile=fopen(tmp,"rb");
+ chdir(datadir);
v1=fgetc(replayfile);
v2=fgetc(replayfile); // To maintain compatibility with a previous version
@@ -309,6 +316,7 @@ bool state_replaymanager_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *
DIR *dp;
struct dirent *ep;
+ chdir(confdir);
dp = opendir ("replays");
if (dp != NULL)
{
@@ -329,6 +337,7 @@ bool state_replaymanager_cycle(SDL_Surface *screen,int sx,int sy,unsigned char *
}
(void) closedir (dp);
}
+ chdir(datadir);
#endif
/* Check if this replay is a highscore: */
diff --git a/sources/state_typetext.cpp b/sources/state_typetext.cpp
index da45793..20c5017 100644
--- a/sources/state_typetext.cpp
+++ b/sources/state_typetext.cpp
@@ -43,7 +43,7 @@ extern int replay_source;
extern SDLKey THRUST_KEY,ANTITHRUST_KEY,LEFT_KEY,RIGHT_KEY;
extern SDLKey FIRE_KEY,ATRACTOR_KEY;
extern SDLKey PAUSE_KEY;
-extern bool pause;
+extern bool paused;
extern unsigned char old_keyboard[SDLK_LAST];
extern SDL_Surface *image,*image2;
extern char edit_text[80];
--
1.8.3.4
From b382be38bd296d72071c135e9fddd6872040c532 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 19 Jan 2014 18:56:20 +0100
Subject: Avoid waste of CPU.
We can sleep longer than 1ms without slowing down the game.
diff --git a/sources/main.cpp b/sources/main.cpp
index b633601..5445993 100644
--- a/sources/main.cpp
+++ b/sources/main.cpp
@@ -284,7 +284,7 @@ int main(int argc, char** argv)
} /* if */
SDL_Flip(screen_sfc);
}
- SDL_Delay(1);
+ SDL_Delay(REDRAWING_PERIOD);
}
fonts_termination();
--
1.8.3.4

View File

@@ -0,0 +1,60 @@
SUMMARY="find and capture the SPHERE, and carry it to the sky."
HOMEPAGE="http://www2.braingames.getput.com/stransball2/default.asp"
LICENSE="GNU GPL v2"
COPYRIGHT="2003-2005 Brain Games"
SRC_URI="http://www2.braingames.getput.com/stransball2/downloads/stransball2-v15-windows.zip"
CHECKSUM_MD5="71214c96369fb78280b75725a51c1989"
REVISION="1"
ARCHITECTURES="x86_gcc2"
PROVIDES="
super_transball = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libsdl$secondaryArchSuffix
lib:libSDL_image$secondaryArchSuffix
lib:libSDL_mixer$secondaryArchSuffix
lib:libSDL_sound$secondaryArchSuffix
lib:libSGE$secondaryArchSuffix
"
BUILD_REQUIRES="
devel:libsdl$secondaryArchSuffix
devel:libSDL_image$secondaryArchSuffix
devel:libSDL_mixer$secondaryArchSuffix
devel:libSDL_sound$secondaryArchSuffix
devel:libSGE$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
haiku_devel >= $haikuVersion
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
SOURCE_DIR="stransball2"
PATCHES="super_transball-$portVersion.patchset"
BUILD()
{
cd sources
make $jobArgs
}
INSTALL()
{
installDir=$appsDir/"Super Transball 2"
mkdir -p "$installDir"
cp -r stransball2 demos graphics maps sound "$installDir"
addAppDeskbarSymlink "$installDir/stransball2" "Super Transball 2"
}
DESCRIPTION="
\"Super Transbal 2\" is the sequel of \"Transball\" and \"Transball 2\",
Inspired in THRUST type of games (and concretely in ZARA THRUSTA for the Amiga
500). In each level of Transball, the goal is to find the SPHERE, capture it
and carry it to the upper part of the level. The main obstacle is the gravity,
that impulses you towards the ground. But many other obstacles, canons, tanks,
doors, etc. will try to make difficult your journey...
"

View File

@@ -0,0 +1,75 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 782799a..c17a479 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,7 @@ find_package(OpenAL REQUIRED)
find_package(VorbisFile REQUIRED)
find_package(Ogg REQUIRED)
find_package(ModPlug REQUIRED)
-find_package(Lua51 REQUIRED)
+find_package(LuaJIT REQUIRED)
find_package(PhysFS REQUIRED)
# Explicit link to libdl is needed for Lua on some systems.
diff --git a/cmake/modules/FindLuaJIT.cmake b/cmake/modules/FindLuaJIT.cmake
new file mode 100644
index 0000000..6b45ed6
--- /dev/null
+++ b/cmake/modules/FindLuaJIT.cmake
@@ -0,0 +1,56 @@
+# Locate LuaJIT library
+# This module defines
+# LUAJIT_FOUND, if false, do not try to link to Lua
+# LUA_LIBRARIES
+# LUA_INCLUDE_DIR, where to find lua.h
+# LUAJIT_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
+
+## Copied from default CMake FindLua51.cmake
+
+find_path(LUA_INCLUDE_DIR luajit.h
+ HINTS
+ ENV LUA_DIR
+ PATH_SUFFIXES include/luajit-2.0 include
+ PATHS
+ ~/Library/Frameworks
+ /Library/Frameworks
+ /sw # Fink
+ /opt/local # DarwinPorts
+ /opt/csw # Blastwave
+ /opt
+)
+
+find_library(LUA_LIBRARY
+ NAMES luajit-5.1
+ HINTS
+ ENV LUA_DIR
+ PATH_SUFFIXES lib
+ PATHS
+ ~/Library/Frameworks
+ /Library/Frameworks
+ /sw
+ /opt/local
+ /opt/csw
+ /opt
+)
+
+if(LUA_LIBRARY)
+ set( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
+endif()
+
+if(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/luajit.h")
+ file(STRINGS "${LUA_INCLUDE_DIR}/luajit.h" luajit_version_str REGEX "^#define[ \t]+LUAJIT_VERSION[ \t]+\"LuaJIT .+\"")
+
+ string(REGEX REPLACE "^#define[ \t]+LUAJIT_VERSION[ \t]+\"LuaJIT ([^\"]+)\".*" "\\1" LUAJIT_VERSION_STRING "${luajit_version_str}")
+ unset(luajit_version_str)
+endif()
+
+include(FindPackageHandleStandardArgs)
+# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
+# all listed variables are TRUE
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LuaJIT
+ REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
+ VERSION_VAR LUAJIT_VERSION_STRING)
+
+mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
+

View File

@@ -5,38 +5,40 @@ Solarus is an open-source Zelda-like 2D game engine.
HOMEPAGE="http://solarus-games.org"
SRC_URI="http://www.solarus-games.org/downloads/solarus/solarus-1.1.1-src.tar.gz"
CHECKSUM_MD5="168894091ce4b728889069c767a1532d"
REVISION="1"
REVISION="2"
LICENSE="GNU GPL v3"
COPYRIGHT="2006-2013 Christopho, Solarus"
ARCHITECTURES="!x86_gcc2 !x86 !x86_64"
SECONDARY_ARCHITECTURES="!x86 !x86_64"
ARCHITECTURES="x86_gcc2 !x86 !x86_64"
SECONDARY_ARCHITECTURES="x86 !x86_64"
PROVIDES="
solarus = $portVersion
app:solarus = $portVersion
solarus$secondaryArchSuffix = $portVersion
cmd:solarus = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libSDL$secondaryArchSuffix
lib:sdl_ttf$secondaryArchSuffix
lib:sdl_image$secondaryArchSuffix
lib:libsdl_ttf$secondaryArchSuffix
lib:libsdl_image$secondaryArchSuffix
lib:libvorbis$secondaryArchSuffix
lib:libmodplug$secondaryArchSuffix >= 0.8.0
lib:libphysfs$secondaryArchSuffix
lib:liblua$secondaryArchSuffix
lib:liblua$secondaryArchSuffix == 5.1.4
lib:libopenal$secondaryArchSuffix
lib:libogg$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
devel:libSDL$secondaryArchSuffix
devel:sdl_ttf$secondaryArchSuffix
devel:sdl_image$secondaryArchSuffix
devel:libsdl_ttf$secondaryArchSuffix
devel:libsdl_image$secondaryArchSuffix
devel:libvorbis$secondaryArchSuffix
devel:libmodplug$secondaryArchSuffix >= 0.8.0
devel:libphysfs$secondaryArchSuffix
devel:liblua$secondaryArchSuffix
devel:liblua$secondaryArchSuffix == 5.1.4
devel:libopenal$secondaryArchSuffix
devel:libogg$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
@@ -48,12 +50,12 @@ BUILD_PREREQUIRES="
BUILD()
{
cmake -DCMAKE_BUILD_TYPE=Release .
cmake -DCMAKE_INSTALL_PREFIX="$prefix" \
-DCMAKE_BUILD_TYPE=Release .
make $jobArgs
}
INSTALL()
{
make install
#addAppDeskbarSymlink $binDir/solarus
}

View File

@@ -0,0 +1,54 @@
SUMMARY="a game like Deflektor (C64) or Mindbender (Amiga) "
HOMEPAGE="http://www.artsoft.org/mirrormagic/"
LICENSE="GNU GPL v2"
COPYRIGHT="1989-2003 Artsoft Entertainment"
SRC_URI="http://www.artsoft.org/RELEASES/unix/mirrormagic/mirrormagic-2.0.2.tar.gz"
#CHECKSUM_MD5="10c03c69d2df6bcae9d835d18215978f"
REVISION="1"
ARCHITECTURES="x86_gcc2"
PROVIDES="
mirrormagic = $portVersion
app:mirrormagic = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libsdl$secondaryArchSuffix
lib:libsdl_image$secondaryArchSuffix
lib:libsdl_mixer$secondaryArchSuffix
"
BUILD_REQUIRES="
devel:libsdl$secondaryArchSuffix
devel:libsdl_image$secondaryArchSuffix
devel:libsdl_mixer$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
haiku_devel >= $haikuVersion
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
PATCHES="mirrormagic-2.0.2.patchset"
BUILD()
{
# parallel build not available.
make sdl
}
INSTALL()
{
destDir="$appsDir/Mirror Magic"
mkdir -p "$destDir"
cp -r mirrormagic graphics levels music sounds "$destDir"
addAppDeskbarSymlink "$destDir/mirrormagic" "Mirror Magic"
}
# ----- DESCRIPTION -----------------------------------------------------------
DESCRIPTION="
Make the Laser reach the target by rotating mirrors, but take care of not
overheating.
"

View File

@@ -0,0 +1,106 @@
From 5e9e47e0aa86949c07c14a0012180614695ba74b Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Mon, 20 Jan 2014 20:59:52 +0100
Subject: Remove hardcoded -lm
diff --git a/src/Makefile b/src/Makefile
index 6ab93a5..6944437 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -113,7 +113,7 @@ OPTIONS = -O3 -Wall
endif
CFLAGS = $(OPTIONS) $(SYS_CFLAGS) $(CONFIG)
-LDFLAGS = $(SYS_LDFLAGS) $(EXTRA_LDFLAGS) -lm
+LDFLAGS = $(SYS_LDFLAGS) $(EXTRA_LDFLAGS)
SRCS = main.c \
--
1.8.3.4
From 587046f039a7a29ed96383d9d73b1d605a398701 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Mon, 20 Jan 2014 21:07:38 +0100
Subject: Have MirrorMagic looks for files in its own dir.
diff --git a/src/main.c b/src/main.c
index 0e3f90e..7a2cfaa 100644
--- a/src/main.c
+++ b/src/main.c
@@ -620,6 +620,8 @@ int num_element_info = sizeof(element_info)/sizeof(char *);
int main(int argc, char *argv[])
{
+ chdir(dirname(argv[0]));
+
InitCommandName(argv[0]);
InitExitFunction(CloseAllAndExit);
InitPlatformDependantStuff();
--
1.8.3.4
From 78ab3228259485da50b6a78fa66d47ea08ae6f4f Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Mon, 20 Jan 2014 21:29:11 +0100
Subject: Fix settings dir.
diff --git a/src/init.c b/src/init.c
index 923da8c..e287635 100644
--- a/src/init.c
+++ b/src/init.c
@@ -23,6 +23,10 @@
#include "tools.h"
#include "files.h"
+#if __HAIKU__
+#include <storage/FindDirectory.h>
+#endif
+
static void InitPlayerInfo(void);
static void InitLevelInfo(void);
static void InitSound(void);
@@ -33,10 +37,20 @@ static void InitElementProperties(void);
void OpenAll(void)
{
+#if __HAIKU__
+ char dir[256];
+ find_directory(B_USER_SETTINGS_DIRECTORY, 0, true, dir, sizeof(dir));
+ strcat(dir, "/mirrormagic");
+ InitProgramInfo(dir,
+ PROGRAM_TITLE_STRING, WINDOW_TITLE_STRING,
+ ICON_TITLE_STRING, X11_ICON_FILENAME, X11_ICONMASK_FILENAME,
+ MSDOS_POINTER_FILENAME);
+#else
InitProgramInfo(UNIX_USERDATA_DIRECTORY,
PROGRAM_TITLE_STRING, WINDOW_TITLE_STRING,
ICON_TITLE_STRING, X11_ICON_FILENAME, X11_ICONMASK_FILENAME,
MSDOS_POINTER_FILENAME);
+#endif
InitPlayerInfo();
diff --git a/src/libgame/misc.c b/src/libgame/misc.c
index 7a55d94..a46a298 100644
--- a/src/libgame/misc.c
+++ b/src/libgame/misc.c
@@ -348,7 +348,9 @@ char *getRealName()
char *getHomeDir()
{
-#if defined(PLATFORM_UNIX)
+#if __HAIKU__
+ return "";
+#elif defined(PLATFORM_UNIX)
static char *home_dir = NULL;
if (!home_dir)
--
1.8.3.4

View File

@@ -0,0 +1,100 @@
From 45ee17169b5ca4ebb52661725d3e0bb9f1377a4c Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Wed, 15 Jan 2014 23:08:17 +0100
Subject: Add pre-configured config.state file.
This avoids the build script asking questions using an interactive menu.
diff --git a/config.state b/config.state
new file mode 100644
index 0000000..01b69f6
--- /dev/null
+++ b/config.state
@@ -0,0 +1,14 @@
+CHOICE_debug_VALUE='nodebug'
+CHOICE_graphics_VALUE='opengl'
+CHOICE_sound_VALUE='mixsdl'
+CHOICE_mikmod_VALUE='external'
+CHOICE_ovcodec_VALUE='standard'
+CHOICE_netplay_VALUE='ipv4'
+CHOICE_joystick_VALUE='enabled'
+CHOICE_ioformat_VALUE='stdio_zip'
+CHOICE_accel_VALUE='asm'
+CHOICE_threadlib_VALUE='pthread'
+INPUT_install_prefix_VALUE='PREFIX_HERE'
+INPUT_install_bindir_VALUE='$prefix/bin'
+INPUT_install_libdir_VALUE='$prefix/lib'
+INPUT_install_sharedir_VALUE='$prefix/share'
--
1.8.3.4
From 3833a4d67d17c88f0ca5d042134a2f77e97475cb Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Wed, 15 Jan 2014 23:08:55 +0100
Subject: Make buildsystem aware of Haiku.
diff --git a/build/unix/config_functions b/build/unix/config_functions
index 4f017f1..7c4aa5a 100644
--- a/build/unix/config_functions
+++ b/build/unix/config_functions
@@ -1060,6 +1060,8 @@ set_host_system() {
HOST_SYSTEM="ARMV5" ;;
[Gg][Cc][Cc][Ee])
HOST_SYSTEM="GCCE" ;;
+ [Hh][Aa][Ii][Kk][Uu])
+ HOST_SYSTEM="Haiku" ;;
*)
build_message "Warning: host type '$BUILD_HOST' unknown. Using defaults."
;;
diff --git a/build/unix/config_proginfo_host b/build/unix/config_proginfo_host
index 6e0466c..d95c6c9 100644
--- a/build/unix/config_proginfo_host
+++ b/build/unix/config_proginfo_host
@@ -299,7 +299,7 @@ case "$HOST_SYSTEM" in
LIB_pthread_LDFLAGS="$(pthread-config --ldflags)"
LIB_pthread_VERSION="$(pthread-config --version)"
;;
- WINSCW|ARMV5|GCCE)
+ WINSCW|ARMV5|GCCE|Haiku)
LIB_pthread_DETECT="true"
;;
*)
@@ -321,6 +321,11 @@ case "$HOST_SYSTEM" in
ARMV5|WINSCW|GCCE)
LIB_netlibs_DETECT="false"
;;
+ Haiku)
+ LIB_netlibs_CFLAGS=""
+ LIB_netlibs_LDFLAGS="-lnetwork"
+ LIB_netlibs_VERSION=""
+ ;;
esac
--
1.8.3.4
From 0cf24463ad192a871fc103821b477cf49bc91306 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Wed, 15 Jan 2014 23:09:08 +0100
Subject: Add missing include for use of select().
diff --git a/src/libs/network/netmanager/netmanager_bsd.c b/src/libs/network/netmanager/netmanager_bsd.c
index 29159f8..4390eb8 100644
--- a/src/libs/network/netmanager/netmanager_bsd.c
+++ b/src/libs/network/netmanager/netmanager_bsd.c
@@ -30,6 +30,7 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/select.h>
#include "netmanager_common.ci"
#include "ndindex.ci"
--
1.8.3.4

View File

@@ -0,0 +1,74 @@
SUMMARY="a port of Star Control II for modern personal computers and operating systems"
DESCRIPTION="
The project started in August 2002, when Toys For Bob released the partially
ported sources of Star Control 2 3DO version to the fan community. Our goal is
to port this wonderful game to current personal computers and operating systems.
It is and will remain 100% free of charge, and anyone can contribute to the
project and thus help make it even better. For more information, look at our
info page.
"
HOMEPAGE="http://sc2.sourceforge.net/"
SRC_URI="http://prdownloads.sourceforge.net/sc2/uqm-0.7.0-source.tgz"
CHECKSUM_MD5="f9018ea0493d7dac6a9e1006b00af7df"
REVISION="1"
ARCHITECTURES="!x86 ?x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
# x86_gcc2 is fine as primary target architecture as long as we're building
# for a different secondary architecture.
ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"
#PATCHES="vcmi-0.94.patchset"
PROVIDES="
uqm$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libSDL_1.2$secondaryArchSuffix
lib:libsdl_image$secondaryArchSuffix
lib:libz$secondaryArchSuffix
lib:libpng$secondaryArchSuffix
lib:libvorbisfile$secondaryArchSuffix
lib:libogg$secondaryArchSuffix
lib:libmikmod$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
devel:libSDL$secondaryArchSuffix
devel:libsdl_image$secondaryArchSuffix
devel:libz$secondaryArchSuffix
devel:libz$secondaryArchSuffix
devel:libpng$secondaryArchSuffix
devel:libvorbisfile$secondaryArchSuffix
devel:libogg$secondaryArchSuffix
devel:libmikmod$secondaryArchSuffix
devel:libglu$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:as$secondaryArchSuffix
cmd:sed
cmd:make
cmd:tr
cmd:pkg_config$secondaryArchSuffix
"
PATCHES="uqm-$portVersion.patchset"
BUILD()
{
sed -i -e"s!PREFIX_HERE!$prefix!" config.state
./build.sh uqm reprocess_config
./build.sh uqm
}
INSTALL()
{
./build.sh uqm install
}
COPYRIGHT="2005-2013 VCMI Team"
LICENSE="GNU GPL v2"

View File

@@ -9,13 +9,13 @@ DESCRIPTION="
HOMEPAGE="http://synrc.com/client/chat/haiku/"
SRC_URI="git+https://github.com/devaspot/chat.git"
LICENSE="MIT"
COPYRIGHT="2012 Maxim Sokhatsky"
REVISION="1"
COPYRIGHT="2010-2014 Maxim Sokhatsky"
REVISION="2"
ARCHITECTURES="x86_gcc2 x86"
PROVIDES="
chat = $portVersion
app:chat = $portVersion
Chat = $portVersion
app:Chat = $portVersion
"
REQUIRES="
@@ -35,18 +35,18 @@ BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:which
cmd:mkdepend
"
BUILD()
{
{
cd src
make -f Makefile.gcc2 BUILDHOME=`finddir B_SYSTEM_DEVELOP_DIRECTORY`
chmod 755 Chat
BUILDHOME=`finddir B_SYSTEM_DEVELOP_DIRECTORY` make
}
INSTALL()
{
mkdir -p $appsDir
cp src/Chat $appsDir/Chat
cp src/objects.*-release/Chat $appsDir/Chat
addAppDeskbarSymlink $appsDir/Chat "Chat"
}

View File

@@ -3,10 +3,10 @@ DESCRIPTION="
Vision is an IRC client for Haiku.
"
HOMEPAGE="http://vision.sourceforge.net/"
SRC_URI="svn://svn.code.sf.net/p/vision/code/branches/0.9.7#947"
SRC_URI="svn://svn.code.sf.net/p/vision/code/branches/0.9.7#949"
LICENSE="MPL v1.1"
COPYRIGHT="1999-2010 The Vision Team"
REVISION="3"
REVISION="2"
ARCHITECTURES="x86_gcc2 x86 x86_64"
if [ $targetArchitecture != x86_gcc2 ]; then

View File

@@ -8,7 +8,7 @@ emulators, and popular games.
HOMEPAGE="http://www.libsdl.org/"
SRC_URI="http://www.libsdl.org/release/SDL2-2.0.1.tar.gz"
CHECKSUM_MD5="0eb97039488bf463e775295f7b18b227"
REVISION="2"
REVISION="3"
LICENSE="Zlib"
COPYRIGHT="1997-2013 Sam Lantinga"
@@ -52,6 +52,8 @@ BUILD_PREREQUIRES="
SOURCE_DIR="SDL2-$portVersion"
PATCHES="libsdl2-2.0.1.patchset"
BUILD()
{
runConfigure ./configure
@@ -70,10 +72,10 @@ INSTALL()
libSDL2-2.0
fixPkgconfig
fixDevelopLibDirReferences $binDir/sdl2-config$secondaryArchSuffix
fixDevelopLibDirReferences $binDir/sdl2-config
packageEntries devel \
$developDir $binDir/sdl2-config$secondaryArchSuffix $dataDir
$developDir $binDir/sdl2-config $dataDir
}
# ----- devel package -------------------------------------

View File

@@ -0,0 +1,115 @@
From 5491ee3ebfd9ddb58dad8e46a0b9afd30e12f000 Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Wed, 15 Jan 2014 00:55:06 -0600
Subject: [PATCH] Haiku: Clean up includes
* Remove random references to be/os/
---
src/joystick/beos/SDL_bejoystick.cc | 4 ++--
src/loadso/beos/SDL_sysloadso.c | 2 +-
src/thread/beos/SDL_syssem.c | 2 +-
src/thread/beos/SDL_systhread.c | 2 +-
src/thread/beos/SDL_systhread_c.h | 2 +-
src/timer/beos/SDL_systimer.c | 2 +-
src/video/bwindow/SDL_BWin.h | 4 ++--
7 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/joystick/beos/SDL_bejoystick.cc b/src/joystick/beos/SDL_bejoystick.cc
index c324581..2b93d09 100644
--- a/src/joystick/beos/SDL_bejoystick.cc
+++ b/src/joystick/beos/SDL_bejoystick.cc
@@ -24,8 +24,8 @@
/* This is the system specific header for the SDL joystick API */
-#include <be/support/String.h>
-#include <be/device/Joystick.h>
+#include <String.h>
+#include <Joystick.h>
extern "C"
{
diff --git a/src/loadso/beos/SDL_sysloadso.c b/src/loadso/beos/SDL_sysloadso.c
index 524cd71..0679bcb 100644
--- a/src/loadso/beos/SDL_sysloadso.c
+++ b/src/loadso/beos/SDL_sysloadso.c
@@ -26,7 +26,7 @@
/* System dependent library loading routines */
#include <stdio.h>
-#include <be/kernel/image.h>
+#include <image.h>
#include "SDL_loadso.h"
diff --git a/src/thread/beos/SDL_syssem.c b/src/thread/beos/SDL_syssem.c
index 9661f90..269557e 100644
--- a/src/thread/beos/SDL_syssem.c
+++ b/src/thread/beos/SDL_syssem.c
@@ -24,7 +24,7 @@
/* Semaphores in the BeOS environment */
-#include <be/kernel/OS.h>
+#include <OS.h>
#include "SDL_thread.h"
diff --git a/src/thread/beos/SDL_systhread.c b/src/thread/beos/SDL_systhread.c
index 11646f9..7371f0a 100644
--- a/src/thread/beos/SDL_systhread.c
+++ b/src/thread/beos/SDL_systhread.c
@@ -26,7 +26,7 @@
#include <stdio.h>
#include <signal.h>
-#include <be/kernel/OS.h>
+#include <OS.h>
#include "SDL_mutex.h"
#include "SDL_thread.h"
diff --git a/src/thread/beos/SDL_systhread_c.h b/src/thread/beos/SDL_systhread_c.h
index a350ab5..65ef60d 100644
--- a/src/thread/beos/SDL_systhread_c.h
+++ b/src/thread/beos/SDL_systhread_c.h
@@ -21,7 +21,7 @@
#include "SDL_config.h"
#include <signal.h>
-#include <be/kernel/OS.h>
+#include <OS.h>
typedef thread_id SYS_ThreadHandle;
diff --git a/src/timer/beos/SDL_systimer.c b/src/timer/beos/SDL_systimer.c
index fd22e44..370e2d9 100644
--- a/src/timer/beos/SDL_systimer.c
+++ b/src/timer/beos/SDL_systimer.c
@@ -22,7 +22,7 @@
#ifdef SDL_TIMER_BEOS
-#include <be/kernel/OS.h>
+#include <OS.h>
#include "SDL_timer.h"
diff --git a/src/video/bwindow/SDL_BWin.h b/src/video/bwindow/SDL_BWin.h
index 6b6a71e..fc034ed 100644
--- a/src/video/bwindow/SDL_BWin.h
+++ b/src/video/bwindow/SDL_BWin.h
@@ -38,9 +38,9 @@ extern "C" {
#include <stdio.h>
#include <AppKit.h>
#include <InterfaceKit.h>
-#include <be/game/DirectWindow.h>
+#include <DirectWindow.h>
#if SDL_VIDEO_OPENGL
-#include <be/opengl/GLView.h>
+#include <GLView.h>
#endif
#include "SDL_events.h"
#include "../../main/beos/SDL_BApp.h"
--
1.8.3.4

View File

@@ -27,6 +27,7 @@ PROVIDES="
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libGL$secondaryArchSuffix # No clue, it wants it
lib:libSDL2$secondaryArchSuffix
lib:libogg$secondaryArchSuffix
lib:libflac$secondaryArchSuffix
@@ -38,6 +39,7 @@ REQUIRES="
"
BUILD_REQUIRES="
devel:libGL$secondaryArchSuffix
devel:libSDL2$secondaryArchSuffix
devel:libogg$secondaryArchSuffix
devel:libflac$secondaryArchSuffix

View File

@@ -7,7 +7,7 @@ SRC_URI="http://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.8.tar.gz"
CHECKSUM_MD5="20e64e61d65662db66c379034f11f718"
LICENSE="Zlib"
COPYRIGHT="1997-2012 Sam Lantinga"
REVISION="2"
REVISION="3"
ARCHITECTURES="x86 x86_gcc2"
SECONDARY_ARCHITECTURES="x86_gcc2 x86 x86_64"
@@ -57,6 +57,7 @@ INSTALL()
make install
prepareInstalledDevelLib libSDL_net
prepareInstalledDevelLib libSDL_net-1.2
fixPkgconfig
packageEntries devel \

View File

@@ -8,7 +8,7 @@ HOMEPAGE="http://www.icculus.org/SDL_sound"
SRC_URI="hg+http://hg.icculus.org/icculus/SDL_sound#release-1.0.3"
LICENSE="GNU LGPL v2.1"
COPYRIGHT="2001-2009 Ryan C. Gordon"
REVISION="1"
REVISION="2"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
@@ -33,6 +33,8 @@ REQUIRES="
lib:libmodplug$secondaryArchSuffix
# lib:smpeg$secondaryArchSuffix
# lib:physfs$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
"
BUILD_REQUIRES="

View File

@@ -8,7 +8,7 @@ CHECKSUM_MD5="a76975665b6a2bf189130fa2c8821caf"
LICENSE="GNU LGPL v2.1"
COPYRIGHT="1999-2003 Anders Lindstrom"
REVISION="1"
REVISION="2"
ARCHITECTURES="x86_gcc2 x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
@@ -60,10 +60,10 @@ INSTALL()
}
PROVIDES_devel="
libSGE${secondaryArchSuffix}_devel = $portVersion compat >= 030809
sge${secondaryArchSuffix}_devel = $portVersion compat >= 030809
devel:libSGE$secondaryArchSuffix = $portVersion compat >= 030809
"
REQUIRES_devel="
libSGE$secondaryArchSuffix == $portVersion base
sge$secondaryArchSuffix == $portVersion base
"

View File

@@ -9,7 +9,7 @@ HOMEPAGE="http://www.icculus.org/smpeg"
SRC_URI="svn://svn.icculus.org/smpeg/tags/release_0_4_5"
LICENSE="GNU LGPL v2"
COPYRIGHT="1999-2004 Sam Lantinga, Joe Tennies."
REVISION="1"
REVISION="2"
ARCHITECTURES="x86 x86_gcc2"
SECONDARY_ARCHITECTURES="x86_gcc2 x86 ?x86_64"
@@ -26,7 +26,7 @@ PROVIDES="
REQUIRES="
haiku$secondaryArchSuffix
lib:libglu$secondaryArchSuffix
lib:libSDL$secondaryArchSuffix
lib:libSDL_1.2$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
"

View File

@@ -0,0 +1,61 @@
SUMMARY="fxload - utility for EZ-USB firmware installation"
DESCRIPTION="
This program is conveniently able to download firmware into FX, FX2, and FX2LP \
EZ-USB devices, as well as the original AnchorChips EZ-USB.
Primarily as an aid for developers, this can also be used to update firmware on \
devices which boot from I2C serial EEPROMs. For that use, as well as \
downloading firmware to all other off-chip memory, a second stage loader must \
first be downloaded.
The distribution includes a3load.hex, which is a simple second stage loader \
that works with all the EZ-USB products listed above. If you want to write to \
an EEPROM, you can use the appropriate version of the Vend_Ax code provided \
with the Cypress developer kit.
This program was modified from the original version available from \
http://linux-hotplug.sourceforge.net to use libusbx [http://libusbx.org]. The \
aim is to integrate this program into the libusbx samples directory.
Besides Linux, use of libusbx as the USB backend allows fxload to be used on \
Windows, OS-X as well as any other platform supported by libusbx.
You are invited to post any bug reports or patches to the libusbx-devel mailing \
list.
"
LICENSE="GNU GPL v2"
COPYRIGHT="
2001 Stephen Williams <steve@icarus.com>
2001-2002 David Brownell <dbrownell@users.sourceforge.net>
2008 Roger Williams <rawqux@users.sourceforge.net>
2012 Pete Batard <pete@akeo.ie>
"
HOMEPAGE="https://github.com/pbatard/fxload"
SRC_URI="git+git://github.com/pbatard/fxload#cd1c1a062579b921d7694a3244cdefc60fd3325f"
REVISION="1"
ARCHITECTURES="x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
cmd:fxload$secondaryArchSuffix
"
REQUIRES="
lib:libusb_1.0$secondaryArchSuffix
haiku$secondaryArchSuffix >= $haikuVersion
"
BUILD_REQUIRES="
devel:libusb_1.0${secondaryArchSuffix}
haiku${secondaryArchSuffix}_devel >= $haikuVersion
"
BUILD_PREREQUIRES="
cmd:make
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:pkg_config
cmd:install
"
BUILD()
{
export PKG_CONFIG_LIBDIR=/system/develop/lib/x86/pkgconfig/
make
}
INSTALL()
{
make install sbindir=$binDir mandir=$manDir INSTALL_PROGRAM="install -cD"
}

View File

@@ -0,0 +1,120 @@
SUMMARY="A llvm front end compiler for C and C++"
DESCRIPTION="
Clang is an 'LLVM native' C/C++/Objective-C compiler, which aims to deliver \
amazingly fast compiles (e.g. about 3x faster than GCC when compiling \
Objective-C code in a debug configuration), extremely useful error and warning \
messages and to provide a platform for building great source level tools.
"
HOMEPAGE="http://www.llvm.org/"
LICENSE="UIUC"
COPYRIGHT="2003-2012 University of Illinois at Urbana-Champaign"
SRC_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.gz"
CHECKSUM_MD5="46ed668a1ce38985120dbf6344cf6116"
SRC_URI_2="http://llvm.org/releases/${portVersion}/clang-${portVersion}.src.tar.gz"
CHECKSUM_MD5_2="b378f1e2c424e03289effc75268d3d2c"
REVISION="2"
ARCHITECTURES="x86 x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
clang$secondaryArchSuffix = $portVersion
cmd:clang = $portVersion
cmd:clang++ = $portVersion
cmd:c_index_test = $portVersion
lib:libLTO = $portVersion
lib:libclang = $portVersion
lib:libprofile_rt = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
"
BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:gcc$secondaryArchSuffix
cmd:groff
cmd:ld$secondaryArchSuffix
cmd:libtoolize
cmd:make
cmd:python
cmd:sed
"
SOURCE_DIR="llvm-${portVersion}"
PATCHES="llvm-${portVersion}.patchset"
PATCHES_2="clang-${portVersion}.patchset"
BUILD()
{
mkdir -p tools/clang
cp -rd $sourceDir2/clang-${portVersion}/* tools/clang/
#cp -r /boot/system/data/libtool/config/. autoconf/
#cp -r /boot/system/data/libtool/config/. projects/sample/autoconf/
# Fix improper env paths
find . -type f -exec sed -i 's/\/usr\/bin\/env/\/bin\/env/g' "{}" \;
# Haiku C++ requires rtti in a lot of central system components
# such as Mesa
export REQUIRES_RTTI=1
# TODO: clang's build system seems to ignore doc / man / shared dirs?
runConfigure ./configure --enable-optimized
make $jobArgs
}
INSTALL()
{
mkdir -p $developDir
mkdir -p $docDir
make install-clang
# Install static analysis tools
mkdir -p $developDir/tools/clang$secondaryArchSuffix
cp -Ra tools/clang/tools/scan-build $developDir/tools/clang$secondaryArchSuffix/
cp -Ra tools/clang/tools/scan-view $developDir/tools/clang$secondaryArchSuffix/
ln -s $developDir/tools/clang$secondaryArchSuffix/scan-build/scan-build $binDir/scan-build
ln -s $developDir/tools/clang$secondaryArchSuffix/scan-view/scan-view $binDir/scan-view
ln -s $binDir/clang $developDir/tools/clang$secondaryArchSuffix/scan-build/clang
# analysis package
packageEntries analysis \
$binDir/scan-build \
$binDir/scan-view \
$developDir/tools/clang$secondaryArchSuffix
}
TEST()
{
make check
}
# ----- analysis package -------------------------------------------------------
SUMMARY_analysis="Static analysis tools using the clang compiler"
PROVIDES_analysis="
clang${secondaryArchSuffix}_analysis = $portVersion
cmd:scan_build = $portVersion
cmd:scan_view = $portVersion
"
REQUIRES_analysis="
clang$secondaryArchSuffix == $portVersion base
"

View File

@@ -0,0 +1,97 @@
From 33c9dfc71ce4a7cc0a0e5967b9110bcbc3d0a7d7 Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Fri, 24 Jan 2014 02:22:17 +0000
Subject: [PATCH] haiku: Fix header search paths
* /boot/develop no longer exists
* /boot/common no longer exists
* We still need to figure something out
for secondary architecture builds.
---
lib/Frontend/InitHeaderSearch.cpp | 70 +++++++++++++++++++++------------------
1 file changed, 38 insertions(+), 32 deletions(-)
diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
index d144cbb..e96e329 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/lib/Frontend/InitHeaderSearch.cpp
@@ -272,38 +272,44 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
llvm_unreachable("Include management is handled in the driver.");
case llvm::Triple::Haiku:
- AddPath("/boot/common/include", System, false);
- AddPath("/boot/develop/headers/os", System, false);
- AddPath("/boot/develop/headers/os/app", System, false);
- AddPath("/boot/develop/headers/os/arch", System, false);
- AddPath("/boot/develop/headers/os/device", System, false);
- AddPath("/boot/develop/headers/os/drivers", System, false);
- AddPath("/boot/develop/headers/os/game", System, false);
- AddPath("/boot/develop/headers/os/interface", System, false);
- AddPath("/boot/develop/headers/os/kernel", System, false);
- AddPath("/boot/develop/headers/os/locale", System, false);
- AddPath("/boot/develop/headers/os/mail", System, false);
- AddPath("/boot/develop/headers/os/media", System, false);
- AddPath("/boot/develop/headers/os/midi", System, false);
- AddPath("/boot/develop/headers/os/midi2", System, false);
- AddPath("/boot/develop/headers/os/net", System, false);
- AddPath("/boot/develop/headers/os/storage", System, false);
- AddPath("/boot/develop/headers/os/support", System, false);
- AddPath("/boot/develop/headers/os/translation", System, false);
- AddPath("/boot/develop/headers/os/add-ons/graphics", System, false);
- AddPath("/boot/develop/headers/os/add-ons/input_server", System, false);
- AddPath("/boot/develop/headers/os/add-ons/screen_saver", System, false);
- AddPath("/boot/develop/headers/os/add-ons/tracker", System, false);
- AddPath("/boot/develop/headers/os/be_apps/Deskbar", System, false);
- AddPath("/boot/develop/headers/os/be_apps/NetPositive", System, false);
- AddPath("/boot/develop/headers/os/be_apps/Tracker", System, false);
- AddPath("/boot/develop/headers/cpp", System, false);
- AddPath("/boot/develop/headers/cpp/i586-pc-haiku", System, false);
- AddPath("/boot/develop/headers/3rdparty", System, false);
- AddPath("/boot/develop/headers/bsd", System, false);
- AddPath("/boot/develop/headers/glibc", System, false);
- AddPath("/boot/develop/headers/posix", System, false);
- AddPath("/boot/develop/headers", System, false);
+ // TODO: We need to handle hybrid secondary architecture paths
+ // (see buildtools/tree/gcc/gcc/config/haiku.h)
+ AddPath("/boot/system/non-packaged/develop/headers", System, false);
+ AddPath("/boot/system/develop/headers/os", System, false);
+ AddPath("/boot/system/develop/headers/os/app", System, false);
+ AddPath("/boot/system/develop/headers/os/arch", System, false);
+ AddPath("/boot/system/develop/headers/os/device", System, false);
+ AddPath("/boot/system/develop/headers/os/drivers", System, false);
+ AddPath("/boot/system/develop/headers/os/game", System, false);
+ AddPath("/boot/system/develop/headers/os/interface", System, false);
+ AddPath("/boot/system/develop/headers/os/kernel", System, false);
+ AddPath("/boot/system/develop/headers/os/locale", System, false);
+ AddPath("/boot/system/develop/headers/os/mail", System, false);
+ AddPath("/boot/system/develop/headers/os/media", System, false);
+ AddPath("/boot/system/develop/headers/os/midi", System, false);
+ AddPath("/boot/system/develop/headers/os/midi2", System, false);
+ AddPath("/boot/system/develop/headers/os/net", System, false);
+ AddPath("/boot/system/develop/headers/os/opengl", System, false);
+ AddPath("/boot/system/develop/headers/os/storage", System, false);
+ AddPath("/boot/system/develop/headers/os/support", System, false);
+ AddPath("/boot/system/develop/headers/os/translation", System, false);
+ AddPath("/boot/system/develop/headers/os/add-ons/graphics", System, false);
+ AddPath("/boot/system/develop/headers/os/add-ons/input_server", System, false);
+ AddPath("/boot/system/develop/headers/os/add-ons/mail_daemon", System, false);
+ AddPath("/boot/system/develop/headers/os/add-ons/registrar", System, false);
+ AddPath("/boot/system/develop/headers/os/add-ons/screen_saver", System, false);
+ AddPath("/boot/system/develop/headers/os/add-ons/tracker", System, false);
+ AddPath("/boot/system/develop/headers/os/be_apps/Deskbar", System, false);
+ AddPath("/boot/system/develop/headers/os/be_apps/NetPositive", System, false);
+ AddPath("/boot/system/develop/headers/os/be_apps/Tracker", System, false);
+ AddPath("/boot/system/develop/headers/cpp", System, false);
+ AddPath("/boot/system/develop/headers/cpp/i586-pc-haiku", System, false);
+ AddPath("/boot/system/develop/headers/3rdparty", System, false);
+ AddPath("/boot/system/develop/headers/bsd", System, false);
+ AddPath("/boot/system/develop/headers/glibc", System, false);
+ AddPath("/boot/system/develop/headers/gnu", System, false);
+ AddPath("/boot/system/develop/headers/posix", System, false);
+ AddPath("/boot/system/develop/headers", System, false);
break;
case llvm::Triple::RTEMS:
break;
--
1.8.3.4

View File

@@ -0,0 +1,25 @@
From 744634aa845c403f5a39b8257bbacd36dc1dd351 Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Wed, 22 Jan 2014 05:04:31 +0000
Subject: [PATCH] haiku: fix Host.h for endian.h
---
include/llvm/Support/Host.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/llvm/Support/Host.h b/include/llvm/Support/Host.h
index 28c4cc7..ab985a4 100644
--- a/include/llvm/Support/Host.h
+++ b/include/llvm/Support/Host.h
@@ -16,7 +16,7 @@
#include "llvm/ADT/StringMap.h"
-#if defined(__linux__) || defined(__GNU__)
+#if defined(__linux__) || defined(__GNU__) || defined(__HAIKU__)
#include <endian.h>
#else
#if !defined(BYTE_ORDER) && !defined(LLVM_ON_WIN32)
--
1.8.3.4

View File

@@ -9,10 +9,10 @@ LICENSE="
"
COPYRIGHT="1988-2000 Free Software Foundation, Inc."
SRC_URI="
git+file://$portBaseDir/../binutils/download/BuildtoolsPM.git#6ff546f23b0259bcd27550aa6ad8aaef89fd1bf6
git+git://github.com/haiku/BuildtoolsPM.git#6ff546f23b0259bcd27550aa6ad8aaef89fd1bf6
git+file://$portBaseDir/../binutils/download/buildtools.git#9bfca2f40f0857932e8bc66b6d1fdae94acf8d9c
git+git://github.com/haiku/buildtools.git#9bfca2f40f0857932e8bc66b6d1fdae94acf8d9c
"
REVISION="2"
REVISION="4"
ARCHITECTURES="x86_gcc2"
if [ $effectiveTargetArchitecture = x86_gcc2 -a $targetArchitecture = x86 ]
then

View File

@@ -9,10 +9,10 @@ LICENSE="
"
COPYRIGHT="1988-2013 Free Software Foundation, Inc."
SRC_URI="
git+file://$portBaseDir/../binutils/download/buildtools.git#2d0a2c6404ffae1a46eb7e74daab08099b45af2c
git+git://github.com/haiku/buildtools.git#2d0a2c6404ffae1a46eb7e74daab08099b45af2c
git+file://$portBaseDir/../binutils/download/buildtools.git#fd576c8d8a83e3fe9a6443f9c0431bd11125314e
git+git://github.com/haiku/buildtools.git#fd576c8d8a83e3fe9a6443f9c0431bd11125314e
"
REVISION="4"
REVISION="5"
ARCHITECTURES="x86 x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
# x86_gcc2 is fine as primary target architecture as long as we're building

View File

@@ -0,0 +1,61 @@
SUMMARY="Modular and reuseable compiler and toolchain technologies."
DESCRIPTION="
LLVM is a collection of modular and reuseable compiler and and toolchain \
technologies.
"
HOMEPAGE="http://www.llvm.org/"
LICENSE="UIUC"
COPYRIGHT="2003-2012 University of Illinois at Urbana-Champaign"
SRC_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.gz"
REVISION="1"
CHECKSUM_MD5="46ed668a1ce38985120dbf6344cf6116"
ARCHITECTURES="x86 x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
llvm$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
"
BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize
cmd:make
cmd:python
cmd:sed
"
PATCHES="llvm-${portVersion}.patchset"
PATCH()
{
find . -type f -exec sed -i 's/\/usr\/bin\/env/\/bin\/env/g' "{}" \;
}
BUILD()
{
# Haiku C++ requires rtti in a lot of central system components
# such as Mesa
export REQUIRES_RTTI=1
runConfigure ./configure --enable-optimized
make $jobArgs
}
INSTALL()
{
make install
}

View File

@@ -0,0 +1,25 @@
From 744634aa845c403f5a39b8257bbacd36dc1dd351 Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Wed, 22 Jan 2014 05:04:31 +0000
Subject: [PATCH] haiku: fix Host.h for endian.h
---
include/llvm/Support/Host.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/llvm/Support/Host.h b/include/llvm/Support/Host.h
index 28c4cc7..ab985a4 100644
--- a/include/llvm/Support/Host.h
+++ b/include/llvm/Support/Host.h
@@ -16,7 +16,7 @@
#include "llvm/ADT/StringMap.h"
-#if defined(__linux__) || defined(__GNU__)
+#if defined(__linux__) || defined(__GNU__) || defined(__HAIKU__)
#include <endian.h>
#else
#if !defined(BYTE_ORDER) && !defined(LLVM_ON_WIN32)
--
1.8.3.4

View File

@@ -0,0 +1,156 @@
SUMMARY="Multi-platform GL implementation"
DESCRIPTION="
Mesa is an open-source implementation of the OpenGL specification. The OpenGL \
specification documents a system for rendering interactive 3D graphics.
Mesa fills the role of the Haiku OpenGL kit providing 3D rendering to Haiku \
applications.
"
HOMEPAGE="http://www.mesa3d.org/"
COPYRIGHT="1999-2013 Brian Paul All Rights Reserved."
LICENSE="MIT"
SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/10.0.2/MesaLib-10.0.2.tar.bz2"
CHECKSUM_MD5="8544c0ab3e438a08b5103421ea15b6d2"
REVISION="2"
ARCHITECTURES="x86 x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
# x86_gcc2 is fine as primary target architecture as long as we're building
# for a different secondary architecture.
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
mesa$secondaryArchSuffix = $portVersion compat >= 10.0
lib:libGL$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
"
PATCHES="mesa-10.0.2.patchset"
BUILD_PREREQUIRES="
libxml2_python
llvm${secondaryArchSuffix}
cmd:bison
cmd:find
cmd:flex
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:scons
cmd:sed
"
SOURCE_DIR="Mesa-$portVersion"
BUILD()
{
if [ -n "$secondaryArchSuffix" ]; then
export HAIKU_SECONDARY_ARCH="$effectiveTargetArchitecture"
fi
scons $jobArgs build=release
#scons $jobArgs build=debug
}
INSTALL()
{
mesaBuildDir=build/haiku-$effectiveTargetArchitecture
# libGL.so makes up the core of our OpenGL kit
mkdir -p $libDir
cp $(find $mesaBuildDir -name 'libGL.so') $libDir
mkdir -p $developLibDir
symlinkRelative -s $libDir/libGL.so $developLibDir
# Our rendering add-ons
mkdir -p $addOnsDir/opengl
cp $(find $mesaBuildDir -name 'libswrast.so') \
"$addOnsDir/opengl/Software Rasterizer"
cp $(find $mesaBuildDir -name 'libswpipe.so') \
"$addOnsDir/opengl/Software Pipe"
# Set some nice version info
setversion "$libDir/libGL.so" -app 10 0 2 -long "Haiku OpenGL kit"
setversion "$addOnsDir/opengl/Software Rasterizer" -app 10 0 2 -long "Mesa software rasterization renderer"
setversion "$addOnsDir/opengl/Software Pipe" -app 10 0 2 -long "Gallium LLVM software pipe renderer"
# OpenGL Kit
mkdir -p $includeDir/os/opengl
cp ./include/HaikuGL/OpenGLKit.h $includeDir/os/
cp ./include/HaikuGL/GLView.h $includeDir/os/opengl/
cp ./include/HaikuGL/GLRenderer.h $includeDir/os/opengl/
# Standard GL headers
mkdir -p $includeDir/GL
cp ./include/GL/gl.h $includeDir/GL/
cp ./include/GL/gl_mangle.h $includeDir/GL/
cp ./include/GL/glext.h $includeDir/GL/
# Create GL symlink in opengl kit
symlinkRelative -s $includeDir/GL $includeDir/os/opengl/GL
# devel package
packageEntries devel \
$developDir
# swpipe renderer package
packageEntries swpipe \
"$addOnsDir/opengl/Software Pipe"
# swrast renderer package
packageEntries swrast \
"$addOnsDir/opengl/Software Rasterizer"
}
# ----- devel package -------------------------------------------------------
PROVIDES_devel="
mesa${secondaryArchSuffix}_devel = $portVersion
devel:libGL$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
mesa$secondaryArchSuffix == $portVersion base
"
# ===== Mesa OpenGL Add-ons ==================================================
# ----- swrast package -------------------------------------------------------
SUMMARY_swrast="Mesa software rasterization renderer"
DESCRIPTION_swrast="This 3D BGLRenderer add-on provides Mesa software
rasterization on Haiku systems. Software rasterization performs all
3D rendering on the systems CPU and doesn't require any specialized
hardware. Software rasterization is generally considered a fallback
3D rendering method as performance is limited.
"
PROVIDES_swrast="
mesa${secondaryArchSuffix}_swrast = $portVersion
"
REQUIRED_swrast="
mesa$secondaryArchSuffix == $portVersion base
"
# ===== Gallium OpenGL Add-ons ===============================================
# ----- swpipe package -------------------------------------------------------
SUMMARY_swpipe="Mesa LLVM enhanced Gallium software pipe renderer"
DESCRIPTION_swpipe="This 3D BGLRenderer add-on provides Gallium LLVM
enhanced software rendering. Software pipe rendering performs all
3D rendering on the systems CPU and doesn't require any specialized
hardware. The usage of LLVM over traditional rasterization gives this
renderer a boost in performance.
Gallium software pipe rendering is in an extremely early state as of
this version of Mesa, and may not function as expected.
"
PROVIDES_swpipe="
mesa${secondaryArchSuffix}_swpipe = $portVersion
"
REQUIRED_swpipe="
mesa$secondaryArchSuffix == $portVersion base
"

File diff suppressed because it is too large Load Diff