1 |
commit: 53d5d5bd85451baa1484b39a9861514e07f12c75 |
2 |
Author: Stefan Strogin <steils <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 28 20:53:13 2020 +0000 |
4 |
Commit: Stefan Strogin <steils <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 28 20:54:28 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53d5d5bd |
7 |
|
8 |
games-roguelike/nethack: drop old and vulnerable 3.6.1, 3.6.3 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/706200 |
11 |
Package-Manager: Portage-2.3.85, Repoman-2.3.20 |
12 |
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org> |
13 |
|
14 |
games-roguelike/nethack/Manifest | 2 - |
15 |
.../nethack/files/nethack-3.6.0-hint-tty | 19 --- |
16 |
.../nethack/files/nethack-3.6.0-hint-x11 | 23 ---- |
17 |
.../nethack/files/nethack-3.6.1-recover.patch | 115 ------------------ |
18 |
games-roguelike/nethack/nethack-3.6.1.ebuild | 128 -------------------- |
19 |
games-roguelike/nethack/nethack-3.6.3.ebuild | 129 --------------------- |
20 |
6 files changed, 416 deletions(-) |
21 |
|
22 |
diff --git a/games-roguelike/nethack/Manifest b/games-roguelike/nethack/Manifest |
23 |
index 66a24f403d3..db4ca9ec040 100644 |
24 |
--- a/games-roguelike/nethack/Manifest |
25 |
+++ b/games-roguelike/nethack/Manifest |
26 |
@@ -1,3 +1 @@ |
27 |
-DIST nethack-3.6.3.tar.gz 5568657 BLAKE2B f0aa12a27fdf5005f57dcc802af88939b8460cfcfea3dc4d262b15a2807376ed434233dfa85ae0bfd60e50ad5a51ff4b060b5063e393d5859bac1b98364b5359 SHA512 38bc6140b12188397539f28528dd8e34364fb7efeb42dbe36d86fea6cc473e292b7f47fba01db19cf7641414dee86092e33deb3b074afa0e8b811e71be71e1d1 |
28 |
DIST nethack-3.6.4.tar.gz 5573777 BLAKE2B 4e5a48bbf521406f17bc699643dd9f9d912381cc91ab2228affc6f54ad2b84ea7c946ab2d5936c274752a36920440d34001b13f28ce4c8f35844300d596086a7 SHA512 c951f939d50027b4468ebd2e32f79771e696035df0918b814bf02899f5c1e89d462ebc3f63155c23f5c627e66ca74244512d666b102c380242df1500a2c0afa9 |
29 |
-DIST nethack-361-src.tgz 4640769 BLAKE2B 3793a753e4012df64335e7e7ec60284de206012d5bb5d30a7ccfb458e456818f30dd0b4bfa9c41b1691bd01ee6aec2e44b57327586f0c9d76a573bf4c9bb00b1 SHA512 bd6e36c163f0d85e1ab1fc659464696b5a02c3864a800ad47e047fdc4a35fff4ef7dd28a9b071fa46f7f67fa45c97fdc77bc1f2bdbad80cc02950d73731d9c30 |
30 |
|
31 |
diff --git a/games-roguelike/nethack/files/nethack-3.6.0-hint-tty b/games-roguelike/nethack/files/nethack-3.6.0-hint-tty |
32 |
deleted file mode 100644 |
33 |
index 3c250e7e719..00000000000 |
34 |
--- a/games-roguelike/nethack/files/nethack-3.6.0-hint-tty |
35 |
+++ /dev/null |
36 |
@@ -1,19 +0,0 @@ |
37 |
-#-PRE |
38 |
- |
39 |
-LINK=$(CC) |
40 |
- |
41 |
-WINSRC = $(WINTTYSRC) |
42 |
-WINOBJ = $(WINTTYOBJ) |
43 |
-WINLIB = $(WINTTYLIB) |
44 |
- |
45 |
-GAMEPERM = 02755 |
46 |
-VARDIRPERM = 0770 |
47 |
-VARFILEPERM = 0660 |
48 |
-CHOWN = true |
49 |
-CHGRP = true |
50 |
- |
51 |
- |
52 |
-#-POST |
53 |
- |
54 |
-# needed for external pager, bug #57410 |
55 |
-DATNODLB = $(VARDATND) license $(DATHELP) |
56 |
|
57 |
diff --git a/games-roguelike/nethack/files/nethack-3.6.0-hint-x11 b/games-roguelike/nethack/files/nethack-3.6.0-hint-x11 |
58 |
deleted file mode 100644 |
59 |
index d0d1a8d4cd4..00000000000 |
60 |
--- a/games-roguelike/nethack/files/nethack-3.6.0-hint-x11 |
61 |
+++ /dev/null |
62 |
@@ -1,23 +0,0 @@ |
63 |
-#-PRE |
64 |
- |
65 |
-LINK=$(CC) |
66 |
- |
67 |
-VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xbm rip.xpm |
68 |
- |
69 |
-WINSRC = $(WINTTYSRC) $(WINX11SRC) |
70 |
-WINOBJ = $(WINTTYOBJ) $(WINX11OBJ) |
71 |
-WINLIB = $(WINTTYLIB) $(WINX11LIB) |
72 |
- |
73 |
-GAMEPERM = 02755 |
74 |
-VARDIRPERM = 0770 |
75 |
-VARFILEPERM = 0660 |
76 |
-CHOWN = true |
77 |
-CHGRP = true |
78 |
- |
79 |
- |
80 |
-#-POST |
81 |
- |
82 |
-# needed for external pager, bug #57410 |
83 |
-DATNODLB = $(VARDATND) license $(DATHELP) |
84 |
- |
85 |
-WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11 -lXpm |
86 |
|
87 |
diff --git a/games-roguelike/nethack/files/nethack-3.6.1-recover.patch b/games-roguelike/nethack/files/nethack-3.6.1-recover.patch |
88 |
deleted file mode 100644 |
89 |
index c7ad7808a2c..00000000000 |
90 |
--- a/games-roguelike/nethack/files/nethack-3.6.1-recover.patch |
91 |
+++ /dev/null |
92 |
@@ -1,115 +0,0 @@ |
93 |
-From 5d9a3ac6b9eaf63167e5c7c01f0bb33d383dab14 Mon Sep 17 00:00:00 2001 |
94 |
-From: Luis Ressel <aranea@×××××.de> |
95 |
-Date: Tue, 21 Aug 2018 22:57:09 +0200 |
96 |
-Subject: [PATCH] doc: Rename recover to recover-nethack |
97 |
- |
98 |
---- |
99 |
- doc/recover.6 | 30 +++++++++++++++--------------- |
100 |
- 1 file changed, 15 insertions(+), 15 deletions(-) |
101 |
- |
102 |
-diff --git a/doc/recover.6 b/doc/recover.6 |
103 |
-index 1209d31d..c3fdd851 100644 |
104 |
---- a/doc/recover.6 |
105 |
-+++ b/doc/recover.6 |
106 |
-@@ -1,4 +1,4 @@ |
107 |
--.TH RECOVER 6 "14 December 2015" NETHACK |
108 |
-+.TH RECOVER-NETHACK 6 "14 December 2015" NETHACK |
109 |
- .de ND |
110 |
- .ds Nd \\$3 |
111 |
- .. |
112 |
-@@ -13,9 +13,9 @@ |
113 |
- .NR $NHDT-Revision: 1.9 $ |
114 |
- .ds Na Kenneth Lorber |
115 |
- .SH NAME |
116 |
--recover \- recover a NetHack game interrupted by disaster |
117 |
-+recover-nethack \- recover a NetHack game interrupted by disaster |
118 |
- .SH SYNOPSIS |
119 |
--.B recover |
120 |
-+.B recover-nethack |
121 |
- [ |
122 |
- .B \-d |
123 |
- .I directory |
124 |
-@@ -33,7 +33,7 @@ so such games can be recovered at the point of the last level change. |
125 |
- The |
126 |
- .I base |
127 |
- options tell |
128 |
--.I recover |
129 |
-+.I recover-nethack |
130 |
- which files to process. |
131 |
- Each base option specifies recovery of a separate game. |
132 |
- .PP |
133 |
-@@ -83,47 +83,47 @@ by a user number to avoid conflicts, |
134 |
- or "xlock" if the number of concurrent players is being limited. |
135 |
- It may be necessary to look in the playground to find the correct |
136 |
- base name of the interrupted game. |
137 |
--.I recover |
138 |
-+.I recover-nethack |
139 |
- will transform these level files into a save file of the same name as |
140 |
- .I nethack |
141 |
- would have used. |
142 |
- .PP |
143 |
- Since |
144 |
--.I recover |
145 |
-+.I recover-nethack |
146 |
- must be able to read and delete files from the playground |
147 |
- and create files in the save directory, |
148 |
- it has interesting interactions with game security. |
149 |
- Giving ordinary players access to |
150 |
--.I recover |
151 |
-+.I recover-nethack |
152 |
- through setuid or setgid is tantamount to leaving the playground |
153 |
- world-writable, |
154 |
- with respect to both cheating and messing up other players. |
155 |
- For a single-user system, this of course does not change anything, |
156 |
- so some of the microcomputer ports install |
157 |
--.I recover |
158 |
-+.I recover-nethack |
159 |
- by default. |
160 |
- .PP |
161 |
- For a multi-user system, |
162 |
- the game administrator may want to arrange for all .0 files in the |
163 |
--playground to be fed to recover when the host machine boots, |
164 |
-+playground to be fed to recover-nethack when the host machine boots, |
165 |
- and handle game crashes individually. |
166 |
- If the user population is sufficiently trustworthy, |
167 |
--.I recover |
168 |
-+.I recover-nethack |
169 |
- can be installed with the same permissions the |
170 |
- .I nethack |
171 |
- executable has. |
172 |
- In either case, |
173 |
--.I recover |
174 |
-+.I recover-nethack |
175 |
- is easily compiled from the distribution utility directory. |
176 |
- .SH NOTES |
177 |
- .PP |
178 |
- Like |
179 |
- .I nethack |
180 |
- itself, |
181 |
--.I recover |
182 |
-+.I recover-nethack |
183 |
- will overwrite existing savefiles of the same name. |
184 |
- Savefiles created by |
185 |
--.I recover |
186 |
-+.I recover-nethack |
187 |
- are uncompressed; |
188 |
- they may be compressed afterwards if desired, |
189 |
- but even a compression-using |
190 |
-@@ -133,12 +133,12 @@ will find them in the uncompressed form. |
191 |
- nethack(6) |
192 |
- .SH BUGS |
193 |
- .PP |
194 |
--.I recover |
195 |
-+.I recover-nethack |
196 |
- makes no attempt to find out if a base name specifies a game in progress. |
197 |
- If multiple machines share a playground, this would be impossible to |
198 |
- determine. |
199 |
- .PP |
200 |
--.I recover |
201 |
-+.I recover-nethack |
202 |
- should be taught to use the nethack playground locking mechanism to |
203 |
- avoid conflicts. |
204 |
- .SH COPYRIGHT |
205 |
--- |
206 |
-2.18.0 |
207 |
- |
208 |
|
209 |
diff --git a/games-roguelike/nethack/nethack-3.6.1.ebuild b/games-roguelike/nethack/nethack-3.6.1.ebuild |
210 |
deleted file mode 100644 |
211 |
index 260b50750f9..00000000000 |
212 |
--- a/games-roguelike/nethack/nethack-3.6.1.ebuild |
213 |
+++ /dev/null |
214 |
@@ -1,128 +0,0 @@ |
215 |
-# Copyright 1999-2019 Gentoo Authors |
216 |
-# Distributed under the terms of the GNU General Public License v2 |
217 |
- |
218 |
-EAPI=7 |
219 |
-inherit desktop flag-o-matic toolchain-funcs |
220 |
- |
221 |
-MY_PV=${PV//.} |
222 |
-DESCRIPTION="The ultimate old-school single player dungeon exploration game" |
223 |
-HOMEPAGE="https://www.nethack.org/" |
224 |
-SRC_URI="https://nethack.org/download/${PV}/nethack-${MY_PV}-src.tgz" |
225 |
- |
226 |
-LICENSE="nethack" |
227 |
-SLOT="0" |
228 |
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86" |
229 |
-IUSE="X" |
230 |
- |
231 |
-RDEPEND="acct-group/gamestat |
232 |
- sys-libs/ncurses:0= |
233 |
- X? ( |
234 |
- x11-libs/libXaw |
235 |
- x11-libs/libXpm |
236 |
- x11-libs/libXt |
237 |
- )" |
238 |
-DEPEND="${RDEPEND} |
239 |
- X? ( x11-base/xorg-proto ) |
240 |
- " |
241 |
-BDEPEND="virtual/pkgconfig |
242 |
- X? ( |
243 |
- x11-apps/bdftopcf |
244 |
- >=x11-apps/mkfontscale-1.2.0 |
245 |
- )" |
246 |
- |
247 |
-src_prepare() { |
248 |
- eapply "${FILESDIR}/${P}-recover.patch" |
249 |
- eapply_user |
250 |
- |
251 |
- cp "${FILESDIR}/${PN}-3.6.0-hint-$(usex X x11 tty)" hint || die "Failed to copy hint file" |
252 |
- sys/unix/setup.sh hint || die "Failed to run setup.sh" |
253 |
-} |
254 |
- |
255 |
-src_compile() { |
256 |
- append-cflags -I../include -DDLB -DSECURE -DTIMED_DELAY -DVISION_TABLES -DDUMPLOG -DSCORE_ON_BOTL |
257 |
- append-cflags '-DCOMPRESS=\"${EPREFIX}/bin/gzip\"' '-DCOMPRESS_EXTENSION=\".gz\"' |
258 |
- append-cflags "-DHACKDIR=\\\"${EPREFIX}/usr/$(get_libdir)/nethack\\\"" "-DVAR_PLAYGROUND=\\\"${EPREFIX}/var/games/nethack\\\"" |
259 |
- append-cflags "-DDEF_PAGER=\\\"${PAGER}\\\"" |
260 |
- append-cflags -DSYSCF "-DSYSCF_FILE=\\\"${EPREFIX}/etc/nethack.sysconf\\\"" |
261 |
- |
262 |
- use X && append-cflags -DX11_GRAPHICS -DUSE_XPM |
263 |
- |
264 |
- LOCAL_MAKEOPTS=( |
265 |
- CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LFLAGS="${LDFLAGS}" |
266 |
- WINTTYLIB="$($(tc-getPKG_CONFIG) --libs ncurses)" |
267 |
- HACKDIR="${EPREFIX}/usr/$(get_libdir)/nethack" INSTDIR="${ED}/usr/$(get_libdir)/nethack" |
268 |
- SHELLDIR="${ED}/usr/bin" VARDIR="${ED}/var/games/nethack" |
269 |
- ) |
270 |
- |
271 |
- emake "${LOCAL_MAKEOPTS[@]}" nethack recover Guidebook spec_levs |
272 |
- |
273 |
- # Upstream still has some parallel compilation bugs |
274 |
- emake -j1 "${LOCAL_MAKEOPTS[@]}" all |
275 |
-} |
276 |
- |
277 |
-src_install() { |
278 |
- emake "${LOCAL_MAKEOPTS[@]}" install |
279 |
- |
280 |
- mv "${ED}/usr/$(get_libdir)/nethack/recover" "${ED}/usr/bin/recover-nethack" || die "Failed to move recover-nethack" |
281 |
- |
282 |
- doman doc/nethack.6 |
283 |
- newman doc/recover.6 recover-nethack.6 |
284 |
- dodoc doc/Guidebook.txt |
285 |
- |
286 |
- insinto /etc |
287 |
- newins sys/unix/sysconf nethack.sysconf |
288 |
- |
289 |
- insinto /etc/skel |
290 |
- newins "${FILESDIR}/${PN}-3.6.0-nethackrc" .nethackrc |
291 |
- |
292 |
- if use X ; then |
293 |
- cd "${S}/win/X11" || die "Failed to enter win/X11 directory" |
294 |
- |
295 |
- mkdir -p "${ED}/etc/X11/app-defaults/" || die "Failed to make app-defaults directory" |
296 |
- mv "${ED}/usr/$(get_libdir)/nethack/NetHack.ad" "${ED}/etc/X11/app-defaults/" || die "Failed to move NetHack.ad" |
297 |
- |
298 |
- newicon nh_icon.xpm nethack.xpm |
299 |
- make_desktop_entry ${PN} Nethack |
300 |
- |
301 |
- # install nethack fonts |
302 |
- bdftopcf -o nh10.pcf nh10.bdf || die "Converting fonts failed" |
303 |
- bdftopcf -o ibm.pcf ibm.bdf || die "Converting fonts failed" |
304 |
- insinto "/usr/$(get_libdir)/nethack/fonts" |
305 |
- doins *.pcf |
306 |
- mkfontdir "${ED}/usr/$(get_libdir)/nethack/fonts" || die "mkfontdir failed" |
307 |
- fi |
308 |
- |
309 |
- rm -r "${ED}/var/games/nethack" || die "Failed to clean var/games/nethack" |
310 |
- keepdir /var/games/nethack/save |
311 |
-} |
312 |
- |
313 |
-pkg_preinst() { |
314 |
- fowners root:gamestat /var/games/nethack /var/games/nethack/save |
315 |
- fperms 2770 /var/games/nethack /var/games/nethack/save |
316 |
- |
317 |
- fowners root:gamestat "/usr/$(get_libdir)/nethack/nethack" |
318 |
- fperms g+s "/usr/$(get_libdir)/nethack/nethack" |
319 |
-} |
320 |
- |
321 |
-pkg_postinst() { |
322 |
- cd "${EROOT}/var/games/nethack" || die "Failed to enter ${EROOT}/var/games/nethack directory" |
323 |
- |
324 |
- # Transition mechanism for <nethack-3.6.1 ebuilds. It's perfectly safe, so we'll just run it unconditionally. |
325 |
- chmod 2770 . save || die "Failed to chmod statedir" |
326 |
- |
327 |
- # Those files can't be created earlier because we don't want portage to wipe them during upgrades |
328 |
- ( umask 007 && touch logfile perm record xlogfile ) || die "Failed to create log files" |
329 |
- |
330 |
- # Instead of using a proper version header in its save files, nethack checks for incompatibilities |
331 |
- # by comparing the mtimes of save files and its own binary. This would require admin interaction even |
332 |
- # during upgrades which don't change the file format, so we'll just touch the files and warn the admin |
333 |
- # manually in case of compatibility issues. |
334 |
- ( |
335 |
- shopt -s nullglob |
336 |
- local saves=( bones* save/* ) |
337 |
- [[ -n "${saves[*]}" ]] && touch -c "${saves[@]}" |
338 |
- ) # non-fatal |
339 |
- |
340 |
- elog "A minimal default .nethackrc has been placed in /etc/skel/" |
341 |
- elog "The sysconf file is at /etc/nethack.sysconf" |
342 |
-} |
343 |
|
344 |
diff --git a/games-roguelike/nethack/nethack-3.6.3.ebuild b/games-roguelike/nethack/nethack-3.6.3.ebuild |
345 |
deleted file mode 100644 |
346 |
index 72711dcc6e1..00000000000 |
347 |
--- a/games-roguelike/nethack/nethack-3.6.3.ebuild |
348 |
+++ /dev/null |
349 |
@@ -1,129 +0,0 @@ |
350 |
-# Copyright 1999-2019 Gentoo Authors |
351 |
-# Distributed under the terms of the GNU General Public License v2 |
352 |
- |
353 |
-EAPI=7 |
354 |
-inherit desktop flag-o-matic toolchain-funcs |
355 |
- |
356 |
-DESCRIPTION="The ultimate old-school single player dungeon exploration game" |
357 |
-HOMEPAGE="https://www.nethack.org/" |
358 |
-SRC_URI="https://nethack.org/download/${PV}/nethack-${PV//.}-src.tgz -> ${P}.tar.gz" |
359 |
- |
360 |
-LICENSE="nethack" |
361 |
-SLOT="0" |
362 |
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86" |
363 |
-IUSE="X" |
364 |
- |
365 |
-RDEPEND="acct-group/gamestat |
366 |
- sys-libs/ncurses:0= |
367 |
- X? ( |
368 |
- x11-libs/libXaw |
369 |
- x11-libs/libXpm |
370 |
- x11-libs/libXt |
371 |
- )" |
372 |
-DEPEND="${RDEPEND} |
373 |
- X? ( x11-base/xorg-proto ) |
374 |
- " |
375 |
-BDEPEND="virtual/pkgconfig |
376 |
- X? ( |
377 |
- x11-apps/bdftopcf |
378 |
- x11-apps/mkfontscale |
379 |
- )" |
380 |
- |
381 |
-S="${WORKDIR}/NetHack-NetHack-${PV}_Released" |
382 |
- |
383 |
-src_prepare() { |
384 |
- eapply "${FILESDIR}/${P}-recover.patch" |
385 |
- eapply_user |
386 |
- |
387 |
- cp "${FILESDIR}/${P}-hint-$(usex X x11 tty)" hint || die "Failed to copy hint file" |
388 |
- sys/unix/setup.sh hint || die "Failed to run setup.sh" |
389 |
-} |
390 |
- |
391 |
-src_compile() { |
392 |
- append-cflags -I../include -DDLB -DSECURE -DTIMED_DELAY -DVISION_TABLES -DDUMPLOG -DSCORE_ON_BOTL |
393 |
- append-cflags '-DCOMPRESS=\"${EPREFIX}/bin/gzip\"' '-DCOMPRESS_EXTENSION=\".gz\"' |
394 |
- append-cflags "-DHACKDIR=\\\"${EPREFIX}/usr/$(get_libdir)/nethack\\\"" "-DVAR_PLAYGROUND=\\\"${EPREFIX}/var/games/nethack\\\"" |
395 |
- append-cflags "-DDEF_PAGER=\\\"${PAGER}\\\"" |
396 |
- append-cflags -DSYSCF "-DSYSCF_FILE=\\\"${EPREFIX}/etc/nethack.sysconf\\\"" |
397 |
- |
398 |
- use X && append-cflags -DX11_GRAPHICS -DUSE_XPM |
399 |
- |
400 |
- LOCAL_MAKEOPTS=( |
401 |
- CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LFLAGS="${LDFLAGS}" |
402 |
- WINTTYLIB="$($(tc-getPKG_CONFIG) --libs ncurses)" |
403 |
- HACKDIR="${EPREFIX}/usr/$(get_libdir)/nethack" INSTDIR="${ED}/usr/$(get_libdir)/nethack" |
404 |
- SHELLDIR="${ED}/usr/bin" VARDIR="${ED}/var/games/nethack" |
405 |
- ) |
406 |
- |
407 |
- emake "${LOCAL_MAKEOPTS[@]}" nethack recover Guidebook spec_levs |
408 |
- |
409 |
- # Upstream still has some parallel compilation bugs |
410 |
- emake -j1 "${LOCAL_MAKEOPTS[@]}" all |
411 |
-} |
412 |
- |
413 |
-src_install() { |
414 |
- emake "${LOCAL_MAKEOPTS[@]}" install |
415 |
- |
416 |
- mv "${ED}/usr/$(get_libdir)/nethack/recover" "${ED}/usr/bin/recover-nethack" || die "Failed to move recover-nethack" |
417 |
- |
418 |
- doman doc/nethack.6 |
419 |
- newman doc/recover.6 recover-nethack.6 |
420 |
- dodoc doc/Guidebook.txt |
421 |
- |
422 |
- insinto /etc |
423 |
- newins sys/unix/sysconf nethack.sysconf |
424 |
- |
425 |
- insinto /etc/skel |
426 |
- newins "${FILESDIR}/${PN}-3.6.0-nethackrc" .nethackrc |
427 |
- |
428 |
- if use X ; then |
429 |
- cd "${S}/win/X11" || die "Failed to enter win/X11 directory" |
430 |
- |
431 |
- mkdir -p "${ED}/etc/X11/app-defaults/" || die "Failed to make app-defaults directory" |
432 |
- mv "${ED}/usr/$(get_libdir)/nethack/NetHack.ad" "${ED}/etc/X11/app-defaults/" || die "Failed to move NetHack.ad" |
433 |
- |
434 |
- newicon nh_icon.xpm nethack.xpm |
435 |
- make_desktop_entry ${PN} Nethack |
436 |
- |
437 |
- # install nethack fonts |
438 |
- bdftopcf -o nh10.pcf nh10.bdf || die "Converting fonts failed" |
439 |
- bdftopcf -o ibm.pcf ibm.bdf || die "Converting fonts failed" |
440 |
- insinto "/usr/$(get_libdir)/nethack/fonts" |
441 |
- doins *.pcf |
442 |
- mkfontdir "${ED}/usr/$(get_libdir)/nethack/fonts" || die "mkfontdir failed" |
443 |
- fi |
444 |
- |
445 |
- rm -r "${ED}/var/games/nethack" || die "Failed to clean var/games/nethack" |
446 |
- keepdir /var/games/nethack/save |
447 |
-} |
448 |
- |
449 |
-pkg_preinst() { |
450 |
- fowners root:gamestat /var/games/nethack /var/games/nethack/save |
451 |
- fperms 2770 /var/games/nethack /var/games/nethack/save |
452 |
- |
453 |
- fowners root:gamestat "/usr/$(get_libdir)/nethack/nethack" |
454 |
- fperms g+s "/usr/$(get_libdir)/nethack/nethack" |
455 |
-} |
456 |
- |
457 |
-pkg_postinst() { |
458 |
- cd "${EROOT}/var/games/nethack" || die "Failed to enter ${EROOT}/var/games/nethack directory" |
459 |
- |
460 |
- # Transition mechanism for <nethack-3.6.1 ebuilds. It's perfectly safe, so we'll just run it unconditionally. |
461 |
- chmod 2770 . save || die "Failed to chmod statedir" |
462 |
- |
463 |
- # Those files can't be created earlier because we don't want portage to wipe them during upgrades |
464 |
- ( umask 007 && touch logfile perm record xlogfile ) || die "Failed to create log files" |
465 |
- |
466 |
- # Instead of using a proper version header in its save files, nethack checks for incompatibilities |
467 |
- # by comparing the mtimes of save files and its own binary. This would require admin interaction even |
468 |
- # during upgrades which don't change the file format, so we'll just touch the files and warn the admin |
469 |
- # manually in case of compatibility issues. |
470 |
- ( |
471 |
- shopt -s nullglob |
472 |
- local saves=( bones* save/* ) |
473 |
- [[ -n "${saves[*]}" ]] && touch -c "${saves[@]}" |
474 |
- ) # non-fatal |
475 |
- |
476 |
- elog "A minimal default .nethackrc has been placed in /etc/skel/" |
477 |
- elog "The sysconf file is at /etc/nethack.sysconf" |
478 |
-} |