aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven 'sleipnir' Rebhan <odinshorse@googlemail.com>2009-07-02 16:33:16 +0000
committerSven 'sleipnir' Rebhan <odinshorse@googlemail.com>2009-07-02 16:33:16 +0000
commite4116bd95e6ac0b396230420594692374234df13 (patch)
tree802ccbf75790deb87534af4a87697086441fcd33 /media-libs/libmad
parentBetter fix for libid3tag pkg-config file handling. (diff)
downloadembedded-cross-e4116bd95e6ac0b396230420594692374234df13.tar.gz
embedded-cross-e4116bd95e6ac0b396230420594692374234df13.tar.bz2
embedded-cross-e4116bd95e6ac0b396230420594692374234df13.zip
Better fix for libmad pkg-config file handling.
Diffstat (limited to 'media-libs/libmad')
-rw-r--r--media-libs/libmad/Manifest5
-rw-r--r--media-libs/libmad/files/libmad-0.15.1b-cflags-O2.patch12
-rw-r--r--media-libs/libmad/files/libmad-0.15.1b-cflags.patch146
-rw-r--r--media-libs/libmad/files/libmad-pkg-config.patch35
-rw-r--r--media-libs/libmad/libmad-0.15.1b-r5.ebuild60
5 files changed, 258 insertions, 0 deletions
diff --git a/media-libs/libmad/Manifest b/media-libs/libmad/Manifest
new file mode 100644
index 0000000..0da5de7
--- /dev/null
+++ b/media-libs/libmad/Manifest
@@ -0,0 +1,5 @@
+AUX libmad-0.15.1b-cflags-O2.patch 347 RMD160 a2a0059dc8fb2c8f526a09fc250b5c16907e687a SHA1 334c2e88e180d8d4757934973f32f3ac270744bf SHA256 197bd69c064ba2957b23d83509c9fdc63c5315076fdf8c98dbc9eccd3ff236ca
+AUX libmad-0.15.1b-cflags.patch 4867 RMD160 9103cec98f6dc746fd05e385159484098c6347b3 SHA1 e6e8c0de26ed6ef6ccfb6d1ea6e8b682695e1144 SHA256 0d92977b30b599be8d423e9bec39c0f76b9dbc0f38dbc98a397394c30e28243e
+AUX libmad-pkg-config.patch 897 RMD160 8f26cd7539b35c6c12cd8767b3b436d8b18eca2b SHA1 39bb2e3b5a3a915fc6d2620a20ac8410d0532396 SHA256 02ceb1c3015e377a52b1952070a241a53c47563a2a06695d4a674b762d25c799
+DIST libmad-0.15.1b.tar.gz 502379 RMD160 0f3415ee10b188681e282ca69dec74c46ca73b0f SHA1 cac19cd00e1a907f3150cc040ccc077783496d76 SHA256 bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690
+EBUILD libmad-0.15.1b-r5.ebuild 1758 RMD160 9793f4edd46f279ea3216667a05c9be225546ddc SHA1 2f465d5f8f643655ab87af3e85beff0b2bd997b1 SHA256 cd3b3d7862e2d55cae917804325ce90ac7f4eb42bac05e688f14341a88c1779f
diff --git a/media-libs/libmad/files/libmad-0.15.1b-cflags-O2.patch b/media-libs/libmad/files/libmad-0.15.1b-cflags-O2.patch
new file mode 100644
index 0000000..61b4b13
--- /dev/null
+++ b/media-libs/libmad/files/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/media-libs/libmad/files/libmad-0.15.1b-cflags.patch b/media-libs/libmad/files/libmad-0.15.1b-cflags.patch
new file mode 100644
index 0000000..2ec44e3
--- /dev/null
+++ b/media-libs/libmad/files/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/media-libs/libmad/files/libmad-pkg-config.patch b/media-libs/libmad/files/libmad-pkg-config.patch
new file mode 100644
index 0000000..60523dd
--- /dev/null
+++ b/media-libs/libmad/files/libmad-pkg-config.patch
@@ -0,0 +1,35 @@
+--- /dev/null 2009-07-02 12:43:53.540375369 +0200
++++ mad.pc.in 2009-07-02 16:28:24.000000000 +0200
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: mad
++Description: MPEG Audio Decoder
++Requires:
++Version: @VERSION@
++Libs: -L${libdir} -lmad -lm
++Cflags: -I${includedir}
+--- Makefile.am 2004-02-17 03:02:03.000000000 +0100
++++ Makefile.am.new 2009-07-02 16:29:17.000000000 +0200
+@@ -59,6 +59,9 @@
+ BUILT_SOURCES = mad.h
+ CLEANFILES = mad.h
+
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = mad.pc
++
+ ## From the libtool documentation on library versioning:
+ ##
+ ## CURRENT
+--- configure.ac 2009-07-02 16:24:09.000000000 +0200
++++ configure.ac.new 2009-07-02 16:29:45.000000000 +0200
+@@ -429,5 +429,5 @@
+ dnl AC_SUBST(LTLIBOBJS)
+
+ AC_CONFIG_FILES([Makefile msvc++/Makefile \
+- libmad.list])
++ libmad.list mad.pc])
+ AC_OUTPUT
diff --git a/media-libs/libmad/libmad-0.15.1b-r5.ebuild b/media-libs/libmad/libmad-0.15.1b-r5.ebuild
new file mode 100644
index 0000000..6f466f3
--- /dev/null
+++ b/media-libs/libmad/libmad-0.15.1b-r5.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libmad/libmad-0.15.1b-r5.ebuild,v 1.1 2008/04/18 21:14:50 flameeyes Exp $
+
+inherit eutils autotools libtool flag-o-matic
+
+DESCRIPTION="\"M\"peg \"A\"udio \"D\"ecoder library"
+HOMEPAGE="http://mad.sourceforge.net"
+SRC_URI="mirror://sourceforge/mad/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="debug"
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/libmad-0.15.1b-cflags.patch"
+ epatch "${FILESDIR}/libmad-0.15.1b-cflags-O2.patch"
+ epatch "${FILESDIR}/libmad-pkg-config.patch"
+
+ eautoreconf
+
+ elibtoolize
+ epunt_cxx #74490
+}
+
+src_compile() {
+ local myconf="--enable-accuracy"
+ # --enable-speed optimize for speed over accuracy
+ # --enable-accuracy optimize for accuracy over speed
+ # --enable-experimental enable code using the EXPERIMENTAL
+ # preprocessor define
+
+ # Fix for b0rked sound on sparc64 (maybe also sparc32?)
+ # default/approx is also possible, uses less cpu but sounds worse
+ use sparc && myconf="${myconf} --enable-fpm=64bit"
+
+ [[ $(tc-arch) == "amd64" ]] && myconf="${myconf} --enable-fpm=64bit"
+ [[ $(tc-arch) == "x86" ]] && myconf="${myconf} --enable-fpm=intel"
+ [[ $(tc-arch) == "ppc" ]] && myconf="${myconf} --enable-fpm=ppc"
+ [[ $(tc-arch) == "ppc64" ]] && myconf="${myconf} --enable-fpm=64bit"
+
+ econf \
+ $(use_enable debug debugging) \
+ ${myconf} || die "configure failed"
+ emake || die "make failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "make install failed"
+
+ dodoc CHANGES CREDITS README TODO VERSION
+
+ find "${D}" -name '*.la' -delete
+}