SDL/cross: Fix building with mingw-w64.
This is to make sure that we don't get Xlibs or alsa in cross builds, because those aren't available on non-Linux/Unix platforms. Also, until we don't have the DirectX SDK packaged, let's disable it during cross builds. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
b9bc42d0f3
commit
fbc307a183
@ -19,7 +19,7 @@ let
|
||||
--disable-oss --disable-video-x11-xme
|
||||
--disable-x11-shared --disable-alsa-shared --enable-rpath --disable-pulseaudio-shared
|
||||
--disable-osmesa-shared
|
||||
${if alsaSupport then "--with-alsa-prefix=${attrs.alsaLib}/lib" else ""}
|
||||
${if attrs.alsaSupport then "--with-alsa-prefix=${attrs.alsaLib}/lib" else ""}
|
||||
'';
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
@ -32,20 +32,24 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
# Since `libpulse*.la' contain `-lgdbm', PulseAudio must be propagated.
|
||||
propagatedBuildInputs = stdenv.lib.optionals x11Support [ x11 libXrandr ] ++
|
||||
propagatedNativeBuildInputs =
|
||||
stdenv.lib.optionals x11Support [ x11 libXrandr ] ++
|
||||
stdenv.lib.optional pulseaudioSupport pulseaudio;
|
||||
|
||||
buildInputs = [ pkgconfig audiofile ] ++
|
||||
nativeBuildInputs = [ pkgconfig audiofile ] ++
|
||||
stdenv.lib.optional openglSupport [ mesa ] ++
|
||||
stdenv.lib.optional alsaSupport alsaLib;
|
||||
|
||||
# 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 = configureFlagsFun { inherit alsaLib; };
|
||||
configureFlags = configureFlagsFun { inherit alsaLib alsaSupport; };
|
||||
|
||||
crossAttrs = {
|
||||
configureFlags = configureFlagsFun { alsaLib = alsaLib.crossDrv; };
|
||||
configureFlags = configureFlagsFun {
|
||||
alsaSupport = stdenv.cross.config != "x86_64-w64-mingw32";
|
||||
alsaLib = alsaLib.crossDrv;
|
||||
} + "--disable-directx";
|
||||
};
|
||||
|
||||
passthru = {inherit openglSupport;};
|
||||
|
Loading…
Reference in New Issue
Block a user