Merge pull request #220545 from div72/allegro5-darwin

allegro5: support darwin platform
This commit is contained in:
7c6f434c 2023-03-13 06:33:26 +00:00 committed by GitHub
commit e541a6950d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,17 +20,19 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [
texinfo libXext xorgproto libX11 libXpm libXt libXcursor
alsa-lib zlib libpng libvorbis libXxf86dga libXxf86misc
libXxf86vm openal libGLU libGL
libjpeg flac
libXi libXfixes
enet libtheora freetype physfs libopus gtk3 pcre libXdmcp
libpulseaudio libpthreadstubs
texinfo zlib libpng libvorbis openal libGLU libGL
libjpeg flac enet libtheora freetype physfs libopus
gtk3 pcre
] ++ lib.optionals stdenv.isLinux [
libXext xorgproto libX11 libXpm libXt libXcursor alsa-lib
libXxf86dga libXxf86misc libXxf86vm libXi libXfixes
libXdmcp libpulseaudio libpthreadstubs
];
postPatch = ''
sed -e 's@/XInput2.h@/XI2.h@g' -i CMakeLists.txt "src/"*.c
sed -e 's@Kernel/IOKit/hidsystem/IOHIDUsageTables.h@IOKit/hid/IOHIDUsageTables.h@g' -i include/allegro5/platform/alosx.h
sed -e 's@OpenAL/@AL/@g' -i addons/audio/openal.c
'';
cmakeFlags = [ "-DCMAKE_SKIP_RPATH=ON" ];
@ -40,6 +42,6 @@ stdenv.mkDerivation rec {
homepage = "https://liballeg.org/";
license = licenses.zlib;
maintainers = [ maintainers.raskin ];
platforms = platforms.linux;
platforms = platforms.linux ++ platforms.darwin;
};
}