enigma: 1.21 -> 1.30-alpha
This commit is contained in:
parent
d0779bc16e
commit
725051e81c
4 changed files with 13 additions and 50 deletions
|
@ -1,30 +1,31 @@
|
|||
{ stdenv, fetchurl, makeWrapper, pkg-config, curl, imagemagick, libpng, SDL, SDL_image, SDL_mixer, SDL_ttf, xercesc, xdg_utils, hicolor-icon-theme }:
|
||||
{ stdenv, lib, fetchurl, makeWrapper, pkg-config, gettext, imagemagick, curl, libpng, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, xercesc, xdg_utils, hicolor-icon-theme }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "enigma";
|
||||
version = "1.21";
|
||||
version = "1.30-alpha";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/enigma-game/enigma-${version}.tar.gz";
|
||||
sha256 = "d872cf067d8eb560d3bb1cb17245814bc56ac3953ae1f12e2229c8eb6f82ce01";
|
||||
url = "https://github.com/Enigma-Game/Enigma/releases/download/${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "1zyk3j43gzfr1lhc6g13j7qai5f33fv5xm5735nnznaqvaz17949";
|
||||
};
|
||||
|
||||
# patches lifted from Arch
|
||||
patches = [ ./src_client.cc.patch ./src_lev_Proxy.cc.patch ./src_Value.cc.patch ];
|
||||
nativeBuildInputs = [ pkg-config gettext makeWrapper imagemagick ];
|
||||
buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_ttf libpng xercesc curl xdg_utils ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = [ "-Wno-deprecated-declarations" ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config imagemagick makeWrapper ];
|
||||
buildInputs = [ SDL SDL_image SDL_mixer SDL_ttf libpng xercesc curl xdg_utils ];
|
||||
# For some reason (might be related to the alpha status), some includes
|
||||
# which are required by lib-src/enigma-core are not picked up by the
|
||||
# configure script. Hence we add them manually.
|
||||
CPPFLAGS = "-I${SDL2.dev}/include/SDL2 -I${SDL2_ttf}/include/SDL2 -I${SDL2_image}/include/SDL2 -I${SDL2_mixer}/include/SDL2";
|
||||
|
||||
postInstall = ''
|
||||
rm -r $out/include
|
||||
wrapProgram $out/bin/enigma --prefix PATH : "${stdenv.lib.makeBinPath [ xdg_utils ]}"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Puzzle game inspired by Oxyd on the Atari ST and Rock'n'Roll on the Amiga";
|
||||
license = with licenses; [ gpl2 free ];
|
||||
license = with licenses; [ gpl2 free ]; # source + bundles libs + art
|
||||
platforms = platforms.unix;
|
||||
broken = stdenv.targetPlatform.isDarwin;
|
||||
maintainers = with maintainers; [ iblech ];
|
||||
homepage = "https://www.nongnu.org/enigma/";
|
||||
};
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
--- a/src/Value.cc.orig 2017-09-03 15:39:37 UTC
|
||||
+++ b/src/Value.cc
|
||||
@@ -146,10 +146,10 @@ namespace enigma {
|
||||
val.str[0] = 0;
|
||||
break;
|
||||
case BOOL :
|
||||
- val.dval[0] = false;
|
||||
+ val.dval[0] = 0;
|
||||
break;
|
||||
case OBJECT :
|
||||
- val.dval[0] = (double) NULL;
|
||||
+ val.dval[0] = 0;
|
||||
break;
|
||||
case NAMEDOBJECT:
|
||||
ASSERT(false, XLevelRuntime, "Value: illegal type usage");
|
|
@ -1,12 +0,0 @@
|
|||
--- a/src/client.cc
|
||||
+++ b/src/client.cc
|
||||
@@ -208,8 +208,8 @@ void Client::handle_events() {
|
||||
case SDL_MOUSEBUTTONUP: on_mousebutton(e); break;
|
||||
case SDL_ACTIVEEVENT: {
|
||||
update_mouse_button_state();
|
||||
- if (e.active.gain == 0 && !video::IsFullScreen())
|
||||
- show_menu(false);
|
||||
+// if (e.active.gain == 0 && !video::IsFullScreen())
|
||||
+// show_menu(false);
|
||||
break;
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
--- a/src/lev/Proxy.cc.orig 2017-09-03 15:54:50 UTC
|
||||
+++ b/src/lev/Proxy.cc
|
||||
@@ -933,7 +933,7 @@ namespace enigma { namespace lev {
|
||||
} else if (haveLocalCopy) {
|
||||
// plain file
|
||||
basic_ifstream<char> ifs(absExtPath.c_str(), ios::binary | ios::in);
|
||||
- if (ifs != NULL)
|
||||
+ if (ifs)
|
||||
Readfile(ifs, extCode);
|
||||
else
|
||||
haveLocalCopy = false;
|
Loading…
Reference in a new issue