1 |
commit: ab219ce2849803591f4ceb79c1e977071cef20f1 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 22 14:52:47 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 22 14:53:04 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab219ce2 |
7 |
|
8 |
games-fps/sauerbraten: add 2020.12.27 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/738152 |
11 |
Closes: https://bugs.gentoo.org/706308 |
12 |
Closes: https://bugs.gentoo.org/781863 |
13 |
Closes: https://bugs.gentoo.org/759535 |
14 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
15 |
|
16 |
games-fps/sauerbraten/Manifest | 1 + |
17 |
...0.12.27-respect-FLAGS-don-t-strip-symbols.patch | 146 +++++++++++++++++++++ |
18 |
.../sauerbraten-2020.12.27-unbundle-enet.patch | 113 ++++++++++++++++ |
19 |
...n-2020.12.27-use-pkg-config-for-freetype2.patch | 28 ++++ |
20 |
games-fps/sauerbraten/files/sauerbraten.conf | 8 +- |
21 |
games-fps/sauerbraten/files/sauerbraten.init | 8 +- |
22 |
.../sauerbraten/sauerbraten-2020.12.27.ebuild | 145 ++++++++++++++++++++ |
23 |
7 files changed, 441 insertions(+), 8 deletions(-) |
24 |
|
25 |
diff --git a/games-fps/sauerbraten/Manifest b/games-fps/sauerbraten/Manifest |
26 |
index 85124398a06..758332c2c9b 100644 |
27 |
--- a/games-fps/sauerbraten/Manifest |
28 |
+++ b/games-fps/sauerbraten/Manifest |
29 |
@@ -1 +1,2 @@ |
30 |
DIST sauerbraten_2013_02_03_collect_edition_linux.tar.bz2 589941180 BLAKE2B b8a1c929dcf7a32bc289262fffcbcd4e7bbab3a9030c12bce7d086d63aaddee0c573c5d38f9ac845b3080aeac38d1b548aa9d243b462c3c682b158a379fe8cc2 SHA512 7864e346cc2bc86d78973db1b341fd8256cc2e1953be51263ef91a5374f9ec00276ba2940850e6d5bba7a57c71190b670dc7ba97021be2935c31f8694fed4897 |
31 |
+DIST sauerbraten_2020_12_27_linux.tar.bz2 985815649 BLAKE2B 4ec9caf705766aed76153a8631b1990c6432db8c816d579e891263b36adf0e7ed4831d2fee010b7692f6457989c0acea552f72c95e0924e97182d2a03dc947f2 SHA512 60487e0493478b9dd8940a9239834d8f3f6b6ca529f3c5b718f91caf5116073942ca6908d7fff26ab37b7ec590114ab07f24cdcea5c355288d3c2706d626ea28 |
32 |
|
33 |
diff --git a/games-fps/sauerbraten/files/sauerbraten-2020.12.27-respect-FLAGS-don-t-strip-symbols.patch b/games-fps/sauerbraten/files/sauerbraten-2020.12.27-respect-FLAGS-don-t-strip-symbols.patch |
34 |
new file mode 100644 |
35 |
index 00000000000..6d0dc3b1f08 |
36 |
--- /dev/null |
37 |
+++ b/games-fps/sauerbraten/files/sauerbraten-2020.12.27-respect-FLAGS-don-t-strip-symbols.patch |
38 |
@@ -0,0 +1,146 @@ |
39 |
+From: Sam James <sam@g.o> |
40 |
+Date: Thu, 22 Apr 2021 13:47:33 +0000 |
41 |
+Subject: Respect *FLAGS, don't strip symbols |
42 |
+ |
43 |
+--- a/src/enet/Makefile |
44 |
++++ b/src/enet/Makefile |
45 |
+@@ -1,4 +1,3 @@ |
46 |
+-CFLAGS=-O3 -fomit-frame-pointer |
47 |
+ override CFLAGS:= $(CFLAGS) -Iinclude $(shell ./check_cflags.sh $(CC) $(CFLAGS)) |
48 |
+ |
49 |
+ OBJS= \ |
50 |
+--- a/src/rpggame/Makefile |
51 |
++++ b/src/rpggame/Makefile |
52 |
+@@ -1,4 +1,3 @@ |
53 |
+-CXXFLAGS= -Os |
54 |
+ override CXXFLAGS+= -Wall -fsigned-char -fno-exceptions -fno-rtti |
55 |
+ |
56 |
+ PLATFORM= $(shell uname -s) |
57 |
+@@ -7,11 +6,6 @@ PLATFORM_PREFIX= native |
58 |
+ INCLUDES= -I../shared -I../engine -I../rpggame -I../enet/include |
59 |
+ |
60 |
+ STRIP= |
61 |
+-ifeq (,$(findstring -g,$(CXXFLAGS))) |
62 |
+-ifeq (,$(findstring -pg,$(CXXFLAGS))) |
63 |
+- STRIP=strip |
64 |
+-endif |
65 |
+-endif |
66 |
+ |
67 |
+ MV=mv |
68 |
+ |
69 |
+@@ -118,7 +112,7 @@ clean: |
70 |
+ $(filter-out shared/%,$(CLIENT_PCH)): $(filter shared/%,$(CLIENT_PCH)) |
71 |
+ |
72 |
+ %.h.gch: %.h |
73 |
+- $(CXX) $(CXXFLAGS) -x c++-header -o $@.tmp $< |
74 |
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -x c++-header -o $@.tmp $< |
75 |
+ $(MV) $@.tmp $@ |
76 |
+ |
77 |
+ $(CLIENT_OBJS): CXXFLAGS += $(CLIENT_INCLUDES) |
78 |
+@@ -129,13 +123,13 @@ $(filter ../rpggame/%,$(CLIENT_OBJS)): $(filter ../rpggame/%,$(CLIENT_PCH)) |
79 |
+ ifneq (,$(findstring MINGW,$(PLATFORM))) |
80 |
+ client: $(CLIENT_OBJS) |
81 |
+ $(WINDRES) -I ../vcpp -i ../vcpp/mingw.rc -J rc -o ../vcpp/mingw.res -O coff |
82 |
+- $(CXX) $(CXXFLAGS) -o ../$(WINBIN)/rpg.exe ../vcpp/mingw.res $(CLIENT_OBJS) $(CLIENT_LIBS) |
83 |
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o ../$(WINBIN)/rpg.exe ../vcpp/mingw.res $(CLIENT_OBJS) $(CLIENT_LIBS) |
84 |
+ ifneq (,$(STRIP)) |
85 |
+ $(STRIP) ../../bin/rpg.exe |
86 |
+ endif |
87 |
+ else |
88 |
+ client: libenet $(CLIENT_OBJS) |
89 |
+- $(CXX) $(CXXFLAGS) -o rpg_client $(CLIENT_OBJS) $(CLIENT_LIBS) |
90 |
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o rpg_client $(CLIENT_OBJS) $(CLIENT_LIBS) |
91 |
+ endif |
92 |
+ |
93 |
+ depend: |
94 |
+--- a/src/Makefile |
95 |
++++ b/src/Makefile |
96 |
+@@ -1,4 +1,3 @@ |
97 |
+-CXXFLAGS= -O3 -fomit-frame-pointer -ffast-math |
98 |
+ override CXXFLAGS+= -Wall -fsigned-char -fno-exceptions -fno-rtti |
99 |
+ |
100 |
+ PLATFORM= $(shell uname -s | tr '[:lower:]' '[:upper:]') |
101 |
+@@ -7,12 +6,6 @@ PLATFORM_PREFIX= native |
102 |
+ INCLUDES= -Ishared -Iengine -Ifpsgame -Ienet/include |
103 |
+ |
104 |
+ STRIP= |
105 |
+-ifeq (,$(findstring -g,$(CXXFLAGS))) |
106 |
+-ifeq (,$(findstring -pg,$(CXXFLAGS))) |
107 |
+- STRIP=strip |
108 |
+-endif |
109 |
+-endif |
110 |
+- |
111 |
+ MV=mv |
112 |
+ |
113 |
+ ifneq (,$(findstring MINGW,$(PLATFORM))) |
114 |
+@@ -65,8 +58,8 @@ CLIENT_LIBS= -F../sauerbraten.app/Contents/Frameworks/ -framework SDL2 -framewor |
115 |
+ CLIENT_LIBS+= -framework SDL2_mixer -framework CoreAudio -framework AudioToolbox |
116 |
+ CLIENT_LIBS+= -framework AudioUnit -framework OpenGL -framework Cocoa -lz -Lenet -lenet |
117 |
+ else |
118 |
+-CLIENT_INCLUDES= $(INCLUDES) -I/usr/X11R6/include `sdl2-config --cflags` |
119 |
+-CLIENT_LIBS= -Lenet -lenet -L/usr/X11R6/lib -lX11 `sdl2-config --libs` -lSDL2_image -lSDL2_mixer -lz -lGL |
120 |
++CLIENT_INCLUDES= $(INCLUDES) `sdl2-config --cflags` |
121 |
++CLIENT_LIBS= -Lenet -lenet -lX11 `sdl2-config --libs` -lSDL2_image -lSDL2_mixer -lz -lGL |
122 |
+ endif |
123 |
+ endif |
124 |
+ ifeq ($(PLATFORM),LINUX) |
125 |
+@@ -173,11 +166,11 @@ clean: |
126 |
+ $(filter-out shared/%,$(CLIENT_PCH)): $(filter shared/%,$(CLIENT_PCH)) |
127 |
+ |
128 |
+ %.h.gch: %.h |
129 |
+- $(CXX) $(CXXFLAGS) -x c++-header -o $@.tmp $< |
130 |
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -x c++-header -o $@.tmp $< |
131 |
+ $(MV) $@.tmp $@ |
132 |
+ |
133 |
+ %-standalone.o: %.cpp |
134 |
+- $(CXX) $(CXXFLAGS) -c -o $@ $< |
135 |
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< |
136 |
+ |
137 |
+ $(CLIENT_OBJS): CXXFLAGS += $(CLIENT_INCLUDES) |
138 |
+ $(filter shared/%,$(CLIENT_OBJS)): $(filter shared/%,$(CLIENT_PCH)) |
139 |
+@@ -188,35 +181,35 @@ $(SERVER_MASTER_OBJS): CXXFLAGS += $(SERVER_INCLUDES) |
140 |
+ |
141 |
+ ifneq (,$(findstring MINGW,$(PLATFORM))) |
142 |
+ client: $(CLIENT_OBJS) |
143 |
+- $(WINDRES) -I vcpp -i vcpp/mingw.rc -J rc -o vcpp/mingw.res -O coff |
144 |
+- $(CXX) $(CXXFLAGS) -o $(WINBIN)/sauerbraten.exe vcpp/mingw.res $(CLIENT_OBJS) $(CLIENT_LIBS) |
145 |
++ $(WINDRES) -I vcpp -i vcpp/mingw.rc -J rc $(LDFLAGS) -o vcpp/mingw.res $(LDFLAGS) -o coff |
146 |
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $(WINBIN)/sauerbraten.exe vcpp/mingw.res $(CLIENT_OBJS) $(CLIENT_LIBS) |
147 |
+ |
148 |
+ server: $(SERVER_OBJS) |
149 |
+- $(WINDRES) -I vcpp -i vcpp/mingw.rc -J rc -o vcpp/mingw.res -O coff |
150 |
+- $(CXX) $(CXXFLAGS) -o $(WINBIN)/sauer_server.exe vcpp/mingw.res $(SERVER_OBJS) $(SERVER_LIBS) |
151 |
++ $(WINDRES) -I vcpp -i vcpp/mingw.rc -J rc $(LDFLAGS) -o vcpp/mingw.res $(LDFLAGS) -o coff |
152 |
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $(WINBIN)/sauer_server.exe vcpp/mingw.res $(SERVER_OBJS) $(SERVER_LIBS) |
153 |
+ |
154 |
+ master: $(MASTER_OBJS) |
155 |
+- $(CXX) $(CXXFLAGS) -o $(WINBIN)/sauer_master.exe $(MASTER_OBJS) $(MASTER_LIBS) |
156 |
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $(WINBIN)/sauer_master.exe $(MASTER_OBJS) $(MASTER_LIBS) |
157 |
+ |
158 |
+ install: all |
159 |
+ else |
160 |
+ client: libenet $(CLIENT_OBJS) |
161 |
+- $(CXX) $(CXXFLAGS) -o sauer_client $(CLIENT_OBJS) $(CLIENT_LIBS) |
162 |
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o sauer_client $(CLIENT_OBJS) $(CLIENT_LIBS) |
163 |
+ ifneq (,$(findstring DARWIN,$(PLATFORM))) |
164 |
+ install_name_tool -add_rpath @executable_path/../Frameworks sauer_client |
165 |
+ endif |
166 |
+ |
167 |
+ server: libenet $(SERVER_OBJS) |
168 |
+- $(CXX) $(CXXFLAGS) -o sauer_server $(SERVER_OBJS) $(SERVER_LIBS) |
169 |
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o sauer_server $(SERVER_OBJS) $(SERVER_LIBS) |
170 |
+ |
171 |
+ master: libenet $(MASTER_OBJS) |
172 |
+- $(CXX) $(CXXFLAGS) -o sauer_master $(MASTER_OBJS) $(MASTER_LIBS) |
173 |
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o sauer_master $(MASTER_OBJS) $(MASTER_LIBS) |
174 |
+ |
175 |
+ shared/cube2font.o: shared/cube2font.c |
176 |
+- $(CXX) $(CXXFLAGS) -c -o $@ $< `freetype-config --cflags` |
177 |
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -c -o $@ $< `freetype-config --cflags` |
178 |
+ |
179 |
+ cube2font: shared/cube2font.o |
180 |
+- $(CXX) $(CXXFLAGS) -o cube2font shared/cube2font.o `freetype-config --libs` -lz |
181 |
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o cube2font shared/cube2font.o `freetype-config --libs` -lz |
182 |
+ |
183 |
+ ifneq (,$(findstring DARWIN,$(PLATFORM))) |
184 |
+ install: client |
185 |
|
186 |
diff --git a/games-fps/sauerbraten/files/sauerbraten-2020.12.27-unbundle-enet.patch b/games-fps/sauerbraten/files/sauerbraten-2020.12.27-unbundle-enet.patch |
187 |
new file mode 100644 |
188 |
index 00000000000..ad7494b5538 |
189 |
--- /dev/null |
190 |
+++ b/games-fps/sauerbraten/files/sauerbraten-2020.12.27-unbundle-enet.patch |
191 |
@@ -0,0 +1,113 @@ |
192 |
+From f269af0dc953ee79d95beabd2679e4c91992ac8d Mon Sep 17 00:00:00 2001 |
193 |
+From: Sam James <sam@g.o> |
194 |
+Date: Thu, 22 Apr 2021 14:06:00 +0000 |
195 |
+Subject: [PATCH] Unbundle enet |
196 |
+ |
197 |
+--- a/src/Makefile |
198 |
++++ b/src/Makefile |
199 |
+@@ -4,7 +4,7 @@ override CXXFLAGS+= -Wall -fsigned-char -fno-exceptions -fno-rtti |
200 |
+ PLATFORM= $(shell uname -s | tr '[:lower:]' '[:upper:]') |
201 |
+ PLATFORM_PREFIX= native |
202 |
+ |
203 |
+-INCLUDES= -Ishared -Iengine -Ifpsgame -Ienet/include |
204 |
++INCLUDES= -Ishared -Iengine -Ifpsgame |
205 |
+ |
206 |
+ STRIP= |
207 |
+ MV=mv |
208 |
+@@ -57,10 +57,10 @@ override CXX+= -arch x86_64 -mmacosx-version-min=$(OSXMIN) |
209 |
+ CLIENT_INCLUDES= $(INCLUDES) -Iinclude |
210 |
+ CLIENT_LIBS= -F../sauerbraten.app/Contents/Frameworks/ -framework SDL2 -framework SDL2_image |
211 |
+ CLIENT_LIBS+= -framework SDL2_mixer -framework CoreAudio -framework AudioToolbox |
212 |
+-CLIENT_LIBS+= -framework AudioUnit -framework OpenGL -framework Cocoa -lz -Lenet -lenet |
213 |
++CLIENT_LIBS+= -framework AudioUnit -framework OpenGL -framework Cocoa -lz -lenet |
214 |
+ else |
215 |
+-CLIENT_INCLUDES= $(INCLUDES) `sdl2-config --cflags` |
216 |
+-CLIENT_LIBS= -Lenet -lenet -lX11 `sdl2-config --libs` -lSDL2_image -lSDL2_mixer -lz -lGL |
217 |
++CLIENT_INCLUDES= $(INCLUDES) `sdl2-config --cflags` |
218 |
++CLIENT_LIBS= -lenet -lX11 `sdl2-config --libs` -lSDL2_image -lSDL2_mixer -lz -lGL |
219 |
+ endif |
220 |
+ endif |
221 |
+ ifeq ($(PLATFORM),LINUX) |
222 |
+@@ -135,7 +135,7 @@ SERVER_LIBS= -mwindows $(STD_LIBS) -L$(WINBIN) -L$(WINLIB) -lzlib1 -lenet -lws2_ |
223 |
+ MASTER_LIBS= $(STD_LIBS) -L$(WINBIN) -L$(WINLIB) -lzlib1 -lenet -lws2_32 -lwinmm |
224 |
+ else |
225 |
+ SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) |
226 |
+-SERVER_LIBS= -Lenet -lenet -lz |
227 |
++SERVER_LIBS= -lenet -lz |
228 |
+ MASTER_LIBS= $(SERVER_LIBS) |
229 |
+ endif |
230 |
+ SERVER_OBJS= \ |
231 |
+@@ -226,10 +226,6 @@ endif |
232 |
+ endif |
233 |
+ endif |
234 |
+ |
235 |
+-enet/libenet.a: |
236 |
+- $(MAKE) -C enet CC='$(CC)' AR='$(AR)' |
237 |
+-libenet: enet/libenet.a |
238 |
+- |
239 |
+ depend: |
240 |
+ makedepend -Y -Ishared -Iengine -Ifpsgame $(CLIENT_OBJS:.o=.cpp) |
241 |
+ makedepend -a -o.h.gch -Y -Ishared -Iengine -Ifpsgame $(CLIENT_PCH:.h.gch=.h) |
242 |
+ |
243 |
+--- a/src/Makefile |
244 |
++++ b/src/Makefile |
245 |
+@@ -193,16 +193,16 @@ master: $(MASTER_OBJS) |
246 |
+ |
247 |
+ install: all |
248 |
+ else |
249 |
+-client: libenet $(CLIENT_OBJS) |
250 |
++client: $(CLIENT_OBJS) |
251 |
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o sauer_client $(CLIENT_OBJS) $(CLIENT_LIBS) |
252 |
+ ifneq (,$(findstring DARWIN,$(PLATFORM))) |
253 |
+ install_name_tool -add_rpath @executable_path/../Frameworks sauer_client |
254 |
+ endif |
255 |
+ |
256 |
+-server: libenet $(SERVER_OBJS) |
257 |
++server: $(SERVER_OBJS) |
258 |
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o sauer_server $(SERVER_OBJS) $(SERVER_LIBS) |
259 |
+ |
260 |
+-master: libenet $(MASTER_OBJS) |
261 |
++master: $(MASTER_OBJS) |
262 |
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o sauer_master $(MASTER_OBJS) $(MASTER_LIBS) |
263 |
+ |
264 |
+ shared/cube2font.o: shared/cube2font.c |
265 |
+--- a/src/rpggame/Makefile |
266 |
++++ b/src/rpggame/Makefile |
267 |
+@@ -3,7 +3,7 @@ override CXXFLAGS+= -Wall -fsigned-char -fno-exceptions -fno-rtti |
268 |
+ PLATFORM= $(shell uname -s) |
269 |
+ PLATFORM_PREFIX= native |
270 |
+ |
271 |
+-INCLUDES= -I../shared -I../engine -I../rpggame -I../enet/include |
272 |
++INCLUDES= -I../shared -I../engine -I../rpggame |
273 |
+ |
274 |
+ STRIP= |
275 |
+ |
276 |
+@@ -41,7 +41,7 @@ STD_LIBS= -static-libgcc -static-libstdc++ |
277 |
+ CLIENT_LIBS= -mwindows $(STD_LIBS) -L../$(WINBIN) -L../$(WINLIB) -lSDL2 -lSDL2_image -lSDL2_mixer -lzlib1 -lopengl32 -lenet -lws2_32 -lwinmm |
278 |
+ else |
279 |
+ CLIENT_INCLUDES= $(INCLUDES) -I/usr/X11R6/include `sdl2-config --cflags` |
280 |
+-CLIENT_LIBS= -L../enet -lenet -L/usr/X11R6/lib -lX11 `sdl2-config --libs` -lSDL2_image -lSDL2_mixer -lz -lGL |
281 |
++CLIENT_LIBS= -lenet -L/usr/X11R6/lib -lX11 `sdl2-config --libs` -lSDL2_image -lSDL2_mixer -lz -lGL |
282 |
+ endif |
283 |
+ ifeq ($(PLATFORM),Linux) |
284 |
+ CLIENT_LIBS+= -lrt |
285 |
+@@ -102,10 +102,6 @@ default: all |
286 |
+ |
287 |
+ all: client |
288 |
+ |
289 |
+-enet/libenet.a: |
290 |
+- $(MAKE) -C ../enet/ |
291 |
+-libenet: enet/libenet.a |
292 |
+- |
293 |
+ clean: |
294 |
+ -$(RM) $(CLIENT_PCH) $(CLIENT_OBJS) rpg_client |
295 |
+ |
296 |
+@@ -128,7 +124,7 @@ ifneq (,$(STRIP)) |
297 |
+ $(STRIP) ../../bin/rpg.exe |
298 |
+ endif |
299 |
+ else |
300 |
+-client: libenet $(CLIENT_OBJS) |
301 |
++client: $(CLIENT_OBJS) |
302 |
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o rpg_client $(CLIENT_OBJS) $(CLIENT_LIBS) |
303 |
+ endif |
304 |
+ |
305 |
|
306 |
diff --git a/games-fps/sauerbraten/files/sauerbraten-2020.12.27-use-pkg-config-for-freetype2.patch b/games-fps/sauerbraten/files/sauerbraten-2020.12.27-use-pkg-config-for-freetype2.patch |
307 |
new file mode 100644 |
308 |
index 00000000000..ae4a43b43f9 |
309 |
--- /dev/null |
310 |
+++ b/games-fps/sauerbraten/files/sauerbraten-2020.12.27-use-pkg-config-for-freetype2.patch |
311 |
@@ -0,0 +1,28 @@ |
312 |
+From: Sam James <sam@g.o> |
313 |
+Date: Thu, 22 Apr 2021 14:33:15 +0000 |
314 |
+Subject: [PATCH] Use pkg-config for freetype2 |
315 |
+ |
316 |
+--- a/src/Makefile |
317 |
++++ b/src/Makefile |
318 |
+@@ -1,5 +1,7 @@ |
319 |
+ override CXXFLAGS+= -Wall -fsigned-char -fno-exceptions -fno-rtti |
320 |
+ |
321 |
++PKG_CONFIG?=pkg-config |
322 |
++ |
323 |
+ PLATFORM= $(shell uname -s | tr '[:lower:]' '[:upper:]') |
324 |
+ PLATFORM_PREFIX= native |
325 |
+ |
326 |
+@@ -206,10 +208,10 @@ master: libenet $(MASTER_OBJS) |
327 |
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o sauer_master $(MASTER_OBJS) $(MASTER_LIBS) |
328 |
+ |
329 |
+ shared/cube2font.o: shared/cube2font.c |
330 |
+- $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -c -o $@ $< `freetype-config --cflags` |
331 |
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -c -o $@ $< `${PKG_CONFIG} --cflags freetype2` |
332 |
+ |
333 |
+ cube2font: shared/cube2font.o |
334 |
+- $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o cube2font shared/cube2font.o `freetype-config --libs` -lz |
335 |
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o cube2font shared/cube2font.o `${PKG_CONFIG} --libs freetype2` -lz |
336 |
+ |
337 |
+ ifneq (,$(findstring DARWIN,$(PLATFORM))) |
338 |
+ install: client |
339 |
+-- |
340 |
|
341 |
diff --git a/games-fps/sauerbraten/files/sauerbraten.conf b/games-fps/sauerbraten/files/sauerbraten.conf |
342 |
index 8d93bf62b78..f0c2896b2be 100644 |
343 |
--- a/games-fps/sauerbraten/files/sauerbraten.conf |
344 |
+++ b/games-fps/sauerbraten/files/sauerbraten.conf |
345 |
@@ -1,15 +1,15 @@ |
346 |
# Config file for /etc/init.d/sauerbraten |
347 |
|
348 |
# Owner of Sauerbraten server processes (must be existing) |
349 |
-USER="%GAMES_USER_DED%" |
350 |
-GROUP="%GAMES_GROUP%" |
351 |
+USER="sauerbraten" |
352 |
+GROUP="sauerbraten" |
353 |
|
354 |
|
355 |
# Whether to run the dedicated server |
356 |
RUNSERVER="Yes" |
357 |
|
358 |
# Location of the dedicated server config directory |
359 |
-SERVERCONFIG="%SYSCONFDIR%" |
360 |
+SERVERCONFIG="/var/lib/sauerbraten" |
361 |
|
362 |
# Additional command line arguments to the dedicated server |
363 |
SERVERARGS="" |
364 |
@@ -19,7 +19,7 @@ SERVERARGS="" |
365 |
RUNMASTER="No" |
366 |
|
367 |
# Location of the master server config directory |
368 |
-MASTERCONFIG="%SYSCONFDIR%" |
369 |
+MASTERCONFIG="/var/lib/sauerbraten" |
370 |
|
371 |
# What port should the masterserver use |
372 |
MASTERPORT="28787" |
373 |
|
374 |
diff --git a/games-fps/sauerbraten/files/sauerbraten.init b/games-fps/sauerbraten/files/sauerbraten.init |
375 |
index a5a7bb32966..14248bc8895 100644 |
376 |
--- a/games-fps/sauerbraten/files/sauerbraten.init |
377 |
+++ b/games-fps/sauerbraten/files/sauerbraten.init |
378 |
@@ -24,7 +24,7 @@ start_server() { |
379 |
|
380 |
start-stop-daemon \ |
381 |
--quiet --start --user ${USER}:${GROUP} --chdir ${SERVERCONFIG} \ |
382 |
- --make-pidfile --pidfile %GAMES_STATEDIR%/run/sauerbraten/server.pid \ |
383 |
+ --make-pidfile --pidfile /var/run/sauerbraten/server.pid \ |
384 |
--background --exec %LIBEXECDIR%/sauer_server -- ${SERVERARGS} |
385 |
eend $? |
386 |
} |
387 |
@@ -45,7 +45,7 @@ start_master() { |
388 |
|
389 |
start-stop-daemon \ |
390 |
--quiet --start --user ${USER}:${GROUP} \ |
391 |
- --make-pidfile --pidfile %GAMES_STATEDIR%/run/sauerbraten/master.pid \ |
392 |
+ --make-pidfile --pidfile /var/run/sauerbraten/master.pid \ |
393 |
--background --exec %LIBEXECDIR%/sauer_master -- ${MASTERARGS} |
394 |
eend $? |
395 |
} |
396 |
@@ -58,13 +58,13 @@ stop() { |
397 |
|
398 |
stop_server() { |
399 |
ebegin "Stopping Sauerbraten dedicated server" |
400 |
- start-stop-daemon --stop --retry 3 --pidfile %GAMES_STATEDIR%/run/sauerbraten/server.pid |
401 |
+ start-stop-daemon --stop --retry 3 --pidfile /var/run/sauerbraten/server.pid |
402 |
eend $? |
403 |
} |
404 |
|
405 |
stop_master() { |
406 |
ebegin "Stopping Sauerbraten master server" |
407 |
- start-stop-daemon --stop --retry 3 --pidfile %GAMES_STATEDIR%/run/sauerbraten/master.pid |
408 |
+ start-stop-daemon --stop --retry 3 --pidfile /var/run/sauerbraten/master.pid |
409 |
eend $? |
410 |
} |
411 |
|
412 |
|
413 |
diff --git a/games-fps/sauerbraten/sauerbraten-2020.12.27.ebuild b/games-fps/sauerbraten/sauerbraten-2020.12.27.ebuild |
414 |
new file mode 100644 |
415 |
index 00000000000..46c1e22b18e |
416 |
--- /dev/null |
417 |
+++ b/games-fps/sauerbraten/sauerbraten-2020.12.27.ebuild |
418 |
@@ -0,0 +1,145 @@ |
419 |
+# Copyright 1999-2021 Gentoo Authors |
420 |
+# Distributed under the terms of the GNU General Public License v2 |
421 |
+ |
422 |
+EAPI=7 |
423 |
+ |
424 |
+inherit desktop flag-o-matic gnome2-utils toolchain-funcs wrapper |
425 |
+ |
426 |
+DESCRIPTION="Sauerbraten is a FOSS game engine (Cube 2) with freeware game data (Sauerbraten)" |
427 |
+HOMEPAGE="http://sauerbraten.org/" |
428 |
+SRC_URI="mirror://sourceforge/sauerbraten/sauerbraten/2020_11_29/sauerbraten_${PV//./_}_linux.tar.bz2" |
429 |
+S="${WORKDIR}"/${PN} |
430 |
+ |
431 |
+LICENSE="ZLIB freedist" |
432 |
+SLOT="0" |
433 |
+KEYWORDS="~amd64 ~x86" |
434 |
+IUSE="debug dedicated server" |
435 |
+ |
436 |
+DEPEND=" |
437 |
+ >=net-libs/enet-1.3.6:1.3 |
438 |
+ sys-libs/zlib |
439 |
+ !dedicated? ( |
440 |
+ media-libs/libsdl2[X,opengl] |
441 |
+ media-libs/sdl2-image |
442 |
+ media-libs/sdl2-mixer |
443 |
+ virtual/opengl |
444 |
+ virtual/glu |
445 |
+ x11-libs/libX11 |
446 |
+ ) |
447 |
+" |
448 |
+RDEPEND=" |
449 |
+ ${DEPEND} |
450 |
+ acct-group/sauerbraten |
451 |
+ dedicated? ( acct-user/sauerbraten ) |
452 |
+" |
453 |
+BDEPEND="virtual/pkgconfig" |
454 |
+ |
455 |
+PATCHES=( |
456 |
+ # Respect CXXFLAGS, LDFLAGS |
457 |
+ "${FILESDIR}"/${PN}-2020.12.27-respect-FLAGS-don-t-strip-symbols.patch |
458 |
+ |
459 |
+ # Patch Makefile to use system enet instead of bundled |
460 |
+ "${FILESDIR}"/${PN}-2020.12.27-unbundle-enet.patch |
461 |
+ |
462 |
+ # Don't use freetype-config, it's obsolete |
463 |
+ "${FILESDIR}"/${PN}-2020.12.27-use-pkg-config-for-freetype2.patch |
464 |
+) |
465 |
+ |
466 |
+src_prepare() { |
467 |
+ rm -rf sauerbraten_unix bin_unix src/{include,lib,vcpp} || die |
468 |
+ |
469 |
+ default |
470 |
+ |
471 |
+ # Fix links so they point to the correct directory |
472 |
+ sed -i -e 's:docs/::' README.html || die |
473 |
+} |
474 |
+ |
475 |
+src_compile() { |
476 |
+ tc-export CXX PKG_CONFIG |
477 |
+ |
478 |
+ if use debug ; then |
479 |
+ append-cppflags -D_DEBUG |
480 |
+ fi |
481 |
+ |
482 |
+ emake -C src \ |
483 |
+ master \ |
484 |
+ $(usex dedicated "server" "$(usex server "server client" "client")") |
485 |
+} |
486 |
+ |
487 |
+src_install() { |
488 |
+ local LIBEXECDIR="/usr/lib" |
489 |
+ local DATADIR="/usr/share/${PN}" |
490 |
+ local STATEDIR="/var/lib/${PN}" |
491 |
+ |
492 |
+ if ! use dedicated ; then |
493 |
+ # Install the game data |
494 |
+ insinto "${DATADIR}" |
495 |
+ doins -r data packages |
496 |
+ |
497 |
+ # Install the client executable |
498 |
+ exeinto "${LIBEXECDIR}" |
499 |
+ doexe src/sauer_client |
500 |
+ |
501 |
+ # Install the client wrapper |
502 |
+ make_wrapper "${PN}-client" "${LIBEXECDIR}/sauer_client -q\$HOME/.${PN} -r" "${DATADIR}" |
503 |
+ |
504 |
+ # Create menu entry |
505 |
+ newicon -s 256 data/cube.png ${PN}.png |
506 |
+ make_desktop_entry "${PN}-client" "Cube 2: Sauerbraten" |
507 |
+ fi |
508 |
+ |
509 |
+ # Install the server config files |
510 |
+ insinto "${STATEDIR}" |
511 |
+ doins server-init.cfg |
512 |
+ |
513 |
+ # Install the server executables |
514 |
+ exeinto "${LIBEXECDIR}" |
515 |
+ doexe src/sauer_master |
516 |
+ |
517 |
+ if use dedicated || use server ; then |
518 |
+ doexe src/sauer_server |
519 |
+ fi |
520 |
+ |
521 |
+ make_wrapper "${PN}-server" \ |
522 |
+ "${LIBEXECDIR}/sauer_server -k${DATADIR} -q${STATEDIR}" |
523 |
+ make_wrapper "${PN}-master" \ |
524 |
+ "${LIBEXECDIR}/sauer_master ${STATEDIR}" |
525 |
+ |
526 |
+ # Install the server init script |
527 |
+ cp "${FILESDIR}"/${PN}.init "${T}" || die |
528 |
+ sed -i \ |
529 |
+ -e "s:%SYSCONFDIR%:${STATEDIR}:g" \ |
530 |
+ -e "s:%LIBEXECDIR%:${LIBEXECDIR}:g" \ |
531 |
+ -e "s:%/var/lib/%:/var/run:g" \ |
532 |
+ "${T}"/${PN}.init || die |
533 |
+ |
534 |
+ newinitd "${T}"/${PN}.init ${PN} |
535 |
+ cp "${FILESDIR}"/${PN}.conf "${T}" || die |
536 |
+ sed -i \ |
537 |
+ -e "s:%SYSCONFDIR%:${STATEDIR}:g" \ |
538 |
+ -e "s:%LIBEXECDIR%:${LIBEXECDIR}:g" \ |
539 |
+ -e "s:%GAMES_USER_DED%:sauerbraten:g" \ |
540 |
+ -e "s:%GAMES_GROUP%:sauerbraten:g" \ |
541 |
+ "${T}"/${PN}.conf || die |
542 |
+ newconfd "${T}"/${PN}.conf ${PN} |
543 |
+ |
544 |
+ dodoc src/*.txt docs/dev/*.txt |
545 |
+ |
546 |
+ docinto html |
547 |
+ dodoc -r README.html docs/* |
548 |
+} |
549 |
+ |
550 |
+pkg_preinst() { |
551 |
+ gnome2_icon_savelist |
552 |
+} |
553 |
+ |
554 |
+pkg_postinst() { |
555 |
+ gnome2_icon_cache_update |
556 |
+ |
557 |
+ elog "If you plan to use map editor feature copy all map data from ${DATADIR}" |
558 |
+ elog "to corresponding folder in your HOME/.${PN}" |
559 |
+} |
560 |
+ |
561 |
+pkg_postrm() { |
562 |
+ gnome2_icon_cache_update |
563 |
+} |