2005-08-24 16:02:30 +01:00
|
|
|
{ alsaSupport ? false, xvSupport ? true, theoraSupport ? false, cacaSupport ? false
|
2006-04-18 19:46:36 +01:00
|
|
|
, xineramaSupport ? false, randrSupport ? false
|
2006-12-05 22:28:45 +00:00
|
|
|
, stdenv, fetchurl, x11, freetype, freefont_ttf, zlib
|
|
|
|
, alsa ? null, libX11, libXv ? null, libtheora ? null, libcaca ? null
|
2006-04-18 19:46:36 +01:00
|
|
|
, libXinerama ? null, libXrandr ? null
|
2005-08-24 16:02:30 +01:00
|
|
|
}:
|
2003-11-11 15:01:07 +00:00
|
|
|
|
2004-03-29 11:25:25 +01:00
|
|
|
assert alsaSupport -> alsa != null;
|
2004-05-01 19:17:56 +01:00
|
|
|
assert xvSupport -> libXv != null;
|
2005-02-16 16:18:43 +00:00
|
|
|
assert theoraSupport -> libtheora != null;
|
2005-08-24 16:02:30 +01:00
|
|
|
assert cacaSupport -> libcaca != null;
|
2005-10-29 20:07:27 +01:00
|
|
|
assert xineramaSupport -> libXinerama != null;
|
2006-04-18 19:46:36 +01:00
|
|
|
assert randrSupport -> libXrandr != null;
|
2003-11-11 15:01:07 +00:00
|
|
|
|
2006-12-05 22:28:45 +00:00
|
|
|
let
|
2003-11-11 15:01:07 +00:00
|
|
|
|
|
|
|
win32codecs = (import ./win32codecs) {
|
2004-03-30 16:15:19 +01:00
|
|
|
inherit stdenv fetchurl;
|
2003-11-11 15:01:07 +00:00
|
|
|
};
|
2004-04-01 19:06:09 +01:00
|
|
|
|
2006-12-05 22:28:45 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "MPlayer-1.0rc1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc1.tar.bz2;
|
|
|
|
sha1 = "a450c0b0749c343a8496ba7810363c9d46dfa73c";
|
|
|
|
};
|
|
|
|
|
2004-05-01 19:17:56 +01:00
|
|
|
buildInputs = [
|
|
|
|
x11 libXv freetype zlib
|
|
|
|
(if alsaSupport then alsa else null)
|
|
|
|
(if xvSupport then libXv else null)
|
2005-02-16 16:18:43 +00:00
|
|
|
(if theoraSupport then libtheora else null)
|
2005-08-24 16:02:30 +01:00
|
|
|
(if cacaSupport then libcaca else null)
|
2005-10-29 20:07:27 +01:00
|
|
|
(if xineramaSupport then libXinerama else null)
|
2006-04-18 19:46:36 +01:00
|
|
|
(if randrSupport then libXrandr else null)
|
2004-05-01 19:17:56 +01:00
|
|
|
];
|
2005-08-24 16:02:30 +01:00
|
|
|
|
2006-12-05 22:28:45 +00:00
|
|
|
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";
|
2006-07-10 18:14:16 +01:00
|
|
|
|
|
|
|
# These fix MPlayer's aspect ratio when run in a screen rotated with
|
|
|
|
# Xrandr.
|
|
|
|
# See: http://itdp.de/~itdp/html/mplayer-dev-eng/2005-08/msg00427.html
|
|
|
|
patches = [./mplayer-aspect.patch ./mplayer-pivot.patch];
|
2006-10-11 17:45:55 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A movie player that supports many video formats";
|
|
|
|
};
|
2003-11-11 15:01:07 +00:00
|
|
|
}
|