diff options
-rw-r--r-- | recipes/libmad.recipe | 14 | ||||
-rw-r--r-- | recipes/libmad/0001-Delete-invalid-compile-option.patch | 37 | ||||
-rw-r--r-- | recipes/libmad/0002-fix-autoreconf.patch | 25 | ||||
-rw-r--r-- | recipes/libmad/0003-ARM-Fix-build-without-the-Thumb-mode.patch | 30 | ||||
-rw-r--r-- | recipes/libmad/0004-Remove-clang-unsupported-compiler-flags.patch | 43 |
5 files changed, 146 insertions, 3 deletions
diff --git a/recipes/libmad.recipe b/recipes/libmad.recipe index 3ba5041e..ac16edf2 100644 --- a/recipes/libmad.recipe +++ b/recipes/libmad.recipe @@ -4,18 +4,26 @@ class Recipe(recipe.Recipe): name = 'libmad' version = '0.15.1b' licenses = [License.GPLv2] + stype = SourceType.TARBALL + url = 'http://downloads.sourceforge.net/project/mad/libmad/0.15.1b/libmad-0.15.1b.tar.gz' + patches = ['libmad/0001-Delete-invalid-compile-option.patch', + 'libmad/0002-fix-autoreconf.patch', + 'libmad/0003-ARM-Fix-build-without-the-Thumb-mode.patch', + ] + autoreconf = True files_libs = ['libmad'] files_devel = ['include/mad.h'] def prepare(self): if self.config.target_platform == Platform.IOS: - self.autoreconf = True self.configure_options += ' --enable-fpm=default ' self.new_env = {'CCAS': os.environ['GAS']} self.new_env['CCAS'] += ' -no-integrated-as ' - if self.config.target_platform == Platform.ANDROID: - self.autoreconf = True + self.patches += ['libmad/0004-Remove-clang-unsupported-compiler-flags.patch'] + elif self.config.target_platform == Platform.DARWIN: + self.patches += ['libmad/0004-Remove-clang-unsupported-compiler-flags.patch'] + elif self.config.target_platform == Platform.ANDROID: if Architecture.is_arm(self.config.target_arch): # Disable thumb mode to get the optimizations compiled properly self.new_env['CFLAGS'] = os.environ['CFLAGS'].replace('-mthumb', '') diff --git a/recipes/libmad/0001-Delete-invalid-compile-option.patch b/recipes/libmad/0001-Delete-invalid-compile-option.patch new file mode 100644 index 00000000..11e0d582 --- /dev/null +++ b/recipes/libmad/0001-Delete-invalid-compile-option.patch @@ -0,0 +1,37 @@ +From 1ca08c65419accec3bedc571c327dbccc7f1d656 Mon Sep 17 00:00:00 2001 +From: Andoni Morales Alastruey <ylatuya@gmail.com> +Date: Fri, 24 Feb 2012 11:39:38 +0100 +Subject: [PATCH 1/4] Delete invalid compile option + +--- + configure | 1 - + configure.ac | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/configure b/configure +index ee421cc..5f29d76 100755 +--- a/configure ++++ b/configure +@@ -19099,7 +19099,6 @@ then + case "$optimize" in + -O|"-O "*) + optimize="-O" +- optimize="$optimize -fforce-mem" + optimize="$optimize -fforce-addr" + : #x optimize="$optimize -finline-functions" + : #- optimize="$optimize -fstrength-reduce" +diff --git a/configure.ac b/configure.ac +index 9b79399..7608315 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -140,7 +140,6 @@ then + case "$optimize" in + -O|"-O "*) + optimize="-O" +- optimize="$optimize -fforce-mem" + optimize="$optimize -fforce-addr" + : #x optimize="$optimize -finline-functions" + : #- optimize="$optimize -fstrength-reduce" +-- +2.1.0 + diff --git a/recipes/libmad/0002-fix-autoreconf.patch b/recipes/libmad/0002-fix-autoreconf.patch new file mode 100644 index 00000000..2673f0fe --- /dev/null +++ b/recipes/libmad/0002-fix-autoreconf.patch @@ -0,0 +1,25 @@ +From cfdd83e5ab8027e8dfe3c033a3db79df1079d6ba Mon Sep 17 00:00:00 2001 +From: Andoni Morales Alastruey <ylatuya@gmail.com> +Date: Mon, 10 Sep 2012 12:03:05 +0200 +Subject: [PATCH 2/4] fix autoreconf + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 7608315..4fcd48b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -26,7 +26,7 @@ AC_PREREQ(2.53) + + AC_CONFIG_SRCDIR([decoder.h]) + +-AM_INIT_AUTOMAKE ++AM_INIT_AUTOMAKE([foreign]) + + AM_CONFIG_HEADER([config.h]) + +-- +2.1.0 + diff --git a/recipes/libmad/0003-ARM-Fix-build-without-the-Thumb-mode.patch b/recipes/libmad/0003-ARM-Fix-build-without-the-Thumb-mode.patch new file mode 100644 index 00000000..4c80118a --- /dev/null +++ b/recipes/libmad/0003-ARM-Fix-build-without-the-Thumb-mode.patch @@ -0,0 +1,30 @@ +From 0e06e5f0d92fc82081f3c73ecad1be57e56039a8 Mon Sep 17 00:00:00 2001 +From: Andoni Morales Alastruey <ylatuya@gmail.com> +Date: Tue, 26 Feb 2013 16:32:57 +0100 +Subject: [PATCH 3/4] ARM: Fix build without the Thumb mode + +--- + imdct_l_arm.S | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/imdct_l_arm.S b/imdct_l_arm.S +index badec5b..69aa21d 100644 +--- a/imdct_l_arm.S ++++ b/imdct_l_arm.S +@@ -468,8 +468,11 @@ _III_imdct_l: + + @---- + +- add r2, pc, #(imdct36_long_karray-.-8) @ r2 = base address of Knn array (PIC safe ?) +- ++#ifdef __thumb__ ++ adr r2, imdct36_long_karray ++#else ++ add r2, pc, #(imdct36_long_karray-.-8) @ r2 = base address of Knn array (PIC safe ?) ++#endif + + loop: + ldr r12, [r0, #X0] +-- +2.1.0 + diff --git a/recipes/libmad/0004-Remove-clang-unsupported-compiler-flags.patch b/recipes/libmad/0004-Remove-clang-unsupported-compiler-flags.patch new file mode 100644 index 00000000..5bfce4d9 --- /dev/null +++ b/recipes/libmad/0004-Remove-clang-unsupported-compiler-flags.patch @@ -0,0 +1,43 @@ +From 3d3fce9b8b927a817b89dd78a60b5cf7d978f64c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com> +Date: Tue, 16 Sep 2014 12:28:47 +0300 +Subject: [PATCH 4/4] Remove clang unsupported compiler flags + +--- + configure.ac | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 4fcd48b..40302db 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -140,20 +140,20 @@ then + case "$optimize" in + -O|"-O "*) + optimize="-O" +- optimize="$optimize -fforce-addr" ++ : #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" ++ : #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 -fregmove" + : #* optimize="$optimize -fdelayed-branch" + : #x optimize="$optimize -fschedule-insns" +- optimize="$optimize -fschedule-insns2" ++ : #optimize="$optimize -fschedule-insns2" + : #? optimize="$optimize -ffunction-sections" + : #? optimize="$optimize -fcaller-saves" + : #> optimize="$optimize -funroll-loops" +-- +2.1.0 + |