Merge all changes from trunk

This commit is contained in:
Oliver Tappe
2013-03-29 14:04:07 +00:00
parent 888e133171
commit 94cc6aaf85
1052 changed files with 65053 additions and 2541 deletions

View File

@@ -11,7 +11,7 @@ BUILD {
aclocal
automake --add-missing
autoconf
./configure --prefix=/boot/common
./configure --prefix=`finddir B_COMMON_DIRECTORY`
make
}

View File

@@ -0,0 +1,24 @@
DESCRIPTION="A branch for adding a new function to the FluidSynth API, fluid_player_add_mem."
HOMEPAGE="https://code.launchpad.net/~mgiuca/fluidsynth/midi-buffer"
SRC_URI="bzr+lp:~mgiuca/fluidsynth/midi-buffer"
#CHECKSUM_MD5=""
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="dev-libs/glib >= 2.24.1
media-libs/libsndfile >= 1.0.18"
BUILD {
cd fluidsynth-1.1-midi-buffer
cd fluidsynth
cmake .
make
}
INSTALL {
cd fluidsynth-1.1-midi-buffer
cd fluidsynth
make install
}
LICENSE="GNU LGPL v2.1"
COPYRIGHT="2007-2011 Matt Giuca, Josh Green, Pedro Lopez-Cabanillas, David Henningsson"

View File

@@ -0,0 +1,22 @@
DESCRIPTION="Fluidsynth is a software real-time synthesizer based on the Soundfont 2 specifications."
HOMEPAGE="http://www.fluidsynth.org/"
SRC_URI="http://sourceforge.net/projects/fluidsynth/files/fluidsynth-1.1.3/fluidsynth-1.1.3.tar.bz2/download"
CHECKSUM_MD5="6e35225b088eae0c2af0b78097941655"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="dev-libs/glib >= 2.24.1
media-libs/libsndfile >= 1.0.18"
BUILD {
cd fluidsynth-1.1.3
cmake .
make
}
INSTALL {
cd fluidsynth-1.1.3
make install
}
LICENSE="GNU LGPL v2.1"
COPYRIGHT="2007-2010 Josh Green, Pedro Lopez-Cabanillas, David Henningsson"

View File

@@ -0,0 +1,23 @@
DESCRIPTION="Fluidsynth is a software real-time synthesizer based on the Soundfont 2 specifications."
HOMEPAGE="http://www.fluidsynth.org/"
SRC_URI="http://sourceforge.net/projects/fluidsynth/files/fluidsynth-1.1.6/fluidsynth-1.1.6.tar.bz2/download"
CHECKSUM_MD5="f6e696690e989098f70641364fdffad7"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="dev-libs/glib >= 2.26.1
media-libs/libsndfile >= 1.0.21
sys-libs/readline >= 6.0"
BUILD {
cd fluidsynth-1.1.6
cmake .
make
}
INSTALL {
cd fluidsynth-1.1.6
make install prefix=`finddir B_COMMON_DIRECTORY`
}
LICENSE="GNU LGPL v2.1"
COPYRIGHT="2007-2012 Josh Green, Pedro Lopez-Cabanillas, David Henningsson"

View File

@@ -0,0 +1,38 @@
diff -Naur fluidsynth-1.1-midi-buffer/fluidsynth/CMakeLists.txt fluidsynth-1.1-midi-buffer-haiku/fluidsynth/CMakeLists.txt
--- fluidsynth-1.1-midi-buffer/fluidsynth/CMakeLists.txt 2011-04-24 20:59:42.047710208 -0300
+++ fluidsynth-1.1-midi-buffer-haiku/fluidsynth/CMakeLists.txt 2011-04-24 21:01:20.278134784 -0300
@@ -166,10 +166,18 @@
add_definitions ( -mms-bitfields )
endif ( MINGW )
else ( WIN32 )
-# Check PThreads, but not in Windows
- find_package ( Pthreads REQUIRED )
- set ( HAVE_LIBPTHREAD ${PTHREADS_FOUND} )
- set ( LIBFLUID_LIBS "m" )
+
+if (UNIX AND NOT BEOS)
+# Check PThreads, but not in Windows
+ find_package ( Pthreads REQUIRED )
+ set ( HAVE_LIBPTHREAD ${PTHREADS_FOUND} )
+ set ( LIBFLUID_LIBS "m" )
+endif (UNIX AND NOT BEOS)
+
+if (BEOS)
+set ( LIBFLUID_LIBS "network")
+endif (BEOS)
+
endif ( WIN32 )
# IBM OS/2
diff -Naur fluidsynth-1.1-midi-buffer/fluidsynth/src/utils/fluid_sys.h fluidsynth-1.1-midi-buffer-haiku/fluidsynth/src/utils/fluid_sys.h
--- fluidsynth-1.1-midi-buffer/fluidsynth/src/utils/fluid_sys.h 2011-04-24 20:59:42.047710208 -0300
+++ fluidsynth-1.1-midi-buffer-haiku/fluidsynth/src/utils/fluid_sys.h 2011-04-24 21:02:01.829685760 -0300
@@ -335,7 +335,7 @@
sample data.
*/
-#if defined(HAVE_SYS_MMAN_H) && !defined(__OS2__)
+#if defined(HAVE_SYS_MMAN_H) && !defined(__OS2__) && !defined(__HAIKU__)
#define fluid_mlock(_p,_n) mlock(_p, _n)
#define fluid_munlock(_p,_n) munlock(_p,_n)
#else

View File

