SDL: propagate libcap and fixup native inputs
Close #8205. All inputs except pkgconfig shouldn't be native but rather disabled on cygwin, I suppose.
This commit is contained in:
parent
317f4ea72d
commit
043a8478c3
3 changed files with 18 additions and 15 deletions
|
@ -14,6 +14,9 @@ assert x11Support -> (x11 != null && libXrandr != null);
|
|||
assert alsaSupport -> alsaLib != null;
|
||||
assert pulseaudioSupport -> libpulseaudio != null;
|
||||
|
||||
let
|
||||
inherit (stdenv.lib) optional optionals;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.2.15";
|
||||
name = "SDL-${version}";
|
||||
|
@ -23,19 +26,19 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "005d993xcac8236fpvd1iawkz4wqjybkpn8dbwaliqz5jfkidlyn";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
# Since `libpulse*.la' contain `-lgdbm', PulseAudio must be propagated.
|
||||
propagatedNativeBuildInputs =
|
||||
stdenv.lib.optionals x11Support [ x11 libXrandr ] ++
|
||||
stdenv.lib.optional alsaSupport alsaLib ++
|
||||
stdenv.lib.optional pulseaudioSupport libpulseaudio;
|
||||
propagatedBuildInputs =
|
||||
optionals x11Support [ x11 libXrandr ] ++
|
||||
optional alsaSupport alsaLib ++
|
||||
optional stdenv.isLinux libcap ++
|
||||
optional openglSupport mesa ++
|
||||
optional pulseaudioSupport libpulseaudio;
|
||||
|
||||
buildInputs = let
|
||||
notMingw = !(stdenv ? cross) || stdenv.cross.libc != "msvcrt";
|
||||
in stdenv.lib.optional stdenv.isLinux libcap
|
||||
++ (stdenv.lib.optional notMingw audiofile);
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ] ++
|
||||
stdenv.lib.optional openglSupport [ mesa ];
|
||||
in optional notMingw audiofile;
|
||||
|
||||
# XXX: By default, SDL wants to dlopen() PulseAudio, in which case
|
||||
# we must arrange to add it to its RPATH; however, `patchelf' seems
|
||||
|
|
|
@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
|
|||
stdenv.lib.optional pulseaudioSupport libpulseaudio;
|
||||
|
||||
buildInputs = [ pkgconfig audiofile ] ++
|
||||
stdenv.lib.optional openglSupport [ mesa ] ++
|
||||
stdenv.lib.optional openglSupport mesa ++
|
||||
stdenv.lib.optional alsaSupport alsaLib;
|
||||
|
||||
# https://bugzilla.libsdl.org/show_bug.cgi?id=1431
|
||||
|
|
|
@ -7841,9 +7841,9 @@ let
|
|||
|
||||
SDL = callPackage ../development/libraries/SDL {
|
||||
openglSupport = mesaSupported;
|
||||
alsaSupport = (!stdenv.isDarwin);
|
||||
x11Support = true;
|
||||
pulseaudioSupport = (!stdenv.isDarwin);
|
||||
alsaSupport = stdenv.isLinux;
|
||||
x11Support = !stdenv.isCygwin;
|
||||
pulseaudioSupport = stdenv.isLinux;
|
||||
};
|
||||
|
||||
SDL_gfx = callPackage ../development/libraries/SDL_gfx { };
|
||||
|
@ -7862,8 +7862,8 @@ let
|
|||
|
||||
SDL2 = callPackage ../development/libraries/SDL2 {
|
||||
openglSupport = mesaSupported;
|
||||
alsaSupport = (!stdenv.isDarwin);
|
||||
x11Support = (!stdenv.isDarwin);
|
||||
alsaSupport = stdenv.isLinux;
|
||||
x11Support = !stdenv.isCygwin;
|
||||
pulseaudioSupport = false; # better go through ALSA
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue