diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2016-03-22 15:00:36 +0100 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@viric.name> | 2016-03-22 15:09:59 +0100 |
commit | bd58b895e05d889960d915751611468ad77220b0 (patch) | |
tree | ba1a063f8871974882e38e55f43b93b329849810 /pkgs/development/libraries/ffmpeg | |
parent | 40b05382397ed448c76e30ab034669da12d970f4 (diff) | |
download | nixlib-bd58b895e05d889960d915751611468ad77220b0.tar nixlib-bd58b895e05d889960d915751611468ad77220b0.tar.gz nixlib-bd58b895e05d889960d915751611468ad77220b0.tar.bz2 nixlib-bd58b895e05d889960d915751611468ad77220b0.tar.lz nixlib-bd58b895e05d889960d915751611468ad77220b0.tar.xz nixlib-bd58b895e05d889960d915751611468ad77220b0.tar.zst nixlib-bd58b895e05d889960d915751611468ad77220b0.zip |
Making ffmpeg friendly for arm.
Diffstat (limited to 'pkgs/development/libraries/ffmpeg')
-rw-r--r-- | pkgs/development/libraries/ffmpeg/generic.nix | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 1113db5c1367..d8f785fb7e5a 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -1,11 +1,13 @@ { stdenv, fetchurl, pkgconfig, perl, texinfo, yasm , alsaLib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg -, libtheora, libva, libvdpau, libvorbis, libvpx, lzma, libpulseaudio, SDL, soxr +, libtheora, libva, libvorbis, libvpx, lzma, libpulseaudio, soxr , x264, xvidcore, zlib , openglSupport ? false, mesa ? null # Build options , runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime , multithreadBuild ? true # Multithreading via pthreads/win32 threads +, sdlSupport ? !stdenv.isArm, SDL ? null +, vdpauSupport ? !stdenv.isArm, libvdpau ? null # Developer options , debugDeveloper ? false , optimizationsDeveloper ? true @@ -39,7 +41,7 @@ */ let - inherit (stdenv) icCygwin isDarwin isFreeBSD isLinux; + inherit (stdenv) icCygwin isDarwin isFreeBSD isLinux isArm; inherit (stdenv.lib) optional optionals enableFeature; cmpVer = builtins.compareVersions; @@ -51,8 +53,8 @@ let # Version specific fix verFix = withoutFix: fixVer: withFix: if reqMatch fixVer then withFix else withoutFix; - # Disable dependency that needs fixes before it will work on Darwin - disDarwinFix = origArg: minVer: fixArg: if (isDarwin && reqMin minVer) then fixArg else origArg; + # 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; in assert openglSupport -> mesa != null; @@ -117,11 +119,11 @@ stdenv.mkDerivation rec { (ifMinVer "0.6" (enableFeature (isLinux || isFreeBSD) "vaapi")) "--enable-vdpau" "--enable-libvorbis" - (disDarwinFix (ifMinVer "0.6" "--enable-libvpx") "0.6" "--disable-libvpx") + (disDarwinOrArmFix (ifMinVer "0.6" "--enable-libvpx") "0.6" "--disable-libvpx") (ifMinVer "2.4" "--enable-lzma") (ifMinVer "2.2" (enableFeature openglSupport "opengl")) - (disDarwinFix (ifMinVer "0.9" "--enable-libpulse") "0.9" "--disable-libpulse") - (ifMinVer "2.5" "--enable-sdl") # Only configurable since 2.5, auto detected before then + (disDarwinOrArmFix (ifMinVer "0.9" "--enable-libpulse") "0.9" "--disable-libpulse") + (ifMinVer "2.5" (if sdlSupport then "--enable-sdl" else "")) # Only configurable since 2.5, auto detected before then (ifMinVer "1.2" "--enable-libsoxr") "--enable-libx264" "--enable-libxvid" @@ -141,10 +143,13 @@ stdenv.mkDerivation rec { bzip2 fontconfig freetype gnutls libiconv lame libass libogg libtheora libvdpau libvorbis lzma SDL soxr x264 xvidcore zlib ] ++ optional openglSupport mesa - ++ optionals (!isDarwin) [ libvpx libpulseaudio ] # Need to be fixed on Darwin - ++ optional (isLinux || isFreeBSD) libva + ++ optionals (!isDarwin && !isArm) [ libvpx libpulseaudio ] # Need to be fixed on Darwin and ARM + ++ optional ((isLinux || isFreeBSD) && !isArm) libva ++ optional isLinux alsaLib - ++ optional isDarwin Cocoa; + ++ optional isDarwin Cocoa + ++ optional vdpauSupport libvdpau + ++ optional sdlSupport SDL; + enableParallelBuilding = true; @@ -178,8 +183,8 @@ stdenv.mkDerivation rec { }; passthru = { - vaapiSupport = if reqMin "0.6" && (isLinux || isFreeBSD) then true else false; - vdpauSupport = true; + vaapiSupport = if reqMin "0.6" && ((isLinux || isFreeBSD) && !isArm) then true else false; + inherit vdpauSupport; }; meta = with stdenv.lib; { |