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