Add libs/faad2
authorOliver Ertl <oliver@ertl-net.net>
Thu, 20 Mar 2008 12:09:19 +0000 (12:09 +0000)
committerOliver Ertl <oliver@ertl-net.net>
Thu, 20 Mar 2008 12:09:19 +0000 (12:09 +0000)
SVN-Revision: 10631

libs/faad2/Makefile [new file with mode: 0644]
libs/faad2/patches/001-abi_has_changed.patch [new file with mode: 0644]
libs/faad2/patches/002-2.6.1-libtool22.patch [new file with mode: 0644]

diff --git a/libs/faad2/Makefile b/libs/faad2/Makefile
new file mode 100644 (file)
index 0000000..ab79c4e
--- /dev/null
@@ -0,0 +1,99 @@
+#
+# Copyright (C) 2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=faad2
+PKG_VERSION:=2.6.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/faac
+PKG_MD5SUM:=74e92df40c270f216a8305fc87603c8a
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
+
+PKG_FIXUP = libtool
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/faad2/Default
+  URL:=http://www.audiocoding.com/faad2.html
+  TITLE:=Freeware Advanced Audio Decoder
+endef
+
+define Package/faad2/Default/description
+       FAAD2 is the fastest ISO AAC audio decoder available.
+       FAAD2 correctly decodes all MPEG-4 and MPEG-2 MAIN,
+       LOW, LTP, LD and ER object type AAC files.
+endef
+
+define Package/faad2
+$(call Package/faad2/Default)
+  SECTION:=sound
+  CATEGORY:=Sound
+  TITLE+=player
+  DEPENDS:=+libfaad2
+endef
+
+define Package/faad2/description
+$(call Package/faad2/Default/description)
+  This package contains a binary to play AAC or MP4 files.
+endef
+
+define Package/libfaad2
+$(call Package/faad2/Default)
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE+=library
+endef
+
+define Package/libfaad2/description
+$(call Package/faad2/Default/description)
+  This package contains the library.
+endef
+
+define Build/Configure
+       (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
+               autoreconf -vif \
+       );
+       $(call Build/Configure/Default, \
+               --with-mp4v2 \
+               --without-xmms \
+               , \
+               FAAD2_CPPFLAGS="-fno-builtin-cos -fno-builtin-sin -fno-builtin-log" \
+       )
+endef
+
+MAKE_FLAGS += \
+       DESTDIR="$(PKG_INSTALL_DIR)" \
+       all install \
+
+define Build/InstallDev
+       mkdir -p $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
+       mkdir -p $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfaad.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/faad2/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/faad $(1)/usr/bin/
+endef
+
+define Package/libfaad2/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfaad.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,faad2))
+$(eval $(call BuildPackage,libfaad2))
+
+$(eval $(call RequireCommand,autoconf, \
+       $(PKG_NAME) requires GNU autoconf. \
+))
diff --git a/libs/faad2/patches/001-abi_has_changed.patch b/libs/faad2/patches/001-abi_has_changed.patch
new file mode 100644 (file)
index 0000000..30dbe1c
--- /dev/null
@@ -0,0 +1,21 @@
+Index: faad2/libfaad/Makefile.am
+===================================================================
+--- faad2.orig/libfaad/Makefile.am     2008-03-20 12:54:17.000000000 +0100
++++ faad2/libfaad/Makefile.am  2008-03-20 12:54:36.000000000 +0100
+@@ -3,7 +3,8 @@
+ include_HEADERS = $(top_srcdir)/include/faad.h \
+                   $(top_srcdir)/include/neaacdec.h
+-libfaad_la_LDFLAGS = -lm
++libfaad_la_LDFLAGS = -version-info 1:0:0
++libfaad_la_LIBADD = -lm
+ libfaad_la_SOURCES = bits.c cfft.c decoder.c drc.c \
+ drm_dec.c error.c filtbank.c \
+@@ -25,4 +26,4 @@
+ sbr_qmf_c.h codebook/hcb.h \
+ codebook/hcb_1.h codebook/hcb_2.h codebook/hcb_3.h codebook/hcb_4.h \
+ codebook/hcb_5.h codebook/hcb_6.h codebook/hcb_7.h codebook/hcb_8.h \
+-codebook/hcb_9.h codebook/hcb_10.h codebook/hcb_11.h codebook/hcb_sf.h
+\ No newline at end of file
++codebook/hcb_9.h codebook/hcb_10.h codebook/hcb_11.h codebook/hcb_sf.h
diff --git a/libs/faad2/patches/002-2.6.1-libtool22.patch b/libs/faad2/patches/002-2.6.1-libtool22.patch
new file mode 100644 (file)
index 0000000..e77cb0c
--- /dev/null
@@ -0,0 +1,13 @@
+Index: faad2/configure.in
+===================================================================
+--- faad2.orig/configure.in    2008-03-20 12:55:28.000000000 +0100
++++ faad2/configure.in 2008-03-20 12:55:41.000000000 +0100
+@@ -18,7 +18,7 @@
+ AC_PROG_CC
+ AC_PROG_CPP
+ dnl disable for mpeg4ip plugin
+-dnl AC_PROG_CXX
++AC_PROG_CXX
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
+ AC_PROG_MAKE_SET