From b3870f014843733ea832d10b0c7aa43912fe783b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Fri, 30 Apr 2010 21:47:09 +0000 Subject: [PATCH] Adding xvid, to ffmpeg and mplayer. svn path=/nixpkgs/trunk/; revision=21469 --- pkgs/applications/video/MPlayer/default.nix | 4 +++- pkgs/development/libraries/ffmpeg/default.nix | 5 +++-- .../libraries/xvidcore/default.nix | 21 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 9 ++++++-- 4 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 pkgs/development/libraries/xvidcore/default.nix diff --git a/pkgs/applications/video/MPlayer/default.nix b/pkgs/applications/video/MPlayer/default.nix index c9cd1909421c..c93959f93d0a 100644 --- a/pkgs/applications/video/MPlayer/default.nix +++ b/pkgs/applications/video/MPlayer/default.nix @@ -7,6 +7,7 @@ , amrnb ? null, amrwb ? null, amrSupport ? false , jackaudioSupport ? false, jackaudio ? null , x264Support ? false, x264 ? null +, xvidSupport ? false, xvidcore ? null , mesa, pkgconfig, unzip }: @@ -63,7 +64,8 @@ stdenv.mkDerivation { ++ stdenv.lib.optional cddaSupport cdparanoia ++ stdenv.lib.optional jackaudioSupport jackaudio ++ stdenv.lib.optionals amrSupport [ amrnb amrwb ] - ++ stdenv.lib.optional x264Support x264; + ++ stdenv.lib.optional x264Support x264 + ++ stdenv.lib.optional xvidSupport xvidcore; configureFlags = '' ${if cacaSupport then "--enable-caca" else "--disable-caca"} diff --git a/pkgs/development/libraries/ffmpeg/default.nix b/pkgs/development/libraries/ffmpeg/default.nix index 1650c6141f4c..70f7feaaf1a9 100644 --- a/pkgs/development/libraries/ffmpeg/default.nix +++ b/pkgs/development/libraries/ffmpeg/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, faad2, libtheora, speex, libvorbis, x264, pkgconfig}: +{stdenv, fetchurl, faad2, libtheora, speex, libvorbis, x264, pkgconfig, xvidcore}: stdenv.mkDerivation { name = "ffmpeg-0.5.1"; @@ -23,9 +23,10 @@ stdenv.mkDerivation { --enable-libvorbis --enable-libspeex --enable-libx264 + --enable-libxvid ''; - buildInputs = [faad2 libtheora speex libvorbis x264 pkgconfig]; + buildInputs = [faad2 libtheora speex libvorbis x264 pkgconfig xvidcore]; meta = { homepage = http://www.ffmpeg.org/; diff --git a/pkgs/development/libraries/xvidcore/default.nix b/pkgs/development/libraries/xvidcore/default.nix new file mode 100644 index 000000000000..b02ae2b14e9b --- /dev/null +++ b/pkgs/development/libraries/xvidcore/default.nix @@ -0,0 +1,21 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation rec { + name = "xvidcore-1.2.2"; + + src = fetchurl { + url = http://downloads.xvid.org/downloads/xvidcore-1.2.2.tar.bz2; + sha256 = "04bd1clv90i5pdwh6mz3mskyzmxyx5l2nx7lyyb8nhw9whnn0ap4"; + }; + + preConfigure = '' + cd build/generic + ''; + + meta = { + description = "MPEG-4 video codec for PC"; + homepage = http://www.xvid.org/; + license = "GPLv2+"; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ba372ed42996..fa0f47f370c1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3670,7 +3670,7 @@ let }; ffmpeg = import ../development/libraries/ffmpeg { - inherit fetchurl stdenv faad2 libvorbis speex libtheora x264 pkgconfig; + inherit fetchurl stdenv faad2 libvorbis speex libtheora x264 pkgconfig xvidcore; }; fftw = import ../development/libraries/fftw { @@ -5247,6 +5247,10 @@ let ]; }; + xvidcore = import ../development/libraries/xvidcore { + inherit fetchurl stdenv; + }; + zangband = builderDefsPackage (import ../games/zangband) { inherit ncurses flex bison autoconf automake m4 coreutils; }; @@ -7914,7 +7918,7 @@ let MPlayer = import ../applications/video/MPlayer { inherit fetchurl stdenv freetype fontconfig x11 zlib libtheora libcaca libdvdnav - cdparanoia mesa pkgconfig unzip amrnb amrwb jackaudio x264; + cdparanoia mesa pkgconfig unzip amrnb amrwb jackaudio x264 xvidcore; inherit (xlibs) libX11 libXv libXinerama libXrandr; alsaSupport = true; alsa = alsaLib; @@ -7925,6 +7929,7 @@ let cddaSupport = true; amrSupport = getConfig [ "MPlayer" "amr" ] false; x264Support = true; + xvidSupport = true; }; MPlayerPlugin = browser: