[gnome-build-meta/abderrahim/flatpak-sdk-fixes: 7/9] sdk: build our own version of ffmpeg



commit ec24b7f9aa966c0f3f89394a6970897f06a99d80
Author: Abderrahim Kitouni <akitouni gnome org>
Date:   Wed Sep 5 16:00:35 2018 +0100

    sdk: build our own version of ffmpeg

 elements/sdk-platform.bst |  5 +--
 elements/sdk/ffmpeg.bst   | 94 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 96 insertions(+), 3 deletions(-)
---
diff --git a/elements/sdk-platform.bst b/elements/sdk-platform.bst
index 68c3f31..a6eb328 100644
--- a/elements/sdk-platform.bst
+++ b/elements/sdk-platform.bst
@@ -15,6 +15,7 @@ depends:
 - sdk/dbus-glib.bst
 - sdk/dconf.bst
 - sdk/enchant-2.bst
+- sdk/ffmpeg.bst
 - sdk/gcab.bst
 - sdk/gcr.bst
 - sdk/gdk-pixbuf.bst
@@ -62,7 +63,7 @@ depends:
 # update our reference to add any new elements.
 
 # Currently, the elements we want to build ourselves, and not use from freedesktop-sdk are:
-# appstream-glib, at-spi2-*, atk, dconf, gcab, gdk-pixbuf, geoclue2, glib-networking,
+# appstream-glib, at-spi2-*, atk, dconf, ffmpeg, gcab, gdk-pixbuf, geoclue2, glib-networking,
 # gobject-introspection, gstreamer-*, gtk3, ibus, json-glib, libcroco, librsvg,
 # libsoup, os-release, pango, sdl2* and zenity.
 
@@ -88,8 +89,6 @@ depends:
   junction: freedesktop-sdk.bst
 - filename: desktop/emoji-one-font.bst
   junction: freedesktop-sdk.bst
-- filename: desktop/ffmpeg.bst
-  junction: freedesktop-sdk.bst
 - filename: desktop/flatpak-xdg-utils.bst
   junction: freedesktop-sdk.bst
 - filename: desktop/fontconfig.bst
diff --git a/elements/sdk/ffmpeg.bst b/elements/sdk/ffmpeg.bst
new file mode 100644
index 0000000..9cbe4d0
--- /dev/null
+++ b/elements/sdk/ffmpeg.bst
@@ -0,0 +1,94 @@
+kind: manual
+sources:
+- kind: git
+  url: https://git.ffmpeg.org/ffmpeg.git
+  track: n4.0.2
+depends:
+- sdk/sdl2.bst
+- filename: desktop/fontconfig.bst
+  junction: freedesktop-sdk.bst
+- filename: desktop/freetype.bst
+  junction: freedesktop-sdk.bst
+- filename: desktop/libfdk-aac.bst
+  junction: freedesktop-sdk.bst
+- filename: desktop/lame.bst
+  junction: freedesktop-sdk.bst
+- filename: desktop/mesa.bst
+  junction: freedesktop-sdk.bst
+- filename: desktop/mpg123.bst
+  junction: freedesktop-sdk.bst
+- filename: desktop/openal.bst
+  junction: freedesktop-sdk.bst
+- filename: desktop/libpulse.bst
+  junction: freedesktop-sdk.bst
+- filename: base.bst
+  junction: freedesktop-sdk.bst
+  type: build
+- filename: base-platform.bst
+  junction: freedesktop-sdk.bst
+  type: runtime
+variables:
+  ffmpeg-prefix: "%{prefix}"
+  ffmpeg-libdir: "%{libdir}"
+  ffmpeg-arch: "%{arch}"
+  (?):
+  - arch == "i386":
+        ffmpeg-arch: x86
+
+  conf-local: |
+    --prefix="%{ffmpeg-prefix}" \
+    --libdir="%{ffmpeg-libdir}" \
+    --disable-debug \
+    --disable-doc \
+    --disable-static \
+    --enable-optimizations \
+    --enable-shared \
+    --disable-ffplay \
+    --disable-ffprobe \
+    --disable-everything \
+    --enable-gnutls \
+    --enable-libfdk-aac \
+    --enable-libmp3lame \
+    --enable-libfontconfig \
+    --enable-libfreetype \
+    --enable-libopus \
+    --enable-libpulse \
+    --enable-libspeex \
+    --enable-libtheora \
+    --enable-libvorbis \
+    --enable-libvpx \
+    --enable-libwebp \
+    --enable-openal \
+    --enable-opengl \
+    --enable-sdl2 \
+    --enable-encoder=ac3,mp2,libmp3lame,libfdk_aac \
+    --enable-decoder=pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw \
+    --enable-decoder=pcm_u8,pcm_s16le,pcm_s24le,pcm_f32le \
+    --enable-decoder=theora,vorbis,vp8,vp9,mp2,mp3,flac,webp,ac3,libfdk_aac \
+    --enable-decoder=rawvideo,png,gif \
+    --enable-parser=opus,vp3,vorbis,vp8,mpegaudio,flac,aac,ac3 \
+    --enable-demuxer=ogg,matroska,wav,mp3,gif,flac,aac,ac3,m4a \
+    --enable-filter=crop,scale \
+    --enable-protocol=file \
+    --arch="%{ffmpeg-arch}"
+# ffmpeg is not using autotools, but a configure and Makefile files
+config:
+  configure-commands:
+  - ./configure %{conf-local}
+  build-commands:
+  - make
+  install-commands:
+  - make -j1 DESTDIR="%{install-root}" install
+public:
+  bst:
+    split-rules:
+      devel:
+        (>):
+        - "%{libdir}/libavdevice.so"
+        - "%{libdir}/libavcodec.so"
+        - "%{libdir}/libswscale.so"
+        - "%{libdir}/libpostproc.so"
+        - "%{libdir}/libavutil.so"
+        - "%{libdir}/libavfilter.so"
+        - "%{libdir}/libavformat.so"
+        - "%{libdir}/libswresample.so"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]