Merge pull request #7001 from spwhitt/sdl
Darwin: Build SDL and SDL_image
This commit is contained in:
commit
a8d795bfda
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
# OSS is no longer supported, for it's much crappier than ALSA and
|
# OSS is no longer supported, for it's much crappier than ALSA and
|
||||||
# PulseAudio.
|
# PulseAudio.
|
||||||
assert !(stdenv ? cross) -> alsaSupport || pulseaudioSupport;
|
assert (stdenv.isLinux && !(stdenv ? cross)) -> alsaSupport || pulseaudioSupport;
|
||||||
|
|
||||||
assert openglSupport -> (mesa != null && x11Support);
|
assert openglSupport -> (mesa != null && x11Support);
|
||||||
assert x11Support -> (x11 != null && libXrandr != null);
|
assert x11Support -> (x11 != null && libXrandr != null);
|
||||||
|
@ -51,6 +51,13 @@ stdenv.mkDerivation rec {
|
||||||
"--without-x"
|
"--without-x"
|
||||||
] ++ stdenv.lib.optional alsaSupport "--with-alsa-prefix=${alsaLib}/lib");
|
] ++ stdenv.lib.optional alsaSupport "--with-alsa-prefix=${alsaLib}/lib");
|
||||||
|
|
||||||
|
# Fix a build failure on OS X Mavericks
|
||||||
|
# Ticket: https://bugzilla.libsdl.org/show_bug.cgi?id=2085
|
||||||
|
patches = stdenv.lib.optional stdenv.isDarwin [ (fetchurl {
|
||||||
|
url = "http://bugzilla-attachments.libsdl.org/attachment.cgi?id=1320";
|
||||||
|
sha1 = "3137feb503a89a8d606405373905b92dcf7e293b";
|
||||||
|
}) ];
|
||||||
|
|
||||||
crossAttrs =stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") {
|
crossAttrs =stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") {
|
||||||
patches = let
|
patches = let
|
||||||
f = rev: sha256: fetchurl {
|
f = rev: sha256: fetchurl {
|
||||||
|
@ -72,6 +79,6 @@ stdenv.mkDerivation rec {
|
||||||
description = "A cross-platform multimedia library";
|
description = "A cross-platform multimedia library";
|
||||||
homepage = http://www.libsdl.org/;
|
homepage = http://www.libsdl.org/;
|
||||||
maintainers = with maintainers; [ lovek323 ];
|
maintainers = with maintainers; [ lovek323 ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,6 @@ stdenv.mkDerivation rec {
|
||||||
description = "SDL image library";
|
description = "SDL image library";
|
||||||
homepage = http://www.libsdl.org/projects/SDL_image/;
|
homepage = http://www.libsdl.org/projects/SDL_image/;
|
||||||
maintainers = with maintainers; [ lovek323 ];
|
maintainers = with maintainers; [ lovek323 ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -7365,7 +7365,7 @@ let
|
||||||
openglSupport = mesaSupported;
|
openglSupport = mesaSupported;
|
||||||
alsaSupport = (!stdenv.isDarwin);
|
alsaSupport = (!stdenv.isDarwin);
|
||||||
x11Support = true;
|
x11Support = true;
|
||||||
pulseaudioSupport = true;
|
pulseaudioSupport = (!stdenv.isDarwin);
|
||||||
|
|
||||||
# resolve the unrecognized -fpascal-strings option error
|
# resolve the unrecognized -fpascal-strings option error
|
||||||
stdenv = if stdenv.isDarwin
|
stdenv = if stdenv.isDarwin
|
||||||
|
|
Loading…
Reference in a new issue