From 9ebbd026d2a8018bb7f68454fb5342186efc88c1 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 12 Jul 2010 19:48:51 +0000 Subject: [PATCH] libflac: Upgrade to 1.2.1 SVN-Revision: 22154 --- libs/flac/Makefile | 49 +++-- libs/flac/patches/001-no_encoder.patch | 280 ------------------------- 2 files changed, 34 insertions(+), 295 deletions(-) delete mode 100644 libs/flac/patches/001-no_encoder.patch diff --git a/libs/flac/Makefile b/libs/flac/Makefile index 596ea6472..129124b85 100644 --- a/libs/flac/Makefile +++ b/libs/flac/Makefile @@ -1,5 +1,5 @@ -# -# Copyright (C) 2006 OpenWrt.org +# +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=flac -PKG_VERSION:=1.1.2 +PKG_VERSION:=1.2.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/flac -PKG_MD5SUM:=2bfc127cdda02834d0491ab531a20960 +PKG_MD5SUM:= +PKG_INSTALL:=1 +PKG_FIXUP:=libtool include $(INCLUDE_DIR)/package.mk @@ -25,27 +27,44 @@ define Package/libflac endef define Build/Configure + $(call Build/Configure/Default, \ + --disable-cpplibs \ + --disable-sse \ + --disable-3dnow \ + --disable-altivec \ + --disable-doxgen-docs \ + --disable-local-xmms-plugin \ + --disable-xmms-plugin \ + --disable-ogg \ + --disable-oggtest \ + --disable-debug \ + ) endef TARGET_CFLAGS += $(FPIC) -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.lite \ - $(TARGET_CONFIGURE_OPTS) \ - RELEASE_CFLAGS="$(TARGET_CFLAGS)" \ - libFLAC -endef - define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_BUILD_DIR)/include/FLAC $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/obj/release/lib/libFLAC.{a,so} $(1)/usr/lib/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/FLAC \ + $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libFLAC.{a,so*,la} \ + $(1)/usr/lib/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ + $(1)/usr/lib/pkgconfig/ + + $(INSTALL_DIR) $(1)/usr/share/aclocal/ + $(INSTALL_DATA) \ + $(PKG_INSTALL_DIR)/usr/share/aclocal/* \ + $(1)/usr/share/aclocal/ endef define Package/libflac/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/obj/release/lib/libFLAC.so $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libFLAC.so* $(1)/usr/lib/ endef $(eval $(call BuildPackage,libflac)) diff --git a/libs/flac/patches/001-no_encoder.patch b/libs/flac/patches/001-no_encoder.patch deleted file mode 100644 index f1d6fe277..000000000 --- a/libs/flac/patches/001-no_encoder.patch +++ /dev/null @@ -1,280 +0,0 @@ -diff -ru flac-1.1.2.OLD/build/lib.mk flac-1.1.2.NEW/build/lib.mk ---- flac-1.1.2.OLD/build/lib.mk 2005-01-25 15:10:47.000000000 +1100 -+++ flac-1.1.2.NEW/build/lib.mk 2005-10-16 10:10:43.000000000 +1000 -@@ -58,7 +58,7 @@ - - debug : CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -Wall -W -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES) - valgrind: CFLAGS = -g -O0 -DDEBUG $(CONFIG_CFLAGS) $(DEBUG_CFLAGS) -DFLAC__VALGRIND_TESTING -Wall -W -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES) --release : CFLAGS = -O3 -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(CONFIG_CFLAGS) $(RELEASE_CFLAGS) -Wall -W -Winline -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES) -+release : CFLAGS = -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(CONFIG_CFLAGS) $(RELEASE_CFLAGS) -Wall -W -Winline -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES) - - LFLAGS = -L$(LIBPATH) - -diff -ru flac-1.1.2.OLD/src/libFLAC/lpc.c flac-1.1.2.NEW/src/libFLAC/lpc.c ---- flac-1.1.2.OLD/src/libFLAC/lpc.c 2005-01-26 15:31:36.000000000 +1100 -+++ flac-1.1.2.NEW/src/libFLAC/lpc.c 2005-10-16 10:44:58.000000000 +1000 -@@ -293,6 +293,209 @@ - - void FLAC__lpc_restore_signal(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]) - { -+ register const FLAC__int32 *qlp0 = &qlp_coeff[(order-1)]; -+ register FLAC__int32 sum; -+ register const FLAC__int32 *history, *qlp; -+ -+ history = &data[(-order)]; -+ -+ switch (order) { -+ case 12: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ + (qlp0[-3] * history[3]) -+ + (qlp0[-4] * history[4]) -+ + (qlp0[-5] * history[5]) -+ + (qlp0[-6] * history[6]) -+ + (qlp0[-7] * history[7]) -+ + (qlp0[-8] * history[8]) -+ + (qlp0[-9] * history[9]) -+ + (qlp0[-10] * history[10]) -+ + (qlp0[-11] * history[11]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 11: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ + (qlp0[-3] * history[3]) -+ + (qlp0[-4] * history[4]) -+ + (qlp0[-5] * history[5]) -+ + (qlp0[-6] * history[6]) -+ + (qlp0[-7] * history[7]) -+ + (qlp0[-8] * history[8]) -+ + (qlp0[-9] * history[9]) -+ + (qlp0[-10] * history[10]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 10: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ + (qlp0[-3] * history[3]) -+ + (qlp0[-4] * history[4]) -+ + (qlp0[-5] * history[5]) -+ + (qlp0[-6] * history[6]) -+ + (qlp0[-7] * history[7]) -+ + (qlp0[-8] * history[8]) -+ + (qlp0[-9] * history[9]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 9: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ + (qlp0[-3] * history[3]) -+ + (qlp0[-4] * history[4]) -+ + (qlp0[-5] * history[5]) -+ + (qlp0[-6] * history[6]) -+ + (qlp0[-7] * history[7]) -+ + (qlp0[-8] * history[8]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 8: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ + (qlp0[-3] * history[3]) -+ + (qlp0[-4] * history[4]) -+ + (qlp0[-5] * history[5]) -+ + (qlp0[-6] * history[6]) -+ + (qlp0[-7] * history[7]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 7: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ + (qlp0[-3] * history[3]) -+ + (qlp0[-4] * history[4]) -+ + (qlp0[-5] * history[5]) -+ + (qlp0[-6] * history[6]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 6: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ + (qlp0[-3] * history[3]) -+ + (qlp0[-4] * history[4]) -+ + (qlp0[-5] * history[5]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 5: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ + (qlp0[-3] * history[3]) -+ + (qlp0[-4] * history[4]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 4: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ + (qlp0[-3] * history[3]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 3: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ + (qlp0[-2] * history[2]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 2: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * history[0]) -+ + (qlp0[-1] * history[1]) -+ ; -+ ++history; -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ case 1: -+ for( ; data_len != 0; --data_len) { -+ sum = (qlp0[0] * (*(history++))); -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ default: -+ { -+ /* handle everything else: (order > 12) -+ * with Duff's Device to reduce jumps */ -+ const unsigned n0 = (order + 7)/8; -+ const int tmp = 0 - order - 1; -+ register const FLAC__int32 *qlpd = &qlp_coeff[order]; -+ for( ; data_len != 0; --data_len) { -+ register unsigned n = n0; -+ sum = 0; -+ qlp = qlpd; -+ history = &data[tmp]; -+ -+ switch(order%8) { -+ case 0: do { -+ sum += (*(--qlp)) * (*(++history)); -+ case 7: sum += (*(--qlp)) * (*(++history)); -+ case 6: sum += (*(--qlp)) * (*(++history)); -+ case 5: sum += (*(--qlp)) * (*(++history)); -+ case 4: sum += (*(--qlp)) * (*(++history)); -+ case 3: sum += (*(--qlp)) * (*(++history)); -+ case 2: sum += (*(--qlp)) * (*(++history)); -+ case 1: sum += (*(--qlp)) * (*(++history)); -+ } while (--n); -+ } -+ -+ *(data++) = *(residual++) + (sum >> lp_quantization); -+ } -+ return; -+ } -+ } -+} -+ -+#if 0 -+void FLAC__lpc_restore_signal_orig(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]) -+{ - #ifdef FLAC__OVERFLOW_DETECT - FLAC__int64 sumo; - #endif -@@ -339,6 +542,7 @@ - } - */ - } -+#endif /* 0 */ - - void FLAC__lpc_restore_signal_wide(const FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, int lp_quantization, FLAC__int32 data[]) - { -diff -ru flac-1.1.2.OLD/src/libFLAC/Makefile.lite flac-1.1.2.NEW/src/libFLAC/Makefile.lite ---- flac-1.1.2.OLD/src/libFLAC/Makefile.lite 2005-01-27 11:08:35.000000000 +1100 -+++ flac-1.1.2.NEW/src/libFLAC/Makefile.lite 2005-10-16 10:13:29.000000000 +1000 -@@ -41,7 +41,7 @@ - ifeq ($(SOLARIS_BUILD),yes) - DEFINES = -DFLAC__NO_ASM -DFLAC__ALIGN_MALLOC_DATA - else --DEFINES = -DFLAC__CPU_IA32 -DFLAC__USE_3DNOW -DFLAC__HAS_NASM -DFLAC__ALIGN_MALLOC_DATA -+DEFINES = -DFLAC__CPU_UNKNOWN -DFLAC__NO_ASM -DFLAC__ALIGN_MALLOC_DATA -DFLAC__INTEGER_ONLY_LIBRARY - endif - endif - INCLUDES = -I./include -I$(topdir)/include -@@ -50,14 +50,6 @@ - ifeq ($(DARWIN_BUILD),yes) - SRCS_S = \ - ppc/as/lpc_asm.s --else --ifeq ($(SOLARIS_BUILD),yes) --else --SRCS_NASM = \ -- ia32/cpu_asm.nasm \ -- ia32/fixed_asm.nasm \ -- ia32/lpc_asm.nasm --endif - endif - - SRCS_C = \ -@@ -66,7 +58,6 @@ - cpu.c \ - crc.c \ - file_decoder.c \ -- file_encoder.c \ - fixed.c \ - float.c \ - format.c \ -@@ -76,10 +67,7 @@ - metadata_iterators.c \ - metadata_object.c \ - seekable_stream_decoder.c \ -- seekable_stream_encoder.c \ -- stream_decoder.c \ -- stream_encoder.c \ -- stream_encoder_framing.c -+ stream_decoder.c - - include $(topdir)/build/lib.mk - -- 2.30.2