Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-fps/quakeforge/, games-fps/quakeforge/files/
Date: Mon, 07 Jun 2021 08:21:31
Message-Id: 1623053860.143bb008da03175efdefb08a1fe6c62377c4865e.ionen@gentoo
1 commit: 143bb008da03175efdefb08a1fe6c62377c4865e
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 7 07:02:08 2021 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 7 08:17:40 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=143bb008
7
8 games-fps/quakeforge: add 0.7.2_p20210601 snapshot
9
10 Previous version (from 2013) didn't build for a long time and,
11 even if get it to build, is prone to segfaults. New snapshot
12 improves several aspects but still rather fragile.
13
14 ebuild is not based on the old one and focuses on what still works
15 while providing a wall-of-text so it's at least remotely usable for
16 a first time user without their ready made Quake folder.
17
18 Should fix all old bugs.
19
20 Closes: https://bugs.gentoo.org/438826
21 Closes: https://bugs.gentoo.org/577112
22 Closes: https://bugs.gentoo.org/629600
23 Closes: https://bugs.gentoo.org/637408
24 Closes: https://bugs.gentoo.org/649088
25 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
26
27 games-fps/quakeforge/Manifest | 1 +
28 .../quakeforge-0.7.2_p20210601-png-stub.patch | 9 ++
29 .../quakeforge-0.7.2_p20210601-skipped-tests.patch | 15 ++
30 games-fps/quakeforge/metadata.xml | 3 +-
31 .../quakeforge/quakeforge-0.7.2_p20210601.ebuild | 173 +++++++++++++++++++++
32 5 files changed, 200 insertions(+), 1 deletion(-)
33
34 diff --git a/games-fps/quakeforge/Manifest b/games-fps/quakeforge/Manifest
35 index e34227e6aee..a4707ca31d2 100644
36 --- a/games-fps/quakeforge/Manifest
37 +++ b/games-fps/quakeforge/Manifest
38 @@ -1 +1,2 @@
39 DIST quakeforge-0.7.2.tar.bz2 2887823 BLAKE2B 27526b0e5491cc9a052f70c387c46b0d5518c0d63264f799cac81e471a87b978c9edcf22f4a68db25b8c05b7b51371504459e8ba5de450719e92aae712940cc7 SHA512 d296e10b86466aee0a4be527a5fea7a44bae60ebef52ad86381744dc96e2bed2ad14d3b790b4514a5c59ac897662e91b80a9d49c822910930742a1d2b8a2ec55
40 +DIST quakeforge-0.7.2_p20210601.tar.gz 3140318 BLAKE2B 4359c2e92a52bc314bca82dcf6f90aebe2fb7260e9c2e1444d3ca239c53adf1ca912093c5c0ccacb4cf9375e199c244f1b8787196c2f8f3bbc7eb00962b0d8da SHA512 a27e4317b3c01f129f1f32209c02b86abf7148c3e0b2e39306324d6b4758d9165883c169ebfde03fc7350b499088cd685991483911b5ae57ccb9b80baaefa733
41
42 diff --git a/games-fps/quakeforge/files/quakeforge-0.7.2_p20210601-png-stub.patch b/games-fps/quakeforge/files/quakeforge-0.7.2_p20210601-png-stub.patch
43 new file mode 100644
44 index 00000000000..d32fab57b7e
45 --- /dev/null
46 +++ b/games-fps/quakeforge/files/quakeforge-0.7.2_p20210601-png-stub.patch
47 @@ -0,0 +1,9 @@
48 +Fix stub definition for USE=-png
49 +https://github.com/quakeforge/quakeforge/issues/14
50 +--- a/libs/image/png.c
51 ++++ b/libs/image/png.c
52 +@@ -320,3 +320,3 @@
53 + VISIBLE tex_t *
54 +-LoadPNG (QFile *infile)
55 ++LoadPNG (QFile *infile, int load)
56 + {
57
58 diff --git a/games-fps/quakeforge/files/quakeforge-0.7.2_p20210601-skipped-tests.patch b/games-fps/quakeforge/files/quakeforge-0.7.2_p20210601-skipped-tests.patch
59 new file mode 100644
60 index 00000000000..5b25af47ac2
61 --- /dev/null
62 +++ b/games-fps/quakeforge/files/quakeforge-0.7.2_p20210601-skipped-tests.patch
63 @@ -0,0 +1,15 @@
64 +These are only failing at high precision and
65 +should not affect normal usage.
66 + quat/simd: fails with -mavx
67 + sebvf: random failure, sometimes pass
68 +--- a/libs/util/test/Makemodule.am
69 ++++ b/libs/util/test/Makemodule.am
70 +@@ -15,8 +15,5 @@
71 + libs/util/test/test-qfs \
72 +- libs/util/test/test-quat \
73 + libs/util/test/test-seb \
74 +- libs/util/test/test-sebvf \
75 + libs/util/test/test-seg \
76 + libs/util/test/test-set \
77 +- libs/util/test/test-simd \
78 + libs/util/test/test-txtbuffer \
79
80 diff --git a/games-fps/quakeforge/metadata.xml b/games-fps/quakeforge/metadata.xml
81 index e686e2fbeaa..120ffed3507 100644
82 --- a/games-fps/quakeforge/metadata.xml
83 +++ b/games-fps/quakeforge/metadata.xml
84 @@ -30,8 +30,9 @@ features, and improving the OpenGL renderer. And QuakeForge is still the
85 most portable source tree based on the id Software code.
86 </longdescription>
87 <use>
88 - <flag name="wildmidi">enable libWildMidi support</flag>
89 <flag name="xdg">enable XDG support</flag>
90 + <flag name="client">Build Normal and QuakeWorld clients alongside the servers</flag>
91 + <flag name="wildmidi">Use <pkg>media-sound/wildmidi</pkg> for midi support</flag>
92 </use>
93 <upstream>
94 <remote-id type="github">quakeforge/quakeforge</remote-id>
95
96 diff --git a/games-fps/quakeforge/quakeforge-0.7.2_p20210601.ebuild b/games-fps/quakeforge/quakeforge-0.7.2_p20210601.ebuild
97 new file mode 100644
98 index 00000000000..504324b8b2b
99 --- /dev/null
100 +++ b/games-fps/quakeforge/quakeforge-0.7.2_p20210601.ebuild
101 @@ -0,0 +1,173 @@
102 +# Copyright 1999-2021 Gentoo Authors
103 +# Distributed under the terms of the GNU General Public License v2
104 +
105 +EAPI=7
106 +
107 +inherit autotools flag-o-matic readme.gentoo-r1 toolchain-funcs
108 +
109 +MY_COMMIT="53b553e89234306dc0111b107308fb42998e522b"
110 +
111 +DESCRIPTION="3D engine based on id Software's Quake and QuakeWorld game engines"
112 +HOMEPAGE="http://www.quakeforge.net/"
113 +SRC_URI="https://github.com/quakeforge/quakeforge/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
114 +S="${WORKDIR}/${PN}-${MY_COMMIT}"
115 +
116 +LICENSE="GPL-2"
117 +SLOT="0"
118 +KEYWORDS="~amd64 ~x86"
119 +IUSE="alsa +client custom-cflags debug doc flac ipv6 jack ncurses oss png sdl vorbis wildmidi zlib"
120 +
121 +RDEPEND="
122 + client? (
123 + media-libs/libsamplerate
124 + net-misc/curl
125 + x11-libs/libX11
126 + x11-libs/libXext
127 + x11-libs/libXxf86vm
128 + alsa? ( media-libs/alsa-lib )
129 + flac? ( media-libs/flac )
130 + jack? ( virtual/jack )
131 + sdl? ( media-libs/libsdl[sound] )
132 + vorbis? ( media-libs/libvorbis )
133 + wildmidi? ( media-sound/wildmidi )
134 + )
135 + ncurses? ( sys-libs/ncurses:= )
136 + png? ( media-libs/libpng:= )
137 + zlib? ( sys-libs/zlib:= )"
138 +DEPEND="
139 + ${RDEPEND}
140 + client? (
141 + virtual/opengl
142 + x11-base/xorg-proto
143 + )"
144 +BDEPEND="
145 + sys-devel/bison
146 + sys-devel/flex
147 + virtual/pkgconfig
148 + doc? (
149 + app-doc/doxygen[dot]
150 + media-gfx/transfig
151 + )"
152 +
153 +PATCHES=(
154 + "${FILESDIR}"/${P}-png-stub.patch
155 + "${FILESDIR}"/${P}-skipped-tests.patch
156 +)
157 +
158 +src_prepare() {
159 + default
160 +
161 + echo ${PV} > .tarball-version || die
162 +
163 + eautoreconf
164 +}
165 +
166 +src_configure() {
167 + if ! use custom-cflags; then
168 + # package does a lot of fragile micro-optimizations
169 + strip-flags
170 +
171 + # nq-x11 segfaults starting a new game with -O2+ and gcc11
172 + # https://github.com/quakeforge/quakeforge/issues/12
173 + tc-is-gcc && [[ $(gcc-major-version) -ge 11 ]] && replace-flags '-O[2-9]*' -Os
174 + fi
175 +
176 + append-ldflags -Wl,-z,noexecstack
177 +
178 + qf_client() {
179 + echo $(usex client $(use_enable ${1}) --disable-${1})
180 + }
181 +
182 + local econfargs=(
183 + $(qf_client alsa)
184 + $(qf_client flac)
185 + $(qf_client jack)
186 + $(qf_client oss)
187 + $(qf_client sdl)
188 + $(qf_client vorbis)
189 + # vulkan is work-in-progress and currently needs <=vulkan-headers-1.2.169
190 + # https://github.com/quakeforge/quakeforge/issues/13
191 + --disable-vulkan # $(qf_client vulkan)
192 + $(qf_client wildmidi)
193 + $(use_enable client sound)
194 + $(use_enable client vidmode)
195 + $(use_enable debug)
196 + $(use_enable ncurses curses)
197 + $(use_enable png)
198 + $(use_enable zlib)
199 + $(use_with client x)
200 + $(use_with ipv6)
201 + --disable-Werror
202 + --disable-dga
203 + --disable-static
204 + --enable-xdg
205 + # non-x11 clients are mostly abandoned/broken (SDL1 still useful for pulseaudio)
206 + --with-clients=$(usex client x11 '')
207 + --with-cpp="$(tc-getCPP) -x c %u %d %s -o %o %i" # see config.d/qfcc.m4
208 + --with-global-cfg="${EPREFIX}"/etc/quakeforge.conf
209 + --with-sharepath="${EPREFIX}"/usr/share/quake1
210 + )
211 +
212 + # Jack audio is special (need a different method to enable), and an
213 + # issue prevents it from being usable without another audio output.
214 + # https://github.com/quakeforge/quakeforge/issues/16
215 + # Given hopefully temporary, not relying on REQUIRED_USE.
216 + use alsa || use oss || use sdl || econfargs+=( --enable-oss )
217 +
218 + econf "${econfargs[@]}"
219 +}
220 +
221 +src_compile() {
222 + default
223 +
224 + use doc && emake doc
225 +}
226 +
227 +src_install() {
228 + use doc && local HTML_DOCS=( doxygen/html/. )
229 +
230 + emake -j1 DESTDIR="${D}" install
231 +
232 + find "${ED}" -name '*.la' -delete || die
233 +
234 + local DISABLE_AUTOFORMATTING="yes"
235 + local DOC_CONTENTS=\
236 +"Before you can play (using nq-x11 or qw-client-x11), you must ensure
237 +that ${PN} can find your Quake pak0.pak (and optionally pak1.pak)
238 +at one of these locations with lowercase filenames:
239 + - '~/.local/share/${PN}/id1/pak0.pak'
240 + - '${EPREFIX}/usr/share/quake1/id1/pak0.pak'
241 +
242 +You can add them yourself or use either of:
243 + - games-fps/quake1-data: install from a Quake CD-ROM
244 + - games-fps/quake1-demodata: pak0.pak only (limited demo)
245 +
246 +Key binds notes:
247 + Defaults ('imt_mod' table) expect you to set key binds manually in:
248 + - '~/.local/share/${PN}/id1/autoexec.cfg' (or '${EPREFIX}/usr/share/quake1/id1')
249 + For the in-game bind menu to be usable ('imt_0' table), bring up the
250 + console with backtick \`, and run 'imt imt_0' (only needed once).
251 + A mouse-grab bind ('toggle in_grab') and using freelook is recommended.
252 +
253 +Audio/Video notes:
254 + Can add settings in:
255 + - '~/.config/${PN}/${PN}.conf' (or '${EPREFIX}/etc/${PN}.conf')
256 + Examples:
257 + - set vid_width 800
258 + - set vid_height 600
259 + - set snd_output sdl (or alsa, oss)
260 + - setrom vid_render gl (or sw for software rendering)
261 + - setrom snd_render default (specially set jack here for JACK audio)"
262 + readme.gentoo_create_doc
263 +}
264 +
265 +pkg_postinst() {
266 + readme.gentoo_print_elog
267 +
268 + if [[ ${REPLACING_VERSIONS} ]] && ver_test ${REPLACING_VERSIONS} -le 0.7.2-r1; then
269 + elog "Migration may be needed for ${PN}'s home paths, now using:"
270 + elog " ~/.${PN}rc -> ~/.config/${PN}/${PN}.conf"
271 + elog " ~/.${PN}/ -> ~/.local/share/${PN}/"
272 + elog "Also, nq-sdl / qw-client-sdl are no longer available (use -x11 instead)."
273 + fi
274 +}