From f92f8dae348124f673b128d79902a30a206a8a80 Mon Sep 17 00:00:00 2001 From: Alejandro R Mosteo Date: Mon, 5 Oct 2020 18:17:34 +0200 Subject: [PATCH] SDLAda on Windows, reprise (#167) * sdlada.toml: add C_INLCUDE_PATH on Windows msys2 * sdlada.toml: only compile tools on post-fetch The other make file targets are not required. Also define SDL_PLATFORM for all targets so we don't have to user a different post-fetch for each OS. * sdlada.toml: remove SDL_MODE definition This means the users of the lib can define the build mode they want. * libsdl2*.toml: add msys2 package * ada_voxel_space_demo.toml: set sdlada build mode * Migrated to 0.4 manifest version Co-authored-by: Fabien Chouteau --- index/li/libsdl2/libsdl2-external.toml | 5 +++-- index/li/libsdl2_image/libsdl2_image-external.toml | 5 +++-- index/li/libsdl2_ttf/libsdl2_ttf-external.toml | 5 +++-- index/sd/sdlada/sdlada-2.3.1.toml | 8 +++++++- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/index/li/libsdl2/libsdl2-external.toml b/index/li/libsdl2/libsdl2-external.toml index 4edef797..494280c9 100644 --- a/index/li/libsdl2/libsdl2-external.toml +++ b/index/li/libsdl2/libsdl2-external.toml @@ -6,5 +6,6 @@ maintainers-logins = ["mosteo"] [[external]] kind = "system" -[external.origin."case(distribution)"] -"debian|ubuntu" = ["libsdl2-dev"] + [external.origin.'case(distribution)'] + 'debian|ubuntu' = ["libsdl2-dev"] + 'msys2' = ["mingw-w64-x86_64-SDL2"] diff --git a/index/li/libsdl2_image/libsdl2_image-external.toml b/index/li/libsdl2_image/libsdl2_image-external.toml index 30fbcdd2..ad04648d 100644 --- a/index/li/libsdl2_image/libsdl2_image-external.toml +++ b/index/li/libsdl2_image/libsdl2_image-external.toml @@ -6,5 +6,6 @@ maintainers-logins = ["mosteo"] [[external]] kind = "system" -[external.origin."case(distribution)"] -"debian|ubuntu" = ["libsdl2-image-dev"] + [external.origin.'case(distribution)'] + 'debian|ubuntu' = ["libsdl2-image-dev"] + 'msys2' = ["mingw-w64-x86_64-SDL2_image"] diff --git a/index/li/libsdl2_ttf/libsdl2_ttf-external.toml b/index/li/libsdl2_ttf/libsdl2_ttf-external.toml index 01a28a1f..404c18b3 100644 --- a/index/li/libsdl2_ttf/libsdl2_ttf-external.toml +++ b/index/li/libsdl2_ttf/libsdl2_ttf-external.toml @@ -6,5 +6,6 @@ maintainers-logins = ["mosteo"] [[external]] kind = "system" -[external.origin."case(distribution)"] -"debian|ubuntu" = ["libsdl2-ttf-dev"] + [external.origin.'case(distribution)'] + 'debian|ubuntu' = ["libsdl2-ttf-dev"] + 'msys2' = ["mingw-w64-x86_64-SDL2_ttf"] diff --git a/index/sd/sdlada/sdlada-2.3.1.toml b/index/sd/sdlada/sdlada-2.3.1.toml index 6bfdadbf..2bacc21d 100644 --- a/index/sd/sdlada/sdlada-2.3.1.toml +++ b/index/sd/sdlada/sdlada-2.3.1.toml @@ -24,11 +24,12 @@ command = ["make", "-C", "build/gnat", "SDL_PLATFORM=macosx", "SDL_MODE=release" [[actions."case(os)".windows]] type = "post-fetch" command = ["make", "-C", "build/gnat", "SDL_PLATFORM=windows", "SDL_MODE=release"] + [available."case(os)"] -"..." = false linux = true macos = true windows = true +"..." = false [gpr-externals] SDL_MODE = ["debug", "release"] @@ -39,6 +40,11 @@ SDL_MODE = "release" [gpr-set-externals."case(os)".linux] SDL_PLATFORM = "linux" +[environment.'case(distribution)'] +# sdlada expects SDL2 headers to be in the C_INCLUDE_PATH but the option +# used in the project file ("-I/usr/include/SDL2") doesn't work with msys2 +msys2 = { C_INCLUDE_PATH.append = "${DISTRIB_ROOT}/mingw64/include/SDL2" } + [origin] url = "https://github.com/Lucretia/sdlada/archive/v2.3.1.tar.gz" hashes = ["sha512:786a047fd74f5105eef9d8b3f1ad082b915339cf9da4a2c32f7789dc12005acb2999301e616a67ec0b2a4c084586e812f8d6343dbd33d8bd165ba58a94db16e3"]