description = "Ada 2012 bindings to SDL 2"
name = "sdlada"
version = "2.3.1"
authors = ["Luke A. Guest"]
licenses = "Zlib"
maintainers = ["alejandro@mosteo.com"]
maintainers-logins = ["mosteo"]
project-files = ["build/gnat/sdlada.gpr"]

[[depends-on]]
libsdl2 = "^2.0"
libsdl2_image = "^2.0"
libsdl2_ttf = "^2.0"
gnat = "=2019 | <=11.0.0" # Does not build yet with CE 2020 and GNAT FSF 11
make = "*" # Required for post-fetch actions

[[actions."case(os)".linux]]
type = "post-fetch"
command = ["make", "-C", "build/gnat", "SDL_PLATFORM=linux", "SDL_MODE=release"]

[[actions."case(os)".macos]]
type = "post-fetch"
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)"]
linux = true
macos = true
windows = true
"..." = false

[gpr-externals]
SDL_MODE = ["debug", "release"]
SDL_PLATFORM = ["linux", "bsd", "windows", "macosx", "ios", "android"]

[gpr-set-externals]
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"]
