summary refs log tree commit diff
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2011-04-23 21:06:39 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2011-04-23 21:06:39 +0000
commitb2e493a858c8f0a9f0216b7d5b112d3614454a3b (patch)
tree92488f21075f03a7f8cd6fe4697493bbb66756ed
parent3b0ea0e5d40faec4e17fb55c0a16e26d3505e2ad (diff)
downloadnixlib-b2e493a858c8f0a9f0216b7d5b112d3614454a3b.tar
nixlib-b2e493a858c8f0a9f0216b7d5b112d3614454a3b.tar.gz
nixlib-b2e493a858c8f0a9f0216b7d5b112d3614454a3b.tar.bz2
nixlib-b2e493a858c8f0a9f0216b7d5b112d3614454a3b.tar.lz
nixlib-b2e493a858c8f0a9f0216b7d5b112d3614454a3b.tar.xz
nixlib-b2e493a858c8f0a9f0216b7d5b112d3614454a3b.tar.zst
nixlib-b2e493a858c8f0a9f0216b7d5b112d3614454a3b.zip
Updating MPlayer to the snapshot of today.
I unpack ffmpeg.src where mplayer wants, taking 'ffmpeg' in the function arguments. Maybe it is not
very nice.

I've not checked if the rest of dependencies are needed either.

And someone should store the snapshot somewhere more permanent.


svn path=/nixpkgs/trunk/; revision=26939
-rw-r--r--pkgs/applications/video/MPlayer/default.nix35
1 files changed, 25 insertions, 10 deletions
diff --git a/pkgs/applications/video/MPlayer/default.nix b/pkgs/applications/video/MPlayer/default.nix
index 11391cea975b..b5d40160e5ad 100644
--- a/pkgs/applications/video/MPlayer/default.nix
+++ b/pkgs/applications/video/MPlayer/default.nix
@@ -1,6 +1,6 @@
 { alsaSupport ? true, xvSupport ? true, theoraSupport ? true, cacaSupport ? true
 , xineramaSupport ? true, randrSupport ? true, dvdnavSupport ? true
-, stdenv, fetchurl, x11, freetype, fontconfig, zlib
+, stdenv, fetchurl, x11, freetype, fontconfig, zlib, ffmpeg
 , alsaLib ? null, libXv ? null, libtheora ? null, libcaca ? null
 , libXinerama ? null, libXrandr ? null, libdvdnav ? null
 , cdparanoia ? null, cddaSupport ? true
@@ -65,15 +65,22 @@ let
 in  
 
 stdenv.mkDerivation rec {
-  name = "MPlayer-1.0-pre20101227";
+  name = "mplayer-20110423";
 
   src = fetchurl {
-    url = http://nixos.org/tarballs/mplayer-snapshot-20101227.tar.bz2;
-    sha256 = "0q9rvjz3byvs0qlnb9jbnw3qs6c3vdcqaqxm1rnql8kqic442hv2";
+    # Old kind of URL:
+    # url = http://nixos.org/tarballs/mplayer-snapshot-20101227.tar.bz2;
+    # Snapshot I took on 20110423
+    url = http://www.mplayerhq.hu/MPlayer/releases/mplayer-export-snapshot.tar.bz2;
+    sha256 = "cc1b3fda75b172f02c3f46581cfb2c17f4090997fe9314ad046e464a76b858bb";
   };
 
+  prePatch = ''
+    sed -i /^_install_strip/d configure
+  '';
+
   buildInputs =
-    [ freetype zlib pkgconfig ]
+    [ freetype zlib pkgconfig ffmpeg ]
     ++ stdenv.lib.optional x11Support [ libX11 libXext mesa ]
     ++ stdenv.lib.optional alsaSupport alsaLib
     ++ stdenv.lib.optional xvSupport libXv
@@ -94,6 +101,11 @@ stdenv.mkDerivation rec {
 
   buildNativeInputs = [ yasm ];
 
+  preConfigure = ''
+    tar xf ${ffmpeg.src}
+    mv ffmpeg* ffmpeg
+  '';
+
   configureFlags = ''
     ${if cacaSupport then "--enable-caca" else "--disable-caca"}
     ${if dvdnavSupport then "--enable-dvdnav --enable-dvdread --disable-dvdread-internal" else ""}
@@ -103,6 +115,8 @@ stdenv.mkDerivation rec {
     ${if x11Support then "--enable-x11" else ""}
     --disable-xanim
     --disable-ivtv
+    --enable-vidix
+    --enable-fbdev
   '';
 
   NIX_LDFLAGS = if x11Support then "-lX11 -lXext" else "";
@@ -115,14 +129,15 @@ stdenv.mkDerivation rec {
     '';
 
   crossAttrs = {
-    preConfigure = ''
+    dontSetConfigureCross = true;
+    # Some things (vidix) are nanonote specific. Once someone cares, we can make options from them.
+    preConfigure = preConfigure + ''
       configureFlags="`echo $configureFlags |
-        sed -e 's/--build[^ ]\+//' \
-        -e 's/--host[^ ]\+//' \
-        -e 's/--codecsdir[^ ]\+//' \
+        sed -e 's/--codecsdir[^ ]\+//' \
         -e 's/--enable-runtime-cpudetection//' `"
       configureFlags="$configureFlags --target=${stdenv.cross.arch}-linux
-        --cc=$crossConfig-gcc --as=$crossConfig-as"
+        --enable-cross-compile --cc=$crossConfig-gcc --as=$crossConfig-as
+        --disable-vidix-pcidb --with-vidix-drivers=no --host-cc=gcc"
     '';
   };