1 |
commit: 2ed9103effd31e645b9405b52507cb88aaa7ef6d |
2 |
Author: Stefan Strogin <steils <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 25 10:54:46 2020 +0000 |
4 |
Commit: Stefan Strogin <steils <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 25 10:55:56 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ed9103e |
7 |
|
8 |
games-roguelike/nethack: version bump to 3.6.4 |
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 | 1 + |
15 |
games-roguelike/nethack/nethack-3.6.4.ebuild | 129 +++++++++++++++++++++++++++ |
16 |
2 files changed, 130 insertions(+) |
17 |
|
18 |
diff --git a/games-roguelike/nethack/Manifest b/games-roguelike/nethack/Manifest |
19 |
index 87ba4b67e93..a95fbc6ee0b 100644 |
20 |
--- a/games-roguelike/nethack/Manifest |
21 |
+++ b/games-roguelike/nethack/Manifest |
22 |
@@ -1,3 +1,4 @@ |
23 |
DIST nethack-3.6.3.tar.gz 5568657 BLAKE2B f0aa12a27fdf5005f57dcc802af88939b8460cfcfea3dc4d262b15a2807376ed434233dfa85ae0bfd60e50ad5a51ff4b060b5063e393d5859bac1b98364b5359 SHA512 38bc6140b12188397539f28528dd8e34364fb7efeb42dbe36d86fea6cc473e292b7f47fba01db19cf7641414dee86092e33deb3b074afa0e8b811e71be71e1d1 |
24 |
+DIST nethack-3.6.4.tar.gz 5573777 BLAKE2B 4e5a48bbf521406f17bc699643dd9f9d912381cc91ab2228affc6f54ad2b84ea7c946ab2d5936c274752a36920440d34001b13f28ce4c8f35844300d596086a7 SHA512 c951f939d50027b4468ebd2e32f79771e696035df0918b814bf02899f5c1e89d462ebc3f63155c23f5c627e66ca74244512d666b102c380242df1500a2c0afa9 |
25 |
DIST nethack-360-src.tgz 4261282 BLAKE2B 7be22b8bdc7b5124418fa904aa3776d77440f67ec18782b878e037b989a18092ed88ca192224c7bc1eaa3cb438823188035c3e6d2aa85d13a7aa1e86c8527d32 SHA512 92370a3c60a4f6861b9c0f1e1320fc23d91cedc1615d0d09e06a0ee3e13c9c8c0cd931389bfd7a25845ed07ef966d19d9e46e77ae07084a941685dc67f49c813 |
26 |
DIST nethack-361-src.tgz 4640769 BLAKE2B 3793a753e4012df64335e7e7ec60284de206012d5bb5d30a7ccfb458e456818f30dd0b4bfa9c41b1691bd01ee6aec2e44b57327586f0c9d76a573bf4c9bb00b1 SHA512 bd6e36c163f0d85e1ab1fc659464696b5a02c3864a800ad47e047fdc4a35fff4ef7dd28a9b071fa46f7f67fa45c97fdc77bc1f2bdbad80cc02950d73731d9c30 |
27 |
|
28 |
diff --git a/games-roguelike/nethack/nethack-3.6.4.ebuild b/games-roguelike/nethack/nethack-3.6.4.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..1dc2a67dd6c |
31 |
--- /dev/null |
32 |
+++ b/games-roguelike/nethack/nethack-3.6.4.ebuild |
33 |
@@ -0,0 +1,129 @@ |
34 |
+# Copyright 1999-2020 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+inherit desktop flag-o-matic toolchain-funcs |
39 |
+ |
40 |
+DESCRIPTION="The ultimate old-school single player dungeon exploration game" |
41 |
+HOMEPAGE="https://www.nethack.org/" |
42 |
+SRC_URI="https://nethack.org/download/${PV}/nethack-${PV//.}-src.tgz -> ${P}.tar.gz" |
43 |
+ |
44 |
+LICENSE="nethack" |
45 |
+SLOT="0" |
46 |
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86" |
47 |
+IUSE="X" |
48 |
+ |
49 |
+RDEPEND="acct-group/gamestat |
50 |
+ sys-libs/ncurses:0= |
51 |
+ X? ( |
52 |
+ x11-libs/libXaw |
53 |
+ x11-libs/libXpm |
54 |
+ x11-libs/libXt |
55 |
+ )" |
56 |
+DEPEND="${RDEPEND} |
57 |
+ X? ( x11-base/xorg-proto ) |
58 |
+ " |
59 |
+BDEPEND="virtual/pkgconfig |
60 |
+ X? ( |
61 |
+ x11-apps/bdftopcf |
62 |
+ x11-apps/mkfontscale |
63 |
+ )" |
64 |
+ |
65 |
+S="${WORKDIR}/NetHack-NetHack-${PV}_Released" |
66 |
+ |
67 |
+src_prepare() { |
68 |
+ eapply "${FILESDIR}/${PN}-3.6.3-recover.patch" |
69 |
+ eapply_user |
70 |
+ |
71 |
+ cp "${FILESDIR}/${PN}-3.6.3-hint-$(usex X x11 tty)" hint || die "Failed to copy hint file" |
72 |
+ sys/unix/setup.sh hint || die "Failed to run setup.sh" |
73 |
+} |
74 |
+ |
75 |
+src_compile() { |
76 |
+ append-cflags -I../include -DDLB -DSECURE -DTIMED_DELAY -DVISION_TABLES -DDUMPLOG -DSCORE_ON_BOTL |
77 |
+ append-cflags '-DCOMPRESS=\"${EPREFIX}/bin/gzip\"' '-DCOMPRESS_EXTENSION=\".gz\"' |
78 |
+ append-cflags "-DHACKDIR=\\\"${EPREFIX}/usr/$(get_libdir)/nethack\\\"" "-DVAR_PLAYGROUND=\\\"${EPREFIX}/var/games/nethack\\\"" |
79 |
+ append-cflags "-DDEF_PAGER=\\\"${PAGER}\\\"" |
80 |
+ append-cflags -DSYSCF "-DSYSCF_FILE=\\\"${EPREFIX}/etc/nethack.sysconf\\\"" |
81 |
+ |
82 |
+ use X && append-cflags -DX11_GRAPHICS -DUSE_XPM |
83 |
+ |
84 |
+ LOCAL_MAKEOPTS=( |
85 |
+ CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LFLAGS="${LDFLAGS}" |
86 |
+ WINTTYLIB="$($(tc-getPKG_CONFIG) --libs ncurses)" |
87 |
+ HACKDIR="${EPREFIX}/usr/$(get_libdir)/nethack" INSTDIR="${ED}/usr/$(get_libdir)/nethack" |
88 |
+ SHELLDIR="${ED}/usr/bin" VARDIR="${ED}/var/games/nethack" |
89 |
+ ) |
90 |
+ |
91 |
+ emake "${LOCAL_MAKEOPTS[@]}" nethack recover Guidebook spec_levs |
92 |
+ |
93 |
+ # Upstream still has some parallel compilation bugs |
94 |
+ emake -j1 "${LOCAL_MAKEOPTS[@]}" all |
95 |
+} |
96 |
+ |
97 |
+src_install() { |
98 |
+ emake "${LOCAL_MAKEOPTS[@]}" install |
99 |
+ |
100 |
+ mv "${ED}/usr/$(get_libdir)/nethack/recover" "${ED}/usr/bin/recover-nethack" || die "Failed to move recover-nethack" |
101 |
+ |
102 |
+ doman doc/nethack.6 |
103 |
+ newman doc/recover.6 recover-nethack.6 |
104 |
+ dodoc doc/Guidebook.txt |
105 |
+ |
106 |
+ insinto /etc |
107 |
+ newins sys/unix/sysconf nethack.sysconf |
108 |
+ |
109 |
+ insinto /etc/skel |
110 |
+ newins "${FILESDIR}/${PN}-3.6.0-nethackrc" .nethackrc |
111 |
+ |
112 |
+ if use X ; then |
113 |
+ cd "${S}/win/X11" || die "Failed to enter win/X11 directory" |
114 |
+ |
115 |
+ mkdir -p "${ED}/etc/X11/app-defaults/" || die "Failed to make app-defaults directory" |
116 |
+ mv "${ED}/usr/$(get_libdir)/nethack/NetHack.ad" "${ED}/etc/X11/app-defaults/" || die "Failed to move NetHack.ad" |
117 |
+ |
118 |
+ newicon nh_icon.xpm nethack.xpm |
119 |
+ make_desktop_entry ${PN} Nethack |
120 |
+ |
121 |
+ # install nethack fonts |
122 |
+ bdftopcf -o nh10.pcf nh10.bdf || die "Converting fonts failed" |
123 |
+ bdftopcf -o ibm.pcf ibm.bdf || die "Converting fonts failed" |
124 |
+ insinto "/usr/$(get_libdir)/nethack/fonts" |
125 |
+ doins *.pcf |
126 |
+ mkfontdir "${ED}/usr/$(get_libdir)/nethack/fonts" || die "mkfontdir failed" |
127 |
+ fi |
128 |
+ |
129 |
+ rm -r "${ED}/var/games/nethack" || die "Failed to clean var/games/nethack" |
130 |
+ keepdir /var/games/nethack/save |
131 |
+} |
132 |
+ |
133 |
+pkg_preinst() { |
134 |
+ fowners root:gamestat /var/games/nethack /var/games/nethack/save |
135 |
+ fperms 2770 /var/games/nethack /var/games/nethack/save |
136 |
+ |
137 |
+ fowners root:gamestat "/usr/$(get_libdir)/nethack/nethack" |
138 |
+ fperms g+s "/usr/$(get_libdir)/nethack/nethack" |
139 |
+} |
140 |
+ |
141 |
+pkg_postinst() { |
142 |
+ cd "${EROOT}/var/games/nethack" || die "Failed to enter ${EROOT}/var/games/nethack directory" |
143 |
+ |
144 |
+ # Transition mechanism for <nethack-3.6.1 ebuilds. It's perfectly safe, so we'll just run it unconditionally. |
145 |
+ chmod 2770 . save || die "Failed to chmod statedir" |
146 |
+ |
147 |
+ # Those files can't be created earlier because we don't want portage to wipe them during upgrades |
148 |
+ ( umask 007 && touch logfile perm record xlogfile ) || die "Failed to create log files" |
149 |
+ |
150 |
+ # Instead of using a proper version header in its save files, nethack checks for incompatibilities |
151 |
+ # by comparing the mtimes of save files and its own binary. This would require admin interaction even |
152 |
+ # during upgrades which don't change the file format, so we'll just touch the files and warn the admin |
153 |
+ # manually in case of compatibility issues. |
154 |
+ ( |
155 |
+ shopt -s nullglob |
156 |
+ local saves=( bones* save/* ) |
157 |
+ [[ -n "${saves[*]}" ]] && touch -c "${saves[@]}" |
158 |
+ ) # non-fatal |
159 |
+ |
160 |
+ elog "A minimal default .nethackrc has been placed in /etc/skel/" |
161 |
+ elog "The sysconf file is at /etc/nethack.sysconf" |
162 |
+} |