@@ -0,0 +1,34 @@
diff -Naur fluidsynth-1.1.3/CMakeLists.txt fluidsynth-1.1.3-haiku/CMakeLists.txt
--- fluidsynth-1.1.3/CMakeLists.txt 2010-10-10 22:16:30.031457280 -0300
+++ fluidsynth-1.1.3-haiku/CMakeLists.txt 2011-04-24 14:21:01.000000000 -0300
@@ -152,9 +152,18 @@
endif ( MINGW )
else ( WIN32 )
# Check PThreads, but not in Windows
+
+if (UNIX AND NOT BEOS)
+# Check PThreads, but not in Windows
find_package ( Pthreads REQUIRED )
set ( HAVE_LIBPTHREAD ${PTHREADS_FOUND} )
set ( LIBFLUID_LIBS "m" )
+endif (UNIX AND NOT BEOS)
+
+if (BEOS)
+set ( LIBFLUID_LIBS "network")
+endif (BEOS)
+
endif ( WIN32 )
# IBM OS/2
diff -Naur fluidsynth-1.1.3/src/utils/fluid_sys.h fluidsynth-1.1.3-haiku/src/utils/fluid_sys.h
--- fluidsynth-1.1.3/src/utils/fluid_sys.h 2010-10-10 22:16:30.022806528 -0300
+++ fluidsynth-1.1.3-haiku/src/utils/fluid_sys.h 2011-04-24 14:17:52.000000000 -0300
@@ -335,7 +335,7 @@
sample data.
*/
-#if defined(HAVE_SYS_MMAN_H) && !defined(__OS2__)
+#if defined(HAVE_SYS_MMAN_H) && !defined(__OS2__) && !defined(__HAIKU__)
#define fluid_mlock(_p,_n) mlock(_p, _n)
#define fluid_munlock(_p,_n) munlock(_p,_n)
#else

View File

@@ -0,0 +1,35 @@
diff -urN fluidsynth-1.1.6/CMakeLists.txt fluidsynth-1.1.6-haiku/CMakeLists.txt
--- fluidsynth-1.1.6/CMakeLists.txt
+++ fluidsynth-1.1.6/haiku/CMakeLists.txt
@@ -168,9 +168,16 @@
endif ( MINGW )
else ( WIN32 )
# Check PThreads, but not in Windows
- find_package ( Pthreads REQUIRED )
- set ( HAVE_LIBPTHREAD ${PTHREADS_FOUND} )
- set ( LIBFLUID_LIBS "m" )
+if (UNIX AND NOT HAIKU)
+# Check PThreads, but not in Windows
+ find_package ( Pthreads REQUIRED )
+ set ( HAVE_LIBPTHREAD ${PTHREADS_FOUND} )
+ set ( LIBFLUID_LIBS "m" )
+endif (UNIX AND NOT HAIKU)
+
+if (HAIKU)
+set ( LIBFLUID_LIBS "network")
+endif (HAIKU)
endif ( WIN32 )
# IBM OS/2
diff -Naur fluidsynth-1.1.6/src/utils/fluid_sys.h fluidsynth-1.1.3-haiku/src/utils/fluid_sys.h
--- fluidsynth-1.1.6/src/utils/fluid_sys.h
+++ fluidsynth-1.1.6-haiku/src/utils/fluid_sys.h
@@ -335,7 +335,7 @@
sample data.
*/
-#if defined(HAVE_SYS_MMAN_H) && !defined(__OS2__)
+#if defined(HAVE_SYS_MMAN_H) && !defined(__OS2__) && !defined(__HAIKU__)
#define fluid_mlock(_p,_n) mlock(_p, _n)
#define fluid_munlock(_p,_n) munlock(_p,_n)
#else

View File

@@ -0,0 +1,21 @@
DESCRIPTION="Mp3 encoder based on LAME3.88, which is optimized for Enhanced 3D Now!/SSE/SSE2 and dual-CPUs."
HOMEPAGE="https://github.com/teragonaudio/gogo-no-coda"
SRC_URI="https://github.com/teragonaudio/gogo-no-coda/archive/master.zip"
CHECKSUM_MD5="b60ae82f7fc70cbefd2e4003b9e13c8f"
REVISION="1"
STATUS_HAIKU="stable"
MESSAGE="This port only builds with gcc2. Use 'setgcc gcc2' before building."
DEPEND="dev-lang/nasm"
BUILD {
cd gogo-no-coda-master/linux
make
}
INSTALL {
cd gogo-no-coda-master/linux
make install prefix=`finddir B_COMMON_DIRECTORY`
}
LICENSE="GNU LGPL v2"
COPYRIGHT="2001-2003 Respective gogo-no-coda creators"

View File

