2005-08-24 17:02:30 +02:00
|
|
|
{ alsaSupport ? false, xvSupport ? true, theoraSupport ? false, cacaSupport ? false
|
2007-10-26 21:47:35 +02:00
|
|
|
, xineramaSupport ? false, randrSupport ? false, dvdnavSupport ? true
|
2006-12-05 23:28:45 +01:00
|
|
|
, stdenv, fetchurl, x11, freetype, freefont_ttf, zlib
|
|
|
|
, alsa ? null, libX11, libXv ? null, libtheora ? null, libcaca ? null
|
2007-10-26 21:47:35 +02:00
|
|
|
, libXinerama ? null, libXrandr ? null, libdvdnav ? null
|
2008-03-06 10:34:36 +01:00
|
|
|
, cdparanoia ? null, cddaSupport ? true
|
2009-10-04 23:31:34 +02:00
|
|
|
, amrnb ? null, amrwb ? null, amrSupport ? false
|
|
|
|
, mesa, pkgconfig, unzip
|
2005-08-24 17:02:30 +02:00
|
|
|
}:
|
2003-11-11 16:01:07 +01:00
|
|
|
|
2004-03-29 12:25:25 +02:00
|
|
|
assert alsaSupport -> alsa != null;
|
2004-05-01 20:17:56 +02:00
|
|
|
assert xvSupport -> libXv != null;
|
2005-02-16 17:18:43 +01:00
|
|
|
assert theoraSupport -> libtheora != null;
|
2005-08-24 17:02:30 +02:00
|
|
|
assert cacaSupport -> libcaca != null;
|
2005-10-29 21:07:27 +02:00
|
|
|
assert xineramaSupport -> libXinerama != null;
|
2006-04-18 20:46:36 +02:00
|
|
|
assert randrSupport -> libXrandr != null;
|
2007-10-26 21:47:35 +02:00
|
|
|
assert dvdnavSupport -> libdvdnav != null;
|
2008-03-06 10:34:36 +01:00
|
|
|
assert cddaSupport -> cdparanoia != null;
|
2009-10-04 23:31:34 +02:00
|
|
|
assert amrSupport -> (amrnb != null && amrwb != null);
|
2003-11-11 16:01:07 +01:00
|
|
|
|
2006-12-05 23:28:45 +01:00
|
|
|
let
|
2003-11-11 16:01:07 +01:00
|
|
|
|
|
|
|
win32codecs = (import ./win32codecs) {
|
2004-03-30 17:15:19 +02:00
|
|
|
inherit stdenv fetchurl;
|
2003-11-11 16:01:07 +01:00
|
|
|
};
|
2004-04-01 20:06:09 +02:00
|
|
|
|
2008-04-11 00:12:14 +02:00
|
|
|
rp9codecs = (import ./rp9codecs) {
|
|
|
|
inherit stdenv fetchurl;
|
|
|
|
};
|
|
|
|
|
2009-10-04 23:31:34 +02:00
|
|
|
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";
|
|
|
|
};
|
|
|
|
|
2006-12-05 23:28:45 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2009-03-10 22:03:51 +01:00
|
|
|
name = "MPlayer-1.0rc2-r28450";
|
2006-12-05 23:28:45 +01:00
|
|
|
|
2009-09-10 18:58:02 +02:00
|
|
|
# 1.0_rc2 is outdated according to website - use trunk instead
|
2006-12-05 23:28:45 +01:00
|
|
|
src = fetchurl {
|
2009-03-10 22:03:51 +01:00
|
|
|
url = mirror://gentoo/distfiles/mplayer-1.0_rc2_p28450.tar.bz2;
|
|
|
|
sha256 = "0cbils58mq20nablywgjfpfx2pzjgnhin23sb8k1s5h2rxgvi3vf";
|
2006-12-05 23:28:45 +01:00
|
|
|
};
|
|
|
|
|
2009-03-10 22:03:51 +01:00
|
|
|
buildInputs =
|
2009-05-17 22:34:12 +02:00
|
|
|
[x11 libXv freetype zlib mesa pkgconfig]
|
2009-03-10 22:03:51 +01:00
|
|
|
++ 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]
|
2009-10-04 23:31:34 +02:00
|
|
|
++ stdenv.lib.optional cddaSupport cdparanoia
|
|
|
|
++ stdenv.lib.optionals amrSupport [amrnb amrwb];
|
2005-08-24 17:02:30 +02:00
|
|
|
|
2009-03-10 22:03:51 +01:00
|
|
|
configureFlags = ''
|
2006-12-05 23:28:45 +01:00
|
|
|
${if cacaSupport then "--enable-caca" else "--disable-caca"}
|
2009-03-10 22:03:51 +01:00
|
|
|
${if dvdnavSupport then "--enable-dvdnav --enable-dvdread --disable-dvdread-internal" else ""}
|
2007-10-26 21:47:35 +02:00
|
|
|
--win32codecsdir=${win32codecs}
|
2008-04-11 00:12:14 +02:00
|
|
|
--realcodecsdir=${rp9codecs}
|
2006-12-05 23:28:45 +01:00
|
|
|
--enable-runtime-cpudetection
|
2007-10-26 21:47:35 +02:00
|
|
|
--enable-x11 --with-extraincdir=${libX11}/include
|
2006-12-05 23:28:45 +01:00
|
|
|
--disable-xanim
|
2009-02-17 17:10:19 +01:00
|
|
|
--disable-ivtv
|
2009-03-10 22:03:51 +01:00
|
|
|
'';
|
2006-12-05 23:28:45 +01:00
|
|
|
|
2009-03-10 22:03:51 +01:00
|
|
|
NIX_LDFLAGS = "-lX11 -lXext";
|
2007-10-26 21:47:35 +02:00
|
|
|
|
2006-12-05 23:28:45 +01:00
|
|
|
# Provide a reasonable standard font. Maybe we should symlink here.
|
2009-03-10 22:03:51 +01:00
|
|
|
postInstall = ''
|
|
|
|
ensureDir $out/share/mplayer
|
|
|
|
cp ${freefont_ttf}/share/fonts/truetype/FreeSans.ttf $out/share/mplayer/subfont.ttf
|
|
|
|
'';
|
2006-10-11 18:45:55 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A movie player that supports many video formats";
|
2008-03-06 10:34:36 +01:00
|
|
|
homepage = "http://mplayerhq.hu";
|
|
|
|
license = "GPL";
|
2006-10-11 18:45:55 +02:00
|
|
|
};
|
2003-11-11 16:01:07 +01:00
|
|
|
}
|