From cf8fad5c837eff0c9becc5c42c3d549cc3eb455f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 5 Dec 2006 22:28:45 +0000 Subject: [PATCH] * MPlayer 1.0rc1. * Added freefont-ttf (use to provide a default OSD font for MPlayer). svn path=/nixpkgs/trunk/; revision=7241 --- pkgs/applications/video/MPlayer/builder.sh | 20 ---------- pkgs/applications/video/MPlayer/default.nix | 39 ++++++++++++------- .../video/MPlayer/win32codecs/default.nix | 6 +-- pkgs/data/fonts/freefont-ttf/default.nix | 11 ++++++ pkgs/top-level/all-packages.nix | 8 +++- 5 files changed, 44 insertions(+), 40 deletions(-) delete mode 100644 pkgs/applications/video/MPlayer/builder.sh create mode 100644 pkgs/data/fonts/freefont-ttf/default.nix diff --git a/pkgs/applications/video/MPlayer/builder.sh b/pkgs/applications/video/MPlayer/builder.sh deleted file mode 100644 index 7b2958689f3c..000000000000 --- a/pkgs/applications/video/MPlayer/builder.sh +++ /dev/null @@ -1,20 +0,0 @@ -source $stdenv/setup - -postUnpack() { - unpackFile $fonts -} -postUnpack=postUnpack - -configureFlags="\ - --with-win32libdir=$win32codecs \ - --with-reallibdir=$win32codecs \ - --enable-runtime-cpudetection \ - --enable-x11 --with-x11incdir=/no-such-dir --with-x11libdir=/no-such-dir - $configureFlags" - -postInstall() { - cp -p ../font-arial-iso-8859-1/font-arial-18-iso-8859-1/* $out/share/mplayer/font -} -postInstall=postInstall - -genericBuild diff --git a/pkgs/applications/video/MPlayer/default.nix b/pkgs/applications/video/MPlayer/default.nix index fda3200509df..225b0669696b 100644 --- a/pkgs/applications/video/MPlayer/default.nix +++ b/pkgs/applications/video/MPlayer/default.nix @@ -1,7 +1,7 @@ { alsaSupport ? false, xvSupport ? true, theoraSupport ? false, cacaSupport ? false , xineramaSupport ? false, randrSupport ? false -, stdenv, fetchurl, x11, freetype, zlib -, alsa ? null, libXv ? null, libtheora ? null, libcaca ? null +, stdenv, fetchurl, x11, freetype, freefont_ttf, zlib +, alsa ? null, libX11, libXv ? null, libtheora ? null, libcaca ? null , libXinerama ? null, libXrandr ? null }: @@ -12,23 +12,22 @@ assert cacaSupport -> libcaca != null; assert xineramaSupport -> libXinerama != null; assert randrSupport -> libXrandr != null; -stdenv.mkDerivation { - name = "MPlayer-1.0pre8"; - - builder = ./builder.sh; - src = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/MPlayer-1.0pre8.tar.bz2; - md5 = "f82bb2bc51b6cd5e5dd96f88f6f98582"; - }; - fonts = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/font-arial-iso-8859-1.tar.bz2; - md5 = "1ecd31d17b51f16332b1fcc7da36b312"; - }; +let win32codecs = (import ./win32codecs) { inherit stdenv fetchurl; }; +in + +stdenv.mkDerivation { + name = "MPlayer-1.0rc1"; + + src = fetchurl { + url = http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc1.tar.bz2; + sha1 = "a450c0b0749c343a8496ba7810363c9d46dfa73c"; + }; + buildInputs = [ x11 libXv freetype zlib (if alsaSupport then alsa else null) @@ -39,7 +38,17 @@ stdenv.mkDerivation { (if randrSupport then libXrandr else null) ]; - configureFlags = if cacaSupport then "--enable-caca" else "--disable-caca"; + configureFlags = " + ${if cacaSupport then "--enable-caca" else "--disable-caca"} + --with-win32libdir=${win32codecs} + --with-reallibdir=${win32codecs} + --enable-runtime-cpudetection + --enable-x11 --with-x11libdir=/no-such-dir --with-extraincdir=${libX11}/include + --disable-xanim + "; + + # Provide a reasonable standard font. Maybe we should symlink here. + postInstall = "cp ${freefont_ttf}/share/fonts/truetype/FreeSans.ttf $out/share/mplayer/subfont.ttf"; # These fix MPlayer's aspect ratio when run in a screen rotated with # Xrandr. diff --git a/pkgs/applications/video/MPlayer/win32codecs/default.nix b/pkgs/applications/video/MPlayer/win32codecs/default.nix index 13a68aa36615..8548954a6626 100644 --- a/pkgs/applications/video/MPlayer/win32codecs/default.nix +++ b/pkgs/applications/video/MPlayer/win32codecs/default.nix @@ -1,8 +1,8 @@ {stdenv, fetchurl}: stdenv.mkDerivation { - name = "MPlayer-codecs-essential-20060611"; + name = "MPlayer-codecs-essential-20061022"; builder = ./builder.sh; src = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/essential-20060611.tar.bz2; - md5 = "26ec3f9feed5f89814b2ec5f436e937b"; + url = http://www1.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2; + md5 = "abcf4a3abc16cf88c9df7e0a77e9b941"; }; } diff --git a/pkgs/data/fonts/freefont-ttf/default.nix b/pkgs/data/fonts/freefont-ttf/default.nix new file mode 100644 index 000000000000..19e1a21450d3 --- /dev/null +++ b/pkgs/data/fonts/freefont-ttf/default.nix @@ -0,0 +1,11 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation { + name = "freefont-ttf-20060126"; + src = fetchurl { + url = http://download.savannah.gnu.org/releases/freefont/freefont-ttf-20060126.tar.gz; + md5 = "822aba4e2ed065d9d3ded6e26e495854"; + }; + buildPhase = "true"; + installPhase = "ensureDir $out/share/fonts/truetype; cp *.ttf $out/share/fonts/truetype"; +} \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e826e01eca9c..70e81f40efea 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2279,6 +2279,10 @@ rec { inherit fetchurl stdenv; }; + freefont_ttf = import ../data/fonts/freefont-ttf { + inherit fetchurl stdenv; + }; + ### APPLICATIONS @@ -2508,8 +2512,8 @@ rec { }; MPlayer = import ../applications/video/MPlayer { - inherit fetchurl stdenv freetype x11 zlib libtheora libcaca; - inherit (xlibs) libXv libXinerama libXrandr; + inherit fetchurl stdenv freetype x11 zlib libtheora libcaca freefont_ttf; + inherit (xlibs) libX11 libXv libXinerama libXrandr; alsaSupport = true; alsa = alsaLib; theoraSupport = true;