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