diff options
author | Ingo Blechschmidt <iblech@web.de> | 2021-01-10 13:45:48 +0100 |
---|---|---|
committer | Ingo Blechschmidt <iblech@web.de> | 2021-01-11 01:42:28 +0100 |
commit | 725051e81cdd650329e948f481b93278d3ef0670 (patch) | |
tree | 36c61f1f9e2fa5f9c5eeef4f286e9405f97b8767 /pkgs/games/enigma | |
parent | d0779bc16e3ac8b134843575e8da8a0452b7d24a (diff) |
enigma: 1.21 -> 1.30-alpha
Diffstat (limited to 'pkgs/games/enigma')
-rw-r--r-- | pkgs/games/enigma/default.nix | 25 | ||||
-rw-r--r-- | pkgs/games/enigma/src_Value.cc.patch | 15 | ||||
-rw-r--r-- | pkgs/games/enigma/src_client.cc.patch | 12 | ||||
-rw-r--r-- | pkgs/games/enigma/src_lev_Proxy.cc.patch | 11 |
4 files changed, 13 insertions, 50 deletions
diff --git a/pkgs/games/enigma/default.nix b/pkgs/games/enigma/default.nix index d277768dbf551..1912f87027504 100644 --- a/pkgs/games/enigma/default.nix +++ b/pkgs/games/enigma/default.nix @@ -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/"; }; diff --git a/pkgs/games/enigma/src_Value.cc.patch b/pkgs/games/enigma/src_Value.cc.patch deleted file mode 100644 index 6ce85692dd2de..0000000000000 --- a/pkgs/games/enigma/src_Value.cc.patch +++ /dev/null @@ -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"); diff --git a/pkgs/games/enigma/src_client.cc.patch b/pkgs/games/enigma/src_client.cc.patch deleted file mode 100644 index 48d989470ff92..0000000000000 --- a/pkgs/games/enigma/src_client.cc.patch +++ /dev/null @@ -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; - } diff --git a/pkgs/games/enigma/src_lev_Proxy.cc.patch b/pkgs/games/enigma/src_lev_Proxy.cc.patch deleted file mode 100644 index 86796484dfd69..0000000000000 --- a/pkgs/games/enigma/src_lev_Proxy.cc.patch +++ /dev/null @@ -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; |