2018-12-31 04:40:47 +01:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch, texinfo, libXext, xorgproto, libX11
|
2015-12-29 23:34:19 +01:00
|
|
|
, libXpm, libXt, libXcursor, alsaLib, cmake, zlib, libpng, libvorbis
|
2018-12-31 04:40:47 +01:00
|
|
|
, libXxf86dga, libXxf86misc
|
|
|
|
, libXxf86vm, openal, libGLU_combined, libjpeg, flac
|
|
|
|
, libXi, libXfixes, freetype, libopus, libtheora
|
2016-11-26 20:18:35 +01:00
|
|
|
, physfs, enet, pkgconfig, gtk2, pcre, libpulseaudio, libpthreadstubs
|
|
|
|
, libXdmcp
|
|
|
|
}:
|
2011-09-25 23:07:48 +02:00
|
|
|
|
2015-12-29 23:34:19 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "allegro-${version}";
|
2018-03-17 17:40:48 +01:00
|
|
|
version = "5.2.4.0";
|
2011-09-25 23:07:48 +02:00
|
|
|
|
2017-08-01 11:25:37 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "liballeg";
|
|
|
|
repo = "allegro5";
|
|
|
|
rev = version;
|
2018-03-17 17:40:48 +01:00
|
|
|
sha256 = "01y3hirn5b08f188nnhb2cbqj4vzysr7l2qpz2208srv8arzmj2d";
|
2011-09-25 23:07:48 +02:00
|
|
|
};
|
|
|
|
|
2015-12-29 23:34:19 +01:00
|
|
|
buildInputs = [
|
2018-12-31 04:40:47 +01:00
|
|
|
texinfo libXext xorgproto libX11 libXpm libXt libXcursor
|
2015-12-29 23:34:19 +01:00
|
|
|
alsaLib cmake zlib libpng libvorbis libXxf86dga libXxf86misc
|
2018-12-31 04:40:47 +01:00
|
|
|
libXxf86vm openal libGLU_combined
|
|
|
|
libjpeg flac
|
|
|
|
libXi libXfixes
|
2016-11-26 20:18:35 +01:00
|
|
|
enet libtheora freetype physfs libopus pkgconfig gtk2 pcre libXdmcp
|
|
|
|
libpulseaudio libpthreadstubs
|
2011-09-25 23:07:48 +02:00
|
|
|
];
|
|
|
|
|
2018-12-20 20:03:26 +01:00
|
|
|
patches = [
|
|
|
|
# fix compilation with mesa 18.2.5
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/liballeg/allegro5/commit/a40d30e21802ecf5c9382cf34af9b01bd3781e47.patch";
|
|
|
|
sha256 = "1f1xlj5y2vr6wzmcz04s8kxn8cfdwrg9kjlnvpz9dix1z3qjnd4m";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2016-11-26 20:18:35 +01:00
|
|
|
sed -e 's@/XInput2.h@/XI2.h@g' -i CMakeLists.txt "src/"*.c
|
|
|
|
'';
|
|
|
|
|
2015-12-29 23:34:19 +01:00
|
|
|
cmakeFlags = [ "-DCMAKE_SKIP_RPATH=ON" ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2011-09-25 23:07:48 +02:00
|
|
|
description = "A game programming library";
|
2018-06-23 13:34:55 +02:00
|
|
|
homepage = https://liballeg.org/;
|
2015-12-29 23:34:19 +01:00
|
|
|
license = licenses.zlib;
|
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
platforms = platforms.linux;
|
2011-09-25 23:07:48 +02:00
|
|
|
};
|
2015-12-29 23:34:19 +01:00
|
|
|
}
|