@@ -0,0 +1,117 @@
diff -Naur gogo-no-coda-master/engine/i386/cpu.c gogo-no-coda-master-haiku/engine/i386/cpu.c
--- gogo-no-coda-master/engine/i386/cpu.c 2011-05-17 09:51:26.045350912 +0000
+++ gogo-no-coda-master-haiku/engine/i386/cpu.c 2012-12-30 16:42:53.811073536 +0000
@@ -162,7 +162,7 @@
}
return nCPU;
-#elif defined(BeOS)
+#elif defined(BeOS) || defined(__HAIKU__)
system_info udtsystem_info;
get_system_info(&udtsystem_info);
diff -Naur gogo-no-coda-master/engine/i386/fftsse.nas gogo-no-coda-master-haiku/engine/i386/fftsse.nas
--- gogo-no-coda-master/engine/i386/fftsse.nas 2011-05-17 09:51:26.045613056 +0000
+++ gogo-no-coda-master-haiku/engine/i386/fftsse.nas 2012-12-30 16:42:53.823656448 +0000
@@ -23,14 +23,14 @@
Q_SQRT2 dd 1.41421356237, 1.41421356237, 1.41421356237, 1.41421356237
Q_1 dd 1.0, 1.0, 1.0, 1.0
-costab dd 9.238795325112867e-01F, 9.238795325112867e-01F, 9.238795325112867e-01F, 9.238795325112867e-01F
- dd 3.826834323650898e-01F, 3.826834323650898e-01F, 3.826834323650898e-01F, 3.826834323650898e-01F
- dd 9.951847266721969e-01F, 9.951847266721969e-01F, 9.951847266721969e-01F, 9.951847266721969e-01F
- dd 9.801714032956060e-02F, 9.801714032956060e-02F, 9.801714032956060e-02F, 9.801714032956060e-02F
- dd 9.996988186962042e-01F, 9.996988186962042e-01F, 9.996988186962042e-01F, 9.996988186962042e-01F
- dd 2.454122852291229e-02F, 2.454122852291229e-02F, 2.454122852291229e-02F, 2.454122852291229e-02F
- dd 9.999811752826011e-01F, 9.999811752826011e-01F, 9.999811752826011e-01F, 9.999811752826011e-01F
- dd 6.135884649154475e-03F, 6.135884649154475e-03F, 6.135884649154475e-03F, 6.135884649154475e-03F
+costab dd 9.238795325112867e-01, 9.238795325112867e-01, 9.238795325112867e-01, 9.238795325112867e-01
+ dd 3.826834323650898e-01, 3.826834323650898e-01, 3.826834323650898e-01, 3.826834323650898e-01
+ dd 9.951847266721969e-01, 9.951847266721969e-01, 9.951847266721969e-01, 9.951847266721969e-01
+ dd 9.801714032956060e-02, 9.801714032956060e-02, 9.801714032956060e-02, 9.801714032956060e-02
+ dd 9.996988186962042e-01, 9.996988186962042e-01, 9.996988186962042e-01, 9.996988186962042e-01
+ dd 2.454122852291229e-02, 2.454122852291229e-02, 2.454122852291229e-02, 2.454122852291229e-02
+ dd 9.999811752826011e-01, 9.999811752826011e-01, 9.999811752826011e-01, 9.999811752826011e-01
+ dd 6.135884649154475e-03, 6.135884649154475e-03, 6.135884649154475e-03, 6.135884649154475e-03
align 32
revLongInit db 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80
diff -Naur gogo-no-coda-master/engine/i386/makecfg.c gogo-no-coda-master-haiku/engine/i386/makecfg.c
--- gogo-no-coda-master/engine/i386/makecfg.c 2011-05-17 09:51:26.045875200 +0000
+++ gogo-no-coda-master-haiku/engine/i386/makecfg.c 2012-12-30 16:42:53.837812224 +0000
@@ -18,7 +18,7 @@
RW_t RW;
RO_t RO;
-#if (defined(WIN32) || defined(__linux__) || defined(__os2__)) && !defined(__BORLANDC__) && !defined(__MINGW32_VERSION)
+#if (defined(WIN32) || defined(__linux__) || defined(__os2__) || defined(__HAIKU__)) && !defined(__BORLANDC__) && !defined(__MINGW32_VERSION)
#define USE_BSS
#endif
diff -Naur gogo-no-coda-master/linux/Makefile gogo-no-coda-master-haiku/linux/Makefile
--- gogo-no-coda-master/linux/Makefile 2011-05-17 09:51:26.057147392 +0000
+++ gogo-no-coda-master-haiku/linux/Makefile 2012-12-30 16:44:48.008912896 +0000
@@ -8,6 +8,8 @@
#######################################################
TARGET = gogo
+prefix =
+BINDIR = $(prefix)/bin
#######################################################
@@ -16,12 +18,11 @@
AS = nasm -i../engine/i386/
LD = gcc
MAKECFG = makecfg
-LIBS = -lm
VPATH = ../engine:../engine/i386:../file_io
LDFLAGS = $(PROF)
AFLAGS = -f elf -D__unix__ $(E3DN)
-CFLAGS = -Wall $(PROF) -DNDEBUG
+CFLAGS = -Wall $(PROF) -D__unix__
#CFLAGS += -Wpointer-arith -Wshadow -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs
CFLAGS += -DHAVE_CONFIG_H -DLAMEPARSE -DLAMESNDFILE
@@ -97,7 +98,6 @@
#COBJS += $(LIBSNDCOBJS)
# if FreeBSD then change -lc_r
-LIBS += -lpthread
CFLAGS += -DUSE_PTHREAD
COBJS += thread.o
@@ -105,9 +105,10 @@
all: $(TARGET)
-install : $(TARGET)
- cp $(TARGET) /usr/local/bin
- strip /usr/local/bin/$(TARGET)
+install : $(TARGET) $(BINDIR)
+ mkdir -p $(DESTDIR)$(BINDIR)
+ install -m 0755 $(TARGET) $(DESTDIR)$(BINDIR)
+ strip $(DESTDIR)$(BINDIR)/$(TARGET)
$(TARGET): $(COBJS) $(AOBJS)
$(LD) $(COBJS) $(AOBJS) $(LDFLAGS) -o $(TARGET) $(LIBS)
diff -Naur gogo-no-coda-master/main.c gogo-no-coda-master-haiku/main.c
--- gogo-no-coda-master/main.c 2011-05-17 09:51:26.057409536 +0000
+++ gogo-no-coda-master-haiku/main.c 2012-12-30 16:42:53.853803008 +0000
@@ -5,13 +5,13 @@
* Copyright(C) 2001,2002,2003 gogo-developer
*/
-#if defined(__linux__) || defined(__ppc__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__ppc__) || defined(__FreeBSD__) || defined(__HAIKU__)
#define USE_ITIMER
#include <unistd.h>
#include <sys/time.h>
#include <signal.h>
#endif
-#if defined(__linux__) || defined(__os2__) || defined(__ppc__) || defined(__CYGWIN32__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__os2__) || defined(__ppc__) || defined(__CYGWIN32__) || defined(__FreeBSD__) || defined(__HAIKU__)
# define min(x,y) (((x)<(y))?(x):(y))
# define max(x,y) (((x)>(y))?(x):(y))
#endif

View File

