ffmpeg: fix arm build

This commit is contained in:
Nikolay Amiantov 2017-05-19 01:59:44 +03:00
parent c5a9ad1880
commit 6679dbbd60

View File

@ -55,6 +55,8 @@ let
# Disable dependency that needs fixes before it will work on Darwin or Arm # Disable dependency that needs fixes before it will work on Darwin or Arm
disDarwinOrArmFix = origArg: minVer: fixArg: if ((isDarwin || isArm) && reqMin minVer) then fixArg else origArg; disDarwinOrArmFix = origArg: minVer: fixArg: if ((isDarwin || isArm) && reqMin minVer) then fixArg else origArg;
vaapiSupport = reqMin "0.6" && ((isLinux || isFreeBSD) && !isArm);
in in
assert openglSupport -> mesa != null; assert openglSupport -> mesa != null;
@ -121,7 +123,7 @@ stdenv.mkDerivation rec {
"--enable-libmp3lame" "--enable-libmp3lame"
(ifMinVer "1.2" "--enable-iconv") (ifMinVer "1.2" "--enable-iconv")
"--enable-libtheora" "--enable-libtheora"
(ifMinVer "0.6" (enableFeature (isLinux || isFreeBSD) "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") (disDarwinOrArmFix (ifMinVer "0.6" "--enable-libvpx") "0.6" "--disable-libvpx")
@ -197,8 +199,7 @@ stdenv.mkDerivation rec {
installFlags = [ "install-man" ]; installFlags = [ "install-man" ];
passthru = { passthru = {
vaapiSupport = if reqMin "0.6" && ((isLinux || isFreeBSD) && !isArm) then true else false; inherit vaapiSupport vdpauSupport;
inherit vdpauSupport;
}; };
meta = with stdenv.lib; { meta = with stdenv.lib; {