Commit 8995ee12 authored by Joel A Fernandes's avatar Joel A Fernandes Committed by Koen Kooi

libmad: Imported from OE-classic

Updated LICENSE version to GPLv2
Signed-off-by: default avatarJoel A Fernandes <joelagnel@ti.com>
Signed-off-by: default avatarKoen Kooi <koen@dominion.thruhere.net>
parent 3f205903
Here is a patch for adding pkg-config support to libmad.
It would make life a bit easier for distro maintainers if this was applied.
In case you didn't know, pkg-config is a tool for providing LDFLAGS and
CFLAGS for packages using shared libraries. It's on freedesktop.org.
Debian has already been distributing the pkg-config file mad.pc with
libmad for some time, and people developing on debian (notably xmms2
developers) have started relying on this support being present, causing
some confusion for people installing from source and on some BSDs which
do not provide mad.pc (google: pkgconfig libmad).
EMH
--h31gzZEtNLTqOjlF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=&quot;libmad-0.15.1b-pkgconfig.patch&quot;
diff -Naur libmad-0.15.1b.old/configure.ac libmad-0.15.1b/configure.ac
--- libmad-0.15.1b.old/configure.ac 2004-01-23 10:41:32.000000000 +0100
+++ libmad-0.15.1b/configure.ac 2004-08-07 02:25:24.633462168 +0200
@@ -429,5 +429,5 @@
dnl AC_SUBST(LTLIBOBJS)
AC_CONFIG_FILES([Makefile msvc++/Makefile \
- libmad.list])
+ libmad.list mad.pc])
AC_OUTPUT
diff -Naur libmad-0.15.1b.old/mad.pc.in libmad-0.15.1b/mad.pc.in
--- libmad-0.15.1b.old/mad.pc.in 1970-01-01 01:00:00.000000000 +0100
+++ libmad-0.15.1b/mad.pc.in 2004-08-07 02:04:59.617692872 +0200
@@ -0,0 +1,14 @@
+# libmad pkg-config source file
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: mad
+Description: MPEG Audio Decoder
+Version: @VERSION@
+Requires:
+Conflicts:
+Libs: -L${libdir} -lmad -lm
+Cflags: -I${includedir}
diff -Naur libmad-0.15.1b.old/Makefile.am libmad-0.15.1b/Makefile.am
--- libmad-0.15.1b.old/Makefile.am 2004-02-17 03:02:03.000000000 +0100
+++ libmad-0.15.1b/Makefile.am 2004-08-07 02:03:19.859858368 +0200
@@ -24,6 +24,9 @@
SUBDIRS =
DIST_SUBDIRS = msvc++
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = mad.pc
+
lib_LTLIBRARIES = libmad.la
include_HEADERS = mad.h
@@ -34,7 +37,8 @@
minimad_LDADD = libmad.la
EXTRA_DIST = mad.h.sed \
- CHANGES COPYRIGHT CREDITS README TODO VERSION
+ CHANGES COPYRIGHT CREDITS README TODO VERSION \
+ mad.pc.in
exported_headers = version.h fixed.h bit.h timer.h stream.h frame.h \
synth.h decoder.h
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) \
--- /tmp/configure.ac 2008-07-11 10:19:17.000000000 +0200
+++ libmad-0.15.1b/configure.ac 2008-07-11 10:20:00.313198000 +0200
@@ -140,21 +140,14 @@
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"
DESCRIPTION = "MPEG Audio Decoder Library"
SECTION = "libs"
DEPENDS = "libid3tag"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
SRC_URI = "${SOURCEFORGE_MIRROR}/mad/libmad-${PV}.tar.gz \
file://add-pkgconfig.patch \
file://mad.diff \
file://mad-mips-h-constraint.patch"
SRC_URI_append_avr32 = " file://libmad-0.15.1b-avr32-optimization.patch"
SRC_URI[md5sum] = "1be543bc30c56fb6bea1d7bf6a64e66c"
SRC_URI[sha256sum] = "bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690"
S = "${WORKDIR}/libmad-${PV}"
inherit autotools pkgconfig
EXTRA_OECONF = "-enable-speed --enable-shared"
# The ASO's don't take any account of thumb...
EXTRA_OECONF_append_thumb = " --disable-aso --enable-fpm=default"
EXTRA_OECONF_append_arm = " --enable-fpm=arm"
do_configure_prepend () {
# damn picky automake...
touch NEWS AUTHORS ChangeLog
}
ARM_INSTRUCTION_SET = "arm"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment