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