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: Wed, 01 Sep 2021 03:00:04
Message-Id: 1630465187.bd0056b8f1ae7779a0671b04f2ec6e9e44eb9faa.stasibear@gentoo
1 commit: bd0056b8f1ae7779a0671b04f2ec6e9e44eb9faa
2 Author: Erik Mackdanz <stasibear <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 1 02:59:47 2021 +0000
4 Commit: Erik Mackdanz <stasibear <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 1 02:59:47 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd0056b8
7
8 games-roguelike/stone-soup: Add _pre build for 0.28 slot
9
10 Signed-off-by: Erik Mackdanz <stasibear <AT> gentoo.org>
11 Package-Manager: Portage-3.0.22, Repoman-3.0.3
12
13 games-roguelike/stone-soup/Manifest | 3 +
14 .../stone-soup-0.28.0_pre20210831.ebuild | 201 +++++++++++++++++++++
15 2 files changed, 204 insertions(+)
16
17 diff --git a/games-roguelike/stone-soup/Manifest b/games-roguelike/stone-soup/Manifest
18 index f229acc14dc..1d5c290ada8 100644
19 --- a/games-roguelike/stone-soup/Manifest
20 +++ b/games-roguelike/stone-soup/Manifest
21 @@ -1,9 +1,12 @@
22 +DIST 46f4d3c3461b2012140bb15563a19ef027b1fc69.zip 17966337 BLAKE2B 149cc0505c2f146d6aaa035d464f7d8b11eff6973cb391283f89e378915af7d61c604916f978aa6727cbee5f0b8c4d29333776992931166b2d70a266afc11744 SHA512 e8af9057ea82e8cffd4319a4eb82e63b4f49287bc001828de09e023df6939ed18303727213146ffc428ecf876bd5e02bd85849446665217753cedf9d74464ccd
23 DIST stone-soup-0.25.png 1351 BLAKE2B cc31abd59701aa6f0fb0bdcd90630ceebf7b3cb8b60f0e2817f8800c5bc4b3a5b9fef63c90a97b6248f306e7e3da0df3863a2195b8771863344d2443e7956d59 SHA512 4695204c8b936f7aac1ba15b02a6115a955fb2c56aa9a0b968ff007bc9a1a59b608110d60cce5625a9b92cd2c869bbea7e15433a53c1a338622809477a5846bc
24 DIST stone-soup-0.25.svg 68546 BLAKE2B 7c66286c9e8a3516e8483b3edb628a59fce29d8d248c3fd5b06e308782bbc651814f21ec958b30c36074a2576ced4bb10f291b5236da6f6e865ce1d7cefdf96d SHA512 dca555271faf704eb8ecdf5ee8a763df42cdeba94e9c163608c438cfc73c6fbf53416547050cad57f477ade191842e701785b65b7a9f18e27ceab05df8f2f75f
25 DIST stone-soup-0.26.png 1351 BLAKE2B cc31abd59701aa6f0fb0bdcd90630ceebf7b3cb8b60f0e2817f8800c5bc4b3a5b9fef63c90a97b6248f306e7e3da0df3863a2195b8771863344d2443e7956d59 SHA512 4695204c8b936f7aac1ba15b02a6115a955fb2c56aa9a0b968ff007bc9a1a59b608110d60cce5625a9b92cd2c869bbea7e15433a53c1a338622809477a5846bc
26 DIST stone-soup-0.26.svg 68546 BLAKE2B 7c66286c9e8a3516e8483b3edb628a59fce29d8d248c3fd5b06e308782bbc651814f21ec958b30c36074a2576ced4bb10f291b5236da6f6e865ce1d7cefdf96d SHA512 dca555271faf704eb8ecdf5ee8a763df42cdeba94e9c163608c438cfc73c6fbf53416547050cad57f477ade191842e701785b65b7a9f18e27ceab05df8f2f75f
27 DIST stone-soup-0.27.png 1351 BLAKE2B cc31abd59701aa6f0fb0bdcd90630ceebf7b3cb8b60f0e2817f8800c5bc4b3a5b9fef63c90a97b6248f306e7e3da0df3863a2195b8771863344d2443e7956d59 SHA512 4695204c8b936f7aac1ba15b02a6115a955fb2c56aa9a0b968ff007bc9a1a59b608110d60cce5625a9b92cd2c869bbea7e15433a53c1a338622809477a5846bc
28 DIST stone-soup-0.27.svg 68546 BLAKE2B 7c66286c9e8a3516e8483b3edb628a59fce29d8d248c3fd5b06e308782bbc651814f21ec958b30c36074a2576ced4bb10f291b5236da6f6e865ce1d7cefdf96d SHA512 dca555271faf704eb8ecdf5ee8a763df42cdeba94e9c163608c438cfc73c6fbf53416547050cad57f477ade191842e701785b65b7a9f18e27ceab05df8f2f75f
29 +DIST stone-soup-0.28.png 1351 BLAKE2B cc31abd59701aa6f0fb0bdcd90630ceebf7b3cb8b60f0e2817f8800c5bc4b3a5b9fef63c90a97b6248f306e7e3da0df3863a2195b8771863344d2443e7956d59 SHA512 4695204c8b936f7aac1ba15b02a6115a955fb2c56aa9a0b968ff007bc9a1a59b608110d60cce5625a9b92cd2c869bbea7e15433a53c1a338622809477a5846bc
30 +DIST stone-soup-0.28.svg 68546 BLAKE2B 7c66286c9e8a3516e8483b3edb628a59fce29d8d248c3fd5b06e308782bbc651814f21ec958b30c36074a2576ced4bb10f291b5236da6f6e865ce1d7cefdf96d SHA512 dca555271faf704eb8ecdf5ee8a763df42cdeba94e9c163608c438cfc73c6fbf53416547050cad57f477ade191842e701785b65b7a9f18e27ceab05df8f2f75f
31 DIST stone_soup-0.25.1.zip 95477710 BLAKE2B 0b38a6c7cb7c4c87acccb861b5aae665cd2b6b532f6e86d4a9fa594e0d363b86b4af1ea47275f7fd026ea69d85215be8cdf46258bd620e738b4850e5eceed006 SHA512 fa7e8be582c5c6615531884ade4c113542c06c164b6912095c1adf2f16a31cb2ecce057d74132b11b1b1c256a77433037948d4e54819739b7e222cc896cd5220
32 DIST stone_soup-0.26.1.zip 95585384 BLAKE2B 6d1cb99fc44e918cad4144608f259e67a26df444b93c8501590ff209e8856fd08c514d4c8c78cb0848d8e6127cdf4360b47d21ced5d919da982421934b46102d SHA512 637f1a07e9f35e18eda10c17dc28449364c56aee8456497e30552acb55608a9433cff8b64af877049c21cb2a42eb2fcad28f58a7e57a1d835eb8c252e580205d
33 DIST stone_soup-0.27.0.zip 96917949 BLAKE2B 1da7d54e4f3ec98514630eeb8c69c7dca02f96cdfe16974856406da0a057011f17a388669ec29844f3657cd4c7c4ef977f522578cbe0dec02ce497063c25ac83 SHA512 e3f79ce8837056c0a34847857b058e055ed23cc0987ab1d862b60739b8b7ec1e955746fa49c339f449603ce9d0707e64e564592b0798310c7c6bdc1a9edc3e70
34
35 diff --git a/games-roguelike/stone-soup/stone-soup-0.28.0_pre20210831.ebuild b/games-roguelike/stone-soup/stone-soup-0.28.0_pre20210831.ebuild
36 new file mode 100644
37 index 00000000000..22fa3f94801
38 --- /dev/null
39 +++ b/games-roguelike/stone-soup/stone-soup-0.28.0_pre20210831.ebuild
40 @@ -0,0 +1,201 @@
41 +# Copyright 1999-2021 Gentoo Authors
42 +# Distributed under the terms of the GNU General Public License v2
43 +
44 +EAPI=8
45 +
46 +LUA_COMPAT=( lua5-{1..3} )
47 +PYTHON_COMPAT=( python3_{7,8,9,10} )
48 +VIRTUALX_REQUIRED="manual"
49 +inherit desktop python-any-r1 lua-single xdg-utils toolchain-funcs
50 +
51 +DESCRIPTION="Role-playing roguelike game of exploration and treasure-hunting in dungeons"
52 +HOMEPAGE="https://crawl.develz.org"
53 +SLOT="0.28"
54 +
55 +# Leave empty string if not a _pre release
56 +COMMITSHA="46f4d3c3461b2012140bb15563a19ef027b1fc69"
57 +if [ -z "${COMMITSHA}" ]; then
58 + # This is a proper release
59 + SRC_URI="
60 + https://github.com/crawl/crawl/releases/download/${PV}/${PN/-/_}-${PV}.zip
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="stone_soup-${PV}"
65 +else
66 + # This is a _pre release
67 + SRC_URI="
68 + https://github.com/crawl/crawl/archive/${COMMITSHA}.zip
69 + https://dev.gentoo.org/~stasibear/distfiles/${PN}.png -> ${PN}-${SLOT}.png
70 + https://dev.gentoo.org/~stasibear/distfiles/${PN}.svg -> ${PN}-${SLOT}.svg
71 + "
72 + MY_P="crawl-${COMMITSHA}/crawl-ref"
73 +fi
74 +
75 +# 3-clause BSD: mt19937ar.cc, MSVC/stdint.h
76 +# 2-clause BSD: all contributions by Steve Noonan and Jesse Luehrs
77 +# Public Domain|CC0: most of tiles
78 +# MIT: json.cc/json.h, some .js files in webserver/static/scripts/contrib/
79 +LICENSE="GPL-2 BSD BSD-2 public-domain CC0-1.0 MIT"
80 +KEYWORDS="~amd64 ~x86"
81 +IUSE="debug ncurses sound +tiles"
82 +
83 +S=${WORKDIR}/${MY_P}/source
84 +RDEPEND="
85 + ${LUA_DEPS}
86 + dev-db/sqlite:3
87 + sys-libs/zlib
88 + !ncurses? ( !tiles? ( sys-libs/ncurses:0 ) )
89 + ncurses? ( sys-libs/ncurses:0 )
90 + tiles? (
91 + media-fonts/dejavu
92 + media-libs/freetype:2
93 + media-libs/libpng:0
94 + sound? (
95 + media-libs/libsdl2[X,opengl,sound,video]
96 + media-libs/sdl2-mixer
97 + )
98 + !sound? ( media-libs/libsdl2[X,opengl,video] )
99 + media-libs/sdl2-image[png]
100 + virtual/glu
101 + virtual/opengl
102 + )"
103 +DEPEND="${RDEPEND}
104 + app-arch/unzip
105 + dev-lang/perl
106 + ${PYTHON_DEPS}
107 + $(python_gen_any_dep 'dev-python/pyyaml[${PYTHON_USEDEP}]')
108 + sys-devel/flex
109 + tiles? (
110 + media-gfx/pngcrush
111 + sys-libs/ncurses:0
112 + )
113 + virtual/pkgconfig
114 + virtual/yacc
115 + "
116 +
117 +PATCHES=(
118 + "${FILESDIR}"/make.patch
119 + "${FILESDIR}"/rltiles-make.patch
120 +)
121 +
122 +python_check_deps() {
123 + has_version "dev-python/pyyaml[${PYTHON_USEDEP}]"
124 +}
125 +
126 +pkg_setup() {
127 +
128 + python-any-r1_pkg_setup
129 +
130 + if use !ncurses && use !tiles ; then
131 + ewarn "Neither ncurses nor tiles frontend"
132 + ewarn "selected, choosing ncurses only."
133 + ewarn "Note that you can also enable both."
134 + fi
135 +
136 + if use sound && use !tiles ; then
137 + ewarn "Sound support is only available with tiles."
138 + fi
139 +}
140 +
141 +src_prepare() {
142 + default
143 + python_fix_shebang "${S}/util/species-gen.py"
144 +
145 + sed -i -e "s/GAME = crawl$/GAME = crawl-${SLOT}/" "${S}/Makefile" \
146 + || die "Couldn't append slot to executable name"
147 +
148 + # File required for a _pre build
149 + if ! [ -f "${S}/util/release_ver" ]; then
150 + echo "${SLOT}" >"${S}/util/release_ver" || die "Couldn't write release_ver"
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 appened, 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 +}