lol

toppler: add gcc14 patch

+90
+5
pkgs/games/toppler/default.nix
··· 43 43 zlib 44 44 ]; 45 45 46 + patches = [ 47 + # Based on https://gitlab.com/roever/toppler/-/merge_requests/3 48 + ./gcc14.patch 49 + ]; 50 + 46 51 # GIMP needs a writable home 47 52 preBuild = '' 48 53 export HOME=$(mktemp -d)
+85
pkgs/games/toppler/gcc14.patch
··· 1 + diff --git a/Makefile b/Makefile 2 + index a6a140f..fb9a8b9 100644 3 + --- a/Makefile 4 + +++ b/Makefile 5 + @@ -518,7 +518,7 @@ src/po/%.po: _build/toppler.pot 6 + # TODO dist and windist.. 7 + 8 + .PHONY: install 9 + -install: toppler.dat toppler $(TRANSLATIONFILES_INST) 10 + +install: toppler $(TRANSLATIONFILES_INST) 11 + $(INSTALL) -m755 -d $(DESTDIR)$(PKGDATADIR) 12 + $(INSTALL) -m755 -d $(DESTDIR)$(BINDIR) 13 + $(INSTALL) -m755 -d $(DESTDIR)$(MANDIR)/man6 14 + diff --git a/src/decl.cc b/src/decl.cc 15 + index f80f83e..8a7bbd9 100644 16 + --- a/src/decl.cc 17 + +++ b/src/decl.cc 18 + @@ -22,6 +22,7 @@ 19 + #include <SDL.h> 20 + 21 + #include <cstdlib> 22 + +#include <algorithm> 23 + #include <cstring> 24 + #include <sys/stat.h> 25 + #include <unistd.h> 26 + diff --git a/src/keyb.cc b/src/keyb.cc 27 + index c3c13df..7d37847 100644 28 + --- a/src/keyb.cc 29 + +++ b/src/keyb.cc 30 + @@ -156,7 +156,7 @@ static void handleEvents(void) { 31 + mouse_button = e.button.button; 32 + break; 33 + case SDL_QUIT: 34 + - fprintf(stderr, _("Wheee!!\n").c_str()); 35 + + fprintf(stderr, "%s", _("Wheee!!\n").c_str()); 36 + exit(0); 37 + break; 38 + 39 + diff --git a/src/level.cc b/src/level.cc 40 + index e1e2bb8..ac2faf3 100644 41 + --- a/src/level.cc 42 + +++ b/src/level.cc 43 + @@ -27,6 +27,7 @@ 44 + #endif 45 + 46 + #include "decl.h" 47 + +#include <algorithm> 48 + 49 + #ifdef _WIN32 50 + #include <direct.h> 51 + diff --git a/src/main.cc b/src/main.cc 52 + index 522d041..ffc8e40 100644 53 + --- a/src/main.cc 54 + +++ b/src/main.cc 55 + @@ -46,7 +46,7 @@ static bool parse_arguments(int argc, char *argv[]) { 56 + if (parm >= '0' && parm <= '9') { 57 + printf(_("Debug level is now %c.\n").c_str(), parm); 58 + config.debug_level(parm - '0'); 59 + - } else printf(_("Illegal debug level value, using default.\n").c_str()); 60 + + } else printf("%s", _("Illegal debug level value, using default.\n").c_str()); 61 + } else { 62 + printhelp(); 63 + return false; 64 + @@ -110,7 +110,7 @@ int main(int argc, char *argv[]) { 65 + atexit(QuitFunction); 66 + srand(time(0)); 67 + startgame(); 68 + - printf(_("Thanks for playing!\n").c_str()); 69 + + printf("%s", _("Thanks for playing!\n").c_str()); 70 + SDL_ShowCursor(mouse); 71 + SDL_Quit(); 72 + } 73 + diff --git a/src/screen.cc b/src/screen.cc 74 + index eb18543..ce23571 100644 75 + --- a/src/screen.cc 76 + +++ b/src/screen.cc 77 + @@ -30,6 +30,8 @@ 78 + #include "keyb.h" 79 + #include "configuration.h" 80 + 81 + +#include <algorithm> 82 + + 83 + static SDL_Surface *display = nullptr; 84 + static SDL_Window *sdlWindow = nullptr; 85 + static SDL_Renderer *sdlRenderer = nullptr;