@@ -0,0 +1,23 @@
DESCRIPTION="jack2 is a C++ version of the JACK low-latency audio server for multi-processor machines."
HOMEPAGE="https://github.com/Barrett17/jack2-for-haiku"
SRC_URI="git://github.com/Barrett17/jack2-for-haiku.git"
REVISION="1"
STATUS_HAIKU="unstable"
DEPEND="media-libs/libsamplerate >= 0.1.8
media-libs/libsndfile >= 1.0.21"
#CHECKSUM_MD5=""
MESSAGE="This port only builds with gcc4."
BUILD {
cd jack2-1.9.8
python ./waf configure --prefix=/boot/common/
python ./waf build
}
INSTALL {
cd jack2-1.9.8
python ./waf build install
}
LICENSE="GNU GPL v2"
COPYRIGHT="2001-2011 Paul Davis."

View File

@@ -14,7 +14,7 @@ BUILD {
libtoolize --force --copy --install
aclocal -I m4
autoconf --warnings=none
./configure --prefix=/boot/common --without-gtk
./configure --prefix=`finddir B_COMMON_DIRECTORY` --without-gtk
make
}

View File

@@ -0,0 +1,26 @@
DESCRIPTION="LAME Ain't an MP3 Encoder"
HOMEPAGE="http://lame.sourceforge.net/"
SRC_URI="http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.tar.gz"
CHECKSUM_MD5="7abacd1d0a65a63733335786015626db"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
BUILD {
cd lame-3.99
mkdir -p m4
# configure checks for gtk, but they didn't include the gtk.m4 so we need to.
cp ../../patches/gtk.m4 m4
echo 'AC_CONFIG_MACRO_DIR([m4])' >> configure.in
libtoolize --force --copy --install
aclocal -I m4
autoconf --warnings=none
./configure --prefix=`finddir B_COMMON_DIRECTORY` --without-gtk
make
}
INSTALL {
cd lame-3.99
make install
}
LICENSE="GNU LGPL v2"
COPYRIGHT="1998-2011 Mike Cheng et al."

View File

@@ -11,7 +11,7 @@ BUILD {
aclocal
autoconf
automake
./configure --prefix=/boot/common
./configure --prefix=`finddir B_COMMON_DIRECTORY`
make
}

View File

@@ -0,0 +1,13 @@
diff -urN lame-3.99/configure.in lame-3.99-haiku/configure.in
--- lame-3.99/configure.in 2010-06-21 14:16:05.000000000 +0000
+++ lame-3.99-haiku/configure.in 2010-06-21 15:12:31.000000000 +0000
@@ -343,6 +343,9 @@
*solaris*)
LIBS="$LIBS -lnsl"
;;
+ *haiku*)
+ LIBS="$LIBS -lnetwork"
+ ;;
esac
fi
fi

View File

@@ -0,0 +1,29 @@
DESCRIPTION="Fasttracker 2 inspired music tracker"
HOMEPAGE="www.orangejua.de/milkytracker.shtml"
SRC_URI="http://www.orangejua.de/archives/MilkyTracker-0.90.85-haiku-2-source.zip"
CHECKSUM_MD5="9d844e81527aa397aa06d648099af2f4"
STATUS_HAIKU="stable"
REVISION="1"
DEPEND="media-libs/libsdl >= 1.2
sys-libs/zlib >= 1.2.5"
BUILD {
cd 'MilkyTracker Source Code'/platforms/haiku
bash ./Add_Jamfiles.sh
cd ../..
jam
}
INSTALL {
cd 'MilkyTracker Source Code'/src/tracker
APPDIR=`finddir B_APPS_DIRECTORY`/MilkyTracker
APPSETTINGSDIR=`finddir B_USER_SETTINGS_DIRECTORY`/MilkyTracker/
mkdir -p ${DESTDIR}/${APPSETTINGSDIR}
mkdir -p ${DESTDIR}/${APPDIR}
cp -af MilkyTracker ${DESTDIR}/${APPDIR}
cd haiku/MilkySettings
cp -af MilkySettings ${DESTDIR}/${APPSETTINGSDIR}
}
LICENSE="GNU GPL v3"
COPYRIGHT="1994-2006 Peter Barth, Christopher O'Neill, Antti S. Lankila, Varthall, Andrew Simper, David Ross, Stuart Caie, Claudio Matsuoka"

View File

@@ -10,7 +10,7 @@ BUILD {
libtoolize --force --copy --install
aclocal
autoconf
./configure --prefix=/boot/common --disable-aligncheck
./configure --prefix=`finddir B_COMMON_DIRECTORY` --disable-aligncheck
make
}

View File

@@ -8,7 +8,7 @@ DEPEND=""
BUILD {
cd naspro-0.2.9-hg/naspro-core
./autogen.sh
./configure --prefix=/boot/common
./configure --prefix=`finddir B_COMMON_DIRECTORY`
make
}

View File

@@ -0,0 +1,26 @@
DESCRIPTION="ocp - Open Cubic Player, a music player ported from DOS"
HOMEPAGE="http://stian.cubic.org/project-ocp.php"
SRC_URI="git://git.code.sf.net/p/opencubicplayer/code"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="media-libs/libvorbis >= 1.3.1
media-libs/libogg >= 1.2.2
sys-devel/gettext >= 0.18.1.1
media-libs/libsdl >= 1.2.14"
# media-libs/flac >= 1.2.1"
# ncurses zlib ... cf. ocp.spec
MESSAGE="This port requires gcc4"
BUILD {
cd code
autoconf
CPPFLAGS=-I/boot/common/include LDFLAGS=-L/boot/common/lib ./configure --prefix=`finddir B_COMMON_DIRECTORY`
make
}
INSTALL {
cd code
make install
}
LICENSE="GNU GPL v2"
COPYRIGHT="1994-2012 Niklas Beisert, Stian Skjelstad and others"

