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