Merge pull request #43601 from thefloweringash/ffmpeg-libvpx

ffmpeg, ffmpeg-full: enable libvpx on Darwin
This commit is contained in:
xeji 2018-07-16 17:16:56 +02:00 committed by GitHub
commit f4fbdf0578
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -26,7 +26,7 @@
* see `ffmpeg-full' for an ffmpeg build with all features included. * see `ffmpeg-full' for an ffmpeg build with all features included.
* *
* Need fixes to support Darwin: * Need fixes to support Darwin:
* libvpx pulseaudio * pulseaudio
* *
* Known issues: * Known issues:
* 0.6 - fails to compile (unresolved) (so far, only disabling a number of * 0.6 - fails to compile (unresolved) (so far, only disabling a number of
@ -58,6 +58,8 @@ let
disDarwinOrArmFix = origArg: minVer: fixArg: if ((isDarwin || isAarch32) && reqMin minVer) then fixArg else origArg; disDarwinOrArmFix = origArg: minVer: fixArg: if ((isDarwin || isAarch32) && reqMin minVer) then fixArg else origArg;
vaapiSupport = reqMin "0.6" && ((isLinux || isFreeBSD) && !isAarch32); vaapiSupport = reqMin "0.6" && ((isLinux || isFreeBSD) && !isAarch32);
vpxSupport = reqMin "0.6" && !isAarch32;
in in
assert openglSupport -> libGLU_combined != null; assert openglSupport -> libGLU_combined != null;
@ -130,7 +132,7 @@ stdenv.mkDerivation rec {
(ifMinVer "0.6" (enableFeature vaapiSupport "vaapi")) (ifMinVer "0.6" (enableFeature vaapiSupport "vaapi"))
"--enable-vdpau" "--enable-vdpau"
"--enable-libvorbis" "--enable-libvorbis"
(disDarwinOrArmFix (ifMinVer "0.6" "--enable-libvpx") "0.6" "--disable-libvpx") (ifMinVer "0.6" (enableFeature vpxSupport "libvpx"))
(ifMinVer "2.4" "--enable-lzma") (ifMinVer "2.4" "--enable-lzma")
(ifMinVer "2.2" (enableFeature openglSupport "opengl")) (ifMinVer "2.2" (enableFeature openglSupport "opengl"))
(disDarwinOrArmFix (ifMinVer "0.9" "--enable-libpulse") "0.9" "--disable-libpulse") (disDarwinOrArmFix (ifMinVer "0.9" "--enable-libpulse") "0.9" "--disable-libpulse")
@ -159,7 +161,8 @@ stdenv.mkDerivation rec {
bzip2 fontconfig freetype gnutls libiconv lame libass libogg libtheora bzip2 fontconfig freetype gnutls libiconv lame libass libogg libtheora
libvdpau libvorbis lzma soxr x264 x265 xvidcore zlib libopus libvdpau libvorbis lzma soxr x264 x265 xvidcore zlib libopus
] ++ optional openglSupport libGLU_combined ] ++ optional openglSupport libGLU_combined
++ optionals (!isDarwin && !isAarch32) [ libvpx libpulseaudio ] # Need to be fixed on Darwin and ARM ++ optional vpxSupport libvpx
++ optionals (!isDarwin && !isAarch32) [ libpulseaudio ] # Need to be fixed on Darwin and ARM
++ optional ((isLinux || isFreeBSD) && !isAarch32) libva ++ optional ((isLinux || isFreeBSD) && !isAarch32) libva
++ optional isLinux alsaLib ++ optional isLinux alsaLib
++ optionals isDarwin darwinFrameworks ++ optionals isDarwin darwinFrameworks

View File

@ -9138,7 +9138,6 @@ with pkgs;
game-music-emu = if stdenv.isDarwin then null else game-music-emu; game-music-emu = if stdenv.isDarwin then null else game-music-emu;
libjack2 = if stdenv.isDarwin then null else libjack2; libjack2 = if stdenv.isDarwin then null else libjack2;
libmodplug = if stdenv.isDarwin then null else libmodplug; libmodplug = if stdenv.isDarwin then null else libmodplug;
libvpx = if stdenv.isDarwin then null else libvpx;
openal = if stdenv.isDarwin then null else openal; openal = if stdenv.isDarwin then null else openal;
libpulseaudio = if stdenv.isDarwin then null else libpulseaudio; libpulseaudio = if stdenv.isDarwin then null else libpulseaudio;
samba = if stdenv.isDarwin then null else samba; samba = if stdenv.isDarwin then null else samba;