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
|
|
|
|
, extraBuildInputs ? []
|
|
|
|
, extraConfigureFlags ? ""
|
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;
|
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
|
|
|
|
2006-12-05 23:28:45 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2007-10-26 21:47:35 +02:00
|
|
|
name = "MPlayer-1.0rc2";
|
2006-12-05 23:28:45 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2007-10-26 21:47:35 +02:00
|
|
|
url = http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc2.tar.bz2;
|
|
|
|
sha1 = "e9b496f3527c552004ec6d01d6b43f196b43ce2d";
|
2006-12-05 23:28:45 +01:00
|
|
|
};
|
|
|
|
|
2004-05-01 20:17:56 +02:00
|
|
|
buildInputs = [
|
|
|
|
x11 libXv freetype zlib
|
|
|
|
(if alsaSupport then alsa else null)
|
|
|
|
(if xvSupport then libXv else null)
|
2005-02-16 17:18:43 +01:00
|
|
|
(if theoraSupport then libtheora else null)
|
2005-08-24 17:02:30 +02:00
|
|
|
(if cacaSupport then libcaca else null)
|
2005-10-29 21:07:27 +02:00
|
|
|
(if xineramaSupport then libXinerama else null)
|
2006-04-18 20:46:36 +02:00
|
|
|
(if randrSupport then libXrandr else null)
|
2007-10-26 21:47:35 +02:00
|
|
|
(if dvdnavSupport then libdvdnav else null)
|
2008-03-06 10:34:36 +01:00
|
|
|
(if cddaSupport then cdparanoia else null)
|
|
|
|
]
|
|
|
|
++ extraBuildInputs
|
|
|
|
;
|
2005-08-24 17:02:30 +02:00
|
|
|
|
2006-12-05 23:28:45 +01:00
|
|
|
configureFlags = "
|
|
|
|
${if cacaSupport then "--enable-caca" else "--disable-caca"}
|
2007-10-26 21:47:35 +02:00
|
|
|
${if dvdnavSupport then "--enable-dvdnav" else ""}
|
|
|
|
--win32codecsdir=${win32codecs}
|
|
|
|
--realcodecsdir=${win32codecs}
|
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
|
2008-03-06 10:34:36 +01:00
|
|
|
"
|
|
|
|
+ extraConfigureFlags
|
|
|
|
;
|
2006-12-05 23:28:45 +01:00
|
|
|
|
2007-10-26 21:47:35 +02:00
|
|
|
NIX_LDFLAGS = "-lX11 -lXext " # !!! hack, necessary to get libX11/Xext in the RPATH
|
|
|
|
+ (if dvdnavSupport then "-ldvdnav" else "");
|
|
|
|
|
2006-12-05 23:28:45 +01:00
|
|
|
# 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 19:14:16 +02:00
|
|
|
|
2007-01-14 19:25:26 +01:00
|
|
|
patches = [
|
|
|
|
# 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
|
2007-10-26 21:47:35 +02:00
|
|
|
#./mplayer-aspect.patch
|
|
|
|
#./mplayer-pivot.patch
|
2007-01-14 19:25:26 +01:00
|
|
|
];
|
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
|
|
|
}
|