View File

@@ -0,0 +1,27 @@
DESCRIPTION="ocp - Open Cubic Player, a music player ported from DOS"
HOMEPAGE="http://stian.cubic.org/project-ocp.php"
SRC_URI="http://stian.cubic.org/ocp/ocp-snapshot-20110319.tar.bz2"
CHECKSUM_MD5="4adb34d39053e06bca00aa6b4ec8dd93"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="media-libs/libvorbis >= 1.3.1
media-libs/libogg >= 1.2.2
sys-devel/gettext >= 0.18.1.1
media-libs/libsdl >= 1.2.14"
# media-libs/flac >= 1.2.1"
# ncurses zlib ... cf. ocp.spec
MESSAGE="This port requires gcc4"
BUILD {
cd ocp-snapshot-20110319
autoconf
CPPFLAGS=-I/boot/common/include LDFLAGS=-L/boot/common/lib ./configure --prefix=`finddir B_COMMON_DIRECTORY`
make
}
INSTALL {
cd ocp-snapshot-20110319
make install
}
LICENSE="GNU GPL v2"
COPYRIGHT="1994-2011 Niklas Beisert, Stian Skjelstad and others"

View File

@@ -0,0 +1,27 @@
DESCRIPTION="ocp - Open Cubic Player, a music player ported from DOS"
HOMEPAGE="http://stian.cubic.org/project-ocp.php"
SRC_URI="http://stian.cubic.org/ocp/ocp-snapshot-20110320.tar.bz2"
CHECKSUM_MD5="febb786fc6c1450a404578369a1f2adc"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="media-libs/libvorbis >= 1.3.1
media-libs/libogg >= 1.2.2
sys-devel/gettext >= 0.18.1.1
media-libs/libsdl >= 1.2.14"
# media-libs/flac >= 1.2.1"
# ncurses zlib ... cf. ocp.spec
MESSAGE="This port requires gcc4"
BUILD {
cd ocp-snapshot-20110320
autoconf
CPPFLAGS=-I/boot/common/include LDFLAGS=-L/boot/common/lib ./configure --prefix=`finddir B_COMMON_DIRECTORY`
make
}
INSTALL {
cd ocp-snapshot-20110320
make install
}
LICENSE="GNU GPL v2"
COPYRIGHT="1994-2011 Niklas Beisert, Stian Skjelstad and others"

View File

