[depends] move ffmpeg to unified deps
authorwsnipex <wsnipex@a1.net>
Sat, 18 Jan 2014 11:51:47 +0000 (12:51 +0100)
committerRainer Hochecker <fernetmenta@online.de>
Sun, 27 Apr 2014 16:04:52 +0000 (18:04 +0200)
tools/depends/target/Makefile
tools/depends/target/ffmpeg/FFMPEG-VERSION [new file with mode: 0644]
tools/depends/target/ffmpeg/Makefile [new file with mode: 0644]

index 4588917..1d5f129 100644 (file)
@@ -15,7 +15,7 @@ DEPENDS = \
        python26 afpfs-ng libshairplay \
        libplist libcec libbluray boost tinyxml dummy-libxbmc \
        libamplayer libssh taglib xbmc-pvr-addons libusb libnfs libmp3lame \
-       pythonmodule-pil libxslt
+       pythonmodule-pil libxslt ffmpeg
 
 ifeq ($(ENABLE_GPLV3),1)
   DEPENDS+=samba-gplv3 libcdio-gplv3
@@ -60,6 +60,7 @@ ifeq ($(OS),linux)
     DEPENDS += alsa-lib libsdl linux-system-libs
     ALSA_LIB = alsa-lib
     LINUX_SYSTEM_LIBS = linux-system-libs
+    FFMPEG_DEPENDS = gnutls
   endif
 endif
 
@@ -96,6 +97,7 @@ nettle: gmp
 pythonmodule-pil: $(ZLIB) libjpeg-turbo libpng freetype2 python26
 libsdl: $(LINUX_SYSTEM_LIBS)
 libxslt: libgcrypt
+ffmpeg: $(ICONV) $(ZLIB) bzip2 libvorbis $(FFMPEG_DEPENDS)
 
 .installed-$(PLATFORM): $(DEPENDS)
        touch $@
diff --git a/tools/depends/target/ffmpeg/FFMPEG-VERSION b/tools/depends/target/ffmpeg/FFMPEG-VERSION
new file mode 100644 (file)
index 0000000..850943e
--- /dev/null
@@ -0,0 +1,5 @@
+LIBNAME=ffmpeg
+BASE_URL=https://github.com/FernetMenta/FFmpeg/archive
+VERSION=11086c540305ffb208e6fc17d301db989d3c4151
+ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
+
diff --git a/tools/depends/target/ffmpeg/Makefile b/tools/depends/target/ffmpeg/Makefile
new file mode 100644 (file)
index 0000000..8b95d5c
--- /dev/null
@@ -0,0 +1,80 @@
+include ../../Makefile.include
+include FFMPEG-VERSION
+DEPS= ../../Makefile.include FFMPEG-VERSION Makefile
+
+# set to "yes" to enable patching
+# we don't apply patches until we move to a vanilla ffmpeg tarball
+APPLY_PATCHES=no
+
+# configuration settings
+ffmpg_config = --prefix=$(PREFIX)
+ffmpg_config += --cc=$(CC) --cxx=$(CXX)
+ffmpg_config += --disable-devices --disable-doc
+ffmpg_config += --disable-ffplay --disable-ffmpeg
+ffmpg_config += --disable-ffprobe --disable-ffserver
+ffmpg_config += --enable-gpl --enable-runtime-cpudetect
+ffmpg_config += --enable-postproc --enable-pthreads
+ffmpg_config += --enable-muxer=spdif --enable-muxer=adts
+ffmpg_config += --enable-muxer=asf --enable-muxer=ipod
+ffmpg_config += --enable-encoder=ac3 --enable-encoder=aac
+ffmpg_config += --enable-encoder=wmav2 --enable-protocol=http
+ifeq ($(CROSS_COMPILING), yes)
+  ffmpg_config += --arch=$(CPU) --enable-cross-compile
+endif
+ifeq ($(OS), linux)
+  ffmpg_config += --target-os=$(OS) --cpu=$(CPU)
+  ffmpg_config += --enable-vdpau --enable-vaapi --enable-gnutls
+  ffmpg_config += --enable-libvorbis --enable-muxer=ogg --enable-encoder=libvorbis
+endif
+ifeq ($(OS), android)
+  ifeq ($(findstring arm, $(CPU)), arm)
+    ffmpg_config += --cpu=cortex-a9
+  else
+    ffmpg_config += --cpu=i686 --disable-mmx
+  endif
+  ffmpg_config += --target-os=linux
+endif
+ifeq ($(OS), ios)
+  ffmpg_config += --cpu=cortex-a8 --yasmexe=$(NATIVEPREFIX)/bin/yasm
+  ffmpg_config += --disable-decoder=mpeg_xvmc --enable-vda --disable-crystalhd
+endif
+ifeq ($(OS), osx)
+  ffmpg_config += --disable-decoder=mpeg_xvmc --enable-vda --disable-crystalhd
+endif
+ifeq ($(findstring arm, $(CPU)), arm)
+  ffmpg_config += --enable-pic --disable-armv5te --disable-armv6t2
+endif
+ifeq ($(Configuration), Release)
+  ffmpg_config += --disable-debug
+endif
+
+
+CLEAN_FILES=$(ARCHIVE) $(PLATFORM)
+
+all: .installed-$(PLATFORM)
+
+$(TARBALLS_LOCATION)/$(ARCHIVE):
+       cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) -Ls --create-dirs -f -o $(TARBALLS_LOCATION)/$(ARCHIVE) $(BASE_URL)/$(VERSION).tar.gz
+
+$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
+       rm -rf $(PLATFORM); mkdir -p $(PLATFORM)
+       cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
+       cd $(PLATFORM); sed -i "s%pkg_config_default=pkg-config%export PKG_CONFIG_LIBDIR=$(PREFIX)/lib/pkgconfig\npkg_config_default=$(NATIVEPREFIX)/bin/pkg-config%" configure
+       cd $(PLATFORM);\
+       CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \
+       ./configure $(ffmpg_config)
+
+build: $(PLATFORM)
+       $(MAKE) -C $(PLATFORM)
+
+.installed-$(PLATFORM): build
+       $(MAKE) -C $(PLATFORM) install
+       touch $@
+
+clean:
+       $(MAKE) -C $(PLATFORM) clean
+       rm -f .installed-$(PLATFORM)
+
+distclean::
+       rm -rf $(PLATFORM) .installed-$(PLATFORM)
+