allegro5: support darwin platform
Changes to only include X11 related packages on Linux and fix some outdated headers to work on new MacOS versions. I have also looked at support Allegro 4 but it seems that any MacOS version after 10.0x are not supported.
This commit is contained in:
parent
3a9aec4691
commit
4587e3164b
|
@ -20,17 +20,19 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkg-config ];
|
nativeBuildInputs = [ cmake pkg-config ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
texinfo libXext xorgproto libX11 libXpm libXt libXcursor
|
texinfo zlib libpng libvorbis openal libGLU libGL
|
||||||
alsa-lib zlib libpng libvorbis libXxf86dga libXxf86misc
|
libjpeg flac enet libtheora freetype physfs libopus
|
||||||
libXxf86vm openal libGLU libGL
|
gtk3 pcre
|
||||||
libjpeg flac
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
libXi libXfixes
|
libXext xorgproto libX11 libXpm libXt libXcursor alsa-lib
|
||||||
enet libtheora freetype physfs libopus gtk3 pcre libXdmcp
|
libXxf86dga libXxf86misc libXxf86vm libXi libXfixes
|
||||||
libpulseaudio libpthreadstubs
|
libXdmcp libpulseaudio libpthreadstubs
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -e 's@/XInput2.h@/XI2.h@g' -i CMakeLists.txt "src/"*.c
|
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" ];
|
cmakeFlags = [ "-DCMAKE_SKIP_RPATH=ON" ];
|
||||||
|
@ -40,6 +42,6 @@ stdenv.mkDerivation rec {
|
||||||
homepage = "https://liballeg.org/";
|
homepage = "https://liballeg.org/";
|
||||||
license = licenses.zlib;
|
license = licenses.zlib;
|
||||||
maintainers = [ maintainers.raskin ];
|
maintainers = [ maintainers.raskin ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux ++ platforms.darwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue