public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ionen Wolkens" <ionen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-fps/quakeforge/, games-fps/quakeforge/files/
Date: Mon,  7 Jun 2021 08:21:26 +0000 (UTC)	[thread overview]
Message-ID: <1623053860.143bb008da03175efdefb08a1fe6c62377c4865e.ionen@gentoo> (raw)

commit:     143bb008da03175efdefb08a1fe6c62377c4865e
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  7 07:02:08 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Jun  7 08:17:40 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=143bb008

games-fps/quakeforge: add 0.7.2_p20210601 snapshot

Previous version (from 2013) didn't build for a long time and,
even if get it to build, is prone to segfaults. New snapshot
improves several aspects but still rather fragile.

ebuild is not based on the old one and focuses on what still works
while providing a wall-of-text so it's at least remotely usable for
a first time user without their ready made Quake folder.

Should fix all old bugs.

Closes: https://bugs.gentoo.org/438826
Closes: https://bugs.gentoo.org/577112
Closes: https://bugs.gentoo.org/629600
Closes: https://bugs.gentoo.org/637408
Closes: https://bugs.gentoo.org/649088
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 games-fps/quakeforge/Manifest                      |   1 +
 .../quakeforge-0.7.2_p20210601-png-stub.patch      |   9 ++
 .../quakeforge-0.7.2_p20210601-skipped-tests.patch |  15 ++
 games-fps/quakeforge/metadata.xml                  |   3 +-
 .../quakeforge/quakeforge-0.7.2_p20210601.ebuild   | 173 +++++++++++++++++++++
 5 files changed, 200 insertions(+), 1 deletion(-)

diff --git a/games-fps/quakeforge/Manifest b/games-fps/quakeforge/Manifest
index e34227e6aee..a4707ca31d2 100644
--- a/games-fps/quakeforge/Manifest
+++ b/games-fps/quakeforge/Manifest
@@ -1 +1,2 @@
 DIST quakeforge-0.7.2.tar.bz2 2887823 BLAKE2B 27526b0e5491cc9a052f70c387c46b0d5518c0d63264f799cac81e471a87b978c9edcf22f4a68db25b8c05b7b51371504459e8ba5de450719e92aae712940cc7 SHA512 d296e10b86466aee0a4be527a5fea7a44bae60ebef52ad86381744dc96e2bed2ad14d3b790b4514a5c59ac897662e91b80a9d49c822910930742a1d2b8a2ec55
