enigma: init at 1.21
This commit is contained in:
parent
9297928d60
commit
d0779bc16e
31
pkgs/games/enigma/default.nix
Normal file
31
pkgs/games/enigma/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ stdenv, fetchurl, makeWrapper, pkg-config, curl, imagemagick, libpng, SDL, SDL_image, SDL_mixer, SDL_ttf, xercesc, xdg_utils, hicolor-icon-theme }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "enigma";
|
||||
version = "1.21";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/enigma-game/enigma-${version}.tar.gz";
|
||||
sha256 = "d872cf067d8eb560d3bb1cb17245814bc56ac3953ae1f12e2229c8eb6f82ce01";
|
||||
};
|
||||
|
||||
# patches lifted from Arch
|
||||
patches = [ ./src_client.cc.patch ./src_lev_Proxy.cc.patch ./src_Value.cc.patch ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = [ "-Wno-deprecated-declarations" ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config imagemagick makeWrapper ];
|
||||
buildInputs = [ SDL SDL_image SDL_mixer SDL_ttf libpng xercesc curl xdg_utils ];
|
||||
|
||||
postInstall = ''
|
||||
rm -r $out/include
|
||||
wrapProgram $out/bin/enigma --prefix PATH : "${stdenv.lib.makeBinPath [ xdg_utils ]}"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Puzzle game inspired by Oxyd on the Atari ST and Rock'n'Roll on the Amiga";
|
||||
license = with licenses; [ gpl2 free ];
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ iblech ];
|
||||
homepage = "https://www.nongnu.org/enigma/";
|
||||
};
|
||||
}
|
15
pkgs/games/enigma/src_Value.cc.patch
Normal file
15
pkgs/games/enigma/src_Value.cc.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
--- 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");
|
12
pkgs/games/enigma/src_client.cc.patch
Normal file
12
pkgs/games/enigma/src_client.cc.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
--- 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;
|
||||
}
|
11
pkgs/games/enigma/src_lev_Proxy.cc.patch
Normal file
11
pkgs/games/enigma/src_lev_Proxy.cc.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- 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;
|
|
@ -2135,6 +2135,8 @@ in
|
|||
|
||||
enca = callPackage ../tools/text/enca { };
|
||||
|
||||
enigma = callPackage ../games/enigma {};
|
||||
|
||||
ent = callPackage ../tools/misc/ent { };
|
||||
|
||||
envconsul = callPackage ../tools/system/envconsul { };
|
||||
|
|
Loading…
Reference in a new issue