SDL{,2}: support building for android
This should be picking up the OpenGL ES headers provided by the NDK. More testing is needed.
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
{ stdenv, config, libGLSupported, fetchurl, pkgconfig
|
||||
, openglSupport ? libGLSupported, libGL
|
||||
, alsaSupport ? stdenv.isLinux, alsaLib
|
||||
, x11Support ? !stdenv.isCygwin, libX11, xorgproto, libICE, libXi, libXScrnSaver, libXcursor, libXinerama, libXext, libXxf86vm, libXrandr
|
||||
, waylandSupport ? stdenv.isLinux, wayland, wayland-protocols, libxkbcommon
|
||||
, dbusSupport ? stdenv.isLinux, dbus
|
||||
, alsaSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid, alsaLib
|
||||
, x11Support ? !stdenv.isCygwin && !stdenv.hostPlatform.isAndroid
|
||||
, libX11, xorgproto, libICE, libXi, libXScrnSaver, libXcursor
|
||||
, libXinerama, libXext, libXxf86vm, libXrandr
|
||||
, waylandSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
|
||||
, wayland, wayland-protocols, libxkbcommon
|
||||
, dbusSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid, dbus
|
||||
, udevSupport ? false, udev
|
||||
, ibusSupport ? false, ibus
|
||||
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio
|
||||
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux && !stdenv.hostPlatform.isAndroid
|
||||
, libpulseaudio
|
||||
, AudioUnit, Cocoa, CoreAudio, CoreServices, ForceFeedback, OpenGL
|
||||
, audiofile, cf-private, libiconv
|
||||
}:
|
||||
@@ -16,9 +20,6 @@
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
assert !stdenv.isDarwin -> alsaSupport || pulseaudioSupport;
|
||||
assert openglSupport -> (stdenv.isDarwin || x11Support && libGL != null);
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "SDL2-${version}";
|
||||
version = "2.0.9";
|
||||
@@ -44,14 +45,14 @@ stdenv.mkDerivation rec {
|
||||
++ optionals x11Support [ libX11 xorgproto ];
|
||||
|
||||
dlopenBuildInputs = [ ]
|
||||
++ optional alsaSupport alsaLib
|
||||
++ optionals alsaSupport [ alsaLib audiofile ]
|
||||
++ optional dbusSupport dbus
|
||||
++ optional pulseaudioSupport libpulseaudio
|
||||
++ optional udevSupport udev
|
||||
++ optionals waylandSupport [ wayland wayland-protocols libxkbcommon ]
|
||||
++ optionals x11Support [ libICE libXi libXScrnSaver libXcursor libXinerama libXext libXrandr libXxf86vm ];
|
||||
|
||||
buildInputs = [ audiofile libiconv ]
|
||||
buildInputs = [ libiconv ]
|
||||
++ dlopenBuildInputs
|
||||
++ optional ibusSupport ibus
|
||||
++ optionals stdenv.isDarwin [
|
||||
|
||||
Reference in New Issue
Block a user