3
0
Fork 0
forked from mirrors/nixpkgs

SDL: Add PulseAudio support.

svn path=/nixpkgs/trunk/; revision=15555
This commit is contained in:
Ludovic Courtès 2009-05-11 19:57:42 +00:00
parent 344712303d
commit 777f805eba
2 changed files with 13 additions and 6 deletions

View file

@ -1,9 +1,12 @@
{ stdenv, fetchurl, x11, libXrandr, openglSupport ? false, mesa ? null
{ stdenv, fetchurl, x11, libXrandr, pkgconfig
, openglSupport ? false, mesa ? null
, alsaSupport ? true, alsaLib ? null
, pulseaudioSupport ? true, pulseaudio ? null
}:
assert openglSupport -> mesa != null;
assert alsaSupport -> alsaLib != null;
assert pulseaudioSupport -> pulseaudio != null;
stdenv.mkDerivation {
name = "SDL-1.2.13";
@ -15,12 +18,16 @@ stdenv.mkDerivation {
propagatedBuildInputs = [x11 libXrandr];
buildInputs =
buildInputs = [ pkgconfig ] ++
stdenv.lib.optional openglSupport mesa ++
stdenv.lib.optional alsaSupport alsaLib;
stdenv.lib.optional alsaSupport alsaLib ++
stdenv.lib.optional pulseaudioSupport pulseaudio;
# XXX: By default, SDL wants to dlopen() PulseAudio, in which case
# we must arrange to add it to its RPATH; however, `patchelf' seems
# to fail at doing this, hence `--disable-pulseaudio-shared'.
configureFlags = ''
--disable-x11-shared --disable-alsa-shared --enable-rpath
--disable-x11-shared --disable-alsa-shared --enable-rpath --disable-pulseaudio-shared
${if alsaSupport then "--with-alsa-prefix=${alsaLib}/lib" else ""}
'';

View file

@ -3894,7 +3894,7 @@ let
};
SDL = import ../development/libraries/SDL {
inherit fetchurl stdenv x11 mesa alsaLib;
inherit fetchurl stdenv pkgconfig x11 mesa alsaLib pulseaudio;
inherit (xlibs) libXrandr;
openglSupport = mesaSupported;
alsaSupport = true;