@@ -0,0 +1,504 @@
diff -ur ../ocp-snapshot-20110319.org/Makefile.in ./Makefile.in
--- ../ocp-snapshot-20110319.org/Makefile.in 2011-03-19 01:04:33.008650752 +0100
+++ ocp-snapshot-20110319/Makefile.in 2011-03-19 02:03:20.319291392 +0100
@@ -165,7 +165,7 @@
$(MAKE) -C doc TOPDIR="../$(TOPDIR)"
ocp: boot/kickload.o
- $(CC) $(LDFLAGS) -o $@ $^ -pthread @DL_LIBS@ @EFENCE_LIBS@ @DUMA_LIBS@
+ $(CC) $(LDFLAGS) -o $@ $^ @PTHREAD_LIBS@ @DL_LIBS@ @EFENCE_LIBS@ @DUMA_LIBS@
ocp.hlp: doc/opencp.dox goodies/helpc/ocphhc
goodies/helpc/ocphhc doc/opencp.dox $@
@@ -207,7 +207,7 @@
rm -Rf config.h autom4te.cache Rules.make config.log config.status Makefile ocp.ini desktop/opencubicplayer.desktop doc/texi/faq.texi doc/texi/install.texi doc/texi/ocp.texi goodies/pack/Makefile goodies/helpc/Makefile
fstypes$(LIB_SUFFIX): dirs $(fstypes_so)
- $(CC) $(SHARED_FLAGS) $(ICONV_LIBS) -o $@ $(fstypes_so)
+ $(CC) $(SHARED_FLAGS) $(ICONV_LIBS) $(LDFLAGS) -o $@ $(fstypes_so)
libocp$(LIB_SUFFIX): $(libocp_so)
$(CC) $(SHARED_FLAGS) $(STATIC_LIBS) -o $@ $(libocp_so)
diff -ur ../ocp-snapshot-20110319.org/boot/kickload.c ./boot/kickload.c
--- ../ocp-snapshot-20110319.org/boot/kickload.c 2011-03-19 01:04:33.044826624 +0100
+++ ocp-snapshot-20110319/boot/kickload.c 2011-03-19 02:03:20.439091200 +0100
@@ -601,6 +601,8 @@
#ifdef __linux
dir=get_current_dir_name();
+#elif defined(HAVE_GETCWD)
+ dir=getcwd(malloc(PATH_MAX), PATH_MAX);
#else /* BSD */
dir=getwd(malloc(PATH_MAX));
#endif
diff -ur ../ocp-snapshot-20110319.org/boot/pmain.c ./boot/pmain.c
--- ../ocp-snapshot-20110319.org/boot/pmain.c 2011-03-19 01:04:33.045350912 +0100
+++ ocp-snapshot-20110319/boot/pmain.c 2011-03-19 15:09:03.064749568 +0100
@@ -110,7 +110,7 @@
printf(" curses : ncurses driver\n");
printf(" x11 : x11 driver\n");
printf(" vcsa : vcsa/fb linux console driver\n");
- printf(" sdl : SDL video driverr\n");
+ printf(" sdl : SDL video driver\n");
printf("\nExample : ocp -fl0,r1 -vp75,f2 -spdevpdisk -sr48000 ftstar.xm\n");
printf(" (for nice HD rendering of modules)\n");
return errHelpPrinted;
diff -ur ../ocp-snapshot-20110319.org/config.h.in ./config.h.in
--- ../ocp-snapshot-20110319.org/config.h.in 2011-03-19 01:04:33.066060288 +0100
+++ ocp-snapshot-20110319/config.h.in 2011-03-19 02:05:09.172490752 +0100
@@ -190,6 +190,8 @@
#undef DLLVERSION
+#undef HAVE_GETCWD
+
#undef HAVE_MEMMEM
#undef HAVE_QSORT
diff -ur ../ocp-snapshot-20110319.org/configure.ac ./configure.ac
--- ../ocp-snapshot-20110319.org/configure.ac 2011-03-19 01:04:33.051642368 +0100
+++ ocp-snapshot-20110319/configure.ac 2011-03-19 02:44:49.498860032 +0100
@@ -29,6 +29,7 @@
AC_C_BIGENDIAN
AC_SUBST(SHARED_FLAGS)
+AC_SUBST(PTHREAD_LIBS)
AC_SUBST(LIB_SUFFIX)
target=`gcc -dumpmachine`
case "$target" in
@@ -36,10 +37,18 @@
SHARED_FLAGS="-dynamiclib -flat_namespace -undefined suppress"
CFLAGS="$CFLAGS -fno-common"
CXXFLAGS="$CXXFLAGS -fno-common"
+ PTHREAD_LIBS=-pthread
LIB_SUFFIX=.dylib
;;
+ *-haiku*)
+ SHARED_FLAGS=-shared
+ LIB_SUFFIX=.so
+ PTHREAD_LIBS=
+ with_desktop_file_install=no
+ ;;
*)
SHARED_FLAGS=-shared
+ PTHREAD_LIBS=-pthread
LIB_SUFFIX=.so
;;
esac
@@ -172,6 +181,7 @@
])
)
+AC_CHECK_FUNCS(getcwd)
AC_CHECK_FUNCS(memmem)
AC_CHECK_FUNCS(qsort)
AC_CHECK_FUNCS(sysconf)
diff -ur ../ocp-snapshot-20110319.org/stuff/compat.c ./stuff/compat.c
--- ../ocp-snapshot-20110319.org/stuff/compat.c 2011-03-19 01:04:33.053739520 +0100
+++ ocp-snapshot-20110319/stuff/compat.c 2011-03-19 02:10:17.354418688 +0100
@@ -204,7 +204,7 @@
*src=toupper(*src);
src++;
}
- return src;
+ return retval;
}
#endif
diff -ur ../ocp-snapshot-20110319.org/devp/Makefile ./devp/Makefile
--- ../ocp-snapshot-20110319.org/devp/Makefile 2011-03-19 01:04:33.048234496 +0100
+++ ocp-snapshot-20110319/devp/Makefile 2011-03-19 03:37:27.953679872 +0100
@@ -13,7 +13,11 @@
COREAUDIO_SO=devpcoreaudio$(LIB_SUFFIX)
endif
-all: devpnone$(LIB_SUFFIX) devpdisk$(LIB_SUFFIX) $(OSS_SO) $(ALSA_SO) $(COREAUDIO_SO)
+ifeq ($(HAVE_SDL),1)
+SDL_SO=devpsdl$(LIB_SUFFIX)
+endif
+
+all: devpnone$(LIB_SUFFIX) devpdisk$(LIB_SUFFIX) $(OSS_SO) $(ALSA_SO) $(COREAUDIO_SO) $(SDL_SO)
devpnone_so=devpnone.o
devpnone$(LIB_SUFFIX): $(devpnone_so)
@@ -35,6 +39,10 @@
devpcoreaudio$(LIB_SUFFIX):$(devpcoreaudio_so)
$(CC) $(SHARED_FLAGS) -o $@ $^ $(COREAUDIO_LIBS)
+devpsdl_so=devpsdl.o
+devpsdl$(LIB_SUFFIX):$(devpsdl_so)
+ $(CC) $(SHARED_FLAGS) -o $@ $^ $(SDL_LIBS)
+
clean:
rm -f *.o *$(LIB_SUFFIX)
@@ -49,6 +57,9 @@
ifeq ($(HAVE_COREAUDIO),1)
$(CP) $(COREAUDIO_SO) "$(DESTDIR)$(LIBDIR)"
endif
+ifeq ($(HAVE_SDL),1)
+ $(CP) $(SDL_SO) "$(DESTDIR)$(LIBDIR)"
+endif
uninstall:
rm -f "$(DESTDIR)$(LIBDIR)/devpnone$(LIB_SUFFIX)" "$(DESTDIR)$(LIBDIR)/devpdisk$(LIB_SUFFIX)"
@@ -61,6 +72,9 @@
ifeq ($(HAVE_COREAUDIO),1)
rm -f "$(DESTDIR)$(LIBDIR)/$(COREAUDIO_SO)"
endif
+ifeq ($(HAVE_SDL),1)
+ rm -f "$(DESTDIR)$(LIBDIR)/$(SDL_SO)"
+endif
devposs.o: devposs.c \
../config.h \
@@ -120,3 +134,12 @@
../dev/player.h \
../stuff/imsrtns.h
$(CC) devpcoreaudio.c -o $@ -c $(DEVPCOREAUDIO_CFLAGS)
+
+devpsdl.o: devpsdl.c \
+ ../config.h \
+ ../types.h \
+ ../boot/plinkman.h \
+ ../dev/imsdev.h \
+ ../dev/player.h \
+ ../stuff/imsrtns.h
+ $(CC) devpsdl.c -o $@ -c $(SDL_CFLAGS) $(DEVPSDL_CFLAGS)
diff -ur ../ocp-snapshot-20110319.org/ocp.ini.in ./ocp.ini.in
--- ../ocp-snapshot-20110319.org/ocp.ini.in 2011-03-19 01:04:33.065798144 +0100
+++ ocp-snapshot-20110319/ocp.ini.in 2011-03-20 15:56:58.479199232 +0100
@@ -136,6 +136,9 @@
path=/dev/dsp
mixer=/dev/mixer
+[devpSDL]
+ link=devpsdl
+
[devpDisk]
link=devpdisk
--- /dev/null 2011-03-20 15:34:50.648381000 +0100
+++ ocp-snapshot-20110319/devp/devpsdl.c 2011-03-20 21:05:30.579862528 +0100
@@ -0,0 +1,321 @@
+/* OpenCP Module Player
+ * copyright (c) '11 François Revol <revol@free.fr>
+ *
+ * SDL Player device
+ *
+ * derived from the CoreAudio Player device
+ * copyright (c) '06-'10 Stian Skjelstad <stian@nixia.no>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * revision history: (please note changes here)
+ * -fr110319 François Revol <revol@free.fr>
+ * -copied from devpcoreaudio
+ */
+
+#include "config.h"
+#include <signal.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <SDL.h>
+#include <SDL_audio.h>
+#include "types.h"
+#include "boot/plinkman.h"
+#include "dev/imsdev.h"
+#include "dev/player.h"
+#include "stuff/timer.h"
+#include "stuff/imsrtns.h"
+
+/*#define PRINT(a) fprintf(stderr, a)*/
+#define PRINT(a) do {} while(0)
+
+extern struct sounddevice plrSDL;
+
+/*static SDL_AudioSpec sdlSpec;*/
+
+/* stolen from devpcoreaudio.c */
+
+static void *playbuf=0;
+static int buflen;
+volatile static int kernpos, cachepos, bufpos; /* in bytes */
+/* kernpos = kernel write header
+ * bufpos = the write header given out of this driver */
+
+/* playbuf kernpos cachepos bufpos buflen
+ * | | kernlen | | |
+ * | | cachelen | |
+ *
+ * on flush, we update all variables> * on getbufpos we return kernpos-(1 sample) as safe point to buffer up to
+ * on getplaypos we use last known kernpos if locked, else update kernpos
+ */
+
+
+volatile static int cachelen, kernlen; /* to make life easier */
+
+volatile static uint32_t playpos; /* how many samples have we done totally */
+
+/* Avoid deadlocks due to signals catched when in the critical section */
+#define SDL_LockAudio() \
+ sigset_t _orgmask; \
+ sigset_t _mask; \
+ sigemptyset(&_mask); \
+ sigaddset(&_mask, SIGALRM); \
+ sigprocmask(SIG_BLOCK, &_mask, &_orgmask); \
+ SDL_LockAudio()
+
+#define SDL_UnlockAudio() \
+ SDL_UnlockAudio(); \
+ sigprocmask(SIG_SETMASK, &_orgmask, NULL)
+
+
+void theRenderProc(void *userdata, Uint8 *stream, int len)
+{
+ int i, i2;
+ int done = 0;
+
+#ifdef SDL_DEBUG
+ PRINT(("%s(,,%d)\n", __FUNCTION__, len));
+#endif
+
+ memset(stream, 0, len);
+
+ SDL_LockAudio();
+
+ i = cachelen;/* >>2 *stereo + 16it */
+ if (i > len)
+ i = len;
+
+ kernlen = done = i;
+ cachelen -= i;
+ cachepos = kernpos;
+
+ if ((i+kernpos)>buflen)
+ {
+ i2 = ( i + kernpos ) % buflen;
+ i = i - i2;
+ } else {
+ i2 = 0;
+ }
+
+ memcpy(stream, playbuf+kernpos, i);
+ if (i2)
+ memcpy(stream+i, playbuf, i2);
+
+ kernpos = (kernpos+i+i2)%buflen;
+
+ SDL_UnlockAudio();
+
+ if (done < len)
+ fprintf(stderr, "%s: got %d of %d\n", __FUNCTION__, done, len);
+ /*PRINT(("%s: got %d of %d\n", __FUNCTION__, done, len));*/
+}
+
+
+/* stolen from devposs */
+static int sdlGetBufPos(void)
+{
+ int retval;
+ PRINT(("%s()\n", __FUNCTION__));
+
+ /* this thing is utterly broken */
+
+ SDL_LockAudio();
+ if (kernpos==bufpos)
+ {
+ if (cachelen|kernlen)
+ {
+ retval=kernpos;
+ SDL_UnlockAudio();
+ return retval;
+ }
+ }
+ retval=(kernpos+buflen-4 /* 1 sample = 4 bytes*/)%buflen;
+ SDL_UnlockAudio();
+ return retval;
+}
+
+static int sdlGetPlayPos(void)
+{
+ int retval;
+ PRINT(("%s()\n", __FUNCTION__));
+
+ SDL_LockAudio();
+ retval=cachepos;
+ SDL_UnlockAudio();
+ return retval;
+}
+
+static void sdlIdle(void)
+{
+ PRINT(("%s()\n", __FUNCTION__));
+}
+
+static void sdlAdvanceTo(unsigned int pos)
+{
+ PRINT(("%s(%u)\n", __FUNCTION__, pos));
+ SDL_LockAudio();
+
+ cachelen+=(pos-bufpos+buflen)%buflen;
+ bufpos=pos;
+
+ SDL_UnlockAudio();
+}
+
+static uint32_t sdlGetTimer(void)
+{
+ long retval;
+ PRINT(("%s()\n", __FUNCTION__));
+
+ SDL_LockAudio();
+
+ retval=playpos-kernlen;
+
+ SDL_UnlockAudio();
+
+ return imuldiv(retval, 65536>>(2/*stereo+bit16*/), plrRate);
+}
+
+static void sdlStop(void)
+{
+ PRINT(("%s()\n", __FUNCTION__));
+ /* TODO, forceflush */
+
+ SDL_PauseAudio(1);
+
+ if (playbuf)
+ {
+ free(playbuf);
+ playbuf=0;
+ }
+
+ plrGetBufPos=0;
+ plrGetPlayPos=0;
+ plrIdle=0;
+ plrAdvanceTo=0;
+ plrGetTimer=0;
+
+ SDL_CloseAudio();
+}
+
+static int sdlPlay(void **buf, unsigned int *len)
+{
+ SDL_AudioSpec desired;
+ int status;
+ PRINT(("%s(,&%d)\n", __FUNCTION__, *len));
+
+ if ((*len)<(plrRate&~3))
+ *len=plrRate&~3;
+ if ((*len)>(plrRate*4))
+ *len=plrRate*4;
+ playbuf=*buf=malloc(*len);
+
+ memset(*buf, 0x80008000, (*len)>>2);
+ buflen = *len;
+
+ cachepos=0;
+ kernpos=0;
+ bufpos=0;
+ cachelen=0;
+ kernlen=0;
+
+ playpos=0;
+
+ plrGetBufPos=sdlGetBufPos;
+ plrGetPlayPos=sdlGetPlayPos;
+ plrIdle=sdlIdle;
+ plrAdvanceTo=sdlAdvanceTo;
+ plrGetTimer=sdlGetTimer;
+
+
+ desired.freq = plrRate;
+ desired.format = AUDIO_S16SYS;
+ desired.channels = 2;
+ desired.samples = *len;
+ desired.callback = theRenderProc;
+ desired.userdata = NULL;
+
+ status=SDL_OpenAudio(&desired, NULL);
+ if (status < 0)
+ {
+ fprintf(stderr, "[SDL] SDL_OpenAudio returned %d (%s)\n", (int)status, SDL_GetError());
+ free(*buf);
+ *buf = playbuf = 0;
+ plrGetBufPos = 0;
+ plrGetPlayPos = 0;
+ plrIdle = 0;
+ plrAdvanceTo = 0;
+ plrGetTimer = 0;
+ return 0;
+ }
+ /*plrRate = sdlSpec.freq;*/
+ SDL_PauseAudio(0);
+ return 1;
+}
+
+static void sdlSetOptions(unsigned int rate, int opt)
+{
+ PRINT(("%s(%u, %d)\n", __FUNCTION__, rate, opt));
+ plrRate=rate; /* fixed */
+ plrOpt=PLR_STEREO|PLR_16BIT|PLR_SIGNEDOUT; /* fixed fixed fixed */
+}
+
+static int sdlInit(const struct deviceinfo *c)
+{
+ char drivername[FILENAME_MAX];
+ int status;
+ PRINT(("%s()\n", __FUNCTION__));
+ status = SDL_InitSubSystem(SDL_INIT_AUDIO);
+ if (status == 0)
+ {
+ fprintf(stderr, "[SDL] Using driver %s\n", SDL_AudioDriverName(drivername, sizeof(drivername)));
+ plrSetOptions=sdlSetOptions;
+ plrPlay=sdlPlay;
+ plrStop=sdlStop;
+ return 1;
+ }
+ fprintf(stderr, "[SDL] SDL_InitSubSystem returned %d (%s)\n", (int)status, SDL_GetError());
+ return 0;
+}
+
+static void sdlClose(void)
+{
+ PRINT(("%s()\n", __FUNCTION__));
+ SDL_QuitSubSystem(SDL_INIT_AUDIO);
+ plrSetOptions=0;
+ plrPlay=0;
+ plrStop=0;
+}
+
+static int sdlDetect(struct deviceinfo *card)
+{
+ PRINT(("%s()\n", __FUNCTION__));
+
+ /* ao is now created, the above is needed only ONCE */
+ card->devtype=&plrSDL;
+ card->port=0;
+ card->port2=0;
+ card->subtype=-1;
+ card->mem=0;
+ card->chan=2;
+
+ return 1;
+}
+
+
+struct sounddevice plrSDL={SS_PLAYER, 0, "SDL Player", sdlDetect, sdlInit, sdlClose, 0};
+
+char *dllinfo="driver plrSDL";
+struct linkinfostruct dllextinfo = {"devpsdl", "OpenCP Player Device: None (c) 1994-09 Niklas Beisert, Tammo Hinrichs", DLLVERSION, 0 LINKINFOSTRUCT_NOEVENTS};

