Gentoo Archives: gentoo-commits

From: Erik Mackdanz <stasibear@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-roguelike/stone-soup/
Date: Fri, 23 Sep 2022 13:50:13
Message-Id: 1663940984.a99b5692d2621edc478933abf1d586fc04e27e68.stasibear@gentoo
1 commit: a99b5692d2621edc478933abf1d586fc04e27e68
2 Author: Erik Mackdanz <stasibear <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 23 13:43:43 2022 +0000
4 Commit: Erik Mackdanz <stasibear <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 23 13:49:44 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a99b5692
7
8 games-roguelike/stone-soup: add 0.29.1
9
10 Signed-off-by: Erik Mackdanz <stasibear <AT> gentoo.org>
11
12 games-roguelike/stone-soup/Manifest | 1 +
13 .../stone-soup/stone-soup-0.29.1.ebuild | 226 +++++++++++++++++++++
14 2 files changed, 227 insertions(+)
15
16 diff --git a/games-roguelike/stone-soup/Manifest b/games-roguelike/stone-soup/Manifest
17 index f4568e5195a4..4c327f7988b4 100644
18 --- a/games-roguelike/stone-soup/Manifest
19 +++ b/games-roguelike/stone-soup/Manifest
20 @@ -6,6 +6,7 @@ DIST stone-soup-0.27.png 1351 BLAKE2B cc31abd59701aa6f0fb0bdcd90630ceebf7b3cb8b6
21 DIST stone-soup-0.27.svg 68546 BLAKE2B 7c66286c9e8a3516e8483b3edb628a59fce29d8d248c3fd5b06e308782bbc651814f21ec958b30c36074a2576ced4bb10f291b5236da6f6e865ce1d7cefdf96d SHA512 dca555271faf704eb8ecdf5ee8a763df42cdeba94e9c163608c438cfc73c6fbf53416547050cad57f477ade191842e701785b65b7a9f18e27ceab05df8f2f75f
22 DIST stone-soup-0.28.png 1351 BLAKE2B cc31abd59701aa6f0fb0bdcd90630ceebf7b3cb8b60f0e2817f8800c5bc4b3a5b9fef63c90a97b6248f306e7e3da0df3863a2195b8771863344d2443e7956d59 SHA512 4695204c8b936f7aac1ba15b02a6115a955fb2c56aa9a0b968ff007bc9a1a59b608110d60cce5625a9b92cd2c869bbea7e15433a53c1a338622809477a5846bc
23 DIST stone-soup-0.28.svg 68546 BLAKE2B 7c66286c9e8a3516e8483b3edb628a59fce29d8d248c3fd5b06e308782bbc651814f21ec958b30c36074a2576ced4bb10f291b5236da6f6e865ce1d7cefdf96d SHA512 dca555271faf704eb8ecdf5ee8a763df42cdeba94e9c163608c438cfc73c6fbf53416547050cad57f477ade191842e701785b65b7a9f18e27ceab05df8f2f75f
24 +DIST stone-soup-0.29.1.tar.gz 17510846 BLAKE2B 65b84797c8d8a268a3ce95de9d928e131bf6e21a1ea6ac3e72263c75f9d6288e9d95f9df6401528c06aefbda9bb642c79bf78065a65224297d33c050abf37056 SHA512 2ca49c4cd228526d47e4ad7e9556b6c26566595458423cd8e6b762298f229eb7ba273770ae1e12939ba66574a5b55e44812d06c4809d4327ed9bfd738501af04
25 DIST stone-soup-0.29.png 1351 BLAKE2B cc31abd59701aa6f0fb0bdcd90630ceebf7b3cb8b60f0e2817f8800c5bc4b3a5b9fef63c90a97b6248f306e7e3da0df3863a2195b8771863344d2443e7956d59 SHA512 4695204c8b936f7aac1ba15b02a6115a955fb2c56aa9a0b968ff007bc9a1a59b608110d60cce5625a9b92cd2c869bbea7e15433a53c1a338622809477a5846bc
26 DIST stone-soup-0.29.svg 68546 BLAKE2B 7c66286c9e8a3516e8483b3edb628a59fce29d8d248c3fd5b06e308782bbc651814f21ec958b30c36074a2576ced4bb10f291b5236da6f6e865ce1d7cefdf96d SHA512 dca555271faf704eb8ecdf5ee8a763df42cdeba94e9c163608c438cfc73c6fbf53416547050cad57f477ade191842e701785b65b7a9f18e27ceab05df8f2f75f
27 DIST stone_soup-0.25.1.zip 95477710 BLAKE2B 0b38a6c7cb7c4c87acccb861b5aae665cd2b6b532f6e86d4a9fa594e0d363b86b4af1ea47275f7fd026ea69d85215be8cdf46258bd620e738b4850e5eceed006 SHA512 fa7e8be582c5c6615531884ade4c113542c06c164b6912095c1adf2f16a31cb2ecce057d74132b11b1b1c256a77433037948d4e54819739b7e222cc896cd5220
28
29 diff --git a/games-roguelike/stone-soup/stone-soup-0.29.1.ebuild b/games-roguelike/stone-soup/stone-soup-0.29.1.ebuild
30 new file mode 100644
31 index 000000000000..455921a656d5
32 --- /dev/null
33 +++ b/games-roguelike/stone-soup/stone-soup-0.29.1.ebuild
34 @@ -0,0 +1,226 @@
35 +# Copyright 1999-2022 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=8
39 +
40 +LUA_COMPAT=( lua5-1 )
41 +PYTHON_COMPAT=( python3_{8,9,10,11} )
42 +VIRTUALX_REQUIRED="manual"
43 +inherit desktop python-any-r1 lua-single xdg-utils toolchain-funcs
44 +
45 +DESCRIPTION="Role-playing roguelike game of exploration and treasure-hunting in dungeons"
46 +HOMEPAGE="https://crawl.develz.org"
47 +SLOT="0.29"
48 +
49 +# Leave empty string if not a _pre release
50 +COMMITSHA=""
51 +if [ -z "${COMMITSHA}" ]; then
52 + # This is a tagged release
53 + # Note the archive URI and file layout changed upstream between 0.29.0 and 0.29.1
54 + SRC_URI="
55 + https://github.com/crawl/crawl/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
56 + "
57 + MY_P="crawl-${PV}/crawl-ref"
58 +else
59 + # This is a _pre release
60 + SRC_URI="
61 + https://github.com/crawl/crawl/archive/${COMMITSHA}.tar.gz -> ${P}.tar.gz
62 + "
63 + MY_P="crawl-${COMMITSHA}/crawl-ref"
64 +fi
65 +SRC_URI="
66 + ${SRC_URI}
67 + https://dev.gentoo.org/~stasibear/distfiles/${PN}.png -> ${PN}-${SLOT}.png
68 + https://dev.gentoo.org/~stasibear/distfiles/${PN}.svg -> ${PN}-${SLOT}.svg
69 +"
70 +
71 +# 3-clause BSD: mt19937ar.cc, MSVC/stdint.h
72 +# 2-clause BSD: all contributions by Steve Noonan and Jesse Luehrs
73 +# Public Domain|CC0: most of tiles
74 +# MIT: json.cc/json.h, some .js files in webserver/static/scripts/contrib/
75 +LICENSE="GPL-2 BSD BSD-2 public-domain CC0-1.0 MIT"
76 +KEYWORDS="~amd64 ~x86"
77 +IUSE="advpng debug ncurses sound test +tiles"
78 +RESTRICT="!test? ( test )"
79 +REQUIRED_USE="${LUA_REQUIRED_USE}"
80 +
81 +S=${WORKDIR}/${MY_P}/source
82 +RDEPEND="
83 + ${LUA_DEPS}
84 + dev-db/sqlite:3
85 + sys-libs/zlib
86 + !ncurses? ( !tiles? ( sys-libs/ncurses:0 ) )
87 + ncurses? ( sys-libs/ncurses:0 )
88 + tiles? (
89 + media-fonts/dejavu
90 + media-libs/freetype:2
91 + media-libs/libpng:0
92 + sound? (
93 + media-libs/libsdl2[X,opengl,sound,video]
94 + media-libs/sdl2-mixer
95 + )
96 + !sound? ( media-libs/libsdl2[X,opengl,video] )
97 + media-libs/sdl2-image[png]
98 + virtual/glu
99 + virtual/opengl
100 + )"
101 +DEPEND="${RDEPEND}
102 + test? ( <dev-cpp/catch-3.0.0:0 )
103 + tiles? (
104 + sys-libs/ncurses:0
105 + )
106 + "
107 +BDEPEND="
108 + app-arch/unzip
109 + dev-lang/perl
110 + ${PYTHON_DEPS}
111 + $(python_gen_any_dep 'dev-python/pyyaml[${PYTHON_USEDEP}]')
112 + sys-devel/flex
113 + tiles? (
114 + advpng? (
115 + app-arch/advancecomp
116 + )
117 + !advpng? (
118 + media-gfx/pngcrush
119 + )
120 + )
121 + virtual/pkgconfig
122 + virtual/yacc
123 + "
124 +
125 +PATCHES=(
126 + "${FILESDIR}"/make.patch
127 + "${FILESDIR}"/rltiles-make.patch
128 +)
129 +
130 +python_check_deps() {
131 + python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]"
132 +}
133 +
134 +pkg_setup() {
135 + python-any-r1_pkg_setup
136 +
137 + if use !ncurses && use !tiles ; then
138 + ewarn "Neither ncurses nor tiles frontend"
139 + ewarn "selected, choosing ncurses only."
140 + ewarn "Note that you can also enable both."
141 + fi
142 +
143 + if use sound && use !tiles ; then
144 + ewarn "Sound support is only available with tiles."
145 + fi
146 +}
147 +
148 +src_prepare() {
149 + default
150 + python_fix_shebang "${S}/util/species-gen.py"
151 +
152 + if use advpng; then
153 + eapply "${FILESDIR}/make-advpng.patch"
154 + fi
155 +
156 + sed -i -e "s/GAME = crawl$/GAME = crawl-${SLOT}/" "${S}/Makefile" \
157 + || die "Couldn't append slot to executable name"
158 +
159 + # File required for a _pre build
160 + if ! [ -f "${S}/util/release_ver" ]; then
161 + echo "${SLOT}" >"${S}/util/release_ver" || die "Couldn't write release_ver"
162 + fi
163 +
164 + # Replace bundled catch2 package with system implementation
165 + # https://bugs.gentoo.org/829950
166 + if use test; then
167 + cp /usr/include/catch2/catch.hpp "${S}/catch2-tests" || die "Couldn't substitute system catch2"
168 + fi
169 +}
170 +
171 +src_compile() {
172 +
173 + # Insurance that we're not using bundled lib sources
174 + rm -rf contrib || die "Couldn't delete contrib directory"
175 +
176 + myemakeargs=(
177 + $(usex debug "FULLDEBUG=y DEBUG=y" "")
178 + BUILD_LUA=
179 + AR="$(tc-getAR)"
180 + CFOPTIMIZE=''
181 + # -DLUA_COMPAT_OPENLIB=1 is required to enable the
182 + # deprecated (in 5.1) luaL_openlib API (#869671)
183 + CFOTHERS="${CXXFLAGS} -DLUA_COMPAT_OPENLIB=1"
184 + CONTRIBS=
185 + DATADIR="/usr/share/${PN}-${SLOT}"
186 + FORCE_CC="$(tc-getCC)"
187 + FORCE_CXX="$(tc-getCXX)"
188 + LDFLAGS="${LDFLAGS}"
189 + MAKEOPTS="${MAKEOPTS}"
190 + PKGCONFIG="$(tc-getPKG_CONFIG)"
191 + RANLIB="$(tc-getRANLIB)"
192 + SAVEDIR="~/.crawl-${SLOT}"
193 + SOUND=$(usex sound "y" "")
194 + STRIP=touch
195 + USE_LUAJIT=
196 + V=1
197 + prefix="/usr"
198 + )
199 +
200 + if use ncurses || (use !ncurses && use !tiles) ; then
201 + emake "${myemakeargs[@]}"
202 + # move it in case we build both variants
203 + use tiles && { mv "crawl-${SLOT}" "${WORKDIR}"/crawl-ncurses-${SLOT} || die ;}
204 + fi
205 +
206 + if use tiles ; then
207 + emake "${myemakeargs[@]}" clean
208 + emake "${myemakeargs[@]}" "TILES=y"
209 + fi
210 +}
211 +
212 +src_test() {
213 + emake "${myemakeargs[@]}" \
214 + $(usex tiles "TILES=y" "") \
215 + catch2-tests
216 +}
217 +
218 +src_install() {
219 + emake "${myemakeargs[@]}" \
220 + $(usex tiles "TILES=y" "") \
221 + DESTDIR="${D}" \
222 + prefix_fp="" \
223 + bin_prefix="${D}/usr/bin" \
224 + install
225 +
226 + [[ -e "${WORKDIR}/crawl-ncurses-${SLOT}" ]] && dobin "${WORKDIR}/crawl-ncurses-${SLOT}"
227 +
228 + # don't relocate docs, needed at runtime
229 + rm -rf "${D}/usr/share/${PN}-${SLOT}"/docs/license
230 +
231 + mv "${WORKDIR}/${MY_P}"/docs/crawl.6 "${WORKDIR}/${MY_P}/docs/crawl-${SLOT}.6" \
232 + || die "Couldn't append slot to man page name"
233 + doman "${WORKDIR}/${MY_P}/docs/crawl-${SLOT}.6"
234 +
235 + # icons and menu for graphical build
236 + if use tiles ; then
237 + doicon -s 48 "${DISTDIR}"/${PN}-${SLOT}.png
238 + doicon -s scalable "${DISTDIR}"/${PN}-${SLOT}.svg
239 + make_desktop_entry "crawl-${SLOT}" "crawl-${SLOT}" "crawl-${SLOT}"
240 + fi
241 +}
242 +
243 +pkg_postinst() {
244 + xdg_icon_cache_update
245 +
246 + elog "crawl is a slotted install that supports having"
247 + elog "multiple versions installed. The binary has the"
248 + elog "slot appended, e.g. 'crawl-"${SLOT}"'."
249 +
250 + if use tiles && use ncurses ; then
251 + elog
252 + elog "Since you have enabled both tiles and ncurses frontends"
253 + elog "the ncurses binary is called 'crawl-ncurses-"${SLOT}"' and the"
254 + elog "tiles binary is called 'crawl-"${SLOT}"'."
255 + fi
256 +}
257 +
258 +pkg_postrm() {
259 + xdg_icon_cache_update
260 +}