include $(TOPDIR)/rules.mk
PKG_NAME:=ffmpeg
-PKG_VERSION:=0.8.2
-PKG_RELEASE:=3
+PKG_VERSION:=0.8.7
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://ffmpeg.org/releases/
-PKG_MD5SUM:=967d481c98161582d149aced6e3b2f31
+PKG_MD5SUM:=31da4d5610d7138761e23fab8fe3a84d
FFMPEG_CUSTOM_ENCODERS:= \
ac3 \
endef
-# 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'
-# libpostproc/postprocess_template.c:3207: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
-
FFMPEG_CONFIGURE:= \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
- PKG_CONFIG="pkg-config" \
./configure \
--enable-cross-compile \
--cross-prefix="$(TARGET_CROSS)" \
--enable-shared \
--enable-static \
--disable-debug \
+ --pkg-config="pkg-config" \
\
--enable-gpl \
--enable-version3 \
\
+ --disable-asm \
--disable-doc \
--disable-dxva2 \
- --disable-mmx \
- --disable-mmx2 \
--enable-pthreads \
--disable-optimizations \
--enable-small \
all install
endef
-ifeq ($(BUILD_VARIANT),full)
- define Build/InstallDev
+define Build/InstallDev/custom
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avdevice,avformat,avutil} $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avformat,avutil}.{a,so*} $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avformat,avutil}.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Build/InstallDev/full
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avdevice,avfilter,avformat,avutil,postproc,swscale} $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avutil,postproc,swscale}.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avfilter,avformat,avutil,postproc,swscale}.pc $(1)/usr/lib/pkgconfig/
- endef
+endef
+
+Build/InstallDev/mini = $(Build/InstallDev/custom)
+
+# XXX: attempt at installing "best" dev files available
+ifeq ($(BUILD_VARIANT),custom)
+ # XXX: only install "custom" dev files if -full & -mini are not selected
+ ifeq ($(CONFIG_PACKAGE_libffmpeg-full)$(CONFIG_PACKAGE_libffmpeg-mini),)
+ Build/InstallDev = $(Build/InstallDev/custom)
+ endif
+endif
+ifeq ($(BUILD_VARIANT),full)
+ # XXX: always install "full" dev files if -full is selected
+ Build/InstallDev = $(Build/InstallDev/full)
+endif
+ifeq ($(BUILD_VARIANT),mini)
+ # XXX: only install "mini" dev files if -full is not selected
+ ifeq ($(CONFIG_PACKAGE_libffmpeg-full),)
+ Build/InstallDev = $(Build/InstallDev/mini)
+ endif
endif
define Package/ffmpeg/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avutil,postproc,swscale}.so.* $(1)/usr/lib/
endef
-define Package/libffmpeg-mini/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avformat,avutil}.so.* $(1)/usr/lib/
-endef
+Package/libffmpeg-mini/install = $(Package/libffmpeg-custom/install)
$(eval $(call BuildPackage,ffmpeg))
$(eval $(call BuildPackage,ffprobe))