diff --git a/app-benchmarks/libmicro/libmicro-0.4.2.hg.recipe b/app-benchmarks/libmicro/libmicro-0.4.2.hg.recipe new file mode 100644 index 000000000..7ae2a054f --- /dev/null +++ b/app-benchmarks/libmicro/libmicro-0.4.2.hg.recipe @@ -0,0 +1,46 @@ +SUMMARY="libmicro - portable microbenchmarks" +DESCRIPTION=" +LibMicro is a portable set of microbenchmarks that many Solaris +engineers used during Solaris 10 development to measure the +performance of various system and library calls. LibMicro was +developed by Bart Smaalders and Phil Harman as part of their If Linux +is faster it's a Solaris bug performance campaign. LibMicro is Open +Source and uses the CDDL license.The libMicro sources include an awk +script that generates color coded html pages to easily compare +various OS revs, processors and other differences in a quick manner +" +LICENSE="CDDL v1" +COPYRIGHT="2013 Oracle" +HOMEPAGE="https://java.net/projects/libmicro" +SRC_URI="hg+https://hg.java.net/hg/libmicro~hg-repo#7dd95b416c3c" +REVISION="1" +ARCHITECTURES="!x86 !x86_gcc2" + +PROVIDES=" + libmicro = $portVersion + " + +REQUIRES=" + haiku >= $haikuVersion + " + +BUILD_REQUIRES=" + haiku_devel >= $haikuVersion + " + +BUILD_PREREQUIRES=" + cmd:make + cmd:gcc + " + +PATCHES="libmicro-0.4.2.patchset" + +BUILD() +{ + make +} + +INSTALL() +{ + make install +} diff --git a/app-benchmarks/libmicro/patches/libmicro-0.4.2.hg.patchset b/app-benchmarks/libmicro/patches/libmicro-0.4.2.hg.patchset new file mode 100644 index 000000000..69ba097c3 --- /dev/null +++ b/app-benchmarks/libmicro/patches/libmicro-0.4.2.hg.patchset @@ -0,0 +1,139 @@ +From 4beb46cb703e13ca5b6a055efec5f18c961b11fe Mon Sep 17 00:00:00 2001 +From: Chris Roberts +Date: Sun, 26 Jan 2014 11:57:02 -0700 +Subject: applying patch libmicro-0.4.1.patch + + +diff --git a/Makefile.Haiku b/Makefile.Haiku +new file mode 100644 +index 0000000..5181d91 +--- /dev/null ++++ b/Makefile.Haiku +@@ -0,0 +1,43 @@ ++# ++# CDDL HEADER START ++# ++# The contents of this file are subject to the terms ++# of the Common Development and Distribution License ++# (the "License"). You may not use this file except ++# in compliance with the License. ++# ++# You can obtain a copy of the license at ++# src/OPENSOLARIS.LICENSE ++# or http://www.opensolaris.org/os/licensing. ++# See the License for the specific language governing ++# permissions and limitations under the License. ++# ++# When distributing Covered Code, include this CDDL ++# HEADER in each file and include the License file at ++# usr/src/OPENSOLARIS.LICENSE. If applicable, ++# add the following below this CDDL HEADER, with the ++# fields enclosed by brackets "[]" replaced with your ++# own identifying information: Portions Copyright [yyyy] ++# [name of copyright owner] ++# ++# CDDL HEADER END ++# ++ ++# ++# Copyright 2005 Sun Microsystems, Inc. All rights reserved. ++# Use is subject to license terms. ++# ++ ++ ++CC= gcc ++ ++#CFLAGS= -O -DUSE_SEMOP ++CPPFLAGS= -DUSE_SEMOP -D_REENTRANT ++MATHLIB= ++ ++ELIDED_BENCHMARKS= \ ++ cachetocache \ ++ atomic ++ ++ ++include ../Makefile.com +diff --git a/Makefile.benchmarks b/Makefile.benchmarks +index ed1923a..d1b1ff8 100644 +--- a/Makefile.benchmarks ++++ b/Makefile.benchmarks +@@ -50,7 +50,7 @@ ALL= \ + fcntl_ndelay \ + file_lock \ + fork \ +- getcontext \ ++# getcontext \ + getenv \ + gettimeofday \ + getpeername \ +diff --git a/Makefile.com b/Makefile.com +index 2ba7e76..5773900 100644 +--- a/Makefile.com ++++ b/Makefile.com +@@ -54,10 +54,10 @@ lint: libmicro.ln $(ALL:%=%.lint) $(EXTRA_CFILES:%.c=%.lint) + + + $(EXTRA_CFILES:%.c=%.lint): +- $(LINT) ../$(@:%.lint=%.c) -I. -mu -lc libmicro.ln -lm ++ $(LINT) ../$(@:%.lint=%.c) -I. -mu -lc libmicro.ln + + %.lint: ../%.c libmicro.ln +- $(LINT) -mu $(CPPFLAGS) $< libmicro.ln -lpthread -lsocket -lnsl -lm ++ $(LINT) -mu $(CPPFLAGS) $< libmicro.ln -lnetwork + + %.o: ../%.c + $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ +@@ -107,13 +107,13 @@ tattle: ../tattle.c libmicro.a + echo "char compiler_version[] = \""`$(COMPILER_VERSION_CMD)`"\";" > tattle.h + echo "char CC[] = \""$(CC)"\";" >> tattle.h + echo "char extra_compiler_flags[] = \""$(extra_CFLAGS)"\";" >> tattle.h +- $(CC) -o tattle $(CFLAGS) -I. ../tattle.c libmicro.a -lrt -lm ++ $(CC) -o tattle $(CFLAGS) -I. ../tattle.c libmicro.a + + $(ELIDED_BENCHMARKS): ../elided.c + $(CC) -o $(@) ../elided.c + + %: libmicro.a %.o +- $(CC) -o $(@) $(@).o $($(@)_EXTRA_DEPS) $(CFLAGS) libmicro.a $($(@)_EXTRA_LIBS) $(EXTRA_LIBS) -lpthread -lm ++ $(CC) -o $(@) $(@).o $($(@)_EXTRA_DEPS) $(CFLAGS) libmicro.a $($(@)_EXTRA_LIBS) $(EXTRA_LIBS) -lnetwork + + exec: exec_bin + +diff --git a/bench.sh b/bench.sh +index 4795c10..24ca1d9 100644 +--- a/bench.sh ++++ b/bench.sh +@@ -56,7 +56,7 @@ VDIR1=$VARROOT/0/1/2/3/4/5/6/7/8/9 + VDIR2=$VARROOT/1/2/3/4/5/6/7/8/9/0 + + +-OPTS="-E -C 200 -L -S -W" ++OPTS="-l -E -C 200 -L -S -W" + + dd if=/dev/zero of=$TFILE bs=1024k count=10 2>/dev/null + dd if=/dev/zero of=$VFILE bs=1024k count=10 2>/dev/null +@@ -65,7 +65,7 @@ mkdir -p $VDIR1 $VDIR2 + + touch $IFILE + +-ARCH=`arch -k` ++ARCH=`uname -m` + + # produce benchmark header for easier comparisons + +diff --git a/cascade_flock.c b/cascade_flock.c +index 27d95d1..a6634a1 100644 +--- a/cascade_flock.c ++++ b/cascade_flock.c +@@ -50,7 +50,7 @@ + #include "libmicro.h" + + #ifndef LOCK_EX +-#include "/usr/ucbinclude/sys/file.h" ++#include "sys/file.h" + extern int flock(int fd, int operation); + #endif + +-- +1.8.3.4 + diff --git a/app-misc/mc/mc-4.8.11.recipe b/app-misc/mc/mc-4.8.11.recipe new file mode 100644 index 000000000..58d11712e --- /dev/null +++ b/app-misc/mc/mc-4.8.11.recipe @@ -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 " + +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 +} diff --git a/app-misc/mc/patches/mc.patch b/app-misc/mc/patches/mc.patch new file mode 100644 index 000000000..acbb58cfa --- /dev/null +++ b/app-misc/mc/patches/mc.patch @@ -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 + diff --git a/app-misc/srm/srm-1.2.12.recipe b/app-misc/srm/srm-1.2.12.recipe new file mode 100644 index 000000000..3b734d06f --- /dev/null +++ b/app-misc/srm/srm-1.2.12.recipe @@ -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 +} diff --git a/app-misc/srm/srm-1.2.12_cvs.recipe b/app-misc/srm/srm-1.2.13_svn.recipe similarity index 83% rename from app-misc/srm/srm-1.2.12_cvs.recipe rename to app-misc/srm/srm-1.2.13_svn.recipe index db1fa7fb1..7dade809b 100644 --- a/app-misc/srm/srm-1.2.12_cvs.recipe +++ b/app-misc/srm/srm-1.2.13_svn.recipe @@ -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 diff --git a/dev-embedded/avrdude/avrdude-6.0.1.recipe b/dev-embedded/avrdude/avrdude-6.0.1.recipe index 28493ec1f..acc6890ca 100644 --- a/dev-embedded/avrdude/avrdude-6.0.1.recipe +++ b/dev-embedded/avrdude/avrdude-6.0.1.recipe @@ -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 diff --git a/dev-embedded/avrdude/patches/avrdude-6.0.1.patch b/dev-embedded/avrdude/patches/avrdude-6.0.1.patch new file mode 100644 index 000000000..6549b0239 --- /dev/null +++ b/dev-embedded/avrdude/patches/avrdude-6.0.1.patch @@ -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 + diff --git a/dev-lang/erlang/erlang-16.03.recipe b/dev-lang/erlang/erlang-16.03.recipe new file mode 100644 index 000000000..9678bc53e --- /dev/null +++ b/dev-lang/erlang/erlang-16.03.recipe @@ -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 +} \ No newline at end of file diff --git a/dev-lang/erlang/erlang-R14B.recipe b/dev-lang/erlang/erlang-R14B.recipe deleted file mode 100644 index 0865f3e9c..000000000 --- a/dev-lang/erlang/erlang-R14B.recipe +++ /dev/null @@ -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" diff --git a/dev-lang/erlang/licenses/EPL v1.1 b/dev-lang/erlang/licenses/EPL similarity index 100% rename from dev-lang/erlang/licenses/EPL v1.1 rename to dev-lang/erlang/licenses/EPL diff --git a/dev-lang/erlang/patches/erlang-R14B.patch b/dev-lang/erlang/patches/erlang-R14B.patch deleted file mode 100644 index 6659da218..000000000 --- a/dev-lang/erlang/patches/erlang-R14B.patch +++ /dev/null @@ -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 diff --git a/dev-lang/erlang/patches/erlang_R16B03_haiku.patch b/dev-lang/erlang/patches/erlang_R16B03_haiku.patch new file mode 100644 index 000000000..9e59e87ac --- /dev/null +++ b/dev-lang/erlang/patches/erlang_R16B03_haiku.patch @@ -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 + #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 { diff --git a/dev-lang/lua/lua-5.1.4.recipe b/dev-lang/lua/lua-5.1.4.recipe index 853e92677..f41a11c35 100644 --- a/dev-lang/lua/lua-5.1.4.recipe +++ b/dev-lang/lua/lua-5.1.4.recipe @@ -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=" diff --git a/dev-lang/lua/patches/lua-5.1.4.patchset b/dev-lang/lua/patches/lua-5.1.4.patchset index c5bf0f4f4..74dc0d828 100644 --- a/dev-lang/lua/patches/lua-5.1.4.patchset +++ b/dev-lang/lua/patches/lua-5.1.4.patchset @@ -1,27 +1,20 @@ -From 5944289e129f60d26f71646bc4e3404f93de138f Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -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 +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 diff --git a/dev-lang/luajit/luajit-2.0.2.recipe b/dev-lang/luajit/luajit-2.0.2.recipe new file mode 100644 index 000000000..a5c5a1028 --- /dev/null +++ b/dev-lang/luajit/luajit-2.0.2.recipe @@ -0,0 +1,66 @@ +SUMMARY="LuaJIT is a Just-In-Time Compiler (JIT) for the Lua programming language." +HOMEPAGE="http://luajit.org/luajit.html" +SRC_URI="http://luajit.org/download/LuaJIT-$portVersion.tar.gz" +CHECKSUM_MD5="112dfb82548b03377fbefbba2e0e3a5b" +REVISION="2" +ARCHITECTURES="x86 x86_gcc2" +SECONDARY_ARCHITECTURES="x86" +PROVIDES=" + luajit$secondaryArchSuffix = $portVersion compat >= 5.1 + lib:libluajit_5.1$secondaryArchSuffix = $portVersion compat >= 2 + cmd:luajit_$portVersion$secondaryArchSuffix + cmd:luajit$secondaryArchSuffix + " + +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + " +BUILD_PREREQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + cmd:make + cmd:gcc$secondaryArchSuffix + " + +PROVIDES_devel=" + luajit${secondaryArchSuffix}_devel = $portVersion compat >= 5.1 + devel:libluajit_5.1$secondaryArchSuffix = $portVersion compat >= 2 + " + +REQUIRES_devel=" + luajit$secondaryArchSuffix == $portVersion base + " + +PATCHES="luajit-$portVersion.patchset" + +SOURCE_DIR="LuaJIT-$portVersion" +BUILD() +{ + # Use amalg target as recommended on luajit homepage to get better performance + make $jobArgs amalg PREFIX=$prefix +} + +INSTALL() +{ + make install PREFIX=$prefix INSTALL_LIB="$libDir" INSTALL_BIN="$binDir" \ + INSTALL_INC="$includeDir" INSTALL_SHARE="$dataDir" \ + 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" +COPYRIGHT="2005-2013, Mike Pall" +DESCRIPTION=" +LuaJIT is a Just-In-Time Compiler (JIT) for the Lua programming language. + +Lua is a powerful, dynamic and light-weight programming language. It may be \ +embedded or used as a general-purpose, stand-alone language. +" diff --git a/dev-lang/luajit/patches/luajit-2.0.2.patchset b/dev-lang/luajit/patches/luajit-2.0.2.patchset new file mode 100644 index 000000000..322537f46 --- /dev/null +++ b/dev-lang/luajit/patches/luajit-2.0.2.patchset @@ -0,0 +1,31 @@ +From 1e25583ec6480560263118a34c5b5ad86f3e9aca Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 12 Jan 2014 22:49:01 +0100 +Subject: Remove hardcoded -lm. + + +diff --git a/src/Makefile b/src/Makefile +index 999e280..27fc411 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -198,7 +198,7 @@ TARGET_DYNXLDOPTS= + TARGET_LFSFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE + TARGET_XCFLAGS= $(TARGET_LFSFLAGS) -U_FORTIFY_SOURCE + TARGET_XLDFLAGS= +-TARGET_XLIBS= -lm ++#TARGET_XLIBS= -lm + TARGET_TCFLAGS= $(CCOPTIONS) $(TARGET_XCFLAGS) $(TARGET_FLAGS) $(TARGET_CFLAGS) + TARGET_ACFLAGS= $(CCOPTIONS) $(TARGET_XCFLAGS) $(TARGET_FLAGS) $(TARGET_CFLAGS) + TARGET_ALDFLAGS= $(LDOPTIONS) $(TARGET_XLDFLAGS) $(TARGET_FLAGS) $(TARGET_LDFLAGS) +@@ -351,7 +351,7 @@ endif + ############################################################################## + + MINILUA_O= host/minilua.o +-MINILUA_LIBS= -lm ++#MINILUA_LIBS= -lm + MINILUA_T= host/minilua + MINILUA_X= $(MINILUA_T) + +-- +1.8.3.4 + diff --git a/dev-lang/python/patches/python-2.6.9.patchset b/dev-lang/python/patches/python-2.6.9.patchset new file mode 100644 index 000000000..284cf52cb --- /dev/null +++ b/dev-lang/python/patches/python-2.6.9.patchset @@ -0,0 +1,877 @@ +From 5ccf5800d437d3abbfd13b4f2ccf86b1606deb8c Mon Sep 17 00:00:00 2001 +From: Oliver Tappe +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 + #include +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 - +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 +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 +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 + diff --git a/dev-lang/python/python-2.6.9.recipe b/dev-lang/python/python-2.6.9.recipe new file mode 100644 index 000000000..a97f285e6 --- /dev/null +++ b/dev-lang/python/python-2.6.9.recipe @@ -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 +} diff --git a/dev-libs/boost/boost-1.55.0.recipe b/dev-libs/boost/boost-1.55.0.recipe index 24170220b..c2cdb68d8 100644 --- a/dev-libs/boost/boost-1.55.0.recipe +++ b/dev-libs/boost/boost-1.55.0.recipe @@ -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 diff --git a/dev-libs/boost/patches/boost-1.55.0.patchset b/dev-libs/boost/patches/boost-1.55.0.patchset index ac31f484a..072d6c2b6 100644 --- a/dev-libs/boost/patches/boost-1.55.0.patchset +++ b/dev-libs/boost/patches/boost-1.55.0.patchset @@ -424,3 +424,46 @@ index 6ce2ea1..3b303eb 100644 -- 1.8.3.4 + +From d94967fa8fdea2842ec02fab90df0ec4efaac685 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Thu, 9 Jan 2014 22:40:40 +0100 +Subject: filesystem: don't crash because of unsupported locale in libstdc++ + +See https://svn.boost.org/trac/boost/ticket/4688 +We do the same as on Mac OS X and assume the filesystem uses utf-8. + +diff --git a/libs/filesystem/src/path.cpp b/libs/filesystem/src/path.cpp +index c740dec..3285d39 100644 +--- a/libs/filesystem/src/path.cpp ++++ b/libs/filesystem/src/path.cpp +@@ -35,7 +35,7 @@ + #ifdef BOOST_WINDOWS_API + # include "windows_file_codecvt.hpp" + # include +-#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) ++#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) || defined(__HAIKU__) + # include + #endif + +@@ -828,7 +828,7 @@ namespace + codecvt_facet_ptr(&std::use_facet > + (path_locale)); + +-#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) ++#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) || defined(__HAIKU__) + + // "All BSD system functions expect their string parameters to be in UTF-8 encoding + // and nothing else." See +@@ -903,7 +903,7 @@ namespace filesystem + const path::codecvt_type& path::codecvt() + { + # if defined(BOOST_POSIX_API) && \ +- !(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) ++ !(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) || defined(__HAIKU__)) + // A local static initialized by calling path::imbue ensures that std::locale(""), + // which may throw, is called only if path_locale and condecvt_facet will actually + // be used. Thus misconfigured environmental variables will only cause an +-- +1.8.3.4 + diff --git a/dev-libs/confuse/confuse-2.7.recipe b/dev-libs/confuse/confuse-2.7.recipe index 5b0e29149..755cbf8b9 100644 --- a/dev-libs/confuse/confuse-2.7.recipe +++ b/dev-libs/confuse/confuse-2.7.recipe @@ -27,12 +27,13 @@ PROVIDES=" REQUIRES=" haiku$secondaryArchSuffix >= $haikuVersion - libiconv$secondaryArchSuffix + lib:libiconv$secondaryArchSuffix + lib:libintl$secondaryArchSuffix " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel >= $haikuVersion - libiconv${secondaryArchSuffic}_devel + devel:libiconv$secondaryArchSuffix " BUILD_PREREQUIRES=" diff --git a/dev-libs/libxml2/libxml2-2.9.1.recipe b/dev-libs/libxml2/libxml2-2.9.1.recipe index e81bad670..9c374179c 100644 --- a/dev-libs/libxml2/libxml2-2.9.1.recipe +++ b/dev-libs/libxml2/libxml2-2.9.1.recipe @@ -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. diff --git a/dev-util/cmake/patches/cmake-2.8.11.2.patchset b/dev-util/cmake/patches/cmake-2.8.11.2.patchset index b443ac74e..2fd8b4d02 100644 --- a/dev-util/cmake/patches/cmake-2.8.11.2.patchset +++ b/dev-util/cmake/patches/cmake-2.8.11.2.patchset @@ -1847,3 +1847,26 @@ index bb0ca91..91577d6 100644 -- 1.8.3.4 + +From bef51860a4e8f12504d8fbd9f421624932f927ad Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Mon, 13 Jan 2014 20:35:48 +0100 +Subject: FindFreetype: fix search path. + + +diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake +index 1df2399..31346a0 100644 +--- a/Modules/FindFreetype.cmake ++++ b/Modules/FindFreetype.cmake +@@ -61,7 +61,7 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h + /usr/local/X11R6 + /usr/local/X11 + /usr/freeware +- PATH_SUFFIXES include/freetype2 include ++ PATH_SUFFIXES include/freetype2 include freetype2 + ) + + find_library(FREETYPE_LIBRARY +-- +1.8.3.4 + diff --git a/games-action/quake3/quake3-0.6.1.recipe b/games-action/quake3/quake3-0.6.1.recipe index c4c316d83..c05b539e4 100644 --- a/games-action/quake3/quake3-0.6.1.recipe +++ b/games-action/quake3/quake3-0.6.1.recipe @@ -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() diff --git a/games-arcade/f1spirit/f1spirit-0.rc9.1615.recipe b/games-arcade/f1spirit/f1spirit-0.rc9.1615.recipe new file mode 100644 index 000000000..9172d3076 --- /dev/null +++ b/games-arcade/f1spirit/f1spirit-0.rc9.1615.recipe @@ -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! +" diff --git a/games-arcade/f1spirit/patches/f1spirit-0.rc9.1615.patchset b/games-arcade/f1spirit/patches/f1spirit-0.rc9.1615.patchset new file mode 100644 index 000000000..dc4dce04b --- /dev/null +++ b/games-arcade/f1spirit/patches/f1spirit-0.rc9.1615.patchset @@ -0,0 +1,21 @@ +From 1ddc81cdd051fabb1e56e861f5fd5a9da429029c Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +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 +-#include + #include + + #include "F1Shttp.h" +-- +1.8.3.4 + diff --git a/games-arcade/mog/mog-0.63.1548.recipe b/games-arcade/mog/mog-0.63.1548.recipe new file mode 100644 index 000000000..235e7d813 --- /dev/null +++ b/games-arcade/mog/mog-0.63.1548.recipe @@ -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. +" diff --git a/games-arcade/roadfighter/roadfighter-1.0.1269.recipe b/games-arcade/roadfighter/roadfighter-1.0.1269.recipe new file mode 100644 index 000000000..2d0a61bf8 --- /dev/null +++ b/games-arcade/roadfighter/roadfighter-1.0.1269.recipe @@ -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). +" diff --git a/games-arcade/super_transball/patches/super_transball-2.1.5.patchset b/games-arcade/super_transball/patches/super_transball-2.1.5.patchset new file mode 100644 index 000000000..e82dda843 --- /dev/null +++ b/games-arcade/super_transball/patches/super_transball-2.1.5.patchset @@ -0,0 +1,671 @@ +From d5e22939a27c71bc0e55a56623b7ea83dceca155 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +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 + + #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 ++#include + #include + #include + #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 ++#include ++#include ++#include ++#include ++#include ++#include ++ + #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 ++#include + #include + #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 ++#include "unistd.h" + #include + #include + #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 ++#include + #include + #include + #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 ++#include + #include + #include + #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 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;irender(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 ++#include + #include + #include + #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 +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 + diff --git a/games-arcade/super_transball/super_transball-2.1.5.recipe b/games-arcade/super_transball/super_transball-2.1.5.recipe new file mode 100644 index 000000000..ee51e2c62 --- /dev/null +++ b/games-arcade/super_transball/super_transball-2.1.5.recipe @@ -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... +" diff --git a/games-engines/solarus/patches/solarus-luajit-1.1.1.patch b/games-engines/solarus/patches/solarus-luajit-1.1.1.patch new file mode 100644 index 000000000..4020dcc88 --- /dev/null +++ b/games-engines/solarus/patches/solarus-luajit-1.1.1.patch @@ -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) ++ diff --git a/games-engines/solarus/solarus-1.1.1.recipe b/games-engines/solarus/solarus-1.1.1.recipe index 84e660388..7fbb49db8 100644 --- a/games-engines/solarus/solarus-1.1.1.recipe +++ b/games-engines/solarus/solarus-1.1.1.recipe @@ -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 } diff --git a/games-puzzle/mirrormagic/mirrormagic-2.0.2.recipe b/games-puzzle/mirrormagic/mirrormagic-2.0.2.recipe new file mode 100644 index 000000000..0eeddcc0e --- /dev/null +++ b/games-puzzle/mirrormagic/mirrormagic-2.0.2.recipe @@ -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. +" diff --git a/games-puzzle/mirrormagic/patches/mirrormagic-2.0.2.patchset b/games-puzzle/mirrormagic/patches/mirrormagic-2.0.2.patchset new file mode 100644 index 000000000..e66c04ec2 --- /dev/null +++ b/games-puzzle/mirrormagic/patches/mirrormagic-2.0.2.patchset @@ -0,0 +1,106 @@ +From 5e9e47e0aa86949c07c14a0012180614695ba74b Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +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 +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 +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 ++#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 + diff --git a/games-simulation/corsix_th/corsix_th-0.30.recipe b/games-simulation/corsix_th/corsix_th-0.30.recipe new file mode 100644 index 000000000..2a900a1f3 --- /dev/null +++ b/games-simulation/corsix_th/corsix_th-0.30.recipe @@ -0,0 +1,74 @@ +SUMMARY="Open source clone of Theme Hospital" +DESCRIPTION=" +CorsixTH aims to reimplement the game engine of Theme Hospital, and be able to +load the original game data files. This means that you will need a purchased +copy of Theme Hospital, or a copy of the demo, in order to use CorsixTH. After +most of the original engine has been reimplemented in open source code, the +project will serve as a base from which extensions and improvements to the +original game can be made. +" +HOMEPAGE="http://github.com/CorsixTH" +SRC_URI="https://github.com/CorsixTH/CorsixTH/archive/v$portVersion.tar.gz" +CHECKSUM_MD5="4557a02d61d7001c1c08960e30c417d7" +REVISION="1" +ARCHITECTURES="x86" +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=" + corsix_th = $portVersion + " + +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + lib:libsdl$secondaryArchSuffix + lib:libsdl_mixer$secondaryArchSuffix + lib:libavcodec$secondaryArchSuffix + lib:libluajit_5.1$secondaryArchSuffix + lib:libfreetype$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + devel:libsdl$secondaryArchSuffix + devel:libsdl_mixer$secondaryArchSuffix + devel:libavcodec$secondaryArchSuffix + devel:libluajit_5.1$secondaryArchSuffix + devel:libfreetype$secondaryArchSuffix + " + +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:git + cmd:make + cmd:cmake + cmd:pkg_config$secondaryArchSuffix + " + +SOURCE_DIR="CorsixTH-$portVersion" +PATCHES="corsix_th-$portVersion.patchset" +BUILD() +{ + cmake . -DLUA_LIBRARY=/system/$relativeLibDir/libluajit-5.1.so.2.0.2 \ + -DCMAKE_INSTALL_PREFIX=$appsDir + cd CorsixTH + make $jobArgs +} + +INSTALL() +{ + touch CorsixTH/LICENSE.txt + make install + + addattr -f Icon_Haiku -t "'VICN'" "BEOS:ICON" $appsDir/CorsixTH/CorsixTH + addAppDeskbarSymlink $appsDir/CorsixTH/CorsixTH "Corsix Theme Hospital" +} + +# no TEST script available + +COPYRIGHT="2005-2013 Corsix" +LICENSE="MIT" diff --git a/games-simulation/corsix_th/patches/corsix_th-0.30.patchset b/games-simulation/corsix_th/patches/corsix_th-0.30.patchset new file mode 100644 index 000000000..fdfd773ba --- /dev/null +++ b/games-simulation/corsix_th/patches/corsix_th-0.30.patchset @@ -0,0 +1,77 @@ +From 6ffdc30a00c95287e9e42fc65462bbcb17b7cff2 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Mon, 13 Jan 2014 21:36:21 +0100 +Subject: Fix config file path. + + +diff --git a/CorsixTH/Lua/config_finder.lua b/CorsixTH/Lua/config_finder.lua +index 5de4dfb..c643f65 100644 +--- a/CorsixTH/Lua/config_finder.lua ++++ b/CorsixTH/Lua/config_finder.lua +@@ -35,7 +35,7 @@ if pathsep == "\\" then + config_path = os.getenv("AppData") or ourpath + else + -- Linux, OS X, etc. +- config_path = os.getenv("XDG_CONFIG_HOME") or pathconcat(os.getenv("HOME") or "~", ".config") ++ config_path = os.getenv("XDG_CONFIG_HOME") or pathconcat(os.getenv("HOME") or "~", "config/settings") + end + if config_path ~= ourpath then + config_path = pathconcat(config_path, "CorsixTH") +-- +1.8.3.4 + + +From d2181fb6daaf3b434de528caaaf25c4da8bcb29d Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Mon, 13 Jan 2014 21:36:49 +0100 +Subject: Add vector icon. + + +diff --git a/Icon_Haiku b/Icon_Haiku +new file mode 100644 +index 0000000000000000000000000000000000000000..e33288c7f66a04b72128533415302926dd613c58 +GIT binary patch +literal 9704 +zcmeHM&u5&Lcu|R06Rn9SFLF?0Jox;4W_EUGx3hJmJQ`ysneN-qe0RRz +z`Fy|M+3!yG?i=YJ*tch=Kr5iPa@xVigeYRXBO`-b`CLJ)7ybPs`#8r>_Yzfe6~u-Z +z{}vPcjInhXGx3G3LR`O3$xl_96AiHlDHp5WfE+bytF%_Vhyq4v)!i64WmrWm;sl;_ +zQSuQUUT-MjWd=v&bFY!Ol>{ycClpeQz_ +z@K=HHS>l63LvkM8zlpBq*(`DDWj`O`er2*ICk$)VrkDymzlo8n<)lya31RlDWhqti +zd`H1x`k$w)2EGpiYGa~+M#f9kdeGo~4`_2?{uq|!%KRpn&So;d8TX^;^t{Qu#;1Xs +z%xnC6;3o6L*#}^cjrrFiTry9Ct6|V+#MF=W3ULFS*X^L5zx8zh_x!D|=5J!AEXT~b +zICi7gaGg1*73iy0ps%;8NV&efn$n@e@L@}Z(4m4`2%UyETtny{$g-Is#NXS|JJHP$ +z(s&neGlVog1l$ZEHK!2A<9X7_`+9`S5ZZv7U0iN=97CcEEb6m}19oAitsdkxE1-O4 +zmq>AKQY^~r+$gTY6)T}wXI++Jji10uO^P-C18|dK;_Q22k1b0XGQ{&J*6BIl3wQSk +z!Rt-*v*?THOgCQ5-;~j^%&5^wPG9+q`khHr3Y!n#ZbeC&wog+kbX1OJ(o{U|7(*k4 +zmBkQK_aJ&UhBVF>n;AnI{|2}jL&Vv4!X8@;?TPTb7^1(q!!F`l#+9+5uXF^viE)gw +zdaE~gXDvU_XT(lB6{whLj|OY3q_&$`Q0r0@T!ed8vfa?#CG>2lX#53?nW3WbL%{hv +zTaLX2%oZvaBHT4p7zPXt^1ppKm)ivGu1ia%UGTr=UZ$x4h>oteOZq*Xku +zGjWD3KhMpLfP9f(?m7j0g6eb7KInWJ7_BX0OL%Fp??tZkS@e_m!F{0!t9ZCaoc(kB +zQSuLn14D!S-jFt4%fY{kaOs6oSUV!6WpT$Fw%AqJu*6V0&VH;x41WGxikc%J-) +zO}|QA)NN}=F-Cj!#z|%Ud3LlQ}c+tB9zZp!2NN2xRI*P+k2ngZfY%)~0T*-_#h67>Mc9bWvRfnazhiim& +zmem91$P=%ex%S(Rn>{g`m8KV{*>P^r6Fr%^EX5~qJnQ-6LQHyo>4ewt4tsU4Iag{_ +zEA^Uuda^QW8<;Pjk9w&?u6&w~ +zagwCu(=k4igP)D?B*vL(ag1{*@vhA??=HD@Ct-fa9rJ;sV=lq+b~$DX=FW3W7shOk +znFMZg3{T)}IA1=*6UT7YrH)~xBpowW36Ev{a{YHs@ynIVA8#H0YWPxjbp1l(c(x?O +za2eP6R%@udmN4;4!98I>Ug8(t#0hg4^~87>O#5S5$58AJ?PTvcCd?-=s9g!enlCS5 +zp2CL^cF>WCu`*3EV3z|Bn&sNIAOSnOUH1HsBgxCnOk#8XBiWqb*>~^{(@~T +zrPZG>o3CUN#Kr}3S+}FK+J<@ZN~`B0UD?uV9`@Kut1G~1Th>`$=HNd@c;YOsXsNTf +z)5?GNb*&XxE(KQSf2P1XiwJPZfQyKLc5O?1cjj$NPh!lrEqTCgksjvYrz1RxbS&Hw +z>C7tiukF<I@`h??ntWyO$7a=%)?hu`u+{>W&5rG + +literal 0 +HcmV?d00001 + +-- +1.8.3.4 + diff --git a/games-strategy/uqm/patches/uqm-0.7.0.patchset b/games-strategy/uqm/patches/uqm-0.7.0.patchset new file mode 100644 index 000000000..54042ce8d --- /dev/null +++ b/games-strategy/uqm/patches/uqm-0.7.0.patchset @@ -0,0 +1,100 @@ +From 45ee17169b5ca4ebb52661725d3e0bb9f1377a4c Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +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 +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 +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 + #include + #include ++#include + + #include "netmanager_common.ci" + #include "ndindex.ci" +-- +1.8.3.4 + diff --git a/games-strategy/uqm/uqm-0.7.0.recipe b/games-strategy/uqm/uqm-0.7.0.recipe new file mode 100644 index 000000000..fa7e6f637 --- /dev/null +++ b/games-strategy/uqm/uqm-0.7.0.recipe @@ -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" diff --git a/games-strategy/vcmi/patches/vcmi-0.94.patchset b/games-strategy/vcmi/patches/vcmi-0.94.patchset index 72ca005b8..a1d6a870b 100644 --- a/games-strategy/vcmi/patches/vcmi-0.94.patchset +++ b/games-strategy/vcmi/patches/vcmi-0.94.patchset @@ -1,4 +1,4 @@ -From b5923cc7d6a06a08421e439e4c5de353ae2bcd77 Mon Sep 17 00:00:00 2001 +From d1531a4d6125f9542d8729eb3712fd41cc88a565 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 7 Jan 2014 23:02:10 +0100 Subject: Link to libnetwork, since we use sockets. @@ -23,14 +23,14 @@ index 2110879..d1fed38 100644 1.8.3.4 -From 8f2e997081b524b6f97a124df1abed2ec18b23a7 Mon Sep 17 00:00:00 2001 +From 17615226b8b9b67a81330aade5609e7eb5a22024 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 8 Jan 2014 21:14:51 +0100 Subject: Support for renaming threads. diff --git a/lib/CThreadHelper.cpp b/lib/CThreadHelper.cpp -index 3774c4b..b0aca56 100644 +index 6a4a89e..983ee5b 100644 --- a/lib/CThreadHelper.cpp +++ b/lib/CThreadHelper.cpp @@ -3,6 +3,8 @@ @@ -54,3 +54,62 @@ index 3774c4b..b0aca56 100644 -- 1.8.3.4 + +From ea422b71bc3fa1af3f84ab5cd2da02649e42a227 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Mon, 27 Jan 2014 20:18:36 +0100 +Subject: Fix settings dir path. + + +diff --git a/lib/VCMIDirs.cpp b/lib/VCMIDirs.cpp +index be00323..9fed4f8 100644 +--- a/lib/VCMIDirs.cpp ++++ b/lib/VCMIDirs.cpp +@@ -123,12 +123,22 @@ std::string VCMIDirs::libraryName(std::string basename) const + + #else + ++#if defined(__haiku__) ++std::string VCMIDirs::userDataPath() const ++{ ++ BPath settingsDir; ++ if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) == B_OK) ++ return std::string(path.Path()) + "vcmi"; ++ return "."; ++} ++#else + std::string VCMIDirs::userDataPath() const + { + if (getenv("HOME") != nullptr ) + return std::string(getenv("HOME")) + "/.vcmi"; + return "."; + } ++#endif + + std::string VCMIDirs::libraryPath() const + { +diff --git a/vcmibuilder b/vcmibuilder +index 472a00d..1f60b12 100755 +--- a/vcmibuilder ++++ b/vcmibuilder +@@ -64,7 +64,7 @@ then + echo " --download " "Automatically download requied packages using wget" + echo " " "Requires wget and Internet connection" + echo +- echo " --dest DIRECTORY " "Path where resulting data will be placed. Default is ~/.vcmi" ++ echo " --dest DIRECTORY " "Path where resulting data will be placed. Default is `finddir B_USER_SETTINGS_DIRECTORY`/vcmi" + echo + echo " --validate " "Run basic validness checks" + exit 0 +@@ -163,7 +163,7 @@ fi + + if [[ -z "$dest_dir" ]] + then +- dest_dir="$HOME/.vcmi" ++ dest_dir="`finddir B_USER_SETTINGS_DIRECTORY`/vcmi" + fi + + temp_dir="$dest_dir"/buildertmp +-- +1.8.3.4 + diff --git a/games-strategy/vcmi/vcmi-0.94.recipe b/games-strategy/vcmi/vcmi-0.94.recipe index 5cefcd55e..99180116d 100644 --- a/games-strategy/vcmi/vcmi-0.94.recipe +++ b/games-strategy/vcmi/vcmi-0.94.recipe @@ -69,6 +69,8 @@ BUILD() { mkdir -p build cd build + export CFLAGS=-DUSE_FILE32API + export CXXFLAGS=$CFLAGS cmake .. -DDATA_DIR=$relativeDataDir/vcmi -DCMAKE_INSTALL_PREFIX=$prefix \ -DLIB_DIR=$relativeLibDir make $jobArgs diff --git a/haiku-apps/chat/chat-20100903.recipe b/haiku-apps/chat/chat-20100903.recipe index 43ae6edd2..848452832 100644 --- a/haiku-apps/chat/chat-20100903.recipe +++ b/haiku-apps/chat/chat-20100903.recipe @@ -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" } diff --git a/haiku-apps/clipup/clipup-2.0.3.recipe b/haiku-apps/clipup/clipup-2.0.3.recipe index 2d92e0403..fa619d324 100644 --- a/haiku-apps/clipup/clipup-2.0.3.recipe +++ b/haiku-apps/clipup/clipup-2.0.3.recipe @@ -1,31 +1,26 @@ -SUMMARY="An app to keep your latest copies" - -DESCRIPTION=" - Ever had something important in your clipboard but you copied something \ - else? ClipUp allows you to save multiple clips, and can be shown by \ - pressing option+space or clicking on the icon. It can save your clipboard content \ - even when rebooting the computer! - " +SUMMARY="A tool to manage multiple clipboards" +DESCRIPTION="Ever had something important in your clipboard but you copied \ +something else and lost the previous contents? ClipUp allows you to keep \ +multiple clips and protect them even between reboots. +ClipUp is invoked by pressing CMD+SHIFT+V or by clicking on the icon in the \ +Deskbar. +" HOMEPAGE="https://github.com/HaikuArchives/ClipUp" -SRC_URI="git://github.com/HaikuArchives/ClipUp.git#a9218f7c0148d818969105e84d3d5e176f580521" -REVISION="1" - +SRC_URI="git://github.com/HaikuArchives/ClipUp#d47f0f6835" +REVISION="2" LICENSE="MIT" COPYRIGHT="2002 Werner Freytag" ARCHITECTURES="x86_gcc2" - PROVIDES=" clipup = $portVersion app:clipup = $portVersion " - REQUIRES=" haiku >= $haikuVersion " - BUILD_PREREQUIRES=" makefile_engine cmd:make @@ -37,21 +32,23 @@ BUILD_REQUIRES=" haiku_devel >= $haikuVersion " +USER_SETTINGS_FILES=" + settings/ClipUp_settings + settings/clipup_clips + " + BUILD() { - cd trunk cd "Input Device" make - cd "../Input Filter" + cd "../Input Filter Ctrl-V" make cd "../Main" make - cd .. } INSTALL() { - cd trunk mkdir -p $addOnsDir/input_server/devices mkdir -p $addOnsDir/input_server/filters @@ -60,7 +57,7 @@ INSTALL() mv temp/* $addOnsDir/input_server/devices cd .. - cd "Input Filter" + cd "Input Filter Ctrl-V" make install INSTALL_DIR=temp mv temp/* $addOnsDir/input_server/filters cd .. @@ -68,6 +65,5 @@ INSTALL() cd "Main" make install INSTALL_DIR=$appsDir mkdir -p "$dataDir/deskbar/menu/Desktop applets" - symlinkRelative -s "$appsDir/ClipUp" "$dataDir/deskbar/menu/Desktop applets" - + symlinkRelative -s "$appsDir/ClipUp" "$dataDir/deskbar/menu/Desktop applets" } diff --git a/haiku-apps/quicklaunch/quicklaunch-0.9.6.recipe b/haiku-apps/quicklaunch/quicklaunch-0.9.6.recipe index 7d54e77f1..b2b4a080e 100644 --- a/haiku-apps/quicklaunch/quicklaunch-0.9.6.recipe +++ b/haiku-apps/quicklaunch/quicklaunch-0.9.6.recipe @@ -7,42 +7,43 @@ them in a list. You choose an app from that list with the CursorUp/Down keys \ and launch it by hitting Return. Escape quits QuickLaunch. " HOMEPAGE="http://sourceforge.net/projects/quicklaunch-h/" -SRC_URI="git://git.code.sf.net/p/quicklaunch-h/code#c88a50516f3154b86efb4ae58ac8daaa3e45f675" +SRC_URI="git://git.code.sf.net/p/quicklaunch-h/code#0effdf6464be346374d1b9ea7f63f2af0a2cfbca" LICENSE="MIT" COPYRIGHT="2013 Humdinger" -REVISION="1" -ARCHITECTURES="x86_gcc2 ?x86" +REVISION="2" +ARCHITECTURES="x86_gcc2 x86" PROVIDES=" quicklaunch = $portVersion + app:quicklaunch = $portVersion " REQUIRES=" haiku >= $haikuVersion " BUILD_REQUIRES=" - makefile_engine + haiku_devel >= $haikuVersion " BUILD_PREREQUIRES=" - haiku_devel >= $haikuVersion + makefile_engine cmd:gcc - cmd:ld cmd:make cmd:mkdepend - cmd:unzip - cmd:xres " +USER_SETTINGS_FILES="settings/QuickLaunch_settings" + BUILD() { - make OBJ_DIR=objects BUILDHOME=/boot/system/develop + make $jobArgs } INSTALL() { quicklaunchDir=$appsDir/QuickLaunch mkdir -p $quicklaunchDir - - cp -af objects/QuickLaunch $quicklaunchDir + + ARCH=$(echo $buildArchitecture | sed 's/_/-/g') + cp -af objects.$ARCH-release/QuickLaunch $quicklaunchDir cp -af ReadMe.html $quicklaunchDir cp -r images $quicklaunchDir diff --git a/haiku-apps/ubertuber/ubertuber-0.9.8.recipe b/haiku-apps/ubertuber/ubertuber-0.9.8.recipe index d05c0e3fd..be0677f1b 100644 --- a/haiku-apps/ubertuber/ubertuber-0.9.8.recipe +++ b/haiku-apps/ubertuber/ubertuber-0.9.8.recipe @@ -9,13 +9,13 @@ websites and automatically inserts them into its URL text field. At this moment there is support for clips from: YouTube, Google video, MetaCafe, DailyMotion, Yahoo video, Photobucket, \ DepositFiles, Vimeo.com, blip.tv, Facebook video and Escapist magazine. -It may also work on videos from other sites... +For a complete list, check http://rg3.github.io/youtube-dl/supportedsites.html " HOMEPAGE="http://sourceforge.net/projects/ubertuber/" -SRC_URI="git://git.code.sf.net/p/ubertuber/code#9d33e8525806a581ed5229b213e81be9ecd29252" +SRC_URI="git://git.code.sf.net/p/ubertuber/code#12bc4486522dab6255f95c5a041674cd8b2cde2c" LICENSE="MIT" COPYRIGHT="2013 Humdinger" -REVISION="1" +REVISION="2" ARCHITECTURES="x86_gcc2 x86" PROVIDES=" @@ -28,27 +28,27 @@ REQUIRES=" " BUILD_REQUIRES=" haiku_devel >= $haikuVersion - makefile_engine " BUILD_PREREQUIRES=" + makefile_engine cmd:gcc cmd:make + cmd:mkdepend " USER_SETTINGS_FILES="settings/UberTuber_settings" BUILD() { - make $jobArgs BUILDHOME=`finddir B_SYSTEM_DEVELOP_DIRECTORY` + make $jobArgs } INSTALL() { - ARCH=$(echo $buildArchitecture | sed 's/_/-/g') - ubertuberDir=$appsDir/UberTuber mkdir -p $ubertuberDir + ARCH=$(echo $buildArchitecture | sed 's/_/-/g') cp -af objects.$ARCH-release/UberTuber $ubertuberDir cp -af ReadMe.html $ubertuberDir cp -r images $ubertuberDir diff --git a/haiku-apps/vision/vision-0.9.7.r947.recipe b/haiku-apps/vision/vision-0.9.7.r949.recipe similarity index 91% rename from haiku-apps/vision/vision-0.9.7.r947.recipe rename to haiku-apps/vision/vision-0.9.7.r949.recipe index 9fcdd7f18..2b0dabe2a 100644 --- a/haiku-apps/vision/vision-0.9.7.r947.recipe +++ b/haiku-apps/vision/vision-0.9.7.r949.recipe @@ -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 diff --git a/media-libs/devil/devil-1.7.8.recipe b/media-libs/devil/devil-1.7.8.recipe index 8734b2381..07d610fb8 100644 --- a/media-libs/devil/devil-1.7.8.recipe +++ b/media-libs/devil/devil-1.7.8.recipe @@ -1,28 +1,64 @@ -DESCRIPTION="DevIL image library" +SUMMARY="A full-featured cross-platform image library" HOMEPAGE="http://openil.sourceforge.net/" SRC_URI="http://sourceforge.net/projects/openil/files/DevIL/1.7.8/DevIL-1.7.8.tar.gz/download" REVISION="1" CHECKSUM_MD5="7918f215524589435e5ec2e8736d5e1d" -STATUS_HAIKU="stable" -DEPEND="media-libs/jasper >= 1.900.1 - media-libs/lcms >= 1.18a - media-libs/libmng >= 1.0.10 - openexr >= 1.5.0 - dev-util/pkg-config >= 0.23 - media-libs/tiff >= 3.8.2" +ARCHITECTURES="x86_gcc2 x86" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + devil$secondaryArchSuffix = $portVersion + lib:libIL$secondaryArchSuffix + " + +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + " + +BUILD_PREREQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + " +#DEPEND="media-libs/jasper >= 1.900.1 +# media-libs/lcms >= 1.18a +# media-libs/libmng >= 1.0.10 +# openexr >= 1.5.0 +# dev-util/pkg-config >= 0.23 +# media-libs/tiff >= 3.8.2" BUILD() { - cd devil-1.7.8 - libtoolize --force --copy --install - autoreconf -i - ./configure --prefix=`finddir B_COMMON_DIRECTORY` - make + runConfigure ./configure + make $jobArgs } INSTALL() { - cd devil-1.7.8 make install + + prepareInstalledDevelLib libIL + fixPkgconfig + packageEntries devel $developDir } + +PROVIDES_devel=" + devil${secondaryArchSuffix}_devel = $portVersion + devel:libIL$secondaryArchSuffix + " + +REQUIRES_devel=" + haiku$secondaryArchSuffix >= $haikuVersion + devil$secondaryArchSuffix == $portVersion base + " + LICENSE="GNU LGPL v2.1" COPYRIGHT="2009 Denton Woods" +DESCRIPTION=" +Developer's Image Library (DevIL) is a programmer's library to develop +applications with very powerful image loading capabilities, yet is easy for a +developer to learn and use. Ultimate control of images is left to the +developer, so unnecessary conversions, etc. are not performed. DevIL utilizes a +simple, yet powerful, syntax. DevIL can load, save, convert, manipulate, filter +and display a wide variety of image formats. +" diff --git a/media-libs/libsdl/patches/libsdl-1.2.14.patch b/media-libs/libsdl/patches/libsdl-1.2.14.patch deleted file mode 100644 index b9278756d..000000000 --- a/media-libs/libsdl/patches/libsdl-1.2.14.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff -r 5002d6aeb85c libsdl-1.2.14/nclude/begin_code.h ---- SDL-1.2.14/include/begin_code.h Fri Jul 09 17:19:18 2010 +0200 -+++ SDL-1.2.14-haiku/include/begin_code.h Fri Sep 17 14:58:26 2010 +0000 -@@ -43,7 +43,7 @@ - #ifndef DECLSPEC - # if defined(__BEOS__) || defined(__HAIKU__) - # if defined(__GNUC__) --# define DECLSPEC __declspec(dllexport) -+# define DECLSPEC - # else - # define DECLSPEC __declspec(export) - # endif -diff -r 31b0f2e06e3c src/main/beos/SDL_BeApp.cc ---- SDL-1.2.14/src/main/beos/SDL_BeApp.cc Sun Apr 25 20:16:38 2010 -0400 -+++ SDL-1.2.14-haiku/src/main/beos/SDL_BeApp.cc Sun Jun 06 08:55:47 2010 +0000 -@@ -39,13 +39,15 @@ - - static int StartBeApp(void *unused) - { -+ if(!be_app) { - BApplication *App; - - App = new BApplication("application/x-SDL-executable"); - - App->Run(); - delete App; -- return(0); -+ } -+ return(0); - } - - /* Initialize the Be Application, if it's not already started */ -@@ -86,7 +88,7 @@ - ++SDL_BeAppActive; - - /* The app is running, and we're ready to go */ -- return(0); -+ return(0); - } - - /* Quit the Be Application, if there's nothing left to do */ -diff -r 31b0f2e06e3c src/video/bwindow/SDL_sysvideo.cc ---- SDL-1.2.14/src/video/bwindow/SDL_sysvideo.cc Sun Apr 25 20:16:38 2010 -0400 -+++ SDL-1.2.14-haiku/src/video/bwindow/SDL_sysvideo.cc Sun Jun 06 08:55:47 2010 +0000 -@@ -57,7 +57,6 @@ - static void BE_FreeHWSurface(_THIS, SDL_Surface *surface); - - static int BE_ToggleFullScreen(_THIS, int fullscreen); --static SDL_Overlay *BE_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, SDL_Surface *display); - - /* OpenGL functions */ - #if SDL_VIDEO_OPENGL -diff -r 31b0f2e06e3c src/video/bwindow/SDL_sysyuv.h ---- SDL-1.2.14/src/video/bwindow/SDL_sysyuv.h Sun Apr 25 20:16:38 2010 -0400 -+++ SDL-1.2.14-haiku/src/video/bwindow/SDL_sysyuv.h Sun Jun 06 08:55:47 2010 +0000 -@@ -62,7 +62,7 @@ - }; - - extern BBitmap * BE_GetOverlayBitmap(BRect bounds, color_space cs); --SDL_Overlay* BE_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, SDL_Surface* display); -+extern SDL_Overlay* BE_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, SDL_Surface* display); - extern int BE_LockYUVOverlay(_THIS, SDL_Overlay* overlay); - extern void BE_UnlockYUVOverlay(_THIS, SDL_Overlay* overlay); - extern int BE_DisplayYUVOverlay(_THIS, SDL_Overlay* overlay, SDL_Rect* src, SDL_Rect* dst); diff --git a/media-libs/libsdl/patches/libsdl-1.2.15.patchset b/media-libs/libsdl/patches/libsdl-1.2.15.patchset index d36d015a9..fa82bad92 100644 --- a/media-libs/libsdl/patches/libsdl-1.2.15.patchset +++ b/media-libs/libsdl/patches/libsdl-1.2.15.patchset @@ -1,4 +1,4 @@ -From 59cfb52a4c0564e1713c37be2ae6026f9e4e76a9 Mon Sep 17 00:00:00 2001 +From ca09de99c346e44cdd1f578848b4958067b5fb06 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 22 Nov 2013 23:38:56 +0100 Subject: Remove Alsa and ESD detection @@ -36,7 +36,7 @@ index 08c8e1e..84d9a55 100644 1.8.3.4 -From b2657c374826ed213072b5e80263f59a42e76faf Mon Sep 17 00:00:00 2001 +From 735586f7d0600476b0b02206daa76926193da957 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 22 Nov 2013 23:39:26 +0100 Subject: Fix samples vs bytes issues @@ -67,7 +67,7 @@ index de635f8..7faf571 100644 1.8.3.4 -From 847264a916bb4b9e3bfa1ff8217beed67b37b8a4 Mon Sep 17 00:00:00 2001 +From 164201f49d1310bdd229feaf33c1f0e988a89f49 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 22 Nov 2013 23:40:12 +0100 Subject: Various fixes to the video code @@ -147,7 +147,7 @@ index c32b661..a26f18b 100644 1.8.3.4 -From 6a8dccbefe9522f65a07177441a93251cfcc8d9f Mon Sep 17 00:00:00 2001 +From ae129e6505148189a3d73fc085f20e214c0d6446 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sat, 23 Nov 2013 11:59:00 +0100 Subject: Actually fix the sample vs bytes problem in audio driver. @@ -201,7 +201,7 @@ index 7faf571..300bf03 100644 1.8.3.4 -From 112569083122d8d14b2571aaf2b73483ce3738db Mon Sep 17 00:00:00 2001 +From 9b20d4dc8a3f5d607623b5d8b2c4ce14e830f4c8 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Sun, 22 Dec 2013 18:37:30 -0700 Subject: Remove Haiku from specialized DECLSPEC definition @@ -223,3 +223,27 @@ index 27e2f7b..d5e2f1f 100644 -- 1.8.3.4 + +From 09ba1fa7eccef32323c9987bdd4742bca6e9dfbc Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 5 Jan 2014 17:22:10 +0100 +Subject: Change prefix from "be" to "os" for OpenGL includes + +Accomodate the new OpenGL kit that doesn't have the "be" symlink. + +diff --git a/src/video/bwindow/SDL_BWin.h b/src/video/bwindow/SDL_BWin.h +index f2b19a2..2cb94ee 100644 +--- a/src/video/bwindow/SDL_BWin.h ++++ b/src/video/bwindow/SDL_BWin.h +@@ -31,7 +31,7 @@ + #include + #if SDL_VIDEO_OPENGL + #include "SDL_opengl.h" +-#include ++#include + #endif + #include + +-- +1.8.3.4 + diff --git a/media-libs/libsdl/patches/libsdl-2.0.0.patch b/media-libs/libsdl/patches/libsdl-2.0.0.patch deleted file mode 100644 index dae2a97bf..000000000 --- a/media-libs/libsdl/patches/libsdl-2.0.0.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -Naur SDL2-2.0.0/include/begin_code.h SDL2-2.0.0-haiku/include/begin_code.h ---- SDL2-2.0.0/include/begin_code.h 2013-08-11 21:57:54.011796480 -0500 -+++ SDL2-2.0.0-haiku/include/begin_code.h 2013-08-19 15:12:06.654049280 -0500 -@@ -35,13 +35,7 @@ - - /* Some compilers use a special export keyword */ - #ifndef DECLSPEC --# if defined(__BEOS__) || defined(__HAIKU__) --# if defined(__GNUC__) --# define DECLSPEC __declspec(dllexport) --# else --# define DECLSPEC __declspec(export) --# endif --# elif defined(__WIN32__) -+# if defined(__WIN32__) - # ifdef __BORLANDC__ - # ifdef BUILD_SDL - # define DECLSPEC -@@ -54,6 +48,8 @@ - # else - # if defined(__GNUC__) && __GNUC__ >= 4 - # define DECLSPEC __attribute__ ((visibility("default"))) -+# elif defined(__GNUC__) && __GNUC__ >= 2 -+# define DECLSPEC __declspec(dllexport) - # else - # define DECLSPEC - # endif -diff -Naur SDL2-2.0.0/src/main/beos/SDL_BApp.h SDL2-2.0.0-haiku/src/main/beos/SDL_BApp.h ---- SDL2-2.0.0/src/main/beos/SDL_BApp.h 2013-08-11 21:57:54.058982400 -0500 -+++ SDL2-2.0.0-haiku/src/main/beos/SDL_BApp.h 2013-08-19 15:10:50.412876800 -0500 -@@ -371,7 +371,7 @@ - - - /* Members */ -- vector _window_map; /* Keeps track of SDL_Windows by index-id*/ -+ std::vector _window_map; /* Keeps track of SDL_Windows by index-id*/ - - display_mode *_saved_mode; - BGLView *_current_context; diff --git a/media-libs/libsdl/patches/libsdl_x86-1.2.15.patchset b/media-libs/libsdl/patches/libsdl_x86-1.2.15.patchset deleted file mode 100644 index fa82bad92..000000000 --- a/media-libs/libsdl/patches/libsdl_x86-1.2.15.patchset +++ /dev/null @@ -1,249 +0,0 @@ -From ca09de99c346e44cdd1f578848b4958067b5fb06 Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Fri, 22 Nov 2013 23:38:56 +0100 -Subject: Remove Alsa and ESD detection - -These will fail on Haiku, and we don't need them anyway. - -diff --git a/configure.in b/configure.in -index 08c8e1e..84d9a55 100644 ---- a/configure.in -+++ b/configure.in -@@ -361,7 +361,7 @@ CheckALSA() - AC_HELP_STRING([--enable-alsa], [support the ALSA audio API [[default=yes]]]), - , enable_alsa=yes) - if test x$enable_audio = xyes -a x$enable_alsa = xyes; then -- AM_PATH_ALSA(0.9.0, have_alsa=yes, have_alsa=no) -+ have_alsa=no - # Restore all flags from before the ALSA detection runs - CFLAGS="$alsa_save_CFLAGS" - LDFLAGS="$alsa_save_LDFLAGS" -@@ -460,7 +460,7 @@ CheckESD() - AC_HELP_STRING([--enable-esd], [support the Enlightened Sound Daemon [[default=yes]]]), - , enable_esd=yes) - if test x$enable_audio = xyes -a x$enable_esd = xyes; then -- AM_PATH_ESD(0.2.8, have_esd=yes, have_esd=no) -+ have_esd=no - if test x$have_esd = xyes; then - AC_ARG_ENABLE(esd-shared, - AC_HELP_STRING([--enable-esd-shared], [dynamically load ESD audio support [[default=yes]]]), -@@ -2963,3 +2963,4 @@ AC_OUTPUT([ - : >build-deps - if test x"$MAKE" = x; then MAKE=make; fi; $MAKE depend - ]) -+AC_CONFIG_MACRO_DIR([acinclude]) --- -1.8.3.4 - - -From 735586f7d0600476b0b02206daa76926193da957 Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Fri, 22 Nov 2013 23:39:26 +0100 -Subject: Fix samples vs bytes issues - -This was particularly noticeable in Milkytracker (SDL version) and -Hivelytracker, where all the audio timing relies on the buffer being -played during the right time. - -diff --git a/src/audio/baudio/SDL_beaudio.cc b/src/audio/baudio/SDL_beaudio.cc -index de635f8..7faf571 100644 ---- a/src/audio/baudio/SDL_beaudio.cc -+++ b/src/audio/baudio/SDL_beaudio.cc -@@ -199,11 +199,11 @@ int BE_OpenAudio(_THIS, SDL_AudioSpec *spec) - return (-1); - } - -- format.buffer_size = spec->samples; -- - /* Calculate the final parameters for this audio specification */ - SDL_CalculateAudioSpec(spec); - -+ format.buffer_size = spec->samples; -+ - /* Subscribe to the audio stream (creates a new thread) */ - { sigset_t omask; - SDL_MaskSignals(&omask); --- -1.8.3.4 - - -From 164201f49d1310bdd229feaf33c1f0e988a89f49 Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Fri, 22 Nov 2013 23:40:12 +0100 -Subject: Various fixes to the video code - -* Do not center the window each time it is resized -* Do not reset video mode if we didn't enter fullscreen -* remove annoying debug print - -diff --git a/src/video/bwindow/SDL_sysvideo.cc b/src/video/bwindow/SDL_sysvideo.cc -index c32b661..a26f18b 100644 ---- a/src/video/bwindow/SDL_sysvideo.cc -+++ b/src/video/bwindow/SDL_sysvideo.cc -@@ -406,6 +406,7 @@ static int BE_SetFullScreen(_THIS, SDL_Surface *screen, int fullscreen) - { - // printf("SetFullScreen(%d)\n", fullscreen); - BScreen bscreen; -+ static bool firstTime = true; - - // SetFullSscreen() does not work as expected if called in a window - // that was never shown. This is probably a bug in the Haiku Game Kit that needs -@@ -425,6 +426,8 @@ static int BE_SetFullScreen(_THIS, SDL_Surface *screen, int fullscreen) - int width = screen->w; - int height = screen->h; - -+ bool wasFullScreen = SDL_Win->IsFullScreen(); -+ - if (fullscreen) { - // Set resolution to the closest available one that matches the - // current SDL resolution. -@@ -444,7 +447,8 @@ static int BE_SetFullScreen(_THIS, SDL_Surface *screen, int fullscreen) - } else { - // Reset to the previous known resolution as we are now in window - // mode. -- bscreen.SetMode(&saved_mode); -+ if(wasFullScreen) -+ bscreen.SetMode(&saved_mode); - } - - // Effectivelly set/reset full screen mode. If we are already in -@@ -456,14 +460,6 @@ static int BE_SetFullScreen(_THIS, SDL_Surface *screen, int fullscreen) - // printf("Going windowed\n"); - SDL_Win->SetFullScreen(fullscreen); - -- // Calculate offsets for centering the window (in window mode) and for -- // dentering the bitmap (in full screen mode). -- BRect bounds = bscreen.Frame(); -- bounds.PrintToStream(); -- int32 cx = (bounds.IntegerWidth() - width)/2; -- int32 cy = (bounds.IntegerHeight() - height)/2; -- -- // printf ("cx = %d, cy = %d\n", cx, cy); - if (!SDL_Win->IsFullScreen()) { - // printf("Doing not fullscreen stuff.\n"); - // We are not in full screen mode, so we want to change the window -@@ -471,10 +467,18 @@ static int BE_SetFullScreen(_THIS, SDL_Surface *screen, int fullscreen) - SDL_Win->ResizeTo(width, height); - - // And also center the window and reset the drawing offset. -- SDL_Win->MoveTo(cx, cy); -+ if(firstTime || wasFullScreen) { -+ SDL_Win->CenterOnScreen(); -+ firstTime = false; -+ } - SDL_Win->SetXYOffset(0, 0); - } else { -- // printf("Doing fullscreen stuff."); -+ // Calculate offsets for centering the bitmap. -+ -+ BRect bounds = bscreen.Frame(); -+ int cx = (bounds.Width() - width) / 2; -+ int cy = (bounds.Height() - height) / 2; -+ - // Center the bitmap whenever we are in full screen mode. - SDL_Win->SetXYOffset(cx, cy); - } --- -1.8.3.4 - - -From ae129e6505148189a3d73fc085f20e214c0d6446 Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Sat, 23 Nov 2013 11:59:00 +0100 -Subject: Actually fix the sample vs bytes problem in audio driver. - - -diff --git a/src/audio/baudio/SDL_beaudio.cc b/src/audio/baudio/SDL_beaudio.cc -index 7faf571..300bf03 100644 ---- a/src/audio/baudio/SDL_beaudio.cc -+++ b/src/audio/baudio/SDL_beaudio.cc -@@ -161,25 +161,30 @@ int BE_OpenAudio(_THIS, SDL_AudioSpec *spec) - format.byte_order = B_MEDIA_LITTLE_ENDIAN; - format.frame_rate = (float) spec->freq; - format.channel_count = spec->channels; /* !!! FIXME: support > 2? */ -+ int samplesize = 1; - while ((!valid_datatype) && (test_format)) { - valid_datatype = 1; - spec->format = test_format; - switch (test_format) { - case AUDIO_S8: - format.format = media_raw_audio_format::B_AUDIO_CHAR; -+ samplesize = 1; - break; - - case AUDIO_U8: - format.format = media_raw_audio_format::B_AUDIO_UCHAR; -+ samplesize = 1; - break; - - case AUDIO_S16LSB: - format.format = media_raw_audio_format::B_AUDIO_SHORT; -+ samplesize = 2; - break; - - case AUDIO_S16MSB: - format.format = media_raw_audio_format::B_AUDIO_SHORT; - format.byte_order = B_MEDIA_BIG_ENDIAN; -+ samplesize = 2; - break; - - default: -@@ -202,7 +207,7 @@ int BE_OpenAudio(_THIS, SDL_AudioSpec *spec) - /* Calculate the final parameters for this audio specification */ - SDL_CalculateAudioSpec(spec); - -- format.buffer_size = spec->samples; -+ format.buffer_size = spec->samples * spec->channels * samplesize; - - /* Subscribe to the audio stream (creates a new thread) */ - { sigset_t omask; --- -1.8.3.4 - - -From 9b20d4dc8a3f5d607623b5d8b2c4ce14e830f4c8 Mon Sep 17 00:00:00 2001 -From: Chris Roberts -Date: Sun, 22 Dec 2013 18:37:30 -0700 -Subject: Remove Haiku from specialized DECLSPEC definition - - -diff --git a/include/begin_code.h b/include/begin_code.h -index 27e2f7b..d5e2f1f 100644 ---- a/include/begin_code.h -+++ b/include/begin_code.h -@@ -41,7 +41,7 @@ - * Some compilers use a special export keyword - */ - #ifndef DECLSPEC --# if defined(__BEOS__) || defined(__HAIKU__) -+# if defined(__BEOS__) - # if defined(__GNUC__) - # define DECLSPEC - # else --- -1.8.3.4 - - -From 09ba1fa7eccef32323c9987bdd4742bca6e9dfbc Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Sun, 5 Jan 2014 17:22:10 +0100 -Subject: Change prefix from "be" to "os" for OpenGL includes - -Accomodate the new OpenGL kit that doesn't have the "be" symlink. - -diff --git a/src/video/bwindow/SDL_BWin.h b/src/video/bwindow/SDL_BWin.h -index f2b19a2..2cb94ee 100644 ---- a/src/video/bwindow/SDL_BWin.h -+++ b/src/video/bwindow/SDL_BWin.h -@@ -31,7 +31,7 @@ - #include - #if SDL_VIDEO_OPENGL - #include "SDL_opengl.h" --#include -+#include - #endif - #include - --- -1.8.3.4 - diff --git a/media-libs/libsdl2/libsdl2-2.0.1.recipe b/media-libs/libsdl2/libsdl2-2.0.1.recipe index abbaff6d7..0c0c62e83 100644 --- a/media-libs/libsdl2/libsdl2-2.0.1.recipe +++ b/media-libs/libsdl2/libsdl2-2.0.1.recipe @@ -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 ------------------------------------- diff --git a/media-libs/libsdl2/patches/libsdl2-2.0.1.patchset b/media-libs/libsdl2/patches/libsdl2-2.0.1.patchset new file mode 100644 index 000000000..69c04b413 --- /dev/null +++ b/media-libs/libsdl2/patches/libsdl2-2.0.1.patchset @@ -0,0 +1,115 @@ +From 5491ee3ebfd9ddb58dad8e46a0b9afd30e12f000 Mon Sep 17 00:00:00 2001 +From: Alexander von Gluck IV +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 +-#include ++#include ++#include + + 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 +-#include ++#include + + #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 ++#include + + #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 + #include +-#include ++#include + + #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 +-#include ++#include + + 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 ++#include + + #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 + #include + #include +-#include ++#include + #if SDL_VIDEO_OPENGL +-#include ++#include + #endif + #include "SDL_events.h" + #include "../../main/beos/SDL_BApp.h" +-- +1.8.3.4 + diff --git a/media-libs/openal/openal-1.13.0.recipe b/media-libs/openal/openal-1.13.0.recipe index e585a8c10..9d0d640c7 100644 --- a/media-libs/openal/openal-1.13.0.recipe +++ b/media-libs/openal/openal-1.13.0.recipe @@ -5,7 +5,7 @@ OpenAL - A software implementation of the OpenAL 3D audio API. HOMEPAGE="http://kcat.strangesoft.net/openal.html" SRC_URI="http://kcat.strangesoft.net/openal-releases/openal-soft-1.13.tar.bz2" CHECKSUM_MD5="58b7d2809790c70681b825644c5f3614" -REVISION="1" +REVISION="2" LICENSE="GNU LGPL v2.1" COPYRIGHT="1999-2000 Loki Software 2005-2011 OpenAL Soft team" @@ -34,24 +34,26 @@ BUILD_PREREQUIRES=" " SOURCE_DIR="openal-soft-1.13" - + +PATCHES="openal-1.13.0.patchset" BUILD() { - sed -i "s,RUNTIME DESTINATION bin,RUNTIME DESTINATION $relativeBinDir," CMakeLists.txt - cmake . -DCMAKE_INSTALL_PREFIX=$prefix \ - -DLIB_SUFFIX="/${secondaryArchSuffix/_/}" + cd build + cmake .. -DCMAKE_INSTALL_PREFIX=$prefix -DBIN_DIR="$relativeBinDir" \ + -DLIB_SUFFIX="/${secondaryArchSuffix/_/}" make $jobArgs } INSTALL() { + cd build make install mkdir -p $developDir/headers - mkdir -p $binDir - mv $prefix/include $developDir/headers - - prepareInstalledDevelLibs libopenal + mv $prefix/include/* $developDir/headers + rmdir $prefix/include + + prepareInstalledDevelLib libopenal fixPkgconfig # devel package diff --git a/media-libs/openal/patches/openal-1.13.patch b/media-libs/openal/patches/openal-1.13.0.patchset similarity index 78% rename from media-libs/openal/patches/openal-1.13.patch rename to media-libs/openal/patches/openal-1.13.0.patchset index 634d011b9..34727f596 100644 --- a/media-libs/openal/patches/openal-1.13.patch +++ b/media-libs/openal/patches/openal-1.13.0.patchset @@ -1,7 +1,14 @@ -diff -Naur openal-soft-1.13/Alc/ALc.c openal-soft-1.13-haiku/Alc/ALc.c ---- openal-soft-1.13/Alc/ALc.c 2011-02-09 17:52:19.006291456 -0200 -+++ openal-soft-1.13-haiku/Alc/ALc.c 2011-05-02 01:08:32.000000000 -0300 -@@ -60,6 +60,9 @@ +From b755a676e918041fe3320e5e6bfa061b3b892994 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Tue, 28 Jan 2014 09:17:21 +0100 +Subject: applying patch openal-1.13.patch + + +diff --git a/Alc/ALc.c b/Alc/ALc.c +index 6bdcc66..c8b2af4 100644 +--- a/Alc/ALc.c ++++ b/Alc/ALc.c +@@ -60,6 +60,9 @@ static BackendInfo BackendList[] = { #ifdef HAVE_SOLARIS { "solaris", alc_solaris_init, alc_solaris_deinit, alc_solaris_probe, EmptyFuncs }, #endif @@ -11,9 +18,11 @@ diff -Naur openal-soft-1.13/Alc/ALc.c openal-soft-1.13-haiku/Alc/ALc.c #ifdef HAVE_DSOUND { "dsound", alcDSoundInit, alcDSoundDeinit, alcDSoundProbe, EmptyFuncs }, #endif -diff -Naur openal-soft-1.13/Alc/haiku.cpp openal-soft-1.13-haiku/Alc/haiku.cpp ---- openal-soft-1.13/Alc/haiku.cpp 1969-12-31 21:00:00.000000000 -0300 -+++ openal-soft-1.13-haiku/Alc/haiku.cpp 2011-05-02 01:06:54.000000000 -0300 +diff --git a/Alc/haiku.cpp b/Alc/haiku.cpp +new file mode 100644 +index 0000000..c66e99d +--- /dev/null ++++ b/Alc/haiku.cpp @@ -0,0 +1,214 @@ +/** + * OpenAL cross platform audio library @@ -229,10 +238,11 @@ diff -Naur openal-soft-1.13/Alc/haiku.cpp openal-soft-1.13-haiku/Alc/haiku.cpp + (void)lSamples; +} + -diff -Naur openal-soft-1.13/CMakeLists.txt openal-soft-1.13-haiku/CMakeLists.txt ---- openal-soft-1.13/CMakeLists.txt 2011-02-15 18:05:40.000000000 -0200 -+++ openal-soft-1.13-haiku/CMakeLists.txt 2011-05-02 01:08:32.000000000 -0300 -@@ -16,10 +16,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 44f9ea8..ffbe13b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,10 +16,12 @@ INCLUDE(CheckIncludeFiles) INCLUDE(CheckSymbolExists) INCLUDE(CheckCCompilerFlag) INCLUDE(CheckCSourceCompiles) @@ -246,7 +256,7 @@ diff -Naur openal-soft-1.13/CMakeLists.txt openal-soft-1.13-haiku/CMakeLists.txt SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE) -@@ -28,6 +30,7 @@ +@@ -28,6 +30,7 @@ SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE) OPTION(ALSA "Check for ALSA backend" ON) OPTION(OSS "Check for OSS backend" ON) OPTION(SOLARIS "Check for Solaris backend" ON) @@ -254,7 +264,7 @@ diff -Naur openal-soft-1.13/CMakeLists.txt openal-soft-1.13-haiku/CMakeLists.txt OPTION(DSOUND "Check for DirectSound backend" ON) OPTION(WINMM "Check for Windows Multimedia backend" ON) OPTION(PORTAUDIO "Check for PortAudio backend" ON) -@@ -334,6 +337,7 @@ +@@ -334,6 +337,7 @@ SET(BACKENDS "") SET(HAVE_ALSA 0) SET(HAVE_OSS 0) SET(HAVE_SOLARIS 0) @@ -262,7 +272,7 @@ diff -Naur openal-soft-1.13/CMakeLists.txt openal-soft-1.13-haiku/CMakeLists.txt SET(HAVE_DSOUND 0) SET(HAVE_WINMM 0) SET(HAVE_PORTAUDIO 0) -@@ -378,6 +382,24 @@ +@@ -378,6 +382,24 @@ IF(SOLARIS) ENDIF() ENDIF() @@ -287,10 +297,11 @@ diff -Naur openal-soft-1.13/CMakeLists.txt openal-soft-1.13-haiku/CMakeLists.txt # Check DSound/MMSystem backend IF(DSOUND) CHECK_INCLUDE_FILE(dsound.h HAVE_DSOUND_H) -diff -Naur openal-soft-1.13/OpenAL32/Include/alMain.h openal-soft-1.13-haiku/OpenAL32/Include/alMain.h ---- openal-soft-1.13/OpenAL32/Include/alMain.h 2011-02-09 17:50:49.001835008 -0200 -+++ openal-soft-1.13-haiku/OpenAL32/Include/alMain.h 2011-05-02 01:08:32.000000000 -0300 -@@ -276,6 +276,9 @@ +diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h +index 02153a8..e3b357a 100644 +--- a/OpenAL32/Include/alMain.h ++++ b/OpenAL32/Include/alMain.h +@@ -276,6 +276,9 @@ void alc_oss_probe(int type); void alc_solaris_init(BackendFuncs *func_list); void alc_solaris_deinit(void); void alc_solaris_probe(int type); @@ -300,9 +311,10 @@ diff -Naur openal-soft-1.13/OpenAL32/Include/alMain.h openal-soft-1.13-haiku/Ope void alcDSoundInit(BackendFuncs *func_list); void alcDSoundDeinit(void); void alcDSoundProbe(int type); -diff -Naur openal-soft-1.13/config.h.in openal-soft-1.13-haiku/config.h.in ---- openal-soft-1.13/config.h.in 2010-06-08 05:56:28.066846720 -0300 -+++ openal-soft-1.13-haiku/config.h.in 2011-05-02 01:08:32.000000000 -0300 +diff --git a/config.h.in b/config.h.in +index 3c1e7e6..27a19cf 100644 +--- a/config.h.in ++++ b/config.h.in @@ -13,6 +13,9 @@ /* Define if we have the Solaris backend */ #cmakedefine HAVE_SOLARIS @@ -313,3 +325,46 @@ diff -Naur openal-soft-1.13/config.h.in openal-soft-1.13-haiku/config.h.in /* Define if we have the DSound backend */ #cmakedefine HAVE_DSOUND +-- +1.8.3.4 + + +From af8af1218c33e188372b600c4c0bfefc616b43e6 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Tue, 28 Jan 2014 09:22:49 +0100 +Subject: Make bin directory a variable. + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ffbe13b..a060122 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -488,6 +488,7 @@ SET(libdir "\${exec_prefix}/lib${LIB_SUFFIX}") + SET(bindir "\${exec_prefix}/bin") + SET(includedir "\${prefix}/include") + SET(PACKAGE_VERSION "${LIB_VERSION}") ++SET(BIN_DIR "bin" CACHE STRING "relative dir where to put executables") + + # End configuration + CONFIGURE_FILE( +@@ -512,7 +513,7 @@ TARGET_LINK_LIBRARIES(${LIBNAME} ${EXTRA_LIBS}) + + # Add an install target here + INSTALL(TARGETS ${LIBNAME} +- RUNTIME DESTINATION bin ++ RUNTIME DESTINATION "${BIN_DIR}" + LIBRARY DESTINATION "lib${LIB_SUFFIX}" + ARCHIVE DESTINATION "lib${LIB_SUFFIX}" + ) +@@ -554,7 +555,7 @@ IF(UTILS) + ADD_EXECUTABLE(openal-info utils/openal-info.c) + TARGET_LINK_LIBRARIES(openal-info ${LIBNAME}) + INSTALL(TARGETS openal-info +- RUNTIME DESTINATION bin ++ RUNTIME DESTINATION "${BIN_DIR}" + LIBRARY DESTINATION "lib${LIB_SUFFIX}" + ARCHIVE DESTINATION "lib${LIB_SUFFIX}" + ) +-- +1.8.3.4 + diff --git a/media-libs/sdl2_mixer/sdl2_mixer-2.0.0.recipe b/media-libs/sdl2_mixer/sdl2_mixer-2.0.0.recipe index 3e7b9f9fa..3d4a50699 100644 --- a/media-libs/sdl2_mixer/sdl2_mixer-2.0.0.recipe +++ b/media-libs/sdl2_mixer/sdl2_mixer-2.0.0.recipe @@ -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 diff --git a/media-libs/sdl_net/sdl_net-1.2.8.recipe b/media-libs/sdl_net/sdl_net-1.2.8.recipe index 4eb98598b..274a831ca 100644 --- a/media-libs/sdl_net/sdl_net-1.2.8.recipe +++ b/media-libs/sdl_net/sdl_net-1.2.8.recipe @@ -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 \ diff --git a/media-libs/sdl_sound/sdl_sound-1.0.3.recipe b/media-libs/sdl_sound/sdl_sound-1.0.3.recipe index 2db412f45..c5bda8025 100644 --- a/media-libs/sdl_sound/sdl_sound-1.0.3.recipe +++ b/media-libs/sdl_sound/sdl_sound-1.0.3.recipe @@ -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=" diff --git a/media-libs/sge/sge-030809.recipe b/media-libs/sge/sge-030809.recipe index 02367c2ce..29897775a 100644 --- a/media-libs/sge/sge-030809.recipe +++ b/media-libs/sge/sge-030809.recipe @@ -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 " diff --git a/media-libs/smpeg/smpeg-0.4.5.recipe b/media-libs/smpeg/smpeg-0.4.5.recipe index 8ffe90683..3ad3c54f6 100644 --- a/media-libs/smpeg/smpeg-0.4.5.recipe +++ b/media-libs/smpeg/smpeg-0.4.5.recipe @@ -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 " diff --git a/media-sound/mpg123/mpg123-1.12.1.recipe b/media-sound/mpg123/mpg123-1.12.1.recipe index 26052220a..9910ad713 100644 --- a/media-sound/mpg123/mpg123-1.12.1.recipe +++ b/media-sound/mpg123/mpg123-1.12.1.recipe @@ -1,3 +1,4 @@ +SUMMARY="Fast console MPEG Audio Player and decoder library" DESCRIPTION=" mpg123 is the fast and Free console based real time MPEG Audio Player for \ Layer 1, 2 and 3. @@ -5,24 +6,55 @@ Layer 1, 2 and 3. HOMEPAGE="http://www.mpg123.org/" SRC_URI="http://sourceforge.net/projects/mpg123/files/mpg123/1.12.1/mpg123-1.12.1.tar.bz2/download" REVISION="1" -STATUS_HAIKU="stable" -DEPEND="media-libs/libsdl >= 1.2" +ARCHITECTURES="x86_gcc2 x86" +SECONDARY_ARCHITECTURES="x86" CHECKSUM_MD5="e7d810a75d22954169f1530a436aca4c" +#DEPEND="media-libs/libsdl >= 1.2" + +PROVIDES=" + mpg123$secondaryArchSuffix = $portVersion + lib:libmpg123$secondaryArchSuffix + cmd:mpg123$secondaryArchSuffix + " + +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + " + +BUILD_PREREQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + " + +PATCHES="mpg123-1.12.1.patch" BUILD() { - cd mpg123-1.12.1 - libtoolize --force --copy --install - aclocal - autoconf - ./configure --prefix=`finddir B_COMMON_DIRECTORY` --disable-aligncheck - make +#libtoolize --force --copy --install +# aclocal +# autoconf + LDFLAGS="-lnetwork" runConfigure ./configure --disable-aligncheck + make $jobArgs } INSTALL() { - cd mpg123-1.12.1 make install + prepareInstalledDevelLib libmpg123 + packageEntries devel $developDir } +PROVIDES_devel=" + mpg123$secondaryArchSuffix = $portVersion + devel:libmpg123$secondaryArchSuffix + " + +REQUIRES_devel=" + haiku$secondaryArchSuffix >= $haikuVersion + mpg123$secondaryArchSuffix == $portVersion base + " + + LICENSE="GNU LGPL v2.1" COPYRIGHT="1995-2009 Michael Hipp and others" diff --git a/net-misc/openssh/openssh-6.5p1.recipe b/net-misc/openssh/openssh-6.5p1.recipe new file mode 100644 index 000000000..2443e889e --- /dev/null +++ b/net-misc/openssh/openssh-6.5p1.recipe @@ -0,0 +1,135 @@ +SUMMARY="Secure Shell Client and Server (Remote Login Program)" +DESCRIPTION=" +OpenSSH is a FREE version of the SSH connectivity tools that technical users \ +of the Internet rely on. Users of telnet, rlogin, and ftp may not realize that \ +their password is transmitted across the Internet unencrypted, but it is. \ +OpenSSH encrypts all traffic (including passwords) to effectively eliminate \ +eavesdropping, connection hijacking, and other attacks. Additionally, OpenSSH \ +provides secure tunneling capabilities and several authentication methods, and \ +supports all SSH protocol versions. +The OpenSSH suite replaces rlogin and telnet with the ssh program, rcp with \ +scp, and ftp with sftp. Also included is sshd (the server side of the \ +package), and the other utilities like ssh-add, ssh-agent, ssh-keysign, \ +ssh-keyscan, ssh-keygen and sftp-server. +" +HOMEPAGE="http://www.openssh.com/" +LICENSE="OpenSSH" +COPYRIGHT="2005-2012 Tatu Ylonen et al." +#SRC_URI="http://openbsd.mirrorcatalogs.com/pub/OpenBSD/OpenSSH/portable/openssh-6.0p1.tar.gz" +SRC_URI="http://mindrot.org/openssh_snap/openssh-SNAP-20140127.tar.gz" +CHECKSUM_MD5="30c7abbc69179aea953cfc2d47e402bd" +REVISION="1" + +ARCHITECTURES="x86_gcc2 x86 x86_64" + +PATCHES="sshd_config.patch + pathnames.patch" + +ADDITIONAL_FILES="sshd_keymaker.sh" + +PROVIDES=" + openssh = $portVersion compat >= 5 + cmd:scp = $portVersion compat >= 5 + cmd:sftp = $portVersion compat >= 5 + cmd:sftp_server = $portVersion compat >= 5 + cmd:slogin = $portVersion compat >= 5 + cmd:ssh = $portVersion compat >= 5 + cmd:ssh_add = $portVersion compat >= 5 + cmd:ssh_agent = $portVersion compat >= 5 + cmd:ssh_keygen = $portVersion compat >= 5 + cmd:ssh_keyscan = $portVersion compat >= 5 + cmd:ssh_keysign = $portVersion compat >= 5 + cmd:ssh_pkcs11_helper = $portVersion compat >= 5 + cmd:sshd = $portVersion compat >= 5 + " +REQUIRES=" + haiku >= $haikuVersion + cmd:login + cmd:passwd + lib:libcrypto + lib:libedit + lib:libncurses + lib:libssl + lib:libz + " +BUILD_REQUIRES=" + devel:libcrypto + devel:libedit + devel:libncurses + devel:libssl + devel:libz + " +BUILD_PREREQUIRES=" + haiku_devel >= $haikuVersion + cmd:aclocal + cmd:autoconf + cmd:automake + cmd:gcc + cmd:ld + cmd:libtoolize + cmd:make + cmd:pkg_config + " + +GLOBAL_WRITABLE_FILES=" + settings/ssh directory keep-old + " +USER_SETTINGS_FILES=" + settings/ssh directory + " +POST_INSTALL_SCRIPTS=" + $relativePostInstallDir/sshd_keymaker.sh + " +sshdUserHomeDir="/packages/$portVersionedName-$REVISION/.self/$relativeDataDir/openssh/empty" +PACKAGE_USERS=" + sshd real-name \"sshd user\" home \"$sshdUserHomeDir\" shell \"/bin/true\" + " +PACKAGE_GROUPS="sshd" + + +PATCH() +{ + echo 'AC_CONFIG_MACRO_DIR([m4])' >> configure.ac +} + +SOURCE_DIR="openssh" + +BUILD() +{ + mkdir -p m4 + aclocal --install -I m4 + libtoolize --force --copy + aclocal -I m4 + autoconf + defaultPath=".:/boot/home/config/non-packaged/bin:/boot/home/config/bin" + defaultPath+=":/boot/common/non-packaged/bin:/boot/common/bin:/bin" + defaultPath+=":/boot/common/apps:/boot/common/preferences:/boot/system/apps" + defaultPath+=":/boot/system/preferences" + + # Note: override sysconfdir and libexecdir since ssh doesn't create + # subdirectories as it should. + PATH_PASSWD_PROG=$portPackageLinksDir/cmd~passwd/bin/passwd \ + LOGIN_PROGRAM=$portPackageLinksDir/cmd~login/bin/login \ + runConfigure ./configure \ + --sysconfdir=$sysconfDir/ssh \ + --libexecdir=$libExecDir/openssh \ + --with-privsep-path=$dataDir/openssh/empty \ + --with-pid-dir=$prefix/var/run \ + --with-default-path="$defaultPath" \ + --with-md5-passwords \ + --disable-utmpx \ + --with-libedit + make $jobArgs +} + +INSTALL() +{ + make install-nokeys + mkdir -p $postInstallDir + cp -f $portDir/additional-files/sshd_keymaker.sh $postInstallDir +} + +TEST() +{ + make tests +} diff --git a/net-misc/openssh/patches/pathnames.patch b/net-misc/openssh/patches/pathnames.patch new file mode 100644 index 000000000..8c911e943 --- /dev/null +++ b/net-misc/openssh/patches/pathnames.patch @@ -0,0 +1,13 @@ +diff --git a/pathnames.h b/pathnames.h +index ec89fc6..6ad1b64 100644 +--- a/pathnames.h ++++ b/pathnames.h +@@ -59,7 +59,7 @@ + * The directory in user's home directory in which the files reside. The + * directory should be world-readable (though not all files are). + */ +-#define _PATH_SSH_USER_DIR ".ssh" ++#define _PATH_SSH_USER_DIR "config/settings/ssh" + + /* + * Per-user file containing host keys of known hosts. This file need not be diff --git a/net-misc/openssh/patches/sshd_config.patch b/net-misc/openssh/patches/sshd_config.patch new file mode 100644 index 000000000..a00bb2e0c --- /dev/null +++ b/net-misc/openssh/patches/sshd_config.patch @@ -0,0 +1,13 @@ +diff --git a/sshd_config b/sshd_config +index e9045bc..0835873 100644 +--- a/sshd_config ++++ b/sshd_config +@@ -51,7 +51,7 @@ + + # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 + # but this is overridden so installations will only check .ssh/authorized_keys +-AuthorizedKeysFile .ssh/authorized_keys ++AuthorizedKeysFile config/settings/ssh/authorized_keys + + #AuthorizedPrincipalsFile none + diff --git a/net-misc/youtube_dl/youtube_dl-2014.01.08.recipe b/net-misc/youtube_dl/youtube_dl-2014.01.08.recipe new file mode 100644 index 000000000..d36f33b21 --- /dev/null +++ b/net-misc/youtube_dl/youtube_dl-2014.01.08.recipe @@ -0,0 +1,50 @@ +SUMMARY="A command-line program to download videos from various sites" +DESCRIPTION=" +The program is usually invoked as youtube-dl followed by options and the video \ +URL. Run 'youtube-dl --help' and get a summary of all options. +Some YouTube videos are served using Adobe's proprietary RTMP protocol, which \ +imposes DRM restrictions and encrypts the connection. youtube-dl is not able \ +to download these videos by itself. +" +HOMEPAGE="http://rg3.github.io/youtube-dl/index.html" +SRC_URI="https://yt-dl.org/downloads/2014.01.08/youtube-dl-2014.01.08.tar.gz" +CHECKSUM_MD5="bb3e523b7e4e59ac64ce9a48fda86de7" +REVISION="1" +LICENSE="Public Domain" +COPYRIGHT="2006-2014 Ricardo Garcia Gonzalez" + +ARCHITECTURES="any" + +PROVIDES=" + youtube_dl = $portVersion + cmd:youtube_dl = $portVersion + " +REQUIRES=" + haiku >= $haikuVersion + cmd:python + " +BUILD_REQUIRES=" + haiku_devel >= $haikuVersion + " +BUILD_PREREQUIRES=" + cmd:zip + " + +SOURCE_DIR="youtube-dl" + +BUILD() +{ + zip -q youtube-dl youtube_dl/*.py youtube_dl/*/*.py + zip -q -j youtube-dl youtube_dl/__main__.py + echo '#!/bin/python' > youtube-dl + cat youtube-dl.zip >> youtube-dl + rm youtube-dl.zip + chmod a+x youtube-dl +} + +INSTALL() +{ + mkdir -p $binDir $manDir/man1 + cp -a youtube-dl $binDir + cp -a youtube-dl.1 $manDir/man1 +} diff --git a/sys-apps/fxload/fxload-20120810.recipe b/sys-apps/fxload/fxload-20120810.recipe new file mode 100644 index 000000000..c448bc656 --- /dev/null +++ b/sys-apps/fxload/fxload-20120810.recipe @@ -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 + 2001-2002 David Brownell + 2008 Roger Williams + 2012 Pete Batard + " +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" +} diff --git a/sys-apps/pciutils/patches/pciutils-3.2.1_git-0001-C89.patch b/sys-apps/pciutils/patches/pciutils-3.2.1_git-0001-C89.patch new file mode 100644 index 000000000..0861c4c79 --- /dev/null +++ b/sys-apps/pciutils/patches/pciutils-3.2.1_git-0001-C89.patch @@ -0,0 +1,30 @@ +From 5791b4969c8acb81a6879035269319d3140d2bfa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Wed, 18 Dec 2013 14:10:05 +0100 +Subject: [PATCH] C89 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: François Revol +--- + ls-caps.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ls-caps.c b/ls-caps.c +index f192510..865a999 100644 +--- a/ls-caps.c ++++ b/ls-caps.c +@@ -1260,8 +1260,8 @@ show_caps(struct device *d, int where) + + if (get_conf_word(d, PCI_STATUS) & PCI_STATUS_CAP_LIST) + { +- where = get_conf_byte(d, where) & ~3; + byte been_there[256]; ++ where = get_conf_byte(d, where) & ~3; + memset(been_there, 0, 256); + while (where) + { +-- +1.8.3.4 + diff --git a/sys-apps/pciutils/pciutils-3.2.1.recipe b/sys-apps/pciutils/pciutils-3.2.1.recipe new file mode 100644 index 000000000..4b77d4ab8 --- /dev/null +++ b/sys-apps/pciutils/pciutils-3.2.1.recipe @@ -0,0 +1,77 @@ +SUMMARY="Various utilities dealing with the PCI bus" +DESCRIPTION="Various utilities dealing with the PCI bus" +HOMEPAGE="http://mj.ucw.cz/sw/pciutils/" +SRC_URI="ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/pciutils-3.2.1.tar.gz" +CHECKSUM_MD5="fdc92c4665bb169022ffe730b3c08313" +REVISION="1" +LICENSE="GNU GPL v2" +COPYRIGHT="1997-2012 Martin Mares" + +ARCHITECTURES="x86_gcc2 x86 ?x86_64" +SECONDARY_ARCHITECTURES="x86_gcc2 x86" + +PROVIDES=" + pciutils${secondaryArchSuffix} = $portVersion + cmd:lspci${secondaryArchSuffix} = $portVersion + cmd:setpci${secondaryArchSuffix} = $portVersion + " +REQUIRES=" + haiku${secondaryArchSuffix} >= $haikuVersion + lib:libz${secondaryArchSuffix} + " +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + devel:libz${secondaryArchSuffix} + " +BUILD_PREREQUIRES=" + cmd:make + cmd:gcc${secondaryArchSuffix} + " + +PATCHES="pciutils-3.2.1_git-0001-C89.patch" + +BUILD() +{ + make \ + ZLIB=yes \ + PREFIX=$prefix \ + SHAREDIR=$dataDir \ + SBINDIR=$binDir \ + MANDIR=$manDir \ + INCDIR=$headersDir \ + LIBDIR=$developLibDir +} + +#TODO: SHARED=yes? +# XXX: remove update-pciids (packages are read-only anyway) +INSTALL() +{ + make \ + ZLIB=yes \ + PREFIX=$prefix \ + SHAREDIR=$dataDir \ + SBINDIR=$binDir \ + MANDIR=$manDir \ + INCDIR=$includeDir \ + LIBDIR=$developLibDir \ + install install-lib + rm -f $binDir/update-pciids + rm -f $manDir/man*/update-pciids.* + + # devel package + packageEntries devel \ + $developDir \ + $manDir/man*/pcilib.* +} + +PROVIDES_devel=" + pciutils${secondaryArchSuffix}_devel = $portVersion + devel:pciutils$secondaryArchSuffix = $portVersion + devel:libpci$secondaryArchSuffix + " + +REQUIRES_devel=" + pciutils$secondaryArchSuffix == $portVersion base + " + + diff --git a/sys-apps/pciutils/pciutils-3.2.1_git.recipe b/sys-apps/pciutils/pciutils-3.2.1_git.recipe new file mode 100644 index 000000000..d0161f4b6 --- /dev/null +++ b/sys-apps/pciutils/pciutils-3.2.1_git.recipe @@ -0,0 +1,80 @@ +SUMMARY="Various utilities dealing with the PCI bus" +DESCRIPTION="Various utilities dealing with the PCI bus" +HOMEPAGE="http://mj.ucw.cz/sw/pciutils/" +SRC_URI="git://git.kernel.org/pub/scm/utils/pciutils/pciutils.git" +#CHECKSUM_MD5="" +REVISION="1" +LICENSE="GNU GPL v2" +COPYRIGHT="1997-2012 Martin Mares" + +ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" +SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86" + +PROVIDES=" + pciutils${secondaryArchSuffix} = $portVersion + cmd:lspci${secondaryArchSuffix} = $portVersion + cmd:setpci${secondaryArchSuffix} = $portVersion +# cmd:update-pciids${secondaryArchSuffix} = $portVersion +# lib:libpci${secondaryArchSuffix} +# devel:pciutils${secondaryArchSuffix} + " +REQUIRES=" + haiku${secondaryArchSuffix} >= $haikuVersion + lib:libz${secondaryArchSuffix} + " +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + devel:libz${secondaryArchSuffix} + " +BUILD_PREREQUIRES=" + cmd:make + cmd:gcc${secondaryArchSuffix} + " + +PATCHES="pciutils-3.2.1_git-0001-C89.patch" + +BUILD() +{ + make \ + ZLIB=yes \ + PREFIX=$prefix \ + SHAREDIR=$dataDir \ + SBINDIR=$binDir \ + MANDIR=$manDir \ + INCDIR=$headersDir \ + LIBDIR=$developLibDir +} + +#TODO: SHARED=yes? +# XXX: remove update-pciids (packages are read-only anyway) +INSTALL() +{ + make \ + ZLIB=yes \ + PREFIX=$prefix \ + SHAREDIR=$dataDir \ + SBINDIR=$binDir \ + MANDIR=$manDir \ + INCDIR=$includeDir \ + LIBDIR=$developLibDir \ + install install-lib + rm -f $binDir/update-pciids + rm -f $manDir/man*/update-pciids.* + + # devel package + packageEntries devel \ + $developDir \ + $manDir/man*/pcilib.* +} + +PROVIDES_devel=" + pciutils${secondaryArchSuffix}_devel = $portVersion + devel:pciutils$secondaryArchSuffix = $portVersion + devel:libpci$secondaryArchSuffix + " + +REQUIRES_devel=" + pciutils$secondaryArchSuffix == $portVersion base + " + + diff --git a/sys-devel/clang/clang-3.4.recipe b/sys-devel/clang/clang-3.4.recipe new file mode 100644 index 000000000..79477fe79 --- /dev/null +++ b/sys-devel/clang/clang-3.4.recipe @@ -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 + " diff --git a/sys-devel/clang/patches/clang-3.4.patchset b/sys-devel/clang/patches/clang-3.4.patchset new file mode 100644 index 000000000..64545c08a --- /dev/null +++ b/sys-devel/clang/patches/clang-3.4.patchset @@ -0,0 +1,97 @@ +From 33c9dfc71ce4a7cc0a0e5967b9110bcbc3d0a7d7 Mon Sep 17 00:00:00 2001 +From: Alexander von Gluck IV +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 + diff --git a/sys-devel/clang/patches/llvm-3.4.patchset b/sys-devel/clang/patches/llvm-3.4.patchset new file mode 100644 index 000000000..9f14d94d8 --- /dev/null +++ b/sys-devel/clang/patches/llvm-3.4.patchset @@ -0,0 +1,25 @@ +From 744634aa845c403f5a39b8257bbacd36dc1dd351 Mon Sep 17 00:00:00 2001 +From: Alexander von Gluck IV +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 + #else + #if !defined(BYTE_ORDER) && !defined(LLVM_ON_WIN32) +-- +1.8.3.4 + diff --git a/sys-devel/gcc/gcc-2.95.3_2013_08_15.recipe b/sys-devel/gcc/gcc-2.95.3_2013_08_15.recipe index a8a586880..da2417640 100644 --- a/sys-devel/gcc/gcc-2.95.3_2013_08_15.recipe +++ b/sys-devel/gcc/gcc-2.95.3_2013_08_15.recipe @@ -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 diff --git a/sys-devel/gcc/gcc-4.7.3_2013_08_12.recipe b/sys-devel/gcc/gcc-4.7.3_2013_08_12.recipe index a9994f2ff..a143a821c 100644 --- a/sys-devel/gcc/gcc-4.7.3_2013_08_12.recipe +++ b/sys-devel/gcc/gcc-4.7.3_2013_08_12.recipe @@ -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 diff --git a/sys-devel/gettext/gettext-0.18.1.1.recipe b/sys-devel/gettext/gettext-0.18.1.1.recipe index 1a6cb99f5..666aaf74e 100644 --- a/sys-devel/gettext/gettext-0.18.1.1.recipe +++ b/sys-devel/gettext/gettext-0.18.1.1.recipe @@ -35,8 +35,31 @@ PROVIDES=" devel:libintl$secondaryArchSuffix = 8.1.1 compat >= 8 lib:libasprintf$secondaryArchSuffix = 0.0.0 compat >= 0 lib:libgettextlib_0.18.1$secondaryArchSuffix = $portVersion - lib:libgettextpo = 0.5.1$secondaryArchSuffix compat >= 0 + lib:libgettextpo$secondaryArchSuffix = 0.5.1 compat >= 0 lib:libgettextsrc_0.18.1$secondaryArchSuffix = $portVersion + cmd:autopoint$secondaryArchSuffix + cmd:envsubst$secondaryArchSuffix + cmd:gettext$secondaryArchSuffix + cmd:gettext.sh$secondaryArchSuffix + cmd:gettextize$secondaryArchSuffix + cmd:msgattrib$secondaryArchSuffix + cmd:msgcat$secondaryArchSuffix + cmd:msgcmp$secondaryArchSuffix + cmd:msgcomm$secondaryArchSuffix + cmd:msgconv$secondaryArchSuffix + cmd:msgen$secondaryArchSuffix + cmd:msgexec$secondaryArchSuffix + cmd:msgfilter$secondaryArchSuffix + cmd:msgfmt$secondaryArchSuffix + cmd:msggrep$secondaryArchSuffix + cmd:msginit$secondaryArchSuffix + cmd:msgmerge$secondaryArchSuffix + cmd:msgunfmt$secondaryArchSuffix + cmd:msguniq$secondaryArchSuffix + cmd:ngettext$secondaryArchSuffix + cmd:recode_sr_latin$secondaryArchSuffix + cmd:xgettext$secondaryArchSuffix + " if [ -z "$secondaryArchSuffix" ]; then PROVIDES="$PROVIDES diff --git a/sys-devel/llvm/llvm-3.4.recipe b/sys-devel/llvm/llvm-3.4.recipe new file mode 100644 index 000000000..10e107e1e --- /dev/null +++ b/sys-devel/llvm/llvm-3.4.recipe @@ -0,0 +1,88 @@ +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 + cmd:bugpoint + cmd:llc + cmd:lli + cmd:lli_child_target + cmd:llvm_ar + cmd:llvm_as + cmd:llvm_bcanalyzer + cmd:llvm_config + cmd:llvm_cov + cmd:llvm_diff + cmd:llvm_dis + cmd:llvm_dwarfdump + cmd:llvm_extract + cmd:llvm_link + cmd:llvm_mc + cmd:llvm_mcmarkup + cmd:llvm_nm + cmd:llvm_objdump + cmd:llvm_ranlib + cmd:llvm_readobj + cmd:llvm_rtdyld + cmd:llvm_size + cmd:llvm_stress + cmd:llvm_symbolizer + cmd:llvm_tblgen + cmd:macho_dump + cmd:opt + " + +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 +} diff --git a/sys-devel/llvm/patches/llvm-3.4.patchset b/sys-devel/llvm/patches/llvm-3.4.patchset new file mode 100644 index 000000000..9f14d94d8 --- /dev/null +++ b/sys-devel/llvm/patches/llvm-3.4.patchset @@ -0,0 +1,25 @@ +From 744634aa845c403f5a39b8257bbacd36dc1dd351 Mon Sep 17 00:00:00 2001 +From: Alexander von Gluck IV +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 + #else + #if !defined(BYTE_ORDER) && !defined(LLVM_ON_WIN32) +-- +1.8.3.4 + diff --git a/sys-libs/mesa/mesa-10.0.2.recipe b/sys-libs/mesa/mesa-10.0.2.recipe new file mode 100644 index 000000000..c3f515310 --- /dev/null +++ b/sys-libs/mesa/mesa-10.0.2.recipe @@ -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/*Pipe" + + # swrast renderer package + packageEntries swrast \ + "$addOnsDir/opengl/*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 + " + diff --git a/sys-libs/mesa/patches/mesa-10.0.2.patchset b/sys-libs/mesa/patches/mesa-10.0.2.patchset new file mode 100644 index 000000000..6c35f8c6e --- /dev/null +++ b/sys-libs/mesa/patches/mesa-10.0.2.patchset @@ -0,0 +1,2746 @@ +From cc285772ce222f3672aa725dea18b52d9f94d2c2 Mon Sep 17 00:00:00 2001 +From: Alexander von Gluck IV +Date: Mon, 30 Dec 2013 23:49:06 -0600 +Subject: [PATCH] haiku: Fix missing HaikuGL header paths + +--- + src/gallium/targets/haiku-softpipe/SConscript | 1 + + src/gallium/targets/libgl-haiku/SConscript | 1 + + src/mesa/drivers/haiku/swrast/SConscript | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/src/gallium/targets/haiku-softpipe/SConscript b/src/gallium/targets/haiku-softpipe/SConscript +index 40bf03c..16ce7cd 100644 +--- a/src/gallium/targets/haiku-softpipe/SConscript ++++ b/src/gallium/targets/haiku-softpipe/SConscript +@@ -21,6 +21,7 @@ env.Append(CPPPATH = [ + '#/src/mapi', + '#/src/mesa', + '#/src/mesa/main', ++ '#/include/HaikuGL', + '#/src/gallium/winsys/sw/hgl', + '/boot/system/develop/headers/private', + ]) +diff --git a/src/gallium/targets/libgl-haiku/SConscript b/src/gallium/targets/libgl-haiku/SConscript +index 2e6b628..43d15c5 100644 +--- a/src/gallium/targets/libgl-haiku/SConscript ++++ b/src/gallium/targets/libgl-haiku/SConscript +@@ -9,6 +9,7 @@ env.Append(CPPPATH = [ + '#/src/mapi', + '#/src/mesa', + '#/src/mesa/main', ++ '#/include/HaikuGL', + '/boot/system/develop/headers/private', + Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers + ]) +diff --git a/src/mesa/drivers/haiku/swrast/SConscript b/src/mesa/drivers/haiku/swrast/SConscript +index 71ce88e..ca0423e 100644 +--- a/src/mesa/drivers/haiku/swrast/SConscript ++++ b/src/mesa/drivers/haiku/swrast/SConscript +@@ -6,6 +6,7 @@ env.Append(CPPPATH = [ + '#/src/mapi', + '#/src/mesa', + '#/src/mesa/main', ++ '#/include/HaikuGL', + '/boot/system/develop/headers/private', + Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers + ]) +-- +1.8.3.4 + +From 72e0f3de1f2df3407dbf257183c78bd3f81c1a12 Mon Sep 17 00:00:00 2001 +From: Alexander von Gluck IV +Date: Tue, 31 Dec 2013 15:39:49 -0600 +Subject: [PATCH] haiku libGL: Move from gallium target to src/hgl + +* The Haiku renderers need to link to libGL to function properly + in all usage contexts. As mesa drivers build before gallium + targets, we couldn't properly link the mesa swrast driver to + the gallium libGL target for Haiku. +* This is likely better as it mimics how glx is laid out ensuring + the Haiku libGL is better understood. +* All renderers properly link in libGL now. +--- + src/SConscript | 5 + + src/gallium/SConscript | 1 - + src/gallium/targets/haiku-softpipe/SConscript | 2 + + src/gallium/targets/libgl-haiku/GLDispatcher.cpp | 72 --- + src/gallium/targets/libgl-haiku/GLDispatcher.h | 109 ---- + src/gallium/targets/libgl-haiku/GLRenderer.cpp | 106 ---- + .../targets/libgl-haiku/GLRendererRoster.cpp | 224 ------- + src/gallium/targets/libgl-haiku/GLRendererRoster.h | 51 -- + src/gallium/targets/libgl-haiku/GLView.cpp | 643 --------------------- + src/gallium/targets/libgl-haiku/SConscript | 35 -- + src/hgl/GLDispatcher.cpp | 72 +++ + src/hgl/GLDispatcher.h | 109 ++++ + src/hgl/GLRenderer.cpp | 106 ++++ + src/hgl/GLRendererRoster.cpp | 224 +++++++ + src/hgl/GLRendererRoster.h | 51 ++ + src/hgl/GLView.cpp | 643 +++++++++++++++++++++ + src/hgl/SConscript | 36 ++ + src/mesa/drivers/haiku/swrast/SConscript | 2 + + 18 files changed, 1250 insertions(+), 1241 deletions(-) + delete mode 100644 src/gallium/targets/libgl-haiku/GLDispatcher.cpp + delete mode 100644 src/gallium/targets/libgl-haiku/GLDispatcher.h + delete mode 100644 src/gallium/targets/libgl-haiku/GLRenderer.cpp + delete mode 100644 src/gallium/targets/libgl-haiku/GLRendererRoster.cpp + delete mode 100644 src/gallium/targets/libgl-haiku/GLRendererRoster.h + delete mode 100644 src/gallium/targets/libgl-haiku/GLView.cpp + delete mode 100644 src/gallium/targets/libgl-haiku/SConscript + create mode 100644 src/hgl/GLDispatcher.cpp + create mode 100644 src/hgl/GLDispatcher.h + create mode 100644 src/hgl/GLRenderer.cpp + create mode 100644 src/hgl/GLRendererRoster.cpp + create mode 100644 src/hgl/GLRendererRoster.h + create mode 100644 src/hgl/GLView.cpp + create mode 100644 src/hgl/SConscript + +diff --git a/src/SConscript b/src/SConscript +index 1465918..a24acea 100644 +--- a/src/SConscript ++++ b/src/SConscript +@@ -18,6 +18,11 @@ if env['hostonly']: + # enable OpenGL ES support. + SConscript('mapi/glapi/gen/SConscript') + SConscript('mapi/glapi/SConscript') ++ ++# Haiku C++ libGL dispatch (renderers depend on libgl) ++if env['platform'] in ['haiku']: ++ SConscript('hgl/SConscript') ++ + SConscript('mesa/SConscript') + + SConscript('mapi/vgapi/SConscript') +diff --git a/src/gallium/SConscript b/src/gallium/SConscript +index 6e27be2..32bbdbe 100644 +--- a/src/gallium/SConscript ++++ b/src/gallium/SConscript +@@ -119,7 +119,6 @@ if not env['embedded']: + if env['platform'] == 'haiku': + SConscript([ + 'targets/haiku-softpipe/SConscript', +- 'targets/libgl-haiku/SConscript', + ]) + + if env['dri']: +diff --git a/src/gallium/targets/haiku-softpipe/SConscript b/src/gallium/targets/haiku-softpipe/SConscript +index 16ce7cd..0381d05 100644 +--- a/src/gallium/targets/haiku-softpipe/SConscript ++++ b/src/gallium/targets/haiku-softpipe/SConscript +@@ -17,6 +17,8 @@ if True: + ]) + env.Prepend(LIBS = [softpipe]) + ++env.Prepend(LIBS = [libgl]) ++ + env.Append(CPPPATH = [ + '#/src/mapi', + '#/src/mesa', +diff --git a/src/gallium/targets/libgl-haiku/GLDispatcher.cpp b/src/gallium/targets/libgl-haiku/GLDispatcher.cpp +deleted file mode 100644 +index 46b91d5..0000000 +--- a/src/gallium/targets/libgl-haiku/GLDispatcher.cpp ++++ /dev/null +@@ -1,72 +0,0 @@ +-/* +- * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +- * Copyright 2000-2012 Haiku, Inc. All Rights Reserved. +- * Distributed under the terms of the MIT License. +- * +- * Authors: +- * Brian Paul +- * Philippe Houdoin +- * Alexander von Gluck IV +- */ +- +- +-extern "C" { +-#include "glapi/glapi.h" +-#include "glapi/glapi_priv.h" +- +-/* +- * NOTE: this file portion implements C-based dispatch of the OpenGL entrypoints +- * (glAccum, glBegin, etc). +- * This code IS NOT USED if we're compiling on an x86 system and using +- * the glapi_x86.S assembly code. +- */ +-#if !(defined(USE_X86_ASM) || defined(USE_SPARC_ASM)) +- +-#define KEYWORD1 PUBLIC +-#define KEYWORD2 +-#define NAME(func) gl##func +- +-#define DISPATCH(func, args, msg) \ +- const struct _glapi_table* dispatch; \ +- dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\ +- (dispatch->func) args +- +-#define RETURN_DISPATCH(func, args, msg) \ +- const struct _glapi_table* dispatch; \ +- dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\ +- return (dispatch->func) args +- +-#endif +-} +- +- +-/* NOTE: this file portion implement a thin OpenGL entrypoints dispatching +- C++ wrapper class +- */ +- +-#include "GLDispatcher.h" +- +-BGLDispatcher::BGLDispatcher() +-{ +-} +- +- +-BGLDispatcher::~BGLDispatcher() +-{ +-} +- +- +-status_t +-BGLDispatcher::CheckTable(const struct _glapi_table* table) +-{ +- _glapi_check_table(table ? table : _glapi_get_dispatch()); +- return B_OK; +-} +- +- +-status_t +-BGLDispatcher::SetTable(struct _glapi_table* table) +-{ +- _glapi_set_dispatch(table); +- return B_OK; +-} +diff --git a/src/gallium/targets/libgl-haiku/GLDispatcher.h b/src/gallium/targets/libgl-haiku/GLDispatcher.h +deleted file mode 100644 +index 44bca8c..0000000 +--- a/src/gallium/targets/libgl-haiku/GLDispatcher.h ++++ /dev/null +@@ -1,109 +0,0 @@ +-/* +- * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +- * Copyright 2000-2012 Haiku, Inc. All Rights Reserved. +- * Distributed under the terms of the MIT License. +- * +- * Authors: +- * Brian Paul +- * Philippe Houdoin +- */ +-#ifndef GLDISPATCHER_H +-#define GLDISPATCHER_H +- +- +-#include +-#include +-#include +- +-#include "glheader.h" +- +-extern "C" { +-#include "glapi/glapi.h" +-} +- +- +-class BGLDispatcher +-{ +- // Private unimplemented copy constructors +- BGLDispatcher(const BGLDispatcher &); +- BGLDispatcher & operator=(const BGLDispatcher &); +- +- public: +- BGLDispatcher(); +- ~BGLDispatcher(); +- +- void SetCurrentContext(void* context); +- void* CurrentContext(); +- +- struct _glapi_table* Table(); +- status_t CheckTable( +- const struct _glapi_table* dispatch = NULL); +- status_t SetTable(struct _glapi_table* dispatch); +- uint32 TableSize(); +- +- const _glapi_proc operator[](const char* functionName); +- const char* operator[](uint32 offset); +- +- const _glapi_proc AddressOf(const char* functionName); +- uint32 OffsetOf(const char* functionName); +-}; +- +- +-// Inlines methods +-inline void +-BGLDispatcher::SetCurrentContext(void* context) +-{ +- _glapi_set_context(context); +-} +- +- +-inline void* +-BGLDispatcher::CurrentContext() +-{ +- return _glapi_get_context(); +-} +- +- +-inline struct _glapi_table* +-BGLDispatcher::Table() +-{ +- return _glapi_get_dispatch(); +-} +- +- +-inline uint32 +-BGLDispatcher::TableSize() +-{ +- return _glapi_get_dispatch_table_size(); +-} +- +- +-inline const _glapi_proc +-BGLDispatcher::operator[](const char* functionName) +-{ +- return _glapi_get_proc_address(functionName); +-} +- +- +-inline const char* +-BGLDispatcher::operator[](uint32 offset) +-{ +- return _glapi_get_proc_name((GLuint) offset); +-} +- +- +-inline const _glapi_proc +-BGLDispatcher::AddressOf(const char* functionName) +-{ +- return _glapi_get_proc_address(functionName); +-} +- +- +-inline uint32 +-BGLDispatcher::OffsetOf(const char* functionName) +-{ +- return (uint32) _glapi_get_proc_offset(functionName); +-} +- +- +-#endif // GLDISPATCHER_H +diff --git a/src/gallium/targets/libgl-haiku/GLRenderer.cpp b/src/gallium/targets/libgl-haiku/GLRenderer.cpp +deleted file mode 100644 +index 4573a64..0000000 +--- a/src/gallium/targets/libgl-haiku/GLRenderer.cpp ++++ /dev/null +@@ -1,106 +0,0 @@ +-/* +- * Copyright 2006-2008, Philippe Houdoin. All rights reserved. +- * Distributed under the terms of the MIT License. +- */ +- +- +-#include +- +-#include "GLRenderer.h" +- +-#include "GLDispatcher.h" +- +- +-BGLRenderer::BGLRenderer(BGLView* view, ulong glOptions, +- BGLDispatcher* dispatcher) +- : +- fRefCount(1), +- fView(view), +- fOptions(glOptions), +- fDispatcher(dispatcher) +-{ +-} +- +- +-BGLRenderer::~BGLRenderer() +-{ +- delete fDispatcher; +-} +- +- +-void +-BGLRenderer::Acquire() +-{ +- atomic_add(&fRefCount, 1); +-} +- +- +-void +-BGLRenderer::Release() +-{ +- if (atomic_add(&fRefCount, -1) < 1) +- delete this; +-} +- +- +-void +-BGLRenderer::LockGL() +-{ +-} +- +- +-void +-BGLRenderer::UnlockGL() +-{ +-} +- +- +-void +-BGLRenderer::SwapBuffers(bool VSync) +-{ +-} +- +- +-void +-BGLRenderer::Draw(BRect updateRect) +-{ +-} +- +- +-status_t +-BGLRenderer::CopyPixelsOut(BPoint source, BBitmap* dest) +-{ +- return B_ERROR; +-} +- +- +-status_t +-BGLRenderer::CopyPixelsIn(BBitmap* source, BPoint dest) +-{ +- return B_ERROR; +-} +- +- +-void +-BGLRenderer::FrameResized(float width, float height) +-{ +-} +- +- +-void +-BGLRenderer::DirectConnected(direct_buffer_info* info) +-{ +-} +- +- +-void +-BGLRenderer::EnableDirectMode(bool enabled) +-{ +-} +- +- +-status_t BGLRenderer::_Reserved_Renderer_0(int32 n, void* p) { return B_ERROR; } +-status_t BGLRenderer::_Reserved_Renderer_1(int32 n, void* p) { return B_ERROR; } +-status_t BGLRenderer::_Reserved_Renderer_2(int32 n, void* p) { return B_ERROR; } +-status_t BGLRenderer::_Reserved_Renderer_3(int32 n, void* p) { return B_ERROR; } +-status_t BGLRenderer::_Reserved_Renderer_4(int32 n, void* p) { return B_ERROR; } +diff --git a/src/gallium/targets/libgl-haiku/GLRendererRoster.cpp b/src/gallium/targets/libgl-haiku/GLRendererRoster.cpp +deleted file mode 100644 +index 1712a87..0000000 +--- a/src/gallium/targets/libgl-haiku/GLRendererRoster.cpp ++++ /dev/null +@@ -1,224 +0,0 @@ +-/* +- * Copyright 2006-2012 Haiku, Inc. All Rights Reserved. +- * Distributed under the terms of the MIT License. +- * +- * Authors: +- * Philippe Houdoin +- * Alexander von Gluck IV +- */ +- +- +-#include +-#include +- +-#include +-#include +- +-#include +-#include +-#include +-#include +-#include "GLDispatcher.h" +-#include "GLRendererRoster.h" +- +-#include +-#include +- +- +-extern "C" status_t _kern_get_safemode_option(const char* parameter, +- char* buffer, size_t* _bufferSize); +- +- +-GLRendererRoster::GLRendererRoster(BGLView* view, ulong options) +- : +- fNextID(0), +- fView(view), +- fOptions(options), +- fSafeMode(false), +- fABISubDirectory(NULL) +-{ +- char parameter[32]; +- size_t parameterLength = sizeof(parameter); +- +- if (_kern_get_safemode_option(B_SAFEMODE_SAFE_MODE, +- parameter, ¶meterLength) == B_OK) { +- if (!strcasecmp(parameter, "enabled") || !strcasecmp(parameter, "on") +- || !strcasecmp(parameter, "true") || !strcasecmp(parameter, "yes") +- || !strcasecmp(parameter, "enable") || !strcmp(parameter, "1")) +- fSafeMode = true; +- } +- +- if (_kern_get_safemode_option(B_SAFEMODE_DISABLE_USER_ADD_ONS, +- parameter, ¶meterLength) == B_OK) { +- if (!strcasecmp(parameter, "enabled") || !strcasecmp(parameter, "on") +- || !strcasecmp(parameter, "true") || !strcasecmp(parameter, "yes") +- || !strcasecmp(parameter, "enable") || !strcmp(parameter, "1")) +- fSafeMode = true; +- } +- +- // We might run in compatibility mode on a system with a different ABI. The +- // renderers matching our ABI can usually be found in respective +- // subdirectories of the opengl add-ons directories. +- system_info info; +- if (get_system_info(&info) == B_OK +- && (info.abi & B_HAIKU_ABI_MAJOR) +- != (B_HAIKU_ABI & B_HAIKU_ABI_MAJOR)) { +- switch (B_HAIKU_ABI & B_HAIKU_ABI_MAJOR) { +- case B_HAIKU_ABI_GCC_2: +- fABISubDirectory = "gcc2"; +- break; +- case B_HAIKU_ABI_GCC_4: +- fABISubDirectory = "gcc4"; +- break; +- } +- } +- +- AddDefaultPaths(); +-} +- +- +-GLRendererRoster::~GLRendererRoster() +-{ +- +-} +- +- +-BGLRenderer* +-GLRendererRoster::GetRenderer(int32 id) +-{ +- RendererMap::const_iterator iterator = fRenderers.find(id); +- if (iterator == fRenderers.end()) +- return NULL; +- +- struct renderer_item item = iterator->second; +- return item.renderer; +-} +- +- +-void +-GLRendererRoster::AddDefaultPaths() +-{ +- // add user directories first, so that they can override system renderers +- const directory_which paths[] = { +- B_USER_NONPACKAGED_ADDONS_DIRECTORY, +- B_USER_ADDONS_DIRECTORY, +- B_SYSTEM_ADDONS_DIRECTORY, +- }; +- +- for (uint32 i = fSafeMode ? 4 : 0; +- i < sizeof(paths) / sizeof(paths[0]); i++) { +- BPath path; +- status_t status = find_directory(paths[i], &path, true); +- if (status == B_OK && path.Append("opengl") == B_OK) +- AddPath(path.Path()); +- } +-} +- +- +-status_t +-GLRendererRoster::AddPath(const char* path) +-{ +- BDirectory directory(path); +- status_t status = directory.InitCheck(); +- if (status < B_OK) +- return status; +- +- // if a subdirectory for our ABI exists, use that instead +- if (fABISubDirectory != NULL) { +- BEntry entry(&directory, fABISubDirectory); +- if (entry.IsDirectory()) { +- status = directory.SetTo(&entry); +- if (status != B_OK) +- return status; +- } +- } +- +- node_ref nodeRef; +- status = directory.GetNodeRef(&nodeRef); +- if (status < B_OK) +- return status; +- +- int32 count = 0; +- int32 files = 0; +- +- entry_ref ref; +- BEntry entry; +- while (directory.GetNextRef(&ref) == B_OK) { +- entry.SetTo(&ref); +- if (entry.InitCheck() == B_OK && !entry.IsFile()) +- continue; +- +- if (CreateRenderer(ref) == B_OK) +- count++; +- +- files++; +- } +- +- if (files != 0 && count == 0) +- return B_BAD_VALUE; +- +- return B_OK; +-} +- +- +-status_t +-GLRendererRoster::AddRenderer(BGLRenderer* renderer, +- image_id image, const entry_ref* ref, ino_t node) +-{ +- renderer_item item; +- item.renderer = renderer; +- item.image = image; +- item.node = node; +- if (ref != NULL) +- item.ref = *ref; +- +- try { +- fRenderers[fNextID] = item; +- } catch (...) { +- return B_NO_MEMORY; +- } +- +- renderer->fOwningRoster = this; +- renderer->fID = fNextID++; +- return B_OK; +-} +- +- +-status_t +-GLRendererRoster::CreateRenderer(const entry_ref& ref) +-{ +- BEntry entry(&ref); +- node_ref nodeRef; +- status_t status = entry.GetNodeRef(&nodeRef); +- if (status < B_OK) +- return status; +- +- BPath path(&ref); +- image_id image = load_add_on(path.Path()); +- if (image < B_OK) +- return image; +- +- BGLRenderer* (*instantiate_renderer) +- (BGLView* view, ulong options, BGLDispatcher* dispatcher); +- +- status = get_image_symbol(image, "instantiate_gl_renderer", +- B_SYMBOL_TYPE_TEXT, (void**)&instantiate_renderer); +- if (status == B_OK) { +- BGLRenderer* renderer +- = instantiate_renderer(fView, fOptions, new BGLDispatcher()); +- if (!renderer) { +- unload_add_on(image); +- return B_UNSUPPORTED; +- } +- +- if (AddRenderer(renderer, image, &ref, nodeRef.node) != B_OK) { +- renderer->Release(); +- // this will delete the renderer +- unload_add_on(image); +- } +- return B_OK; +- } +- unload_add_on(image); +- +- return status; +-} +diff --git a/src/gallium/targets/libgl-haiku/GLRendererRoster.h b/src/gallium/targets/libgl-haiku/GLRendererRoster.h +deleted file mode 100644 +index 5c8da27..0000000 +--- a/src/gallium/targets/libgl-haiku/GLRendererRoster.h ++++ /dev/null +@@ -1,51 +0,0 @@ +-/* +- * Copyright 2006-2012, Haiku, Inc. All Rights Reserved. +- * Distributed under the terms of the MIT License. +- * +- * Authors: +- * Philippe Houdoin +- */ +-#ifndef _GLRENDERER_ROSTER_H +-#define _GLRENDERER_ROSTER_H +- +- +-#include +- +-#include +- +- +-struct renderer_item { +- BGLRenderer* renderer; +- entry_ref ref; +- ino_t node; +- image_id image; +-}; +- +-typedef std::map RendererMap; +- +- +-class GLRendererRoster { +- public: +- GLRendererRoster(BGLView* view, ulong options); +- virtual ~GLRendererRoster(); +- +- BGLRenderer* GetRenderer(int32 id = 0); +- +- private: +- void AddDefaultPaths(); +- status_t AddPath(const char* path); +- status_t AddRenderer(BGLRenderer* renderer, +- image_id image, const entry_ref* ref, ino_t node); +- status_t CreateRenderer(const entry_ref& ref); +- +- RendererMap fRenderers; +- int32 fNextID; +- BGLView* fView; +- ulong fOptions; +- bool fSafeMode; +- const char* fABISubDirectory; +- +-}; +- +- +-#endif /* _GLRENDERER_ROSTER_H */ +diff --git a/src/gallium/targets/libgl-haiku/GLView.cpp b/src/gallium/targets/libgl-haiku/GLView.cpp +deleted file mode 100644 +index 9ae5b5c..0000000 +--- a/src/gallium/targets/libgl-haiku/GLView.cpp ++++ /dev/null +@@ -1,643 +0,0 @@ +-/* +- * Copyright 2006-2012, Haiku. All rights reserved. +- * Distributed under the terms of the MIT License. +- * +- * Authors: +- * Jérôme Duval, korli@users.berlios.de +- * Philippe Houdoin, philippe.houdoin@free.fr +- * Stefano Ceccherini, burton666@libero.it +- */ +- +-#include +- +-#include +- +-#include +-#include +-#include +-#include +- +-#include +-#include +- +-#include "interface/DirectWindowPrivate.h" +-#include "GLDispatcher.h" +-#include "GLRendererRoster.h" +- +- +-struct glview_direct_info { +- direct_buffer_info* direct_info; +- bool direct_connected; +- bool enable_direct_mode; +- +- glview_direct_info(); +- ~glview_direct_info(); +-}; +- +- +-BGLView::BGLView(BRect rect, const char* name, ulong resizingMode, ulong mode, +- ulong options) +- : +- BView(rect, name, B_FOLLOW_ALL_SIDES, mode | B_WILL_DRAW | B_FRAME_EVENTS), +- // | B_FULL_UPDATE_ON_RESIZE) +- fGc(NULL), +- fOptions(options), +- fDitherCount(0), +- fDrawLock("BGLView draw lock"), +- fDisplayLock("BGLView display lock"), +- fClipInfo(NULL), +- fRenderer(NULL), +- fRoster(NULL), +- fDitherMap(NULL) +-{ +- fRoster = new GLRendererRoster(this, options); +-} +- +- +-BGLView::~BGLView() +-{ +- delete fClipInfo; +- if (fRenderer) +- fRenderer->Release(); +-} +- +- +-void +-BGLView::LockGL() +-{ +- // TODO: acquire the OpenGL API lock it on this glview +- +- fDisplayLock.Lock(); +- if (fRenderer) +- fRenderer->LockGL(); +-} +- +- +-void +-BGLView::UnlockGL() +-{ +- if (fRenderer) +- fRenderer->UnlockGL(); +- fDisplayLock.Unlock(); +- +- // TODO: release the GL API lock to others glviews +-} +- +- +-void +-BGLView::SwapBuffers() +-{ +- SwapBuffers(false); +-} +- +- +-void +-BGLView::SwapBuffers(bool vSync) +-{ +- if (fRenderer) { +- _LockDraw(); +- fRenderer->SwapBuffers(vSync); +- _UnlockDraw(); +- } +-} +- +- +-BView* +-BGLView::EmbeddedView() +-{ +- return NULL; +-} +- +- +-void* +-BGLView::GetGLProcAddress(const char* procName) +-{ +- BGLDispatcher* glDispatcher = NULL; +- +- if (fRenderer) +- glDispatcher = fRenderer->GLDispatcher(); +- +- if (glDispatcher) +- return (void*)glDispatcher->AddressOf(procName); +- +- return NULL; +-} +- +- +-status_t +-BGLView::CopyPixelsOut(BPoint source, BBitmap* dest) +-{ +- if (!fRenderer) +- return B_ERROR; +- +- if (!dest || !dest->Bounds().IsValid()) +- return B_BAD_VALUE; +- +- return fRenderer->CopyPixelsOut(source, dest); +-} +- +- +-status_t +-BGLView::CopyPixelsIn(BBitmap* source, BPoint dest) +-{ +- if (!fRenderer) +- return B_ERROR; +- +- if (!source || !source->Bounds().IsValid()) +- return B_BAD_VALUE; +- +- return fRenderer->CopyPixelsIn(source, dest); +-} +- +- +-/*! Mesa's GLenum is not ulong but uint, so we can't use GLenum +- without breaking this method signature. +- Instead, we have to use the effective BeOS's SGI OpenGL GLenum type: +- unsigned long. +- */ +-void +-BGLView::ErrorCallback(unsigned long errorCode) +-{ +- char msg[32]; +- sprintf(msg, "GL: Error code $%04lx.", errorCode); +- // TODO: under BeOS R5, it call debugger(msg); +- fprintf(stderr, "%s\n", msg); +-} +- +- +-void +-BGLView::Draw(BRect updateRect) +-{ +- if (fRenderer) { +- _LockDraw(); +- fRenderer->Draw(updateRect); +- _UnlockDraw(); +- return; +- } +- // TODO: auto-size and center the string +- MovePenTo(8, 32); +- DrawString("No OpenGL renderer available!"); +-} +- +- +-void +-BGLView::AttachedToWindow() +-{ +- BView::AttachedToWindow(); +- +- fBounds = Bounds(); +- for (BView* view = this; view != NULL; view = view->Parent()) +- view->ConvertToParent(&fBounds); +- +- fRenderer = fRoster->GetRenderer(); +- if (fRenderer != NULL) { +- // Jackburton: The following code was commented because it doesn't look +- // good in "direct" mode: +- // when the window is moved, the app_server doesn't paint the view's +- // background, and the stuff behind the window itself shows up. +- // Setting the view color to black, instead, looks a bit more elegant. +-#if 0 +- // Don't paint white window background when resized +- SetViewColor(B_TRANSPARENT_32_BIT); +-#else +- SetViewColor(0, 0, 0); +-#endif +- +- // Set default OpenGL viewport: +- LockGL(); +- glViewport(0, 0, Bounds().IntegerWidth(), Bounds().IntegerHeight()); +- UnlockGL(); +- fRenderer->FrameResized(Bounds().IntegerWidth(), +- Bounds().IntegerHeight()); +- +- if (fClipInfo) { +- fRenderer->DirectConnected(fClipInfo->direct_info); +- fRenderer->EnableDirectMode(fClipInfo->enable_direct_mode); +- } +- +- return; +- } +- +- fprintf(stderr, "no renderer found! \n"); +- +- // No Renderer, no rendering. Setup a minimal "No Renderer" string drawing +- // context +- SetFont(be_bold_font); +- // SetFontSize(16); +-} +- +- +-void +-BGLView::AllAttached() +-{ +- BView::AllAttached(); +-} +- +- +-void +-BGLView::DetachedFromWindow() +-{ +- if (fRenderer) +- fRenderer->Release(); +- fRenderer = NULL; +- +- BView::DetachedFromWindow(); +-} +- +- +-void +-BGLView::AllDetached() +-{ +- BView::AllDetached(); +-} +- +- +-void +-BGLView::FrameResized(float width, float height) +-{ +- fBounds = Bounds(); +- for (BView* v = this; v; v = v->Parent()) +- v->ConvertToParent(&fBounds); +- +- if (fRenderer) { +- LockGL(); +- _LockDraw(); +- _CallDirectConnected(); +- fRenderer->FrameResized(width, height); +- _UnlockDraw(); +- UnlockGL(); +- } +- +- BView::FrameResized(width, height); +-} +- +- +-status_t +-BGLView::Perform(perform_code d, void* arg) +-{ +- return BView::Perform(d, arg); +-} +- +- +-status_t +-BGLView::Archive(BMessage* data, bool deep) const +-{ +- return BView::Archive(data, deep); +-} +- +- +-void +-BGLView::MessageReceived(BMessage* msg) +-{ +- BView::MessageReceived(msg); +-} +- +- +-void +-BGLView::SetResizingMode(uint32 mode) +-{ +- BView::SetResizingMode(mode); +-} +- +- +-void +-BGLView::GetPreferredSize(float* _width, float* _height) +-{ +- if (_width) +- *_width = 0; +- if (_height) +- *_height = 0; +-} +- +- +-void +-BGLView::Show() +-{ +- BView::Show(); +-} +- +- +-void +-BGLView::Hide() +-{ +- BView::Hide(); +-} +- +- +-BHandler* +-BGLView::ResolveSpecifier(BMessage* msg, int32 index, BMessage* specifier, +- int32 form, const char* property) +-{ +- return BView::ResolveSpecifier(msg, index, specifier, form, property); +-} +- +- +-status_t +-BGLView::GetSupportedSuites(BMessage* data) +-{ +- return BView::GetSupportedSuites(data); +-} +- +- +-void +-BGLView::DirectConnected(direct_buffer_info* info) +-{ +- if (fClipInfo == NULL) { +- fClipInfo = new (std::nothrow) glview_direct_info(); +- if (fClipInfo == NULL) +- return; +- } +- +- direct_buffer_info* localInfo = fClipInfo->direct_info; +- +- switch (info->buffer_state & B_DIRECT_MODE_MASK) { +- case B_DIRECT_START: +- fClipInfo->direct_connected = true; +- memcpy(localInfo, info, DIRECT_BUFFER_INFO_AREA_SIZE); +- _UnlockDraw(); +- break; +- +- case B_DIRECT_MODIFY: +- _LockDraw(); +- memcpy(localInfo, info, DIRECT_BUFFER_INFO_AREA_SIZE); +- _UnlockDraw(); +- break; +- +- case B_DIRECT_STOP: +- fClipInfo->direct_connected = false; +- _LockDraw(); +- break; +- } +- +- if (fRenderer) +- _CallDirectConnected(); +-} +- +- +-void +-BGLView::EnableDirectMode(bool enabled) +-{ +- if (fRenderer) +- fRenderer->EnableDirectMode(enabled); +- if (fClipInfo == NULL) { +- fClipInfo = new (std::nothrow) glview_direct_info(); +- if (fClipInfo == NULL) +- return; +- } +- +- fClipInfo->enable_direct_mode = enabled; +-} +- +- +-void +-BGLView::_LockDraw() +-{ +- if (!fClipInfo || !fClipInfo->enable_direct_mode) +- return; +- +- fDrawLock.Lock(); +-} +- +- +-void +-BGLView::_UnlockDraw() +-{ +- if (!fClipInfo || !fClipInfo->enable_direct_mode) +- return; +- +- fDrawLock.Unlock(); +-} +- +- +-void +-BGLView::_CallDirectConnected() +-{ +- if (!fClipInfo) +- return; +- +- direct_buffer_info* localInfo = fClipInfo->direct_info; +- direct_buffer_info* info = (direct_buffer_info*)malloc( +- DIRECT_BUFFER_INFO_AREA_SIZE); +- if (info == NULL) +- return; +- +- memcpy(info, localInfo, DIRECT_BUFFER_INFO_AREA_SIZE); +- +- // Collect the rects into a BRegion, then clip to the view's bounds +- BRegion region; +- for (uint32 c = 0; c < localInfo->clip_list_count; c++) +- region.Include(localInfo->clip_list[c]); +- BRegion boundsRegion = fBounds.OffsetByCopy(localInfo->window_bounds.left, +- localInfo->window_bounds.top); +- info->window_bounds = boundsRegion.RectAtInt(0); +- // window_bounds are now view bounds +- region.IntersectWith(&boundsRegion); +- +- info->clip_list_count = region.CountRects(); +- info->clip_bounds = region.FrameInt(); +- +- for (uint32 c = 0; c < info->clip_list_count; c++) +- info->clip_list[c] = region.RectAtInt(c); +- fRenderer->DirectConnected(info); +- free(info); +-} +- +- +-//---- virtual reserved methods ---------- +- +- +-void BGLView::_ReservedGLView1() {} +-void BGLView::_ReservedGLView2() {} +-void BGLView::_ReservedGLView3() {} +-void BGLView::_ReservedGLView4() {} +-void BGLView::_ReservedGLView5() {} +-void BGLView::_ReservedGLView6() {} +-void BGLView::_ReservedGLView7() {} +-void BGLView::_ReservedGLView8() {} +- +- +-// #pragma mark - +- +- +-// BeOS compatibility: contrary to others BView's contructors, +-// BGLView one wants a non-const name argument. +-BGLView::BGLView(BRect rect, char* name, ulong resizingMode, ulong mode, +- ulong options) +- : +- BView(rect, name, B_FOLLOW_ALL_SIDES, mode | B_WILL_DRAW | B_FRAME_EVENTS), +- fGc(NULL), +- fOptions(options), +- fDitherCount(0), +- fDrawLock("BGLView draw lock"), +- fDisplayLock("BGLView display lock"), +- fClipInfo(NULL), +- fRenderer(NULL), +- fRoster(NULL), +- fDitherMap(NULL) +-{ +- fRoster = new GLRendererRoster(this, options); +-} +- +- +-#if 0 +-// TODO: implement BGLScreen class... +- +- +-BGLScreen::BGLScreen(char* name, ulong screenMode, ulong options, +- status_t* error, bool debug) +- : +- BWindowScreen(name, screenMode, error, debug) +-{ +-} +- +- +-BGLScreen::~BGLScreen() +-{ +-} +- +- +-void +-BGLScreen::LockGL() +-{ +-} +- +- +-void +-BGLScreen::UnlockGL() +-{ +-} +- +- +-void +-BGLScreen::SwapBuffers() +-{ +-} +- +- +-void +-BGLScreen::ErrorCallback(unsigned long errorCode) +-{ +- // Mesa's GLenum is not ulong but uint! +- char msg[32]; +- sprintf(msg, "GL: Error code $%04lx.", errorCode); +- // debugger(msg); +- fprintf(stderr, "%s\n", msg); +- return; +-} +- +- +-void +-BGLScreen::ScreenConnected(bool enabled) +-{ +-} +- +- +-void +-BGLScreen::FrameResized(float width, float height) +-{ +- return BWindowScreen::FrameResized(width, height); +-} +- +- +-status_t +-BGLScreen::Perform(perform_code d, void* arg) +-{ +- return BWindowScreen::Perform(d, arg); +-} +- +- +-status_t +-BGLScreen::Archive(BMessage* data, bool deep) const +-{ +- return BWindowScreen::Archive(data, deep); +-} +- +- +-void +-BGLScreen::MessageReceived(BMessage* msg) +-{ +- BWindowScreen::MessageReceived(msg); +-} +- +- +-void +-BGLScreen::Show() +-{ +- BWindowScreen::Show(); +-} +- +- +-void +-BGLScreen::Hide() +-{ +- BWindowScreen::Hide(); +-} +- +- +-BHandler* +-BGLScreen::ResolveSpecifier(BMessage* msg, int32 index, BMessage* specifier, +- int32 form, const char* property) +-{ +- return BWindowScreen::ResolveSpecifier(msg, index, specifier, +- form, property); +-} +- +- +-status_t +-BGLScreen::GetSupportedSuites(BMessage* data) +-{ +- return BWindowScreen::GetSupportedSuites(data); +-} +- +- +-//---- virtual reserved methods ---------- +- +-void BGLScreen::_ReservedGLScreen1() {} +-void BGLScreen::_ReservedGLScreen2() {} +-void BGLScreen::_ReservedGLScreen3() {} +-void BGLScreen::_ReservedGLScreen4() {} +-void BGLScreen::_ReservedGLScreen5() {} +-void BGLScreen::_ReservedGLScreen6() {} +-void BGLScreen::_ReservedGLScreen7() {} +-void BGLScreen::_ReservedGLScreen8() {} +-#endif +- +- +-const char* color_space_name(color_space space) +-{ +-#define C2N(a) case a: return #a +- +- switch (space) { +- C2N(B_RGB24); +- C2N(B_RGB32); +- C2N(B_RGBA32); +- C2N(B_RGB32_BIG); +- C2N(B_RGBA32_BIG); +- C2N(B_GRAY8); +- C2N(B_GRAY1); +- C2N(B_RGB16); +- C2N(B_RGB15); +- C2N(B_RGBA15); +- C2N(B_CMAP8); +- default: +- return "Unknown!"; +- }; +- +-#undef C2N +-}; +- +- +-glview_direct_info::glview_direct_info() +-{ +- // TODO: See direct_window_data() in app_server's ServerWindow.cpp +- direct_info = (direct_buffer_info*)calloc(1, DIRECT_BUFFER_INFO_AREA_SIZE); +- direct_connected = false; +- enable_direct_mode = false; +-} +- +- +-glview_direct_info::~glview_direct_info() +-{ +- free(direct_info); +-} +- +diff --git a/src/gallium/targets/libgl-haiku/SConscript b/src/gallium/targets/libgl-haiku/SConscript +deleted file mode 100644 +index 43d15c5..0000000 +--- a/src/gallium/targets/libgl-haiku/SConscript ++++ /dev/null +@@ -1,35 +0,0 @@ +-####################################################################### +-# SConscript for Haiku OpenGL kit +- +-Import('*') +- +-env = env.Clone() +- +-env.Append(CPPPATH = [ +- '#/src/mapi', +- '#/src/mesa', +- '#/src/mesa/main', +- '#/include/HaikuGL', +- '/boot/system/develop/headers/private', +- Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers +-]) +- +-env.Prepend(LIBS = [ +- glapi +-]) +- +-sources = [ +- 'GLView.cpp', +- 'GLRenderer.cpp', +- 'GLRendererRoster.cpp', +- 'GLDispatcher.cpp', +-] +- +-# libGL.so +-libgl = env.SharedLibrary( +- target ='GL', +- source = sources, +- SHLIBSUFFIX = env['SHLIBSUFFIX'], +-) +- +-env.Alias('libgl-haiku', libgl) +diff --git a/src/hgl/GLDispatcher.cpp b/src/hgl/GLDispatcher.cpp +new file mode 100644 +index 0000000..46b91d5 +--- /dev/null ++++ b/src/hgl/GLDispatcher.cpp +@@ -0,0 +1,72 @@ ++/* ++ * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. ++ * Copyright 2000-2012 Haiku, Inc. All Rights Reserved. ++ * Distributed under the terms of the MIT License. ++ * ++ * Authors: ++ * Brian Paul ++ * Philippe Houdoin ++ * Alexander von Gluck IV ++ */ ++ ++ ++extern "C" { ++#include "glapi/glapi.h" ++#include "glapi/glapi_priv.h" ++ ++/* ++ * NOTE: this file portion implements C-based dispatch of the OpenGL entrypoints ++ * (glAccum, glBegin, etc). ++ * This code IS NOT USED if we're compiling on an x86 system and using ++ * the glapi_x86.S assembly code. ++ */ ++#if !(defined(USE_X86_ASM) || defined(USE_SPARC_ASM)) ++ ++#define KEYWORD1 PUBLIC ++#define KEYWORD2 ++#define NAME(func) gl##func ++ ++#define DISPATCH(func, args, msg) \ ++ const struct _glapi_table* dispatch; \ ++ dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\ ++ (dispatch->func) args ++ ++#define RETURN_DISPATCH(func, args, msg) \ ++ const struct _glapi_table* dispatch; \ ++ dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\ ++ return (dispatch->func) args ++ ++#endif ++} ++ ++ ++/* NOTE: this file portion implement a thin OpenGL entrypoints dispatching ++ C++ wrapper class ++ */ ++ ++#include "GLDispatcher.h" ++ ++BGLDispatcher::BGLDispatcher() ++{ ++} ++ ++ ++BGLDispatcher::~BGLDispatcher() ++{ ++} ++ ++ ++status_t ++BGLDispatcher::CheckTable(const struct _glapi_table* table) ++{ ++ _glapi_check_table(table ? table : _glapi_get_dispatch()); ++ return B_OK; ++} ++ ++ ++status_t ++BGLDispatcher::SetTable(struct _glapi_table* table) ++{ ++ _glapi_set_dispatch(table); ++ return B_OK; ++} +diff --git a/src/hgl/GLDispatcher.h b/src/hgl/GLDispatcher.h +new file mode 100644 +index 0000000..44bca8c +--- /dev/null ++++ b/src/hgl/GLDispatcher.h +@@ -0,0 +1,109 @@ ++/* ++ * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. ++ * Copyright 2000-2012 Haiku, Inc. All Rights Reserved. ++ * Distributed under the terms of the MIT License. ++ * ++ * Authors: ++ * Brian Paul ++ * Philippe Houdoin ++ */ ++#ifndef GLDISPATCHER_H ++#define GLDISPATCHER_H ++ ++ ++#include ++#include ++#include ++ ++#include "glheader.h" ++ ++extern "C" { ++#include "glapi/glapi.h" ++} ++ ++ ++class BGLDispatcher ++{ ++ // Private unimplemented copy constructors ++ BGLDispatcher(const BGLDispatcher &); ++ BGLDispatcher & operator=(const BGLDispatcher &); ++ ++ public: ++ BGLDispatcher(); ++ ~BGLDispatcher(); ++ ++ void SetCurrentContext(void* context); ++ void* CurrentContext(); ++ ++ struct _glapi_table* Table(); ++ status_t CheckTable( ++ const struct _glapi_table* dispatch = NULL); ++ status_t SetTable(struct _glapi_table* dispatch); ++ uint32 TableSize(); ++ ++ const _glapi_proc operator[](const char* functionName); ++ const char* operator[](uint32 offset); ++ ++ const _glapi_proc AddressOf(const char* functionName); ++ uint32 OffsetOf(const char* functionName); ++}; ++ ++ ++// Inlines methods ++inline void ++BGLDispatcher::SetCurrentContext(void* context) ++{ ++ _glapi_set_context(context); ++} ++ ++ ++inline void* ++BGLDispatcher::CurrentContext() ++{ ++ return _glapi_get_context(); ++} ++ ++ ++inline struct _glapi_table* ++BGLDispatcher::Table() ++{ ++ return _glapi_get_dispatch(); ++} ++ ++ ++inline uint32 ++BGLDispatcher::TableSize() ++{ ++ return _glapi_get_dispatch_table_size(); ++} ++ ++ ++inline const _glapi_proc ++BGLDispatcher::operator[](const char* functionName) ++{ ++ return _glapi_get_proc_address(functionName); ++} ++ ++ ++inline const char* ++BGLDispatcher::operator[](uint32 offset) ++{ ++ return _glapi_get_proc_name((GLuint) offset); ++} ++ ++ ++inline const _glapi_proc ++BGLDispatcher::AddressOf(const char* functionName) ++{ ++ return _glapi_get_proc_address(functionName); ++} ++ ++ ++inline uint32 ++BGLDispatcher::OffsetOf(const char* functionName) ++{ ++ return (uint32) _glapi_get_proc_offset(functionName); ++} ++ ++ ++#endif // GLDISPATCHER_H +diff --git a/src/hgl/GLRenderer.cpp b/src/hgl/GLRenderer.cpp +new file mode 100644 +index 0000000..4573a64 +--- /dev/null ++++ b/src/hgl/GLRenderer.cpp +@@ -0,0 +1,106 @@ ++/* ++ * Copyright 2006-2008, Philippe Houdoin. All rights reserved. ++ * Distributed under the terms of the MIT License. ++ */ ++ ++ ++#include ++ ++#include "GLRenderer.h" ++ ++#include "GLDispatcher.h" ++ ++ ++BGLRenderer::BGLRenderer(BGLView* view, ulong glOptions, ++ BGLDispatcher* dispatcher) ++ : ++ fRefCount(1), ++ fView(view), ++ fOptions(glOptions), ++ fDispatcher(dispatcher) ++{ ++} ++ ++ ++BGLRenderer::~BGLRenderer() ++{ ++ delete fDispatcher; ++} ++ ++ ++void ++BGLRenderer::Acquire() ++{ ++ atomic_add(&fRefCount, 1); ++} ++ ++ ++void ++BGLRenderer::Release() ++{ ++ if (atomic_add(&fRefCount, -1) < 1) ++ delete this; ++} ++ ++ ++void ++BGLRenderer::LockGL() ++{ ++} ++ ++ ++void ++BGLRenderer::UnlockGL() ++{ ++} ++ ++ ++void ++BGLRenderer::SwapBuffers(bool VSync) ++{ ++} ++ ++ ++void ++BGLRenderer::Draw(BRect updateRect) ++{ ++} ++ ++ ++status_t ++BGLRenderer::CopyPixelsOut(BPoint source, BBitmap* dest) ++{ ++ return B_ERROR; ++} ++ ++ ++status_t ++BGLRenderer::CopyPixelsIn(BBitmap* source, BPoint dest) ++{ ++ return B_ERROR; ++} ++ ++ ++void ++BGLRenderer::FrameResized(float width, float height) ++{ ++} ++ ++ ++void ++BGLRenderer::DirectConnected(direct_buffer_info* info) ++{ ++} ++ ++ ++void ++BGLRenderer::EnableDirectMode(bool enabled) ++{ ++} ++ ++ ++status_t BGLRenderer::_Reserved_Renderer_0(int32 n, void* p) { return B_ERROR; } ++status_t BGLRenderer::_Reserved_Renderer_1(int32 n, void* p) { return B_ERROR; } ++status_t BGLRenderer::_Reserved_Renderer_2(int32 n, void* p) { return B_ERROR; } ++status_t BGLRenderer::_Reserved_Renderer_3(int32 n, void* p) { return B_ERROR; } ++status_t BGLRenderer::_Reserved_Renderer_4(int32 n, void* p) { return B_ERROR; } +diff --git a/src/hgl/GLRendererRoster.cpp b/src/hgl/GLRendererRoster.cpp +new file mode 100644 +index 0000000..1712a87 +--- /dev/null ++++ b/src/hgl/GLRendererRoster.cpp +@@ -0,0 +1,224 @@ ++/* ++ * Copyright 2006-2012 Haiku, Inc. All Rights Reserved. ++ * Distributed under the terms of the MIT License. ++ * ++ * Authors: ++ * Philippe Houdoin ++ * Alexander von Gluck IV ++ */ ++ ++ ++#include ++#include ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include "GLDispatcher.h" ++#include "GLRendererRoster.h" ++ ++#include ++#include ++ ++ ++extern "C" status_t _kern_get_safemode_option(const char* parameter, ++ char* buffer, size_t* _bufferSize); ++ ++ ++GLRendererRoster::GLRendererRoster(BGLView* view, ulong options) ++ : ++ fNextID(0), ++ fView(view), ++ fOptions(options), ++ fSafeMode(false), ++ fABISubDirectory(NULL) ++{ ++ char parameter[32]; ++ size_t parameterLength = sizeof(parameter); ++ ++ if (_kern_get_safemode_option(B_SAFEMODE_SAFE_MODE, ++ parameter, ¶meterLength) == B_OK) { ++ if (!strcasecmp(parameter, "enabled") || !strcasecmp(parameter, "on") ++ || !strcasecmp(parameter, "true") || !strcasecmp(parameter, "yes") ++ || !strcasecmp(parameter, "enable") || !strcmp(parameter, "1")) ++ fSafeMode = true; ++ } ++ ++ if (_kern_get_safemode_option(B_SAFEMODE_DISABLE_USER_ADD_ONS, ++ parameter, ¶meterLength) == B_OK) { ++ if (!strcasecmp(parameter, "enabled") || !strcasecmp(parameter, "on") ++ || !strcasecmp(parameter, "true") || !strcasecmp(parameter, "yes") ++ || !strcasecmp(parameter, "enable") || !strcmp(parameter, "1")) ++ fSafeMode = true; ++ } ++ ++ // We might run in compatibility mode on a system with a different ABI. The ++ // renderers matching our ABI can usually be found in respective ++ // subdirectories of the opengl add-ons directories. ++ system_info info; ++ if (get_system_info(&info) == B_OK ++ && (info.abi & B_HAIKU_ABI_MAJOR) ++ != (B_HAIKU_ABI & B_HAIKU_ABI_MAJOR)) { ++ switch (B_HAIKU_ABI & B_HAIKU_ABI_MAJOR) { ++ case B_HAIKU_ABI_GCC_2: ++ fABISubDirectory = "gcc2"; ++ break; ++ case B_HAIKU_ABI_GCC_4: ++ fABISubDirectory = "gcc4"; ++ break; ++ } ++ } ++ ++ AddDefaultPaths(); ++} ++ ++ ++GLRendererRoster::~GLRendererRoster() ++{ ++ ++} ++ ++ ++BGLRenderer* ++GLRendererRoster::GetRenderer(int32 id) ++{ ++ RendererMap::const_iterator iterator = fRenderers.find(id); ++ if (iterator == fRenderers.end()) ++ return NULL; ++ ++ struct renderer_item item = iterator->second; ++ return item.renderer; ++} ++ ++ ++void ++GLRendererRoster::AddDefaultPaths() ++{ ++ // add user directories first, so that they can override system renderers ++ const directory_which paths[] = { ++ B_USER_NONPACKAGED_ADDONS_DIRECTORY, ++ B_USER_ADDONS_DIRECTORY, ++ B_SYSTEM_ADDONS_DIRECTORY, ++ }; ++ ++ for (uint32 i = fSafeMode ? 4 : 0; ++ i < sizeof(paths) / sizeof(paths[0]); i++) { ++ BPath path; ++ status_t status = find_directory(paths[i], &path, true); ++ if (status == B_OK && path.Append("opengl") == B_OK) ++ AddPath(path.Path()); ++ } ++} ++ ++ ++status_t ++GLRendererRoster::AddPath(const char* path) ++{ ++ BDirectory directory(path); ++ status_t status = directory.InitCheck(); ++ if (status < B_OK) ++ return status; ++ ++ // if a subdirectory for our ABI exists, use that instead ++ if (fABISubDirectory != NULL) { ++ BEntry entry(&directory, fABISubDirectory); ++ if (entry.IsDirectory()) { ++ status = directory.SetTo(&entry); ++ if (status != B_OK) ++ return status; ++ } ++ } ++ ++ node_ref nodeRef; ++ status = directory.GetNodeRef(&nodeRef); ++ if (status < B_OK) ++ return status; ++ ++ int32 count = 0; ++ int32 files = 0; ++ ++ entry_ref ref; ++ BEntry entry; ++ while (directory.GetNextRef(&ref) == B_OK) { ++ entry.SetTo(&ref); ++ if (entry.InitCheck() == B_OK && !entry.IsFile()) ++ continue; ++ ++ if (CreateRenderer(ref) == B_OK) ++ count++; ++ ++ files++; ++ } ++ ++ if (files != 0 && count == 0) ++ return B_BAD_VALUE; ++ ++ return B_OK; ++} ++ ++ ++status_t ++GLRendererRoster::AddRenderer(BGLRenderer* renderer, ++ image_id image, const entry_ref* ref, ino_t node) ++{ ++ renderer_item item; ++ item.renderer = renderer; ++ item.image = image; ++ item.node = node; ++ if (ref != NULL) ++ item.ref = *ref; ++ ++ try { ++ fRenderers[fNextID] = item; ++ } catch (...) { ++ return B_NO_MEMORY; ++ } ++ ++ renderer->fOwningRoster = this; ++ renderer->fID = fNextID++; ++ return B_OK; ++} ++ ++ ++status_t ++GLRendererRoster::CreateRenderer(const entry_ref& ref) ++{ ++ BEntry entry(&ref); ++ node_ref nodeRef; ++ status_t status = entry.GetNodeRef(&nodeRef); ++ if (status < B_OK) ++ return status; ++ ++ BPath path(&ref); ++ image_id image = load_add_on(path.Path()); ++ if (image < B_OK) ++ return image; ++ ++ BGLRenderer* (*instantiate_renderer) ++ (BGLView* view, ulong options, BGLDispatcher* dispatcher); ++ ++ status = get_image_symbol(image, "instantiate_gl_renderer", ++ B_SYMBOL_TYPE_TEXT, (void**)&instantiate_renderer); ++ if (status == B_OK) { ++ BGLRenderer* renderer ++ = instantiate_renderer(fView, fOptions, new BGLDispatcher()); ++ if (!renderer) { ++ unload_add_on(image); ++ return B_UNSUPPORTED; ++ } ++ ++ if (AddRenderer(renderer, image, &ref, nodeRef.node) != B_OK) { ++ renderer->Release(); ++ // this will delete the renderer ++ unload_add_on(image); ++ } ++ return B_OK; ++ } ++ unload_add_on(image); ++ ++ return status; ++} +diff --git a/src/hgl/GLRendererRoster.h b/src/hgl/GLRendererRoster.h +new file mode 100644 +index 0000000..5c8da27 +--- /dev/null ++++ b/src/hgl/GLRendererRoster.h +@@ -0,0 +1,51 @@ ++/* ++ * Copyright 2006-2012, Haiku, Inc. All Rights Reserved. ++ * Distributed under the terms of the MIT License. ++ * ++ * Authors: ++ * Philippe Houdoin ++ */ ++#ifndef _GLRENDERER_ROSTER_H ++#define _GLRENDERER_ROSTER_H ++ ++ ++#include ++ ++#include ++ ++ ++struct renderer_item { ++ BGLRenderer* renderer; ++ entry_ref ref; ++ ino_t node; ++ image_id image; ++}; ++ ++typedef std::map RendererMap; ++ ++ ++class GLRendererRoster { ++ public: ++ GLRendererRoster(BGLView* view, ulong options); ++ virtual ~GLRendererRoster(); ++ ++ BGLRenderer* GetRenderer(int32 id = 0); ++ ++ private: ++ void AddDefaultPaths(); ++ status_t AddPath(const char* path); ++ status_t AddRenderer(BGLRenderer* renderer, ++ image_id image, const entry_ref* ref, ino_t node); ++ status_t CreateRenderer(const entry_ref& ref); ++ ++ RendererMap fRenderers; ++ int32 fNextID; ++ BGLView* fView; ++ ulong fOptions; ++ bool fSafeMode; ++ const char* fABISubDirectory; ++ ++}; ++ ++ ++#endif /* _GLRENDERER_ROSTER_H */ +diff --git a/src/hgl/GLView.cpp b/src/hgl/GLView.cpp +new file mode 100644 +index 0000000..9ae5b5c +--- /dev/null ++++ b/src/hgl/GLView.cpp +@@ -0,0 +1,643 @@ ++/* ++ * Copyright 2006-2012, Haiku. All rights reserved. ++ * Distributed under the terms of the MIT License. ++ * ++ * Authors: ++ * Jérôme Duval, korli@users.berlios.de ++ * Philippe Houdoin, philippe.houdoin@free.fr ++ * Stefano Ceccherini, burton666@libero.it ++ */ ++ ++#include ++ ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "interface/DirectWindowPrivate.h" ++#include "GLDispatcher.h" ++#include "GLRendererRoster.h" ++ ++ ++struct glview_direct_info { ++ direct_buffer_info* direct_info; ++ bool direct_connected; ++ bool enable_direct_mode; ++ ++ glview_direct_info(); ++ ~glview_direct_info(); ++}; ++ ++ ++BGLView::BGLView(BRect rect, const char* name, ulong resizingMode, ulong mode, ++ ulong options) ++ : ++ BView(rect, name, B_FOLLOW_ALL_SIDES, mode | B_WILL_DRAW | B_FRAME_EVENTS), ++ // | B_FULL_UPDATE_ON_RESIZE) ++ fGc(NULL), ++ fOptions(options), ++ fDitherCount(0), ++ fDrawLock("BGLView draw lock"), ++ fDisplayLock("BGLView display lock"), ++ fClipInfo(NULL), ++ fRenderer(NULL), ++ fRoster(NULL), ++ fDitherMap(NULL) ++{ ++ fRoster = new GLRendererRoster(this, options); ++} ++ ++ ++BGLView::~BGLView() ++{ ++ delete fClipInfo; ++ if (fRenderer) ++ fRenderer->Release(); ++} ++ ++ ++void ++BGLView::LockGL() ++{ ++ // TODO: acquire the OpenGL API lock it on this glview ++ ++ fDisplayLock.Lock(); ++ if (fRenderer) ++ fRenderer->LockGL(); ++} ++ ++ ++void ++BGLView::UnlockGL() ++{ ++ if (fRenderer) ++ fRenderer->UnlockGL(); ++ fDisplayLock.Unlock(); ++ ++ // TODO: release the GL API lock to others glviews ++} ++ ++ ++void ++BGLView::SwapBuffers() ++{ ++ SwapBuffers(false); ++} ++ ++ ++void ++BGLView::SwapBuffers(bool vSync) ++{ ++ if (fRenderer) { ++ _LockDraw(); ++ fRenderer->SwapBuffers(vSync); ++ _UnlockDraw(); ++ } ++} ++ ++ ++BView* ++BGLView::EmbeddedView() ++{ ++ return NULL; ++} ++ ++ ++void* ++BGLView::GetGLProcAddress(const char* procName) ++{ ++ BGLDispatcher* glDispatcher = NULL; ++ ++ if (fRenderer) ++ glDispatcher = fRenderer->GLDispatcher(); ++ ++ if (glDispatcher) ++ return (void*)glDispatcher->AddressOf(procName); ++ ++ return NULL; ++} ++ ++ ++status_t ++BGLView::CopyPixelsOut(BPoint source, BBitmap* dest) ++{ ++ if (!fRenderer) ++ return B_ERROR; ++ ++ if (!dest || !dest->Bounds().IsValid()) ++ return B_BAD_VALUE; ++ ++ return fRenderer->CopyPixelsOut(source, dest); ++} ++ ++ ++status_t ++BGLView::CopyPixelsIn(BBitmap* source, BPoint dest) ++{ ++ if (!fRenderer) ++ return B_ERROR; ++ ++ if (!source || !source->Bounds().IsValid()) ++ return B_BAD_VALUE; ++ ++ return fRenderer->CopyPixelsIn(source, dest); ++} ++ ++ ++/*! Mesa's GLenum is not ulong but uint, so we can't use GLenum ++ without breaking this method signature. ++ Instead, we have to use the effective BeOS's SGI OpenGL GLenum type: ++ unsigned long. ++ */ ++void ++BGLView::ErrorCallback(unsigned long errorCode) ++{ ++ char msg[32]; ++ sprintf(msg, "GL: Error code $%04lx.", errorCode); ++ // TODO: under BeOS R5, it call debugger(msg); ++ fprintf(stderr, "%s\n", msg); ++} ++ ++ ++void ++BGLView::Draw(BRect updateRect) ++{ ++ if (fRenderer) { ++ _LockDraw(); ++ fRenderer->Draw(updateRect); ++ _UnlockDraw(); ++ return; ++ } ++ // TODO: auto-size and center the string ++ MovePenTo(8, 32); ++ DrawString("No OpenGL renderer available!"); ++} ++ ++ ++void ++BGLView::AttachedToWindow() ++{ ++ BView::AttachedToWindow(); ++ ++ fBounds = Bounds(); ++ for (BView* view = this; view != NULL; view = view->Parent()) ++ view->ConvertToParent(&fBounds); ++ ++ fRenderer = fRoster->GetRenderer(); ++ if (fRenderer != NULL) { ++ // Jackburton: The following code was commented because it doesn't look ++ // good in "direct" mode: ++ // when the window is moved, the app_server doesn't paint the view's ++ // background, and the stuff behind the window itself shows up. ++ // Setting the view color to black, instead, looks a bit more elegant. ++#if 0 ++ // Don't paint white window background when resized ++ SetViewColor(B_TRANSPARENT_32_BIT); ++#else ++ SetViewColor(0, 0, 0); ++#endif ++ ++ // Set default OpenGL viewport: ++ LockGL(); ++ glViewport(0, 0, Bounds().IntegerWidth(), Bounds().IntegerHeight()); ++ UnlockGL(); ++ fRenderer->FrameResized(Bounds().IntegerWidth(), ++ Bounds().IntegerHeight()); ++ ++ if (fClipInfo) { ++ fRenderer->DirectConnected(fClipInfo->direct_info); ++ fRenderer->EnableDirectMode(fClipInfo->enable_direct_mode); ++ } ++ ++ return; ++ } ++ ++ fprintf(stderr, "no renderer found! \n"); ++ ++ // No Renderer, no rendering. Setup a minimal "No Renderer" string drawing ++ // context ++ SetFont(be_bold_font); ++ // SetFontSize(16); ++} ++ ++ ++void ++BGLView::AllAttached() ++{ ++ BView::AllAttached(); ++} ++ ++ ++void ++BGLView::DetachedFromWindow() ++{ ++ if (fRenderer) ++ fRenderer->Release(); ++ fRenderer = NULL; ++ ++ BView::DetachedFromWindow(); ++} ++ ++ ++void ++BGLView::AllDetached() ++{ ++ BView::AllDetached(); ++} ++ ++ ++void ++BGLView::FrameResized(float width, float height) ++{ ++ fBounds = Bounds(); ++ for (BView* v = this; v; v = v->Parent()) ++ v->ConvertToParent(&fBounds); ++ ++ if (fRenderer) { ++ LockGL(); ++ _LockDraw(); ++ _CallDirectConnected(); ++ fRenderer->FrameResized(width, height); ++ _UnlockDraw(); ++ UnlockGL(); ++ } ++ ++ BView::FrameResized(width, height); ++} ++ ++ ++status_t ++BGLView::Perform(perform_code d, void* arg) ++{ ++ return BView::Perform(d, arg); ++} ++ ++ ++status_t ++BGLView::Archive(BMessage* data, bool deep) const ++{ ++ return BView::Archive(data, deep); ++} ++ ++ ++void ++BGLView::MessageReceived(BMessage* msg) ++{ ++ BView::MessageReceived(msg); ++} ++ ++ ++void ++BGLView::SetResizingMode(uint32 mode) ++{ ++ BView::SetResizingMode(mode); ++} ++ ++ ++void ++BGLView::GetPreferredSize(float* _width, float* _height) ++{ ++ if (_width) ++ *_width = 0; ++ if (_height) ++ *_height = 0; ++} ++ ++ ++void ++BGLView::Show() ++{ ++ BView::Show(); ++} ++ ++ ++void ++BGLView::Hide() ++{ ++ BView::Hide(); ++} ++ ++ ++BHandler* ++BGLView::ResolveSpecifier(BMessage* msg, int32 index, BMessage* specifier, ++ int32 form, const char* property) ++{ ++ return BView::ResolveSpecifier(msg, index, specifier, form, property); ++} ++ ++ ++status_t ++BGLView::GetSupportedSuites(BMessage* data) ++{ ++ return BView::GetSupportedSuites(data); ++} ++ ++ ++void ++BGLView::DirectConnected(direct_buffer_info* info) ++{ ++ if (fClipInfo == NULL) { ++ fClipInfo = new (std::nothrow) glview_direct_info(); ++ if (fClipInfo == NULL) ++ return; ++ } ++ ++ direct_buffer_info* localInfo = fClipInfo->direct_info; ++ ++ switch (info->buffer_state & B_DIRECT_MODE_MASK) { ++ case B_DIRECT_START: ++ fClipInfo->direct_connected = true; ++ memcpy(localInfo, info, DIRECT_BUFFER_INFO_AREA_SIZE); ++ _UnlockDraw(); ++ break; ++ ++ case B_DIRECT_MODIFY: ++ _LockDraw(); ++ memcpy(localInfo, info, DIRECT_BUFFER_INFO_AREA_SIZE); ++ _UnlockDraw(); ++ break; ++ ++ case B_DIRECT_STOP: ++ fClipInfo->direct_connected = false; ++ _LockDraw(); ++ break; ++ } ++ ++ if (fRenderer) ++ _CallDirectConnected(); ++} ++ ++ ++void ++BGLView::EnableDirectMode(bool enabled) ++{ ++ if (fRenderer) ++ fRenderer->EnableDirectMode(enabled); ++ if (fClipInfo == NULL) { ++ fClipInfo = new (std::nothrow) glview_direct_info(); ++ if (fClipInfo == NULL) ++ return; ++ } ++ ++ fClipInfo->enable_direct_mode = enabled; ++} ++ ++ ++void ++BGLView::_LockDraw() ++{ ++ if (!fClipInfo || !fClipInfo->enable_direct_mode) ++ return; ++ ++ fDrawLock.Lock(); ++} ++ ++ ++void ++BGLView::_UnlockDraw() ++{ ++ if (!fClipInfo || !fClipInfo->enable_direct_mode) ++ return; ++ ++ fDrawLock.Unlock(); ++} ++ ++ ++void ++BGLView::_CallDirectConnected() ++{ ++ if (!fClipInfo) ++ return; ++ ++ direct_buffer_info* localInfo = fClipInfo->direct_info; ++ direct_buffer_info* info = (direct_buffer_info*)malloc( ++ DIRECT_BUFFER_INFO_AREA_SIZE); ++ if (info == NULL) ++ return; ++ ++ memcpy(info, localInfo, DIRECT_BUFFER_INFO_AREA_SIZE); ++ ++ // Collect the rects into a BRegion, then clip to the view's bounds ++ BRegion region; ++ for (uint32 c = 0; c < localInfo->clip_list_count; c++) ++ region.Include(localInfo->clip_list[c]); ++ BRegion boundsRegion = fBounds.OffsetByCopy(localInfo->window_bounds.left, ++ localInfo->window_bounds.top); ++ info->window_bounds = boundsRegion.RectAtInt(0); ++ // window_bounds are now view bounds ++ region.IntersectWith(&boundsRegion); ++ ++ info->clip_list_count = region.CountRects(); ++ info->clip_bounds = region.FrameInt(); ++ ++ for (uint32 c = 0; c < info->clip_list_count; c++) ++ info->clip_list[c] = region.RectAtInt(c); ++ fRenderer->DirectConnected(info); ++ free(info); ++} ++ ++ ++//---- virtual reserved methods ---------- ++ ++ ++void BGLView::_ReservedGLView1() {} ++void BGLView::_ReservedGLView2() {} ++void BGLView::_ReservedGLView3() {} ++void BGLView::_ReservedGLView4() {} ++void BGLView::_ReservedGLView5() {} ++void BGLView::_ReservedGLView6() {} ++void BGLView::_ReservedGLView7() {} ++void BGLView::_ReservedGLView8() {} ++ ++ ++// #pragma mark - ++ ++ ++// BeOS compatibility: contrary to others BView's contructors, ++// BGLView one wants a non-const name argument. ++BGLView::BGLView(BRect rect, char* name, ulong resizingMode, ulong mode, ++ ulong options) ++ : ++ BView(rect, name, B_FOLLOW_ALL_SIDES, mode | B_WILL_DRAW | B_FRAME_EVENTS), ++ fGc(NULL), ++ fOptions(options), ++ fDitherCount(0), ++ fDrawLock("BGLView draw lock"), ++ fDisplayLock("BGLView display lock"), ++ fClipInfo(NULL), ++ fRenderer(NULL), ++ fRoster(NULL), ++ fDitherMap(NULL) ++{ ++ fRoster = new GLRendererRoster(this, options); ++} ++ ++ ++#if 0 ++// TODO: implement BGLScreen class... ++ ++ ++BGLScreen::BGLScreen(char* name, ulong screenMode, ulong options, ++ status_t* error, bool debug) ++ : ++ BWindowScreen(name, screenMode, error, debug) ++{ ++} ++ ++ ++BGLScreen::~BGLScreen() ++{ ++} ++ ++ ++void ++BGLScreen::LockGL() ++{ ++} ++ ++ ++void ++BGLScreen::UnlockGL() ++{ ++} ++ ++ ++void ++BGLScreen::SwapBuffers() ++{ ++} ++ ++ ++void ++BGLScreen::ErrorCallback(unsigned long errorCode) ++{ ++ // Mesa's GLenum is not ulong but uint! ++ char msg[32]; ++ sprintf(msg, "GL: Error code $%04lx.", errorCode); ++ // debugger(msg); ++ fprintf(stderr, "%s\n", msg); ++ return; ++} ++ ++ ++void ++BGLScreen::ScreenConnected(bool enabled) ++{ ++} ++ ++ ++void ++BGLScreen::FrameResized(float width, float height) ++{ ++ return BWindowScreen::FrameResized(width, height); ++} ++ ++ ++status_t ++BGLScreen::Perform(perform_code d, void* arg) ++{ ++ return BWindowScreen::Perform(d, arg); ++} ++ ++ ++status_t ++BGLScreen::Archive(BMessage* data, bool deep) const ++{ ++ return BWindowScreen::Archive(data, deep); ++} ++ ++ ++void ++BGLScreen::MessageReceived(BMessage* msg) ++{ ++ BWindowScreen::MessageReceived(msg); ++} ++ ++ ++void ++BGLScreen::Show() ++{ ++ BWindowScreen::Show(); ++} ++ ++ ++void ++BGLScreen::Hide() ++{ ++ BWindowScreen::Hide(); ++} ++ ++ ++BHandler* ++BGLScreen::ResolveSpecifier(BMessage* msg, int32 index, BMessage* specifier, ++ int32 form, const char* property) ++{ ++ return BWindowScreen::ResolveSpecifier(msg, index, specifier, ++ form, property); ++} ++ ++ ++status_t ++BGLScreen::GetSupportedSuites(BMessage* data) ++{ ++ return BWindowScreen::GetSupportedSuites(data); ++} ++ ++ ++//---- virtual reserved methods ---------- ++ ++void BGLScreen::_ReservedGLScreen1() {} ++void BGLScreen::_ReservedGLScreen2() {} ++void BGLScreen::_ReservedGLScreen3() {} ++void BGLScreen::_ReservedGLScreen4() {} ++void BGLScreen::_ReservedGLScreen5() {} ++void BGLScreen::_ReservedGLScreen6() {} ++void BGLScreen::_ReservedGLScreen7() {} ++void BGLScreen::_ReservedGLScreen8() {} ++#endif ++ ++ ++const char* color_space_name(color_space space) ++{ ++#define C2N(a) case a: return #a ++ ++ switch (space) { ++ C2N(B_RGB24); ++ C2N(B_RGB32); ++ C2N(B_RGBA32); ++ C2N(B_RGB32_BIG); ++ C2N(B_RGBA32_BIG); ++ C2N(B_GRAY8); ++ C2N(B_GRAY1); ++ C2N(B_RGB16); ++ C2N(B_RGB15); ++ C2N(B_RGBA15); ++ C2N(B_CMAP8); ++ default: ++ return "Unknown!"; ++ }; ++ ++#undef C2N ++}; ++ ++ ++glview_direct_info::glview_direct_info() ++{ ++ // TODO: See direct_window_data() in app_server's ServerWindow.cpp ++ direct_info = (direct_buffer_info*)calloc(1, DIRECT_BUFFER_INFO_AREA_SIZE); ++ direct_connected = false; ++ enable_direct_mode = false; ++} ++ ++ ++glview_direct_info::~glview_direct_info() ++{ ++ free(direct_info); ++} ++ +diff --git a/src/hgl/SConscript b/src/hgl/SConscript +new file mode 100644 +index 0000000..70db149 +--- /dev/null ++++ b/src/hgl/SConscript +@@ -0,0 +1,36 @@ ++####################################################################### ++# SConscript for Haiku OpenGL kit ++ ++Import('*') ++ ++env = env.Clone() ++ ++env.Append(CPPPATH = [ ++ '#/src/mapi', ++ '#/src/mesa', ++ '#/src/mesa/main', ++ '#/include/HaikuGL', ++ '/boot/system/develop/headers/private', ++ Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers ++]) ++ ++env.Prepend(LIBS = [ ++ glapi ++]) ++ ++sources = [ ++ 'GLView.cpp', ++ 'GLRenderer.cpp', ++ 'GLRendererRoster.cpp', ++ 'GLDispatcher.cpp', ++] ++ ++# libGL.so ++libgl = env.SharedLibrary( ++ target ='GL', ++ source = sources, ++ SHLIBSUFFIX = env['SHLIBSUFFIX'], ++) ++ ++env.Alias('libgl-haiku', libgl) ++Export('libgl') +diff --git a/src/mesa/drivers/haiku/swrast/SConscript b/src/mesa/drivers/haiku/swrast/SConscript +index ca0423e..aef7300 100644 +--- a/src/mesa/drivers/haiku/swrast/SConscript ++++ b/src/mesa/drivers/haiku/swrast/SConscript +@@ -16,6 +16,8 @@ env.Prepend(LIBS = [ + mesa, + ]) + ++env.Prepend(LIBS = [libgl]) ++ + sources = [ + 'SoftwareRast.cpp' + ] +-- +1.8.3.4 + +From fc7707b49c064f17ed345cf70e89e8dfa8a6738d Mon Sep 17 00:00:00 2001 +From: Alexander von Gluck IV +Date: Tue, 21 Jan 2014 18:40:22 +0000 +Subject: [PATCH] hgl: atomic stores no longer need to be volatile + +* Our atomics were revamped to no longer require + volatile int pointers +--- + include/HaikuGL/GLRenderer.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/HaikuGL/GLRenderer.h b/include/HaikuGL/GLRenderer.h +index 7ffcc34..02a438d 100644 +--- a/include/HaikuGL/GLRenderer.h ++++ b/include/HaikuGL/GLRenderer.h +@@ -61,7 +61,7 @@ private: + virtual status_t _Reserved_Renderer_3(int32, void *); + virtual status_t _Reserved_Renderer_4(int32, void *); + +- volatile int32 fRefCount; // How much we're still usefull? ++ int32 fRefCount; // How much we're still usefull? + BGLView* fView; // Never forget who is the boss! + ulong fOptions; // Keep that tune in memory + BGLDispatcher* fDispatcher;// Our personal GL API call dispatcher +-- +1.8.3.4 +