+DIST quakeforge-0.7.2_p20210601.tar.gz 3140318 BLAKE2B 4359c2e92a52bc314bca82dcf6f90aebe2fb7260e9c2e1444d3ca239c53adf1ca912093c5c0ccacb4cf9375e199c244f1b8787196c2f8f3bbc7eb00962b0d8da SHA512 a27e4317b3c01f129f1f32209c02b86abf7148c3e0b2e39306324d6b4758d9165883c169ebfde03fc7350b499088cd685991483911b5ae57ccb9b80baaefa733

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
new file mode 100644
index 00000000000..d32fab57b7e
--- /dev/null
+++ b/games-fps/quakeforge/files/quakeforge-0.7.2_p20210601-png-stub.patch
@@ -0,0 +1,9 @@
+Fix stub definition for USE=-png
+https://github.com/quakeforge/quakeforge/issues/14
+--- a/libs/image/png.c
++++ b/libs/image/png.c
+@@ -320,3 +320,3 @@
+ VISIBLE tex_t *
+-LoadPNG (QFile *infile)
++LoadPNG (QFile *infile, int load)
+ {

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
new file mode 100644
index 00000000000..5b25af47ac2
--- /dev/null
+++ b/games-fps/quakeforge/files/quakeforge-0.7.2_p20210601-skipped-tests.patch
@@ -0,0 +1,15 @@
+These are only failing at high precision and
+should not affect normal usage.
+  quat/simd: fails with -mavx
+      sebvf: random failure, sometimes pass
+--- a/libs/util/test/Makemodule.am
++++ b/libs/util/test/Makemodule.am
+@@ -15,8 +15,5 @@
+ 	libs/util/test/test-qfs \
+-	libs/util/test/test-quat \
+ 	libs/util/test/test-seb \
+-	libs/util/test/test-sebvf \
+ 	libs/util/test/test-seg \
+ 	libs/util/test/test-set \
+-	libs/util/test/test-simd \
+ 	libs/util/test/test-txtbuffer \

diff --git a/games-fps/quakeforge/metadata.xml b/games-fps/quakeforge/metadata.xml
index e686e2fbeaa..120ffed3507 100644
--- a/games-fps/quakeforge/metadata.xml
+++ b/games-fps/quakeforge/metadata.xml
@@ -30,8 +30,9 @@ features, and improving the OpenGL renderer. And QuakeForge is still the
 most portable source tree based on the id Software code.
 </longdescription>
 	<use>
-		<flag name="wildmidi">enable libWildMidi support</flag>
 		<flag name="xdg">enable XDG support</flag>
+		<flag name="client">Build Normal and QuakeWorld clients alongside the servers</flag>
+		<flag name="wildmidi">Use <pkg>media-sound/wildmidi</pkg> for midi support</flag>
 	</use>
 	<upstream>
 		<remote-id type="github">quakeforge/quakeforge</remote-id>

diff --git a/games-fps/quakeforge/quakeforge-0.7.2_p20210601.ebuild b/games-fps/quakeforge/quakeforge-0.7.2_p20210601.ebuild
new file mode 100644
index 00000000000..504324b8b2b
--- /dev/null
+++ b/games-fps/quakeforge/quakeforge-0.7.2_p20210601.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic readme.gentoo-r1 toolchain-funcs
+
+MY_COMMIT="53b553e89234306dc0111b107308fb42998e522b"
+
+DESCRIPTION="3D engine based on id Software's Quake and QuakeWorld game engines"
+HOMEPAGE="http://www.quakeforge.net/"
+SRC_URI="https://github.com/quakeforge/quakeforge/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${MY_COMMIT}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa +client custom-cflags debug doc flac ipv6 jack ncurses oss png sdl vorbis wildmidi zlib"
+
+RDEPEND="
+	client? (
+		media-libs/libsamplerate
+		net-misc/curl
+		x11-libs/libX11
+		x11-libs/libXext
+		x11-libs/libXxf86vm
+		alsa? ( media-libs/alsa-lib )
+		flac? ( media-libs/flac )
+		jack? ( virtual/jack )
+		sdl? ( media-libs/libsdl[sound] )
+		vorbis? ( media-libs/libvorbis )
+		wildmidi? ( media-sound/wildmidi )
+	)
+	ncurses? ( sys-libs/ncurses:= )
+	png? ( media-libs/libpng:= )
+	zlib? ( sys-libs/zlib:= )"
+DEPEND="
+	${RDEPEND}
+	client? (
+		virtual/opengl
+		x11-base/xorg-proto
+	)"
+BDEPEND="
+	sys-devel/bison
+	sys-devel/flex
+	virtual/pkgconfig
+	doc? (
+		app-doc/doxygen[dot]
+		media-gfx/transfig
+	)"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-png-stub.patch
+	"${FILESDIR}"/${P}-skipped-tests.patch
+)
+
+src_prepare() {
+	default
+
+	echo ${PV} > .tarball-version || die
+
+	eautoreconf
+}
+
+src_configure() {
+	if ! use custom-cflags; then
+		# package does a lot of fragile micro-optimizations
+		strip-flags
+
+		# nq-x11 segfaults starting a new game with -O2+ and gcc11
+		# https://github.com/quakeforge/quakeforge/issues/12
+		tc-is-gcc && [[ $(gcc-major-version) -ge 11 ]] && replace-flags '-O[2-9]*' -Os
+	fi
+
+	append-ldflags -Wl,-z,noexecstack
+
+	qf_client() {
+		echo $(usex client $(use_enable ${1}) --disable-${1})
+	}
+
+	local econfargs=(
+		$(qf_client alsa)
+		$(qf_client flac)
+		$(qf_client jack)
+		$(qf_client oss)
+		$(qf_client sdl)
+		$(qf_client vorbis)
+		# vulkan is work-in-progress and currently needs <=vulkan-headers-1.2.169
+		# https://github.com/quakeforge/quakeforge/issues/13
+		--disable-vulkan # $(qf_client vulkan)
+		$(qf_client wildmidi)
+		$(use_enable client sound)
+		$(use_enable client vidmode)
+		$(use_enable debug)
+		$(use_enable ncurses curses)
+		$(use_enable png)
+		$(use_enable zlib)
+		$(use_with client x)
+		$(use_with ipv6)
+		--disable-Werror
+		--disable-dga
+		--disable-static
+		--enable-xdg
+		# non-x11 clients are mostly abandoned/broken (SDL1 still useful for pulseaudio)
+		--with-clients=$(usex client x11 '')
+		--with-cpp="$(tc-getCPP) -x c %u %d %s -o %o %i" # see config.d/qfcc.m4
+		--with-global-cfg="${EPREFIX}"/etc/quakeforge.conf
+		--with-sharepath="${EPREFIX}"/usr/share/quake1
+	)
+
+	# Jack audio is special (need a different method to enable), and an
+	# issue prevents it from being usable without another audio output.
+	# https://github.com/quakeforge/quakeforge/issues/16
+	# Given hopefully temporary, not relying on REQUIRED_USE.
+	use alsa || use oss || use sdl || econfargs+=( --enable-oss )
+
+	econf "${econfargs[@]}"
+}
+
+src_compile() {
+	default
+
+	use doc && emake doc
+}
+
+src_install() {
+	use doc && local HTML_DOCS=( doxygen/html/. )
+
+	emake -j1 DESTDIR="${D}" install
+
+	find "${ED}" -name '*.la' -delete || die
+
+	local DISABLE_AUTOFORMATTING="yes"
+	local DOC_CONTENTS=\
+"Before you can play (using nq-x11 or qw-client-x11), you must ensure
+that ${PN} can find your Quake pak0.pak (and optionally pak1.pak)
+at one of these locations with lowercase filenames:
+	- '~/.local/share/${PN}/id1/pak0.pak'
+	- '${EPREFIX}/usr/share/quake1/id1/pak0.pak'
+
+You can add them yourself or use either of:
+	- games-fps/quake1-data: install from a Quake CD-ROM
+	- games-fps/quake1-demodata: pak0.pak only (limited demo)
+
+Key binds notes:
+	Defaults ('imt_mod' table) expect you to set key binds manually in:
+	- '~/.local/share/${PN}/id1/autoexec.cfg' (or '${EPREFIX}/usr/share/quake1/id1')
+	For the in-game bind menu to be usable ('imt_0' table), bring up the
+	console with backtick \`, and run 'imt imt_0' (only needed once).
+	A mouse-grab bind ('toggle in_grab') and using freelook is recommended.
+
+Audio/Video notes:
+	Can add settings in:
+	- '~/.config/${PN}/${PN}.conf' (or '${EPREFIX}/etc/${PN}.conf')
+	Examples:
+	- set vid_width 800
+	- set vid_height 600
+	- set snd_output sdl (or alsa, oss)
+	- setrom vid_render gl (or sw for software rendering)
+	- setrom snd_render default (specially set jack here for JACK audio)"
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+
+	if [[ ${REPLACING_VERSIONS} ]] && ver_test ${REPLACING_VERSIONS} -le 0.7.2-r1; then
+		elog "Migration may be needed for ${PN}'s home paths, now using:"
+		elog "    ~/.${PN}rc -> ~/.config/${PN}/${PN}.conf"
+		elog "    ~/.${PN}/  -> ~/.local/share/${PN}/"
+		elog "Also, nq-sdl / qw-client-sdl are no longer available (use -x11 instead)."
+	fi
+}


             reply	other threads:[~2021-06-07  8:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07  8:21 Ionen Wolkens [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-07-25  1:36 [gentoo-commits] repo/gentoo:master commit in: games-fps/quakeforge/, games-fps/quakeforge/files/ Ionen Wolkens
2017-02-09 17:37 Austin English
2016-01-18  7:27 Michael Sterrett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1623053860.143bb008da03175efdefb08a1fe6c62377c4865e.ionen@gentoo \
    --to=ionen@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox