public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-emulation/pcsx2/, profiles/base/
@ 2024-02-17 10:20 Ionen Wolkens
  0 siblings, 0 replies; only message in thread
From: Ionen Wolkens @ 2024-02-17 10:20 UTC (permalink / raw
  To: gentoo-commits

commit:     02038f740f159241bb3e7a1871e2fecb22da974e
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 17 09:59:00 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Feb 17 10:19:42 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02038f74

games-emulation/pcsx2: add (forced) IUSE=+clang

Makes what is happening clearer to users, and gives the option to
force-disable it (through /etc/portage/profile) if really wanted.
Albeit doing so will currently fail to build without patches which
upstream is unlikely to accept given they took a clang-only stance
and ignore bugs (thus being forced).

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 games-emulation/pcsx2/metadata.xml          | 5 +++++
 games-emulation/pcsx2/pcsx2-1.7.5474.ebuild | 8 ++++----
 games-emulation/pcsx2/pcsx2-9999.ebuild     | 8 ++++----
 profiles/base/package.use.force             | 6 ++++++
 4 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/games-emulation/pcsx2/metadata.xml b/games-emulation/pcsx2/metadata.xml
index 6e25d9d61e5b..ddf894bc0a0f 100644
--- a/games-emulation/pcsx2/metadata.xml
+++ b/games-emulation/pcsx2/metadata.xml
@@ -14,6 +14,11 @@
 		<name>Gentoo Games Project</name>
 	</maintainer>
 	<use>
+		<flag name="clang">
+			Use Clang compiler to build (the only compiler that is
+			currently supported by upstream on Linux, do not report
+			bugs if force-disabled)
+		</flag>
 		<flag name="sndio">Enable support for the <pkg>media-sound/sndio</pkg> backend</flag>
 	</use>
 	<upstream>

diff --git a/games-emulation/pcsx2/pcsx2-1.7.5474.ebuild b/games-emulation/pcsx2/pcsx2-1.7.5474.ebuild
index 5166d24d2965..9810fcf44af1 100644
--- a/games-emulation/pcsx2/pcsx2-1.7.5474.ebuild
+++ b/games-emulation/pcsx2/pcsx2-1.7.5474.ebuild
@@ -23,7 +23,7 @@ LICENSE="
 	ISC LGPL-2.1+ LGPL-3+ MIT OFL-1.1 ZLIB public-domain
 "
 SLOT="0"
-IUSE="alsa cpu_flags_x86_sse4_1 jack pulseaudio sndio test vulkan wayland"
+IUSE="alsa cpu_flags_x86_sse4_1 +clang jack pulseaudio sndio test vulkan wayland"
 REQUIRED_USE="cpu_flags_x86_sse4_1" # dies at runtime if no support
 RESTRICT="!test? ( test )"
 
@@ -65,7 +65,7 @@ DEPEND="
 "
 BDEPEND="
 	dev-qt/qttools:6[linguist]
-	sys-devel/clang:*
+	clang? ( sys-devel/clang:* )
 	wayland? (
 		dev-util/wayland-scanner
 		kde-frameworks/extra-cmake-modules
@@ -93,10 +93,10 @@ src_prepare() {
 }
 
 src_configure() {
-	# upstream only supports clang and ignores gcc issues, e.g.
+	# note that upstream only supports clang and ignores gcc issues, e.g.
 	# https://github.com/PCSX2/pcsx2/issues/10624#issuecomment-1890326047
 	# (CMakeLists.txt also gives a big warning if compiler is not clang)
-	if ! tc-is-clang; then
+	if use clang && ! tc-is-clang; then
 		local -x CC=${CHOST}-clang CXX=${CHOST}-clang++
 		strip-unsupported-flags
 	fi

diff --git a/games-emulation/pcsx2/pcsx2-9999.ebuild b/games-emulation/pcsx2/pcsx2-9999.ebuild
index 5166d24d2965..9810fcf44af1 100644
--- a/games-emulation/pcsx2/pcsx2-9999.ebuild
+++ b/games-emulation/pcsx2/pcsx2-9999.ebuild
@@ -23,7 +23,7 @@ LICENSE="
 	ISC LGPL-2.1+ LGPL-3+ MIT OFL-1.1 ZLIB public-domain
 "
 SLOT="0"
-IUSE="alsa cpu_flags_x86_sse4_1 jack pulseaudio sndio test vulkan wayland"
+IUSE="alsa cpu_flags_x86_sse4_1 +clang jack pulseaudio sndio test vulkan wayland"
 REQUIRED_USE="cpu_flags_x86_sse4_1" # dies at runtime if no support
 RESTRICT="!test? ( test )"
 
@@ -65,7 +65,7 @@ DEPEND="
 "
 BDEPEND="
 	dev-qt/qttools:6[linguist]
-	sys-devel/clang:*
+	clang? ( sys-devel/clang:* )
 	wayland? (
 		dev-util/wayland-scanner
 		kde-frameworks/extra-cmake-modules
@@ -93,10 +93,10 @@ src_prepare() {
 }
 
 src_configure() {
-	# upstream only supports clang and ignores gcc issues, e.g.
+	# note that upstream only supports clang and ignores gcc issues, e.g.
 	# https://github.com/PCSX2/pcsx2/issues/10624#issuecomment-1890326047
 	# (CMakeLists.txt also gives a big warning if compiler is not clang)
-	if ! tc-is-clang; then
+	if use clang && ! tc-is-clang; then
 		local -x CC=${CHOST}-clang CXX=${CHOST}-clang++
 		strip-unsupported-flags
 	fi

diff --git a/profiles/base/package.use.force b/profiles/base/package.use.force
index e50d568231f8..7430401bf4b8 100644
--- a/profiles/base/package.use.force
+++ b/profiles/base/package.use.force
@@ -1,6 +1,12 @@
 # Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Ionen Wolkens <ionen@gentoo.org> (2024-02-17)
+# Currently fails to build with gcc, and either way the current upstream
+# makes it clear that non-clang is not a supported configuration.
+# Please do not report bugs if disabled unless upstream's stance changed.
+games-emulation/pcsx2 clang
+
 # Matt Turner <mattst88@gentoo.org> (2024-02-01)
 # Reverse dependencies are not ready for media-libs/mesa to not provide OpenGL.
 media-libs/mesa opengl


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-17 10:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-17 10:20 [gentoo-commits] repo/gentoo:master commit in: games-emulation/pcsx2/, profiles/base/ Ionen Wolkens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox