From 76a39bed1cfb79217aa920475a1461a7b14bb7bd Mon Sep 17 00:00:00 2001 From: Scott McCreary Date: Tue, 8 Jun 2010 08:22:12 +0000 Subject: [PATCH] Fixed almp3 .bep file so that it actually builds now, but it's probably not correct. It's creating a libalmp3.so and libalmp3.a, but probably only one of these is correct. TODO: Figure out which one is correct and add a better patch so that it correctly builds the other one. --- media-libs/almp3/almp3-2.0.4.bep | 10 +++-- media-libs/almp3/patches/almp3-2.0.4.patch | 50 ++++++++++++++++++++++ 2 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 media-libs/almp3/patches/almp3-2.0.4.patch diff --git a/media-libs/almp3/almp3-2.0.4.bep b/media-libs/almp3/almp3-2.0.4.bep index 692b4780c..e86b5a825 100644 --- a/media-libs/almp3/almp3-2.0.4.bep +++ b/media-libs/almp3/almp3-2.0.4.bep @@ -7,15 +7,19 @@ DEPEND="media-libs/allegro >= 4.4" CHECKSUM_MD5="8fe1517750acf23c07442b31447791a8" BUILD { cd almp3 - make TARGET=LINUX_STATIC + mkdir -p obj/haiku/dynamic + mkdir -p obj/haiku/static + mkdir -p lib/haiku + make TARGET=HAIKU_STATIC + make TARGET=HAIKU_SHARED } INSTALL { cd almp3 + make install prefix=/boot/common \ INSTALL="install -c" \ - INSTALL_INFO="install-info" \ - TARGET=LINUX_STATIC + INSTALL_INFO="install-info" } LICENSE="GNU LGPL v2.1" diff --git a/media-libs/almp3/patches/almp3-2.0.4.patch b/media-libs/almp3/patches/almp3-2.0.4.patch new file mode 100644 index 000000000..ee80c22cd --- /dev/null +++ b/media-libs/almp3/patches/almp3-2.0.4.patch @@ -0,0 +1,50 @@ +diff -urN almp3/Makefile almp3-haiku/Makefile +--- almp3/Makefile 2005-07-26 02:36:11.066846720 +0000 ++++ almp3-haiku/Makefile 2010-06-08 08:16:15.839909376 +0000 +@@ -7,7 +7,7 @@ + #TARGET=MINGW32_STATIC + #TARGET=MINGW32_DLL + #TARGET=LINUX_STATIC +-TARGET=SOLARIS_DYNAMIC ++#TARGET=SOLARIS_DYNAMIC + + prefix = /opt/BCallegro + exec_prefix = ${prefix} +@@ -60,6 +60,19 @@ + endif + + ++# HAIKU_STATIC ++ifeq ($(TARGET),HAIKU_STATIC) ++TARGETFLAGS=-Wall -O2 -march=pentium -fomit-frame-pointer -finline-functions -ffast-math ++OBJDIR=obj/haiku/static ++LIBDEST=lib/libalmp3.a ++endif ++ ++# HAIKU_SHARED ++ifeq ($(TARGET),HAIKU_SHARED) ++TARGETFLAGS=-Wall -O2 -march=pentium -fomit-frame-pointer -finline-functions -ffast-math ++OBJDIR=obj/haiku/dynamic ++LIBDEST=lib/libalmp3.so ++endif + + # LINUX_STATIC + ifeq ($(TARGET),LINUX_STATIC) +@@ -106,7 +119,6 @@ + endif + endif + +- + # compiling of the library + %.o: %.c + $(CC) -c $(CFLAGS) $< -o $(OBJDIR)/$@ +@@ -118,7 +130,8 @@ + $(INSTALL_DATA) -D docs/AUTHORS.txt $(DESTDIR)$(docdir)/almp3/AUTHORS.txt + $(INSTALL_DATA) -D docs/COPYING.txt $(DESTDIR)$(docdir)/almp3/COPYING.txt + $(INSTALL_DATA) -D include/almp3.h $(DESTDIR)$(includedir)/almp3.h +- $(INSTALL) -m 755 -D $(LIBDEST) $(DESTDIR)$(libdir)/libalmp3.so ++ $(INSTALL) -m 755 -D lib/libalmp3.so $(DESTDIR)$(libdir)/libalmp3.so ++ $(INSTALL) -m 755 -D lib/libalmp3.a $(DESTDIR)$(libdir)/libalmp3.a + + clean: + rm -f $(OBJECTS2) $(LIBDEST) $(LIBIMP)