Added libsndfile, note that it only builds on gcc4 though. Updated ilmbase to stable, but only for gcc4 as well.

This commit is contained in:
Scott McCreary
2010-09-30 15:12:04 +00:00
parent 545cad4971
commit bf3c494d1e
3 changed files with 84 additions and 1 deletions

View File

@@ -3,7 +3,8 @@ HOMEPAGE="http://www.openexr.com"
SRC_URI="http://download.savannah.nongnu.org/releases/openexr/ilmbase-1.0.2.tar.gz"
REVISION="1"
CHECKSUM_MD5="26c133ee8ca48e1196fbfb3ffe292ab4"
STATUS_HAIKU="broken"
MESSAGE="This port only builds with gcc4. Use 'setgcc gcc4' before building."
STATUS_HAIKU="stable"
DEPEND=""
BUILD {
cd ilmbase-1.0.2

View File

@@ -0,0 +1,38 @@
DESCRIPTION="Libsndfile is a C library for reading and writing files containing sampled sound"
HOMEPAGE="http://www.mega-nerd.com/libsndfile"
SRC_URI="http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.21.tar.gz"
CHECKSUM_MD5="880a40ec636ab2185b97f8927299b292"
REVISION="1"
MESSAGE="This port only builds with gcc4. Use 'setgcc gcc4' before building."
STATUS_HAIKU="stable"
DEPEND="media-libs/flac >= 1.2.1
media-libs/libogg >= 1.2.0
media-libs/libvorbis >= 1.3.1"
BUILD {
cd libsndfile-1.0.21
rm aclocal.m4
cp /boot/common/share/aclocal/libtool.m4 M4
cp /boot/common/share/aclocal/ltoptions.m4 M4
cp /boot/common/share/aclocal/ltversion.m4 M4
cp /boot/common/share/aclocal/ltsugar.m4 M4
cp /boot/common/share/aclocal/lt~obsolete.m4 M4
echo "AC_CONFIG_MACRO_DIR([M4]) >> configure.in"
libtoolize --force --copy --install
aclocal -I M4
autoconf
autoheader
automake
./configure --prefix=/boot/common
make
}
INSTALL {
cd libsndfile-1.0.21
make install
}
LICENSE="GNU LGPL v2.1
GNU LGPL v3"
COPYRIGHT="1999-2009 Erik de Castro Lopo"

View File

@@ -0,0 +1,44 @@
diff -Naur libsndfile-1.0.21/programs/Makefile.am libsndfile-1.0.21-haiku/programs/Makefile.am
--- libsndfile-1.0.21/programs/Makefile.am 2009-12-09 10:56:35.001048576 +0000
+++ libsndfile-1.0.21-haiku/programs/Makefile.am 2010-08-09 17:15:51.864813056 +0000
@@ -16,8 +16,8 @@
sndfile_info_SOURCES = sndfile-info.c
sndfile_info_LDADD = $(top_builddir)/src/libsndfile.la
-sndfile_play_SOURCES = sndfile-play.c
-sndfile_play_LDADD = $(top_builddir)/src/libsndfile.la $(OS_SPECIFIC_LINKS) $(ALSA_LIBS)
+sndfile_play_SOURCES = sndfile-play-beos.cpp test-sndfile-metadata-set.py
+sndfile_play_LDADD = $(top_builddir)/src/libsndfile.la $(OS_SPECIFIC_LINKS) $(ALSA_LIBS) -lbe -lmedia
sndfile_convert_SOURCES = sndfile-convert.c common.c common.h
sndfile_convert_LDADD = $(top_builddir)/src/libsndfile.la
diff -Naur libsndfile-1.0.21/programs/sndfile-play-beos.cpp libsndfile-1.0.21-haiku/programs/sndfile-play-beos.cpp
--- libsndfile-1.0.21/programs/sndfile-play-beos.cpp 2009-03-22 19:17:13.066846720 +0000
+++ libsndfile-1.0.21-haiku/programs/sndfile-play-beos.cpp 2010-08-09 16:57:35.000000000 +0000
@@ -30,7 +30,7 @@
** BeOS functions for playing a sound.
*/
-#if defined (__BEOS__)
+#if defined(__BEOS__) || defined(__HAIKU__)
struct shared_data
{
@@ -60,7 +60,7 @@
{ for (m = readcount ; m < count ; m++)
buffer [m] = 0 ;
}
- if (data->sfinfo.pcmbitwidth < 16)
+ if (readcount > count)
{ for (m = 0 ; m < count ; m++)
buffer [m] *= 256 ;
}
@@ -78,7 +78,7 @@
for (k = 1 ; k < argc ; k++)
{ printf ("Playing %s\n", argv [k]) ;
- if (! (data.sndfile = sf_open_read (argv [k], &data.sfinfo)))
+ if (! (data.sndfile = sf_open (argv [k], SFM_READ, &data.sfinfo)))
{ sf_perror (NULL) ;
continue ;
} ;