[backfire/packages] openntpd: merge r28620, r28621
[openwrt/svn-archive/archive.git] / multimedia / ffmpeg / Makefile
index 36592b8f86ca554cb3e1e3c2ba2884ed00897fa8..e2dc1f13a3b5fe7df5b3e8e14a456d1ae9f42cea 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ffmpeg
-PKG_VERSION:=0.5.2
-PKG_RELEASE:=4
+PKG_VERSION:=0.5.4
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://ffmpeg.org/releases/
-PKG_MD5SUM:=451eb428ca97a72c00555d50944cdb24
+PKG_MD5SUM:=87e771cd0f5d465fbf1a0a4824b7cc24
 
 FFMPEG_ENCODERS:= \
        ac3 \
@@ -31,6 +31,7 @@ FFMPEG_DECODERS:= \
        aac \
        ac3 \
        atrac3 \
+       flac \
        gif \
        h264 \
        jpegls \
@@ -63,9 +64,14 @@ FFMPEG_MUXERS:= \
        rtp \
 
 FFMPEG_DEMUXERS:= \
+       aac \
        ac3 \
+       avi \
+       flac \
        ffm \
        h264 \
+       matroska \
+       mov \
        mp3 \
        mpegps \
        mpegts \
@@ -81,8 +87,8 @@ FFMPEG_PARSERS:= \
        ac3 \
        h264 \
        mpegaudio \
-       mpegvideo \
        mpeg4video \
+       mpegvideo \
 
 FFMPEG_PROTOCOLS:= \
        file http pipe rtp tcp udp
@@ -112,7 +118,7 @@ $(call Package/ffmpeg/Default)
  SECTION:=multimedia
  CATEGORY:=Multimedia
  TITLE+= program
- DEPENDS+= +libpthread +libffmpeg +libpostproc
+ DEPENDS+= +libpthread +libffmpeg +libpostproc +libswscale
 endef
 
 define Package/ffmpeg/description
@@ -162,6 +168,14 @@ define Package/libpostproc
  DEPENDS:=+libffmpeg
 endef
 
+define Package/libswscale
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=libswscale
+ URL:=http://ffmpeg.mplayerhq.hu/
+ DEPENDS:=+libffmpeg
+endef
+
 FILTER_CONFIG= \
        $(foreach c, $(3), \
                $(if $(CONFIG_FFMPEG_$(1)_$(c)),--enable-$(2)="$(c)") \
@@ -174,6 +188,10 @@ FFMPEG_CONFIGURE_DEMUXERS:=$(call FILTER_CONFIG,DEMUXER,demuxer,$(FFMPEG_DEMUXER
 FFMPEG_CONFIGURE_PARSERS:=$(call FILTER_CONFIG,PARSER,parser,$(FFMPEG_PARSERS))
 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FILTER_CONFIG,PROTOCOL,protocol,$(FFMPEG_PROTOCOLS))
 
+ifneq ($(CONFIG_TARGET_x86),)
+  TARGET_CFLAGS += -fomit-frame-pointer
+endif
+
 # XXX: add --disable-mmx & --disable-mmx2 to fix build failure on x86
 # libpostproc/postprocess_template.c:2195: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
 # libpostproc/postprocess_template.c:3124: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
@@ -188,12 +206,15 @@ define Build/Configure
                --enable-cross-compile \
                --cross-prefix="$(TARGET_CROSS)" \
                --arch="$(ARCH)" \
+               --target-os=linux \
                --prefix="/usr" \
                --enable-shared \
                --enable-static \
                --disable-debug \
                --enable-gpl \
                --disable-libfaad \
+               --disable-amd3dnow \
+               --disable-amd3dnowext \
                --disable-mmx \
                --disable-mmx2 \
                --enable-pthreads \
@@ -203,6 +224,7 @@ define Build/Configure
                --disable-vhook \
                --enable-zlib \
                --enable-postproc \
+               --enable-swscale \
                \
                $(if $(CONFIG_PACKAGE_ffmpeg),,--disable-ffmpeg) \
                $(if $(CONFIG_PACKAGE_ffserver),,--disable-ffserver) \
@@ -235,12 +257,15 @@ define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/libav{codec,device,format,util} $(1)/usr/include/
        $(CP) $(PKG_INSTALL_DIR)/usr/include/libpostproc $(1)/usr/include/
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/libswscale $(1)/usr/include/
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libav{codec,device,format,util}.{a,so*} $(1)/usr/lib/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.{a,so*} $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libswscale.{a,so*} $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libav{codec,device,format,util}.pc $(1)/usr/lib/pkgconfig/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpostproc.pc $(1)/usr/lib/pkgconfig/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libswscale.pc $(1)/usr/lib/pkgconfig/
 endef
 
 define Package/ffmpeg/install
@@ -263,7 +288,13 @@ define Package/libpostproc/install
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.so.* $(1)/usr/lib/
 endef
 
+define Package/libswscale/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libswscale.so.* $(1)/usr/lib/
+endef
+
 $(eval $(call BuildPackage,ffmpeg))
 $(eval $(call BuildPackage,ffserver))
 $(eval $(call BuildPackage,libffmpeg))
 $(eval $(call BuildPackage,libpostproc))
+$(eval $(call BuildPackage,libswscale))