summaryrefslogtreecommitdiff
path: root/media-libs/libmad
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-libs/libmad
reinit the tree, so we can have metadata
Diffstat (limited to 'media-libs/libmad')
-rw-r--r--media-libs/libmad/Manifest9
-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-0.15.1b-gcc44-mips-h-constraint-removal.patch77
-rw-r--r--media-libs/libmad/files/mad.pc11
-rw-r--r--media-libs/libmad/libmad-0.15.1b-r8.ebuild77
-rw-r--r--media-libs/libmad/metadata.xml11
7 files changed, 343 insertions, 0 deletions
diff --git a/media-libs/libmad/Manifest b/media-libs/libmad/Manifest
new file mode 100644
index 000000000000..e57c8eb1ec43
--- /dev/null
+++ b/media-libs/libmad/Manifest
@@ -0,0 +1,9 @@
+AUX libmad-0.15.1b-cflags-O2.patch 347 SHA256 197bd69c064ba2957b23d83509c9fdc63c5315076fdf8c98dbc9eccd3ff236ca SHA512 13a8bac30cea4861f903b4abc8673f9a35b6253aae6a02915f99b67e5e8c56460fc1fb059a0aa52143b665f888928baba098daf0ed022420e46317be4dbc6161 WHIRLPOOL 201bc101ae0a6a708f7ac75f266e0e7651f0e36c15564153d5e8793924ebd36e1818666bb1617aa8de61104c22933bba81ce269e79b59c798de0e861d92b467f
+AUX libmad-0.15.1b-cflags.patch 4867 SHA256 0d92977b30b599be8d423e9bec39c0f76b9dbc0f38dbc98a397394c30e28243e SHA512 01dc8421dba2b652aa8ca6d1f1a5c310645465b18190ebfdeaae516de881869957e8e7c0c373d0d09623da33719d01e028f2f6164790b54c43a71271f5b4dbba WHIRLPOOL eca69695be9cb684c08969cef257d26995427e1a55e5e03c6910cccd8e5e6baeb6ac4073ab002e6f74ca43cc4d0da331d78f44d49a8c8c7ba350fa8c8b54b8dc
+AUX libmad-0.15.1b-gcc44-mips-h-constraint-removal.patch 2377 SHA256 328e42102e637273502831d5c45b29e765073d08328de1e8ed6280958877eae5 SHA512 de08e0ce3c39b76c2838f940279a39c26e9c7e5b1e762c44f0db1ce3f65364e51036ad4f4ccdc160d80660c723a1bede70a4b505a9a01583de43ebc47aaeedb9 WHIRLPOOL 9c6ac55db53e77b0c2c0f5eaddfb33e68e1cf92c65592dec9c12b57bc00f88f8ea6b33dca5786df95d0296a8366695f8f9b9f30eac2363b79936f3161f1185f5
+AUX mad.pc 211 SHA256 821918a6be761d7b8a697af951e4a9a5d2e48920cd80c9b6b9fa19d78afcf3b3 SHA512 ec0b14bd0c6236a216107b507b92c06e295352f1657ba5e45f37fff220a73e1454b262ac36fc715d698c4ffd210d348fca71cf0198e2c49d16fe0ec5ea839f08 WHIRLPOOL 7d7468443e65ad4c332d2a4c726f862111505e91ec59028ee8f11d7c5b900d6c01df78424c7045e01a01c17aae5ce208401aba4e49c74b10f7812c99b1fcf3ab
+DIST libmad-0.15.1b.tar.gz 502379 SHA256 bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690 SHA512 2cad30347fb310dc605c46bacd9da117f447a5cabedd8fefdb24ab5de641429e5ec5ce8af7aefa6a75a3f545d3adfa255e3fa0a2d50971f76bc0c4fc0400cc45 WHIRLPOOL 7453ec587711c3de1a221316e88ef9039e4d2002f5a87a3957ed479899e5cc11fb8e89128f251cfd028c1fb9b89eca6b45aa5cb07f4a5e4f9a92086180084de5
+EBUILD libmad-0.15.1b-r8.ebuild 2389 SHA256 2f01091487de4a45ab198a77cfed29506e26c6c1ded04e031225a817051a75f2 SHA512 31c52f13e271d9e90aa3af1ce236bb3308c1f483bc39f186c95200742f5e513094d6a2b0934f56bfb97a6cc9636f875e6675bc321b2ea09fffd01ac7a5742ef6 WHIRLPOOL d2689eade186dd142f297cf30dda4a27a389b48d9859011ac368d3b05e3cd8ae114f90eb3a9b7aa9c904625c7d9ad817fbe2ae5e2f284adeee4f93b60e655ee4
+MISC ChangeLog 2591 SHA256 df6d3f4655cd48b63dc5d9177354c8807a0c1aa563ca2f5ca110828699e4be2b SHA512 5496d9156aaf6fed2286e394f2a89b480afd6349f87337c9d60f0c037a1df345c655fb11568f90de5bc487ed9e196fce638583e86c9c0ff9c9c42b3eae4f1382 WHIRLPOOL bddffb7c70dc74e550e9396e7cc63bfad7bd3545514d441136f4d067a731e77b48b0c46daa9c7ce72a6774dda9d5ffa687a0d52a2499c412596ecb450fc265da
+MISC ChangeLog-2015 11001 SHA256 193618b03004866d199c58393d479e24bde74b2fc2e8f01db1c50aca8166e4fe SHA512 98ca73b9632c625a0b5af0e1b916a15cf2064cc714a7f0b4a48d9404c137313311d9653eda6dec8f30c6ae8437f245587191a49b762bf62576345119c781891b WHIRLPOOL 57d2a3953af5d306acc92514f99d5d36993bd29c872a9a6e489e3b6c6466e2cfd2983e759f8e45a9337b50cd0b6b41bf7515da24da09aec4657da9f08626e9ee
+MISC metadata.xml 326 SHA256 c5bff3d046dcaada983011140e6f5f93e812aa8f551320fb6b26d796d6e1032f SHA512 b6c3a0765c5d00fd44caf7266edb75a373d8d4e813ac7f68507067f57713090fdc84f95886e73401d9c912f7f64453c975117030692526a49aebd6f5276751c9 WHIRLPOOL 2b29e508649777b666708af5ab1cdcb8e979e3bbef64646432cc34d1348ed94cca5eac226d98de90305531db4faee4c0d34bf526f370f20cdc465aaa9df44aab
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 000000000000..61b4b13bd73e
--- /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 000000000000..2ec44e344562
--- /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-0.15.1b-gcc44-mips-h-constraint-removal.patch b/media-libs/libmad/files/libmad-0.15.1b-gcc44-mips-h-constraint-removal.patch
new file mode 100644
index 000000000000..bff7afe6b6bc
--- /dev/null
+++ b/media-libs/libmad/files/libmad-0.15.1b-gcc44-mips-h-constraint-removal.patch
@@ -0,0 +1,77 @@
+libmad: MIPS GCC-4.4 build fixes
+
+GCC-4.4 on MIPS removed the "h" asm constraint, fix this up.
+Taken from OE.
+
+http://patchwork.openembedded.org/patch/921/
+
+diff -ur libmad-0.15.1b-orig/fixed.h libmad-0.15.1b/fixed.h
+--- libmad-0.15.1b-orig/fixed.h 2004-02-17 12:32:03.000000000 +1030
++++ libmad-0.15.1b/fixed.h 2009-08-05 10:46:30.000000000 +0930
+@@ -299,6 +299,23 @@
+
+ # elif defined(FPM_MIPS)
+
++/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */
++#if defined (__GNUC__) && defined (__GNUC_MINOR__)
++#define __GNUC_PREREQ(maj, min) \
++ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
++#else
++#define __GNUC_PREREQ(maj, min) 0
++#endif
++
++#if __GNUC_PREREQ(4,4)
++ typedef unsigned int u64_di_t __attribute__ ((mode (DI)));
++# define MAD_F_MLX(hi, lo, x, y) \
++ do { \
++ u64_di_t __ll = (u64_di_t) (x) * (y); \
++ hi = __ll >> 32; \
++ lo = __ll; \
++ } while (0)
++#else
+ /*
+ * This MIPS version is fast and accurate; the disposition of the least
+ * significant bit depends on OPT_ACCURACY via mad_f_scale64().
+@@ -328,6 +345,7 @@
+ : "%r" ((x) >> 12), "r" ((y) >> 16))
+ # define MAD_F_MLZ(hi, lo) ((mad_fixed_t) (lo))
+ # endif
++#endif /* __GNU_PREREQ(4,4) */
+
+ # if defined(OPT_SPEED)
+ # define mad_f_scale64(hi, lo) \
+diff -ur libmad-0.15.1b-orig/mad.h libmad-0.15.1b/mad.h
+--- libmad-0.15.1b-orig/mad.h 2004-02-17 13:25:44.000000000 +1030
++++ libmad-0.15.1b/mad.h 2009-08-05 10:42:40.000000000 +0930
+@@ -344,6 +344,23 @@
+
+ # elif defined(FPM_MIPS)
+
++/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */
++#if defined (__GNUC__) && defined (__GNUC_MINOR__)
++#define __GNUC_PREREQ(maj, min) \
++ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
++#else
++#define __GNUC_PREREQ(maj, min) 0
++#endif
++
++#if __GNUC_PREREQ(4,4)
++ typedef unsigned int u64_di_t __attribute__ ((mode (DI)));
++# define MAD_F_MLX(hi, lo, x, y) \
++ do { \
++ u64_di_t __ll = (u64_di_t) (x) * (y); \
++ hi = __ll >> 32; \
++ lo = __ll; \
++ } while (0)
++#else
+ /*
+ * This MIPS version is fast and accurate; the disposition of the least
+ * significant bit depends on OPT_ACCURACY via mad_f_scale64().
+@@ -373,6 +390,7 @@
+ : "%r" ((x) >> 12), "r" ((y) >> 16))
+ # define MAD_F_MLZ(hi, lo) ((mad_fixed_t) (lo))
+ # endif
++#endif /* __GNU_PREREQ(4,4) */
+
+ # if defined(OPT_SPEED)
+ # define mad_f_scale64(hi, lo) \
diff --git a/media-libs/libmad/files/mad.pc b/media-libs/libmad/files/mad.pc
new file mode 100644
index 000000000000..14a66f552582
--- /dev/null
+++ b/media-libs/libmad/files/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}
diff --git a/media-libs/libmad/libmad-0.15.1b-r8.ebuild b/media-libs/libmad/libmad-0.15.1b-r8.ebuild
new file mode 100644
index 000000000000..50520a655d24
--- /dev/null
+++ b/media-libs/libmad/libmad-0.15.1b-r8.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools epatch flag-o-matic libtool ltprune multilib-minimal
+
+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 ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="debug static-libs"
+
+DEPEND=""
+RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20130224-r3
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
+
+DOCS=( CHANGES CREDITS README TODO VERSION )
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/mad.h
+)
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/libmad-0.15.1b-cflags.patch \
+ "${FILESDIR}"/libmad-0.15.1b-cflags-O2.patch \
+ "${FILESDIR}"/libmad-0.15.1b-gcc44-mips-h-constraint-removal.patch
+
+ # bug 467002
+ sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac || die
+
+ eautoreconf
+ # unnecessary when eautoreconf'd
+# elibtoolize
+ # unnecessary when eautoreconf'd with new autoconf, for example, 2.69
+# epunt_cxx #74490
+}
+
+multilib_src_configure() {
+ 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+=" --enable-fpm=64bit"
+
+ [[ $(tc-arch) == "amd64" ]] && myconf+=" --enable-fpm=64bit"
+ [[ $(tc-arch) == "x86" ]] && myconf+=" --enable-fpm=intel"
+ [[ $(tc-arch) == "ppc" ]] && myconf+=" --enable-fpm=default"
+ [[ $(tc-arch) == "ppc64" ]] && myconf+=" --enable-fpm=64bit"
+
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable debug debugging) \
+ $(use_enable static-libs static) \
+ ${myconf}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ # This file must be updated with each version update
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins "${FILESDIR}"/mad.pc
+
+ # Use correct libdir in pkgconfig file
+ sed -i -e "s:^libdir.*:libdir=${EPREFIX}/usr/$(get_libdir):" \
+ "${ED}"/usr/$(get_libdir)/pkgconfig/mad.pc
+
+ prune_libtool_files --all
+}
diff --git a/media-libs/libmad/metadata.xml b/media-libs/libmad/metadata.xml
new file mode 100644
index 000000000000..e929ca1abedc
--- /dev/null
+++ b/media-libs/libmad/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sound@gentoo.org</email>
+ <name>Gentoo Sound project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">mad</remote-id>
+ </upstream>
+</pkgmetadata>