aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-09-06 13:52:54 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-09-06 13:52:54 +0000
commit813042bf6af6ea4c3e459abcf2b18f4508257384 (patch)
treecf5369284264534190590bed422e44a27a10023d /main
parent92d1bc8f9adebf61f15a0faeacd1aedecd5fe4de (diff)
downloadaports-813042bf6af6ea4c3e459abcf2b18f4508257384.tar.bz2
aports-813042bf6af6ea4c3e459abcf2b18f4508257384.tar.xz
main/libmad: new aport
A high-quality MPEG audio decoder http://www.underbit.com/products/mad/
Diffstat (limited to 'main')
-rw-r--r--main/libmad/APKBUILD40
-rw-r--r--main/libmad/libmad-0.15.1b-cflags-O2.patch12
-rw-r--r--main/libmad/libmad-0.15.1b-cflags.patch146
-rw-r--r--main/libmad/mad.pc11
4 files changed, 209 insertions, 0 deletions
diff --git a/main/libmad/APKBUILD b/main/libmad/APKBUILD
new file mode 100644
index 0000000000..72968faad7
--- /dev/null
+++ b/main/libmad/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: Sebastian Wicki <gandro@gmx.net>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=libmad
+pkgver=0.15.1b
+pkgrel=0
+pkgdesc="A high-quality MPEG audio decoder"
+url="http://www.underbit.com/products/mad/"
+license="GPL"
+subpackages="$pkgname-dev"
+depends=
+makedepends="autoconf automake libtool"
+source="http://downloads.sourceforge.net/sourceforge/mad/$pkgname-$pkgver.tar.gz
+ libmad-0.15.1b-cflags-O2.patch
+ libmad-0.15.1b-cflags.patch
+ mad.pc
+ "
+
+build ()
+{
+ cd "$srcdir"/$pkgname-$pkgver
+ for i in ../*.patch; do
+ msg "Applying $i..."
+ patch -Np1 -i $i || return 1
+ done
+
+ aclocal && autoconf && ./missing --run automake --foreign \
+ && libtoolize --force || return 1
+
+ ./configure --prefix=/usr \
+ --enable-fpm=intel \
+ --enable-accuracy
+
+ make -j1 || return 1
+ make DESTDIR="$pkgdir" install
+ install -D -m644 "$srcdir"/mad.pc "$pkgdir"/usr/lib/pkgconfig/mad.pc
+}
+md5sums="1be543bc30c56fb6bea1d7bf6a64e66c libmad-0.15.1b.tar.gz
+fbda7a1821e2038221deb3f476da034d libmad-0.15.1b-cflags-O2.patch
+bcd6eab331fc316baf4e9c9882fe13f4 libmad-0.15.1b-cflags.patch
+89806934195402446d21d1a83f523b11 mad.pc"
diff --git a/main/libmad/libmad-0.15.1b-cflags-O2.patch b/main/libmad/libmad-0.15.1b-cflags-O2.patch
new file mode 100644
index 0000000000..61b4b13bd7
--- /dev/null
+++ b/main/libmad/libmad-0.15.1b-cflags-O2.patch
@@ -0,0 +1,12 @@
+diff -Naur libmad-0.15.1b-orig/configure.ac libmad-0.15.1b/configure.ac
+--- libmad-0.15.1b-orig/configure.ac 2007-07-01 12:58:13.000000000 -0600
++++ libmad-0.15.1b/configure.ac 2007-07-01 12:59:13.000000000 -0600
+@@ -105,7 +105,7 @@
+ shift
+ ;;
+ -O2)
+- optimize="-O"
++ optimize="-O2"
+ shift
+ ;;
+ -fomit-frame-pointer)
diff --git a/main/libmad/libmad-0.15.1b-cflags.patch b/main/libmad/libmad-0.15.1b-cflags.patch
new file mode 100644
index 0000000000..2ec44e3445
--- /dev/null
+++ b/main/libmad/libmad-0.15.1b-cflags.patch
@@ -0,0 +1,146 @@
+diff -Naur libmad-0.15.1b-orig/configure.ac libmad-0.15.1b/configure.ac
+--- libmad-0.15.1b-orig/configure.ac 2007-06-30 20:22:31.000000000 -0600
++++ libmad-0.15.1b/configure.ac 2007-06-30 20:25:31.000000000 -0600
+@@ -122,74 +122,74 @@
+ esac
+ done
+
+-if test "$GCC" = yes
+-then
+- if test -z "$arch"
+- then
+- case "$host" in
+- i386-*) ;;
+- i?86-*) arch="-march=i486" ;;
+- arm*-empeg-*) arch="-march=armv4 -mtune=strongarm1100" ;;
+- armv4*-*) arch="-march=armv4 -mtune=strongarm" ;;
+- powerpc-*) ;;
+- mips*-agenda-*) arch="-mcpu=vr4100" ;;
+- mips*-luxsonor-*) arch="-mips1 -mcpu=r3000 -Wa,-m4010" ;;
+- esac
+- fi
+-
+- case "$optimize" in
+- -O|"-O "*)
+- optimize="-O"
+- optimize="$optimize -fforce-mem"
+- optimize="$optimize -fforce-addr"
+- : #x optimize="$optimize -finline-functions"
+- : #- optimize="$optimize -fstrength-reduce"
+- optimize="$optimize -fthread-jumps"
+- optimize="$optimize -fcse-follow-jumps"
+- optimize="$optimize -fcse-skip-blocks"
+- : #x optimize="$optimize -frerun-cse-after-loop"
+- : #x optimize="$optimize -frerun-loop-opt"
+- : #x optimize="$optimize -fgcse"
+- optimize="$optimize -fexpensive-optimizations"
+- optimize="$optimize -fregmove"
+- : #* optimize="$optimize -fdelayed-branch"
+- : #x optimize="$optimize -fschedule-insns"
+- optimize="$optimize -fschedule-insns2"
+- : #? optimize="$optimize -ffunction-sections"
+- : #? optimize="$optimize -fcaller-saves"
+- : #> optimize="$optimize -funroll-loops"
+- : #> optimize="$optimize -funroll-all-loops"
+- : #x optimize="$optimize -fmove-all-movables"
+- : #x optimize="$optimize -freduce-all-givs"
+- : #? optimize="$optimize -fstrict-aliasing"
+- : #* optimize="$optimize -fstructure-noalias"
+-
+- case "$host" in
+- arm*-*)
+- optimize="$optimize -fstrength-reduce"
+- ;;
+- mips*-*)
+- optimize="$optimize -fstrength-reduce"
+- optimize="$optimize -finline-functions"
+- ;;
+- i?86-*)
+- optimize="$optimize -fstrength-reduce"
+- ;;
+- powerpc-apple-*)
+- # this triggers an internal compiler error with gcc2
+- : #optimize="$optimize -fstrength-reduce"
+-
+- # this is really only beneficial with gcc3
+- : #optimize="$optimize -finline-functions"
+- ;;
+- *)
+- # this sometimes provokes bugs in gcc 2.95.2
+- : #optimize="$optimize -fstrength-reduce"
+- ;;
+- esac
+- ;;
+- esac
+-fi
++#if test "$GCC" = yes
++#then
++# if test -z "$arch"
++# then
++# case "$host" in
++# i386-*) ;;
++# i?86-*) arch="-march=i486" ;;
++# arm*-empeg-*) arch="-march=armv4 -mtune=strongarm1100" ;;
++# armv4*-*) arch="-march=armv4 -mtune=strongarm" ;;
++# powerpc-*) ;;
++# mips*-agenda-*) arch="-mcpu=vr4100" ;;
++# mips*-luxsonor-*) arch="-mips1 -mcpu=r3000 -Wa,-m4010" ;;
++# esac
++# fi
++#
++# case "$optimize" in
++# -O|"-O "*)
++# optimize="-O"
++# optimize="$optimize -fforce-mem"
++# optimize="$optimize -fforce-addr"
++# : #x optimize="$optimize -finline-functions"
++# : #- optimize="$optimize -fstrength-reduce"
++# optimize="$optimize -fthread-jumps"
++# optimize="$optimize -fcse-follow-jumps"
++# optimize="$optimize -fcse-skip-blocks"
++# : #x optimize="$optimize -frerun-cse-after-loop"
++# : #x optimize="$optimize -frerun-loop-opt"
++# : #x optimize="$optimize -fgcse"
++# optimize="$optimize -fexpensive-optimizations"
++# optimize="$optimize -fregmove"
++# : #* optimize="$optimize -fdelayed-branch"
++# : #x optimize="$optimize -fschedule-insns"
++# optimize="$optimize -fschedule-insns2"
++# : #? optimize="$optimize -ffunction-sections"
++# : #? optimize="$optimize -fcaller-saves"
++# : #> optimize="$optimize -funroll-loops"
++# : #> optimize="$optimize -funroll-all-loops"
++# : #x optimize="$optimize -fmove-all-movables"
++# : #x optimize="$optimize -freduce-all-givs"
++# : #? optimize="$optimize -fstrict-aliasing"
++# : #* optimize="$optimize -fstructure-noalias"
++#
++# case "$host" in
++# arm*-*)
++# optimize="$optimize -fstrength-reduce"
++# ;;
++# mips*-*)
++# optimize="$optimize -fstrength-reduce"
++# optimize="$optimize -finline-functions"
++# ;;
++# i?86-*)
++# optimize="$optimize -fstrength-reduce"
++# ;;
++# powerpc-apple-*)
++# # this triggers an internal compiler error with gcc2
++# : #optimize="$optimize -fstrength-reduce"
++#
++# # this is really only beneficial with gcc3
++# : #optimize="$optimize -finline-functions"
++# ;;
++# *)
++# # this sometimes provokes bugs in gcc 2.95.2
++# : #optimize="$optimize -fstrength-reduce"
++# ;;
++# esac
++# ;;
++# esac
++#fi
+
+ case "$host" in
+ mips*-agenda-*)
diff --git a/main/libmad/mad.pc b/main/libmad/mad.pc
new file mode 100644
index 0000000000..14a66f5525
--- /dev/null
+++ b/main/libmad/mad.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: mad
+Description: MPEG Audio Decoder
+Requires:
+Version: 0.15.0b
+Libs: -L${libdir} -lmad -lm
+Cflags: -I${includedir}