allegro5: support building with SDL
stock allegro5 does not support Wayland. the experimental SDL backend is one way to enable native Wayland support for allegro applications. see: - <https://github.com/liballeg/allegro5/blob/master/README_sdl.txt> - <https://github.com/liballeg/allegro5/blob/master/CMakeLists.txt#L64>
This commit is contained in:
parent
f9e5b7b32f
commit
71b0d9ef4d
@ -35,8 +35,13 @@
|
||||
texinfo,
|
||||
xorgproto,
|
||||
zlib,
|
||||
# https://github.com/liballeg/allegro5/blob/master/README_sdl.txt
|
||||
useSDL ? false,
|
||||
sdl2-compat ? null,
|
||||
}:
|
||||
|
||||
assert useSDL -> sdl2-compat != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "allegro";
|
||||
version = "5.2.10.1";
|
||||
@ -89,6 +94,9 @@ stdenv.mkDerivation rec {
|
||||
libXxf86misc
|
||||
libXxf86vm
|
||||
xorgproto
|
||||
]
|
||||
++ lib.optionals useSDL [
|
||||
sdl2-compat
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@ -97,7 +105,12 @@ stdenv.mkDerivation rec {
|
||||
sed -e 's@OpenAL/@AL/@g' -i addons/audio/openal.c
|
||||
'';
|
||||
|
||||
cmakeFlags = [ "-DCMAKE_SKIP_RPATH=ON" ];
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_SKIP_RPATH=ON"
|
||||
]
|
||||
++ lib.optionals useSDL [
|
||||
"ALLEGRO_SDL=ON"
|
||||
];
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
|
Loading…
x
Reference in New Issue
Block a user