SDL, SDL2: Remove crossAttrs
Cross drvs are now the default for precisely this reason.
This commit is contained in:
parent
515ca1a7c8
commit
219b74d71b
|
@ -15,24 +15,6 @@ with lib;
|
||||||
assert !stdenv.isDarwin -> alsaSupport || pulseaudioSupport;
|
assert !stdenv.isDarwin -> alsaSupport || pulseaudioSupport;
|
||||||
assert openglSupport -> (stdenv.isDarwin || x11Support && libGL != null && libGLU != null);
|
assert openglSupport -> (stdenv.isDarwin || x11Support && libGL != null && libGLU != null);
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
configureFlagsFun = attrs: [
|
|
||||||
"--disable-oss"
|
|
||||||
"--disable-video-x11-xme"
|
|
||||||
"--enable-rpath"
|
|
||||||
# Building without this fails on Darwin with
|
|
||||||
#
|
|
||||||
# ./src/video/x11/SDL_x11sym.h:168:17: error: conflicting types for '_XData32'
|
|
||||||
# SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
|
|
||||||
#
|
|
||||||
# Please try revert the change that introduced this comment when updating SDL.
|
|
||||||
] ++ optional stdenv.isDarwin "--disable-x11-shared"
|
|
||||||
++ optional (!x11Support) "--without-x"
|
|
||||||
++ optional alsaSupport "--with-alsa-prefix=${attrs.alsaLib.out}/lib";
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "SDL-${version}";
|
name = "SDL-${version}";
|
||||||
version = "1.2.15";
|
version = "1.2.15";
|
||||||
|
@ -62,11 +44,19 @@ stdenv.mkDerivation rec {
|
||||||
++ optional (!hostPlatform.isMinGW) audiofile
|
++ optional (!hostPlatform.isMinGW) audiofile
|
||||||
++ optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ];
|
++ optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ];
|
||||||
|
|
||||||
configureFlags = configureFlagsFun { inherit alsaLib; };
|
configureFlags = [
|
||||||
|
"--disable-oss"
|
||||||
crossAttrs = {
|
"--disable-video-x11-xme"
|
||||||
configureFlags = configureFlagsFun { alsaLib = alsaLib.crossDrv; };
|
"--enable-rpath"
|
||||||
};
|
# Building without this fails on Darwin with
|
||||||
|
#
|
||||||
|
# ./src/video/x11/SDL_x11sym.h:168:17: error: conflicting types for '_XData32'
|
||||||
|
# SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
|
||||||
|
#
|
||||||
|
# Please try revert the change that introduced this comment when updating SDL.
|
||||||
|
] ++ optional stdenv.isDarwin "--disable-x11-shared"
|
||||||
|
++ optional (!x11Support) "--without-x"
|
||||||
|
++ optional alsaSupport "--with-alsa-prefix=${alsaLib.out}/lib";
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./find-headers.patch
|
./find-headers.patch
|
||||||
|
|
|
@ -19,15 +19,6 @@ with lib;
|
||||||
assert !stdenv.isDarwin -> alsaSupport || pulseaudioSupport;
|
assert !stdenv.isDarwin -> alsaSupport || pulseaudioSupport;
|
||||||
assert openglSupport -> (stdenv.isDarwin || x11Support && libGL != null);
|
assert openglSupport -> (stdenv.isDarwin || x11Support && libGL != null);
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
configureFlagsFun = attrs: [
|
|
||||||
"--disable-oss"
|
|
||||||
] ++ optional (!x11Support) "--without-x"
|
|
||||||
++ optional alsaSupport "--with-alsa-prefix=${attrs.alsaLib.out}/lib";
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "SDL2-${version}";
|
name = "SDL2-${version}";
|
||||||
version = "2.0.8";
|
version = "2.0.8";
|
||||||
|
@ -61,11 +52,10 @@ stdenv.mkDerivation rec {
|
||||||
# pointer-constraints-unstable-v1-client-protocol.h: No such file or directory
|
# pointer-constraints-unstable-v1-client-protocol.h: No such file or directory
|
||||||
enableParallelBuilding = false;
|
enableParallelBuilding = false;
|
||||||
|
|
||||||
configureFlags = configureFlagsFun { inherit alsaLib; };
|
configureFlags = [
|
||||||
|
"--disable-oss"
|
||||||
crossAttrs = {
|
] ++ optional (!x11Support) "--without-x"
|
||||||
configureFlags = configureFlagsFun { alsaLib = alsaLib.crossDrv; };
|
++ optional alsaSupport "--with-alsa-prefix=${alsaLib.out}/lib";
|
||||||
};
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
moveToOutput lib/libSDL2main.a "$dev"
|
moveToOutput lib/libSDL2main.a "$dev"
|
||||||
|
|
Loading…
Reference in New Issue