2006-09-12 01:06:26 +02:00
|
|
|
{ stdenv, fetchurl, x11, libXrandr, openglSupport ? false, mesa ? null
|
|
|
|
, alsaSupport ? true, alsaLib ? null
|
|
|
|
}:
|
2006-01-26 15:01:08 +01:00
|
|
|
|
|
|
|
assert openglSupport -> mesa != null;
|
2006-09-12 01:06:26 +02:00
|
|
|
assert alsaSupport -> alsaLib != null;
|
2004-09-26 20:12:51 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2008-06-14 22:46:34 +02:00
|
|
|
name = "SDL-1.2.13";
|
|
|
|
|
2004-09-26 20:12:51 +02:00
|
|
|
src = fetchurl {
|
2008-06-14 22:46:34 +02:00
|
|
|
url = http://www.libsdl.org/release/SDL-1.2.13.tar.gz;
|
|
|
|
sha256 = "0cp155296d6fy3w31jj481jxl9b43fkm01klyibnna8gsvqrvycl";
|
2004-09-26 20:12:51 +02:00
|
|
|
};
|
2008-06-14 22:46:34 +02:00
|
|
|
|
2006-09-12 02:15:05 +02:00
|
|
|
propagatedBuildInputs = [x11 libXrandr];
|
2008-06-14 22:46:34 +02:00
|
|
|
|
|
|
|
buildInputs =
|
|
|
|
stdenv.lib.optional openglSupport mesa ++
|
|
|
|
stdenv.lib.optional alsaSupport alsaLib;
|
|
|
|
|
|
|
|
configureFlags = ''
|
2006-09-12 01:06:26 +02:00
|
|
|
--disable-x11-shared --disable-alsa-shared --enable-rpath
|
2006-09-12 02:15:05 +02:00
|
|
|
${if alsaSupport then "--with-alsa-prefix=${alsaLib}/lib" else ""}
|
2008-06-14 22:46:34 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {inherit openglSupport;};
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A cross-platform multimedia library";
|
|
|
|
homepage = http://www.libsdl.org/;
|
|
|
|
};
|
2004-09-26 20:12:51 +02:00
|
|
|
}
|