forked from mirrors/nixpkgs
* Consolidate MPlayer trunk.nix and default.nix into one.
* Removed the font because MPlayer doesn't use it anymore (it uses fontconfig). * Removed rp9codecs because the Real codecs are included in the "essential" codecs package. * Moved win32codecs into the MPlayer Nix expression. svn path=/nixpkgs/trunk/; revision=21070
This commit is contained in:
parent
98bab41c33
commit
cd56e341de
|
@ -1,10 +1,11 @@
|
|||
{ alsaSupport ? false, xvSupport ? true, theoraSupport ? false, cacaSupport ? false
|
||||
, xineramaSupport ? false, randrSupport ? false, dvdnavSupport ? true
|
||||
, stdenv, fetchurl, x11, freetype, freefont_ttf, zlib
|
||||
, stdenv, fetchurl, x11, freetype, fontconfig, zlib
|
||||
, alsa ? null, libX11, libXv ? null, libtheora ? null, libcaca ? null
|
||||
, libXinerama ? null, libXrandr ? null, libdvdnav ? null
|
||||
, cdparanoia ? null, cddaSupport ? true
|
||||
, amrnb ? null, amrwb ? null, amrSupport ? false
|
||||
, jackaudioSupport ? false, jackaudio ? null
|
||||
, mesa, pkgconfig, unzip
|
||||
}:
|
||||
|
||||
|
@ -16,78 +17,68 @@ assert xineramaSupport -> libXinerama != null;
|
|||
assert randrSupport -> libXrandr != null;
|
||||
assert dvdnavSupport -> libdvdnav != null;
|
||||
assert cddaSupport -> cdparanoia != null;
|
||||
assert jackaudioSupport -> jackaudio != null;
|
||||
assert amrSupport -> (amrnb != null && amrwb != null);
|
||||
|
||||
let
|
||||
|
||||
win32codecs = (import ./win32codecs) {
|
||||
inherit stdenv fetchurl;
|
||||
codecs = stdenv.mkDerivation {
|
||||
name = "MPlayer-codecs-essential-20071007";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://www2.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2;
|
||||
sha256 = "18vls12n12rjw0mzw4pkp9vpcfmd1c21rzha19d7zil4hn7fs2ic";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp -prv * $out
|
||||
'';
|
||||
|
||||
meta = {
|
||||
license = "unfree";
|
||||
};
|
||||
};
|
||||
|
||||
rp9codecs = (import ./rp9codecs) {
|
||||
inherit stdenv fetchurl;
|
||||
};
|
||||
|
||||
srcAmr = fetchurl {
|
||||
url = http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-530.zip;
|
||||
sha256 = "1qyla52jjymhcnbidhwc6a1vm4v1wl27mj4ygp3cpn33swcmkgd0";
|
||||
};
|
||||
|
||||
srcAmrFloat = fetchurl {
|
||||
url = http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-540.zip;
|
||||
sha256 = "1d337h3051w7azipsq7nzf4d25csia2snq3qlhw2sj7282ab042z";
|
||||
};
|
||||
|
||||
srcAmrWBFloat = fetchurl {
|
||||
url = http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26204-540.zip;
|
||||
sha256 = "1mb7g3fy5faz26jjbibxvlbb5b81vwmdsldl3kl8hzg14vcrv1q9";
|
||||
};
|
||||
|
||||
in
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "MPlayer-1.0rc2-r28450";
|
||||
name = "MPlayer-1.0-pre-rc4-20100213";
|
||||
|
||||
# 1.0_rc2 is outdated according to website - use trunk instead
|
||||
src = fetchurl {
|
||||
url = mirror://gentoo/distfiles/mplayer-1.0_rc2_p28450.tar.bz2;
|
||||
sha256 = "0cbils58mq20nablywgjfpfx2pzjgnhin23sb8k1s5h2rxgvi3vf";
|
||||
url = mirror://gentoo/distfiles/mplayer-1.0_rc4_p20100213.tbz2;
|
||||
sha256 = "1c5w49vqavs9pnc5av89v502wfa5g7hfn65ffhpx25ddi1irzh2r";
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
[x11 libXv freetype zlib mesa pkgconfig]
|
||||
[ x11 libXv freetype zlib mesa pkgconfig ]
|
||||
++ stdenv.lib.optional alsaSupport alsa
|
||||
++ stdenv.lib.optional xvSupport libXv
|
||||
++ stdenv.lib.optional theoraSupport libtheora
|
||||
++ stdenv.lib.optional cacaSupport libcaca
|
||||
++ stdenv.lib.optional xineramaSupport libXinerama
|
||||
++ stdenv.lib.optional randrSupport libXrandr
|
||||
++ stdenv.lib.optionals dvdnavSupport [libdvdnav libdvdnav.libdvdread]
|
||||
++ stdenv.lib.optionals dvdnavSupport [ libdvdnav libdvdnav.libdvdread ]
|
||||
++ stdenv.lib.optional cddaSupport cdparanoia
|
||||
++ stdenv.lib.optionals amrSupport [amrnb amrwb];
|
||||
++ stdenv.lib.optional jackaudioSupport jackaudio
|
||||
++ stdenv.lib.optionals amrSupport [ amrnb amrwb ];
|
||||
|
||||
configureFlags = ''
|
||||
${if cacaSupport then "--enable-caca" else "--disable-caca"}
|
||||
${if dvdnavSupport then "--enable-dvdnav --enable-dvdread --disable-dvdread-internal" else ""}
|
||||
--win32codecsdir=${win32codecs}
|
||||
--realcodecsdir=${rp9codecs}
|
||||
--codecsdir=${codecs}
|
||||
--enable-runtime-cpudetection
|
||||
--enable-x11 --with-extraincdir=${libX11}/include
|
||||
--enable-x11
|
||||
--disable-xanim
|
||||
--disable-ivtv
|
||||
'';
|
||||
|
||||
NIX_LDFLAGS = "-lX11 -lXext";
|
||||
|
||||
# Provide a reasonable standard font. Maybe we should symlink here.
|
||||
postInstall = ''
|
||||
ensureDir $out/share/mplayer
|
||||
cp ${freefont_ttf}/share/fonts/truetype/FreeSans.ttf $out/share/mplayer/subfont.ttf
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A movie player that supports many video formats";
|
||||
homepage = "http://mplayerhq.hu";
|
||||
license = "GPL";
|
||||
maintainers = [ stdenv.lib.maintainers.eelco ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
{stdenv, fetchurl}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "MPlayer-rp9codecs-20050115";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://www2.mplayerhq.hu/MPlayer/releases/codecs/rp9codecs-20050115.tar.bz2;
|
||||
sha256 = "353c22e2c992a1c730bdd5fade66a94e1a058e38063d2ce064a6510b70c39677";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp -prv * $out
|
||||
'';
|
||||
}
|
|
@ -1,79 +0,0 @@
|
|||
# the hompepage even recommends using trunk
|
||||
{ alsaSupport ? false, xvSupport ? true, theoraSupport ? false, cacaSupport ? false
|
||||
, xineramaSupport ? false, randrSupport ? false, dvdnavSupport ? true
|
||||
, stdenv, fetchurl, x11, freetype, freefont_ttf, zlib
|
||||
, alsa ? null, libX11, libXv ? null, libtheora ? null, libcaca ? null
|
||||
, libXinerama ? null, libXrandr ? null, libdvdnav ? null, jackaudio ? null
|
||||
, cdparanoia ? null, cddaSupport ? true, jackaudioSupport ? true
|
||||
, mesa, pkgconfig
|
||||
, sourceFromHead
|
||||
}:
|
||||
|
||||
assert alsaSupport -> alsa != null;
|
||||
assert xvSupport -> libXv != null;
|
||||
assert theoraSupport -> libtheora != null;
|
||||
assert cacaSupport -> libcaca != null;
|
||||
assert xineramaSupport -> libXinerama != null;
|
||||
assert randrSupport -> libXrandr != null;
|
||||
assert dvdnavSupport -> libdvdnav != null;
|
||||
assert cddaSupport -> cdparanoia != null;
|
||||
assert jackaudioSupport -> jackaudio != null;
|
||||
|
||||
let
|
||||
|
||||
win32codecs = (import ./win32codecs) {
|
||||
inherit stdenv fetchurl;
|
||||
};
|
||||
|
||||
rp9codecs = (import ./rp9codecs) {
|
||||
inherit stdenv fetchurl;
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
||||
name = "mplayer-trunk";
|
||||
|
||||
# REGION AUTO UPDATE: { name="MPlayer"; type = "svn"; url="svn://svn.mplayerhq.hu/mplayer/trunk"; }
|
||||
src = sourceFromHead "MPlayer-30676.tar.gz"
|
||||
(fetchurl { url = "http://mawercer.de/~nix/repos/MPlayer-30676.tar.gz"; sha256 = "3d5fc038d34dfc5af15f1510f06920710d083f61f29fe31f2dfa3cdcac2a4424"; });
|
||||
# END
|
||||
|
||||
buildInputs =
|
||||
[x11 libXv freetype zlib mesa pkgconfig]
|
||||
++ stdenv.lib.optional alsaSupport alsa
|
||||
++ stdenv.lib.optional xvSupport libXv
|
||||
++ stdenv.lib.optional theoraSupport libtheora
|
||||
++ stdenv.lib.optional cacaSupport libcaca
|
||||
++ stdenv.lib.optional xineramaSupport libXinerama
|
||||
++ stdenv.lib.optional randrSupport libXrandr
|
||||
++ stdenv.lib.optionals dvdnavSupport [libdvdnav libdvdnav.libdvdread]
|
||||
++ stdenv.lib.optional cddaSupport cdparanoia
|
||||
++ stdenv.lib.optional jackaudioSupport jackaudio;
|
||||
|
||||
configureFlags = ''
|
||||
${if cacaSupport then "--enable-caca" else "--disable-caca"}
|
||||
${if dvdnavSupport then "--enable-dvdnav --enable-dvdread --disable-dvdread-internal" else ""}
|
||||
--win32codecsdir=${win32codecs}
|
||||
--realcodecsdir=${rp9codecs}
|
||||
--enable-runtime-cpudetection
|
||||
--enable-x11
|
||||
--disable-xanim
|
||||
--disable-ivtv
|
||||
'';
|
||||
|
||||
NIX_LDFLAGS = "-lX11 -lXext";
|
||||
|
||||
# Provide a reasonable standard font. Maybe we should symlink here.
|
||||
postInstall = ''
|
||||
ensureDir $out/share/mplayer
|
||||
cp ${freefont_ttf}/share/fonts/truetype/FreeSans.ttf $out/share/mplayer/subfont.ttf
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A movie player that supports many video formats";
|
||||
homepage = "http://mplayerhq.hu";
|
||||
license = "GPL";
|
||||
};
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
{stdenv, fetchurl}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "MPlayer-codecs-essential-20071007";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://www2.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2;
|
||||
sha256 = "18vls12n12rjw0mzw4pkp9vpcfmd1c21rzha19d7zil4hn7fs2ic";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp -prv * $out
|
||||
'';
|
||||
|
||||
meta = {
|
||||
license = "unfree";
|
||||
};
|
||||
}
|
|
@ -7752,8 +7752,8 @@ let
|
|||
};
|
||||
|
||||
MPlayer = import ../applications/video/MPlayer {
|
||||
inherit fetchurl stdenv freetype x11 zlib libtheora libcaca freefont_ttf libdvdnav
|
||||
cdparanoia mesa pkgconfig unzip amrnb amrwb;
|
||||
inherit fetchurl stdenv freetype fontconfig x11 zlib libtheora libcaca libdvdnav
|
||||
cdparanoia mesa pkgconfig unzip amrnb amrwb jackaudio;
|
||||
inherit (xlibs) libX11 libXv libXinerama libXrandr;
|
||||
alsaSupport = true;
|
||||
alsa = alsaLib;
|
||||
|
@ -7773,19 +7773,6 @@ let
|
|||
# !!! should depend on MPlayer
|
||||
};
|
||||
|
||||
MPlayerTrunk = import ../applications/video/MPlayer/trunk.nix {
|
||||
inherit fetchurl sourceFromHead stdenv freetype x11 zlib libtheora libcaca
|
||||
freefont_ttf libdvdnav cdparanoia mesa pkgconfig jackaudio;
|
||||
inherit (xlibs) libX11 libXv libXinerama libXrandr;
|
||||
alsaSupport = true;
|
||||
alsa = alsaLib;
|
||||
theoraSupport = true;
|
||||
cacaSupport = true;
|
||||
xineramaSupport = true;
|
||||
randrSupport = true;
|
||||
cddaSupport = true;
|
||||
};
|
||||
|
||||
mrxvt = import ../applications/misc/mrxvt {
|
||||
inherit lib fetchurl stdenv freetype pkgconfig which;
|
||||
inherit (xlibs) libXaw xproto libXt libX11 libSM libICE libXft
|
||||
|
|
Loading…
Reference in a new issue