Browse Source

Import flac from oldpackages

Ted Hess 10 years ago
parent
commit
18aef4945a

+ 75
- 0
libs/flac/Makefile View File

@@ -0,0 +1,75 @@
1
+#
2
+# Copyright (C) 2006-2009 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=flac
11
+PKG_VERSION:=1.2.1
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=@SF/flac
16
+PKG_MD5SUM:=
17
+PKG_INSTALL:=1
18
+
19
+PKG_LICENSE:=GFDLv1.2 GPLv2 LGPLv2.1 BSD-3c
20
+PKG_LICENSE_FILES:=README COPYING.FDL COPYING.GPL COPYING.LGPL COPYING.Xiph
21
+
22
+PKG_FIXUP:=autoreconf
23
+PKG_REMOVE_FILES:=autogen.sh aclocal.m4
24
+
25
+include $(INCLUDE_DIR)/package.mk
26
+
27
+define Package/libflac
28
+  SECTION:=libs
29
+  CATEGORY:=Libraries
30
+  TITLE:=Free Lossless Audio Codec library
31
+  URL:=http://flac.sourceforge.net/
32
+endef
33
+
34
+define Build/Configure
35
+	$(call Build/Configure/Default, \
36
+		--disable-cpplibs \
37
+		--disable-sse \
38
+		--disable-3dnow \
39
+		--disable-altivec \
40
+		--disable-doxgen-docs \
41
+		--disable-local-xmms-plugin \
42
+		--disable-xmms-plugin \
43
+		--disable-ogg \
44
+		--disable-oggtest \
45
+		--disable-debug \
46
+	)
47
+endef
48
+
49
+TARGET_CFLAGS += $(FPIC)
50
+
51
+define Build/InstallDev
52
+	$(INSTALL_DIR) $(1)/usr/include
53
+	$(CP) \
54
+		$(PKG_INSTALL_DIR)/usr/include/FLAC \
55
+		$(1)/usr/include/
56
+	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
57
+	$(CP) \
58
+		$(PKG_INSTALL_DIR)/usr/lib/libFLAC.{a,so*,la} \
59
+		$(1)/usr/lib/
60
+	$(INSTALL_DATA) \
61
+		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
62
+		$(1)/usr/lib/pkgconfig/
63
+
64
+	$(INSTALL_DIR) $(1)/usr/share/aclocal/
65
+	$(INSTALL_DATA) \
66
+		$(PKG_INSTALL_DIR)/usr/share/aclocal/* \
67
+		$(1)/usr/share/aclocal/
68
+endef
69
+
70
+define Package/libflac/install
71
+	$(INSTALL_DIR) $(1)/usr/lib
72
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libFLAC.so* $(1)/usr/lib/
73
+endef
74
+
75
+$(eval $(call BuildPackage,libflac))

+ 73
- 0
libs/flac/patches/001-no-docs-and-examples.patch View File

@@ -0,0 +1,73 @@
1
+--- a/Makefile.am
2
++++ b/Makefile.am
3
+@@ -30,7 +30,7 @@
4
+ 
5
+ AUTOMAKE_OPTIONS = foreign 1.7
6
+ 
7
+-SUBDIRS = doc include m4 man src examples test build obj
8
++SUBDIRS = include m4 src build obj
9
+ 
10
+ DISTCLEANFILES = libtool-disable-static
11
+ 
12
+--- a/Makefile.in
13
++++ b/Makefile.in
14
+@@ -234,7 +234,7 @@ target_alias = @target_alias@
15
+ 
16
+ AUTOMAKE_OPTIONS = foreign 1.7
17
+ 
18
+-SUBDIRS = doc include m4 man src examples test build obj
19
++SUBDIRS = include m4 src build obj
20
+ 
21
+ DISTCLEANFILES = libtool-disable-static
22
+ 
23
+--- a/src/Makefile.am
24
++++ b/src/Makefile.am
25
+@@ -30,12 +30,6 @@ SUBDIRS = \
26
+ 	metaflac \
27
+ 	monkeys_audio_utilities \
28
+ 	$(XMMS_DIRS) \
29
+-	plugin_winamp2 \
30
+-	test_grabbag \
31
+-	test_libs_common \
32
+-	test_libFLAC \
33
+-	test_seeking \
34
+-	test_streams \
35
+ 	$(CPPLIBS_DIRS)
36
+ 
37
+ EXTRA_DIST = \
38
+--- a/src/Makefile.in
39
++++ b/src/Makefile.in
40
+@@ -221,7 +221,7 @@ target_alias = @target_alias@
41
+ 
42
+ @FLaC__HAS_XMMS_TRUE@XMMS_DIRS = plugin_common plugin_xmms
43
+ 
44
+-@FLaC__WITH_CPPLIBS_TRUE@CPPLIBS_DIRS = libFLAC++ test_libFLAC++
45
++@FLaC__WITH_CPPLIBS_TRUE@CPPLIBS_DIRS = libFLAC++
46
+ 
47
+ SUBDIRS = \
48
+ 	libFLAC \
49
+@@ -230,12 +230,6 @@ SUBDIRS = \
50
+ 	metaflac \
51
+ 	monkeys_audio_utilities \
52
+ 	$(XMMS_DIRS) \
53
+-	plugin_winamp2 \
54
+-	test_grabbag \
55
+-	test_libs_common \
56
+-	test_libFLAC \
57
+-	test_seeking \
58
+-	test_streams \
59
+ 	$(CPPLIBS_DIRS)
60
+ 
61
+ 
62
+@@ -256,9 +250,8 @@ RECURSIVE_TARGETS = info-recursive dvi-r
63
+ 	check-recursive installcheck-recursive
64
+ DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
65
+ DIST_SUBDIRS = libFLAC share flac metaflac monkeys_audio_utilities \
66
+-	plugin_common plugin_xmms plugin_winamp2 test_grabbag \
67
+-	test_libs_common test_libFLAC test_seeking test_streams \
68
+-	libFLAC++ test_libFLAC++
69
++	plugin_common plugin_xmms plugin_winamp2 \
70
++	libFLAC++
71
+ all: all-recursive
72
+ 
73
+ .SUFFIXES:

+ 24
- 0
libs/flac/patches/002-no-utility.patch View File

@@ -0,0 +1,24 @@
1
+--- a/src/Makefile.am
2
++++ b/src/Makefile.am
3
+@@ -26,9 +26,6 @@ endif
4
+ SUBDIRS = \
5
+ 	libFLAC \
6
+ 	share \
7
+-	flac \
8
+-	metaflac \
9
+-	monkeys_audio_utilities \
10
+ 	$(XMMS_DIRS) \
11
+ 	$(CPPLIBS_DIRS)
12
+ 
13
+--- a/src/Makefile.in
14
++++ b/src/Makefile.in
15
+@@ -226,9 +226,6 @@ target_alias = @target_alias@
16
+ SUBDIRS = \
17
+ 	libFLAC \
18
+ 	share \
19
+-	flac \
20
+-	metaflac \
21
+-	monkeys_audio_utilities \
22
+ 	$(XMMS_DIRS) \
23
+ 	$(CPPLIBS_DIRS)
24
+ 

+ 11
- 0
libs/flac/patches/010-automake-compat.patch View File

@@ -0,0 +1,11 @@
1
+--- a/Makefile.am
2
++++ b/Makefile.am
3
+@@ -34,6 +34,8 @@ SUBDIRS = include m4 src build obj
4
+ 
5
+ DISTCLEANFILES = libtool-disable-static
6
+ 
7
++ACLOCAL_AMFLAGS = -I m4
8
++
9
+ EXTRA_DIST = \
10
+ 	COPYING.FDL \
11
+ 	COPYING.GPL \

+ 62
- 0
libs/flac/patches/020-libFLAC-remove-altivec-options.patch View File

@@ -0,0 +1,62 @@
1
+--- a/src/libFLAC/Makefile.in
2
++++ b/src/libFLAC/Makefile.in
3
+@@ -66,6 +66,7 @@ NORMAL_UNINSTALL = :
4
+ PRE_UNINSTALL = :
5
+ POST_UNINSTALL = :
6
+ host_triplet = @host@
7
++@FLaC__CPU_PPC_TRUE@@FLaC__SYS_DARWIN_FALSE@@FLaC__USE_ALTIVEC_TRUE@am__append_1 = -maltivec -mabi=altivec
8
+ ACLOCAL = @ACLOCAL@
9
+ ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
10
+ AMDEP_FALSE = @AMDEP_FALSE@
11
+@@ -234,13 +235,21 @@ target_alias = @target_alias@
12
+ 
13
+ lib_LTLIBRARIES = libFLAC.la
14
+ @DEBUG_TRUE@DEBUGCFLAGS = -DFLAC__OVERFLOW_DETECT
15
++# Linux-gcc for PPC does not have -force_cpusubtype_ALL, it is Darwin-specific
16
++#@@@ PPC optimizations temporarily disabled
17
++@FLaC__CPU_PPC_TRUE@@FLaC__SYS_DARWIN_FALSE@CPUCFLAGS =  \
18
++@FLaC__CPU_PPC_TRUE@@FLaC__SYS_DARWIN_FALSE@	$(am__append_1) \
19
++@FLaC__CPU_PPC_TRUE@@FLaC__SYS_DARWIN_FALSE@	-DFLAC__NO_ASM
20
++
21
++# FIXME: The following logic should be part of configure, not of Makefile.am
22
++
23
+ # The -force_cpusubtype_ALL is needed to insert a ppc64 instruction
24
+ # into cpu.c with an asm().
25
+ #@@@ PPC optimizations temporarily disabled
26
+-@FLaC__CPU_PPC_TRUE@@FLaC__SYS_DARWIN_TRUE@CPUCFLAGS = -faltivec -force_cpusubtype_ALL -DFLAC__NO_ASM
27
+-# Linux-gcc for PPC does not have -force_cpusubtype_ALL, it is Darwin-specific
28
+-#@@@ PPC optimizations temporarily disabled
29
+-@FLaC__CPU_PPC_TRUE@@FLaC__SYS_DARWIN_FALSE@CPUCFLAGS = -maltivec -mabi=altivec -DFLAC__NO_ASM
30
++@FLaC__CPU_PPC_TRUE@@FLaC__SYS_DARWIN_TRUE@CPUCFLAGS = -faltivec \
31
++@FLaC__CPU_PPC_TRUE@@FLaC__SYS_DARWIN_TRUE@	-force_cpusubtype_ALL \
32
++@FLaC__CPU_PPC_TRUE@@FLaC__SYS_DARWIN_TRUE@	-DFLAC__NO_ASM \
33
++@FLaC__CPU_PPC_TRUE@@FLaC__SYS_DARWIN_TRUE@	$(am__append_1)
34
+ 
35
+ AM_CFLAGS = $(DEBUGCFLAGS) $(CPUCFLAGS) @OGG_CFLAGS@
36
+ @FLaC__CPU_PPC_TRUE@@FLaC__NO_ASM_FALSE@ARCH_SUBDIRS = ppc
37
+--- a/src/libFLAC/Makefile.am
38
++++ b/src/libFLAC/Makefile.am
39
+@@ -32,6 +32,9 @@ lib_LTLIBRARIES = libFLAC.la
40
+ if DEBUG
41
+ DEBUGCFLAGS = -DFLAC__OVERFLOW_DETECT
42
+ endif
43
++
44
++# FIXME: The following logic should be part of configure, not of Makefile.am
45
++
46
+ if FLaC__CPU_PPC
47
+ # The -force_cpusubtype_ALL is needed to insert a ppc64 instruction
48
+ # into cpu.c with an asm().
49
+@@ -40,8 +43,12 @@ if FLaC__SYS_DARWIN
50
+ CPUCFLAGS = -faltivec -force_cpusubtype_ALL -DFLAC__NO_ASM
51
+ else
52
+ # Linux-gcc for PPC does not have -force_cpusubtype_ALL, it is Darwin-specific
53
++CPUCFLAGS =
54
++if FLaC__USE_ALTIVEC
55
++CPUCFLAGS += -maltivec -mabi=altivec
56
++endif
57
+ #@@@ PPC optimizations temporarily disabled
58
+-CPUCFLAGS = -maltivec -mabi=altivec -DFLAC__NO_ASM
59
++CPUCFLAGS += -DFLAC__NO_ASM
60
+ endif
61
+ endif
62
+