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