View File

@@ -13,7 +13,7 @@ BUILD {
autoconf
autoheader
automake --add-missing
./configure --prefix=/boot/common
./configure --prefix=`finddir B_COMMON_DIRECTORY`
make
}

View File

@@ -0,0 +1,24 @@
DESCRIPTION="TwoLAME MPEG Audio Layer 2 encoder"
HOMEPAGE="http://www.twolame.org"
SRC_URI="http://downloads.sourceforge.net/twolame/twolame-0.3.13.tar.gz"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
CHECKSUM_MD5="4113d8aa80194459b45b83d4dbde8ddb"
BUILD {
cd twolame-0.3.13
COMMON_DOCS=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
--datadir=`finddir B_COMMON_DATA_DIRECTORY` \
--docdir=$COMMON_DOCS/doc/twolame \
--mandir=$COMMON_DOCS/man
make
}
INSTALL {
cd twolame-0.3.13
make install
}
LICENSE="GNU LGPL v2.1"
COPYRIGHT="2004-2006 The TwoLAME Project"

View File

@@ -11,7 +11,7 @@ BUILD {
aclocal -I m4
automake
autoconf
./configure --prefix=/boot/common
./configure --prefix=`finddir B_COMMON_DIRECTORY`
make
}

View File

@@ -14,7 +14,10 @@ BUILD {
aclocal -I m4
automake
autoconf
./configure --prefix=/boot/common
COMMON_DOCS=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`
./configure --prefix=`finddir B_COMMON_DIRECTORY` \
--datarootdir=`finddir B_COMMON_DATA_DIRECTORY` \
--mandir=$COMMON_DOCS/man
make
}