Author: viric
Date: Wed Sep  1 08:36:09 2010
New Revision: 23578
URL: https://svn.nixos.org/websvn/nix/?rev=23578&sc=1

Log:
Make mplayer build on the loongson2f

Modified:
   nixpkgs/branches/stdenv-updates/pkgs/applications/video/MPlayer/default.nix
   nixpkgs/branches/stdenv-updates/pkgs/development/libraries/ffmpeg/default.nix
   nixpkgs/branches/stdenv-updates/pkgs/development/libraries/libvpx/default.nix
   nixpkgs/branches/stdenv-updates/pkgs/top-level/all-packages.nix

Modified: 
nixpkgs/branches/stdenv-updates/pkgs/applications/video/MPlayer/default.nix
==============================================================================
--- nixpkgs/branches/stdenv-updates/pkgs/applications/video/MPlayer/default.nix 
Wed Sep  1 08:34:53 2010        (r23577)
+++ nixpkgs/branches/stdenv-updates/pkgs/applications/video/MPlayer/default.nix 
Wed Sep  1 08:36:09 2010        (r23578)
@@ -5,7 +5,7 @@
 , libXinerama ? null, libXrandr ? null, libdvdnav ? null
 , cdparanoia ? null, cddaSupport ? true
 , amrnb ? null, amrwb ? null, amrSupport ? false
-, x11Support ? true, libX11 ? null
+, x11Support ? true, libX11 ? null, libXext ? null
 , jackaudioSupport ? false, jackaudio ? null
 , x264Support ? false, x264 ? null
 , xvidSupport ? false, xvidcore ? null
@@ -72,7 +72,7 @@
 
   buildInputs =
     [ freetype zlib pkgconfig ]
-    ++ stdenv.lib.optional x11Support [ libX11 mesa ]
+    ++ stdenv.lib.optional x11Support [ libX11 libXext mesa ]
     ++ stdenv.lib.optional alsaSupport alsaLib
     ++ stdenv.lib.optional xvSupport libXv
     ++ stdenv.lib.optional theoraSupport libtheora
@@ -96,7 +96,7 @@
     ${if dvdnavSupport then "--enable-dvdnav --enable-dvdread 
--disable-dvdread-internal" else ""}
     ${if x264Support then "--enable-x264 --extra-libs=-lx264" else ""}
     ${if codecs != null then "--codecsdir=${codecs}" else ""}
-    --enable-runtime-cpudetection
+    ${if (stdenv.isi686 || stdenv.isx86_64) then 
"--enable-runtime-cpudetection" else ""}
     ${if x11Support then "--enable-x11" else ""}
     --disable-xanim
     --disable-ivtv

Modified: 
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/ffmpeg/default.nix
==============================================================================
--- 
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/ffmpeg/default.nix   
    Wed Sep  1 08:34:53 2010        (r23577)
+++ 
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/ffmpeg/default.nix   
    Wed Sep  1 08:36:09 2010        (r23578)
@@ -1,5 +1,5 @@
 {stdenv, fetchurl, faad2, libtheora, speex, libvorbis, x264, pkgconfig, 
xvidcore, lame, yasm
-, libvpx}:
+, vpxSupport ? false, libvpx ? null}:
 
 stdenv.mkDerivation {
   name = "ffmpeg-0.6";
@@ -12,25 +12,26 @@
   # `--enable-gpl' (as well as the `postproc' and `swscale') mean that
   # the resulting library is GPL'ed, so it can only be used in GPL'ed
   # applications.
-  configureFlags = ''
-    --enable-gpl
-    --enable-postproc
-    --enable-swscale
-    --disable-ffserver
-    --disable-ffplay
-    --enable-libfaad
-    --enable-shared
-    --enable-libtheora
-    --enable-libvorbis
-    --enable-libspeex
-    --enable-libx264
-    --enable-libxvid
-    --enable-libmp3lame
-    --enable-runtime-cpudetect
-    --enable-libvpx
-  '';
+  configureFlags = [
+    "--enable-gpl"
+    "--enable-postproc"
+    "--enable-swscale"
+    "--disable-ffserver"
+    "--disable-ffplay"
+    "--enable-libfaad"
+    "--enable-shared"
+    "--enable-libtheora"
+    "--enable-libvorbis"
+    "--enable-libspeex"
+    "--enable-libx264"
+    "--enable-libxvid"
+    "--enable-libmp3lame"
+    "--enable-runtime-cpudetect"
+  ] ++
+    stdenv.lib.optional vpxSupport "--enable-libvpx";
 
-  buildInputs = [faad2 libtheora speex libvorbis x264 pkgconfig xvidcore lame 
yasm libvpx];
+  buildInputs = [ faad2 libtheora speex libvorbis x264 pkgconfig xvidcore lame 
yasm ]
+    ++ stdenv.lib.optional vpxSupport libvpx;
 
   meta = {
     homepage = http://www.ffmpeg.org/;

Modified: 
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/libvpx/default.nix
==============================================================================
--- 
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/libvpx/default.nix   
    Wed Sep  1 08:34:53 2010        (r23577)
+++ 
nixpkgs/branches/stdenv-updates/pkgs/development/libraries/libvpx/default.nix   
    Wed Sep  1 08:36:09 2010        (r23578)
@@ -11,14 +11,25 @@
   patchPhase = ''
     sed -e 's,/bin/bash,${bash}/bin/bash,' -i configure build/make/version.sh \
       examples/gen_example_code.sh
+    sed -e '/enable linux/d' -i configure
   '';
 
-  configurePhase = ''
+  configureScript = "../configure";
+
+  preConfigure = ''
     mkdir -p build
     cd build
-    ../configure --disable-install-srcs --disable-examples --enable-vp8 
--enable-runtime-cpu-detect --enable-shared --enable-pic
   '';
 
+  configureFlags = [
+    "--disable-install-srcs"
+    "--disable-examples"
+    "--enable-vp8"
+    "--enable-runtime-cpu-detect"
+    "--enable-shared"
+    "--enable-pic"
+  ];
+
   installPhase = ''
     make quiet=false DIST_DIR=$out install
   '';

Modified: nixpkgs/branches/stdenv-updates/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/branches/stdenv-updates/pkgs/top-level/all-packages.nix     Wed Sep 
 1 08:34:53 2010        (r23577)
+++ nixpkgs/branches/stdenv-updates/pkgs/top-level/all-packages.nix     Wed Sep 
 1 08:36:09 2010        (r23578)
@@ -2723,7 +2723,9 @@
 
   fcgi = callPackage ../development/libraries/fcgi { };
 
-  ffmpeg = callPackage ../development/libraries/ffmpeg { };
+  ffmpeg = callPackage ../development/libraries/ffmpeg {
+    vpxSupport = if !stdenv.isMips then true else false;
+  };
 
   fftw = callPackage ../development/libraries/fftw {
     singlePrecision = false;
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to