diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2016-06-16 14:00:06 +0300 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2016-07-29 10:59:41 +0200 |
commit | ecf41acf0dacf2068e9eab0b58f8f9ed8bda5805 (patch) | |
tree | c0b437c56ecaa2f350995eadd6c1e6a19eb07dbf | |
parent | 1f87c7f3b29ef972a08500a912d1a3ff1ed814c8 (diff) | |
download | meta-openembedded-ecf41acf0dacf2068e9eab0b58f8f9ed8bda5805.tar.gz |
libmad: add the recipe
The recipe has been removed from oe-core, see https://bugzilla.yoctoproject.org/show_bug.cgi?id=6020
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
6 files changed, 183 insertions, 0 deletions
diff --git a/meta-oe/recipes-multimedia/libmad/libmad/add-pkgconfig.patch b/meta-oe/recipes-multimedia/libmad/libmad/add-pkgconfig.patch new file mode 100644 index 000000000..b49dc8c98 --- /dev/null +++ b/meta-oe/recipes-multimedia/libmad/libmad/add-pkgconfig.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | Here is a patch for adding pkg-config support to libmad. | ||
2 | It would make life a bit easier for distro maintainers if this was applied. | ||
3 | In case you didn't know, pkg-config is a tool for providing LDFLAGS and | ||
4 | CFLAGS for packages using shared libraries. It's on freedesktop.org. | ||
5 | Debian has already been distributing the pkg-config file mad.pc with | ||
6 | libmad for some time, and people developing on debian (notably xmms2 | ||
7 | developers) have started relying on this support being present, causing | ||
8 | some confusion for people installing from source and on some BSDs which | ||
9 | do not provide mad.pc (google: pkgconfig libmad). | ||
10 | |||
11 | EMH | ||
12 | |||
13 | Upstream-Status: Inappropriate [configuration] | ||
14 | |||
15 | --h31gzZEtNLTqOjlF | ||
16 | Content-Type: text/plain; charset=us-ascii | ||
17 | Content-Disposition: attachment; filename="libmad-0.15.1b-pkgconfig.patch" | ||
18 | |||
19 | diff -Naur libmad-0.15.1b.old/configure.ac libmad-0.15.1b/configure.ac | ||
20 | --- libmad-0.15.1b.old/configure.ac 2004-01-23 10:41:32.000000000 +0100 | ||
21 | +++ libmad-0.15.1b/configure.ac 2004-08-07 02:25:24.633462168 +0200 | ||
22 | @@ -429,5 +429,5 @@ | ||
23 | dnl AC_SUBST(LTLIBOBJS) | ||
24 | |||
25 | AC_CONFIG_FILES([Makefile msvc++/Makefile \ | ||
26 | - libmad.list]) | ||
27 | + libmad.list mad.pc]) | ||
28 | AC_OUTPUT | ||
29 | diff -Naur libmad-0.15.1b.old/mad.pc.in libmad-0.15.1b/mad.pc.in | ||
30 | --- libmad-0.15.1b.old/mad.pc.in 1970-01-01 01:00:00.000000000 +0100 | ||
31 | +++ libmad-0.15.1b/mad.pc.in 2004-08-07 02:04:59.617692872 +0200 | ||
32 | @@ -0,0 +1,14 @@ | ||
33 | +# libmad pkg-config source file | ||
34 | + | ||
35 | +prefix=@prefix@ | ||
36 | +exec_prefix=@exec_prefix@ | ||
37 | +libdir=@libdir@ | ||
38 | +includedir=@includedir@ | ||
39 | + | ||
40 | +Name: mad | ||
41 | +Description: MPEG Audio Decoder | ||
42 | +Version: @VERSION@ | ||
43 | +Requires: | ||
44 | +Conflicts: | ||
45 | +Libs: -L${libdir} -lmad -lm | ||
46 | +Cflags: -I${includedir} | ||
47 | diff -Naur libmad-0.15.1b.old/Makefile.am libmad-0.15.1b/Makefile.am | ||
48 | --- libmad-0.15.1b.old/Makefile.am 2004-02-17 03:02:03.000000000 +0100 | ||
49 | +++ libmad-0.15.1b/Makefile.am 2004-08-07 02:03:19.859858368 +0200 | ||
50 | @@ -24,6 +24,9 @@ | ||
51 | SUBDIRS = | ||
52 | DIST_SUBDIRS = msvc++ | ||
53 | |||
54 | +pkgconfigdir = $(libdir)/pkgconfig | ||
55 | +pkgconfig_DATA = mad.pc | ||
56 | + | ||
57 | lib_LTLIBRARIES = libmad.la | ||
58 | include_HEADERS = mad.h | ||
59 | |||
60 | @@ -34,7 +37,8 @@ | ||
61 | minimad_LDADD = libmad.la | ||
62 | |||
63 | EXTRA_DIST = mad.h.sed \ | ||
64 | - CHANGES COPYRIGHT CREDITS README TODO VERSION | ||
65 | + CHANGES COPYRIGHT CREDITS README TODO VERSION \ | ||
66 | + mad.pc.in | ||
67 | |||
68 | exported_headers = version.h fixed.h bit.h timer.h stream.h frame.h \ | ||
69 | synth.h decoder.h | ||
70 | |||
diff --git a/meta-oe/recipes-multimedia/libmad/libmad/automake-foreign.patch b/meta-oe/recipes-multimedia/libmad/libmad/automake-foreign.patch new file mode 100644 index 000000000..3e544248d --- /dev/null +++ b/meta-oe/recipes-multimedia/libmad/libmad/automake-foreign.patch | |||
@@ -0,0 +1,12 @@ | |||
1 | Pass foreign to AM_INIT_AUTOMAKE so it doesn't enforce GNU strictness. | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
5 | |||
6 | diff --git a/configure.ac b/configure.ac | ||
7 | index e602fd3..e075b86 100644 | ||
8 | --- a/configure.ac | ||
9 | +++ b/configure.ac | ||
10 | @@ -29 +29 @@ AC_CONFIG_SRCDIR([decoder.h]) | ||
11 | -AM_INIT_AUTOMAKE | ||
12 | +AM_INIT_AUTOMAKE([foreign]) | ||
diff --git a/meta-oe/recipes-multimedia/libmad/libmad/fix_for_mips_with_gcc-4.5.0.patch b/meta-oe/recipes-multimedia/libmad/libmad/fix_for_mips_with_gcc-4.5.0.patch new file mode 100644 index 000000000..01c7aa3c8 --- /dev/null +++ b/meta-oe/recipes-multimedia/libmad/libmad/fix_for_mips_with_gcc-4.5.0.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | gcc 4.4 did this: The MIPS port no longer recognizes the h asm constraint. It was necessary to remove this constraint in order to avoid generating unpredictable code sequences. | ||
2 | |||
3 | so the libmad build with gcc-4.5.0 was failing. | ||
4 | |||
5 | Found a solution here: | ||
6 | |||
7 | http://us.generation-nt.com/answer/bug-568418-libmad0-dev-mpg321-compilation-errors-mips-mipsel-architectures-help-169033451.html | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | 2010/07/29 | ||
12 | Nitin A Kamble <nitin.a.kamble@intel.com> | ||
13 | |||
14 | Index: libmad-0.15.1b/fixed.h | ||
15 | =================================================================== | ||
16 | --- libmad-0.15.1b.orig/fixed.h | ||
17 | +++ libmad-0.15.1b/fixed.h | ||
18 | @@ -297,6 +297,15 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t | ||
19 | |||
20 | /* --- MIPS ---------------------------------------------------------------- */ | ||
21 | |||
22 | +# elif defined(FPM_MIPS) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) | ||
23 | + typedef unsigned int u64_di_t __attribute__ ((mode (DI))); | ||
24 | +# define MAD_F_MLX(hi, lo, x, y) \ | ||
25 | + do { \ | ||
26 | + u64_di_t __ll = (u64_di_t) (x) * (y); \ | ||
27 | + hi = __ll >> 32; \ | ||
28 | + lo = __ll; \ | ||
29 | + } while (0) | ||
30 | + | ||
31 | # elif defined(FPM_MIPS) | ||
32 | |||
33 | /* | ||
diff --git a/meta-oe/recipes-multimedia/libmad/libmad/no-force-mem.patch b/meta-oe/recipes-multimedia/libmad/libmad/no-force-mem.patch new file mode 100644 index 000000000..d5e6d206e --- /dev/null +++ b/meta-oe/recipes-multimedia/libmad/libmad/no-force-mem.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | This option no longer exists in gcc 3.4.1 | ||
2 | |||
3 | RP - 18/07/2008 | ||
4 | |||
5 | Upstream-Status: Inappropriate [configuration] | ||
6 | |||
7 | Index: libmad-0.15.1b/configure.ac | ||
8 | =================================================================== | ||
9 | --- libmad-0.15.1b.orig/configure.ac 2008-07-18 15:45:30.000000000 +0100 | ||
10 | +++ libmad-0.15.1b/configure.ac 2008-07-18 15:45:37.000000000 +0100 | ||
11 | @@ -140,7 +140,6 @@ | ||
12 | case "$optimize" in | ||
13 | -O|"-O "*) | ||
14 | optimize="-O" | ||
15 | - optimize="$optimize -fforce-mem" | ||
16 | optimize="$optimize -fforce-addr" | ||
17 | : #x optimize="$optimize -finline-functions" | ||
18 | : #- optimize="$optimize -fstrength-reduce" | ||
diff --git a/meta-oe/recipes-multimedia/libmad/libmad/obsolete_automake_macros.patch b/meta-oe/recipes-multimedia/libmad/libmad/obsolete_automake_macros.patch new file mode 100644 index 000000000..cc87d299e --- /dev/null +++ b/meta-oe/recipes-multimedia/libmad/libmad/obsolete_automake_macros.patch | |||
@@ -0,0 +1,14 @@ | |||
1 | Upstream-Status: Submitted [https://sourceforge.net/tracker/?group_id=12349&atid=112349] | ||
2 | |||
3 | Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> | ||
4 | diff -Nurd libmad-0.15.1b/configure.ac libmad-0.15.1b/configure.ac | ||
5 | --- libmad-0.15.1b/configure.ac 2004-01-23 11:41:32.000000000 +0200 | ||
6 | +++ libmad-0.15.1b/configure.ac 2013-01-03 08:28:23.718693697 +0200 | ||
7 | @@ -28,7 +28,7 @@ | ||
8 | |||
9 | AM_INIT_AUTOMAKE | ||
10 | |||
11 | -AM_CONFIG_HEADER([config.h]) | ||
12 | +AC_CONFIG_HEADERS([config.h]) | ||
13 | |||
14 | dnl System type. | ||
diff --git a/meta-oe/recipes-multimedia/libmad/libmad_0.15.1b.bb b/meta-oe/recipes-multimedia/libmad/libmad_0.15.1b.bb new file mode 100644 index 000000000..d431abdaa --- /dev/null +++ b/meta-oe/recipes-multimedia/libmad/libmad_0.15.1b.bb | |||
@@ -0,0 +1,36 @@ | |||
1 | SUMMARY = "MPEG Audio Decoder library" | ||
2 | HOMEPAGE = "http://sourceforge.net/projects/mad/" | ||
3 | BUGTRACKER = "http://sourceforge.net/tracker/?group_id=12349&atid=112349" | ||
4 | LICENSE = "GPLv2+" | ||
5 | LICENSE_FLAGS = "commercial" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
7 | file://COPYRIGHT;md5=8e55eb14894e782b84488d5a239bc23d \ | ||
8 | file://version.h;beginline=1;endline=8;md5=aa07311dd39288d4349f28e1de516454" | ||
9 | SECTION = "libs" | ||
10 | DEPENDS = "libid3tag" | ||
11 | PR = "r3" | ||
12 | |||
13 | SRC_URI = "ftp://ftp.mars.org/pub/mpeg/libmad-${PV}.tar.gz \ | ||
14 | file://no-force-mem.patch \ | ||
15 | file://add-pkgconfig.patch \ | ||
16 | file://fix_for_mips_with_gcc-4.5.0.patch \ | ||
17 | file://obsolete_automake_macros.patch \ | ||
18 | file://automake-foreign.patch \ | ||
19 | " | ||
20 | |||
21 | SRC_URI[md5sum] = "1be543bc30c56fb6bea1d7bf6a64e66c" | ||
22 | SRC_URI[sha256sum] = "bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690" | ||
23 | |||
24 | S = "${WORKDIR}/libmad-${PV}" | ||
25 | |||
26 | inherit autotools pkgconfig | ||
27 | |||
28 | EXTRA_OECONF = "-enable-speed --enable-shared" | ||
29 | EXTRA_OECONF_append_arm = " --enable-fpm=arm" | ||
30 | |||
31 | do_configure_prepend () { | ||
32 | # damn picky automake... | ||
33 | touch NEWS AUTHORS ChangeLog | ||
34 | } | ||
35 | |||
36 | ARM_INSTRUCTION_SET = "arm" | ||