public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Rafael Kitover <rkitover@gmail.com>
To: gentoo-dev@lists.gentoo.org
Cc: x11@gentoo.org, Rafael Kitover <rkitover@gmail.com>
Subject: [gentoo-dev] [PATCH 2/2] x11-libs/wxGTK: egl USE flag for OpenGL on Wayland
Date: Sun, 10 Sep 2023 15:45:22 +0000	[thread overview]
Message-ID: <20230910154522.3472260-2-rkitover@gmail.com> (raw)
In-Reply-To: <20230910154522.3472260-1-rkitover@gmail.com>

EGL is the only available OpenGL support on Wayland, so add the egl USE
flag and do not add --disable-glcanvasegl to configure args if it is
enabled.

Explain the rationale for GLX being the default and the egl USE flag, as
well as the upstream issue link to improve the situation in the ebuild
comments.

PR: https://github.com/gentoo/gentoo/pull/32452

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
---
 x11-libs/wxGTK/wxGTK-3.2.2.1-r3.ebuild | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/x11-libs/wxGTK/wxGTK-3.2.2.1-r3.ebuild b/x11-libs/wxGTK/wxGTK-3.2.2.1-r3.ebuild
index 1411650e6df9..b6d95a3df4a5 100644
--- a/x11-libs/wxGTK/wxGTK-3.2.2.1-r3.ebuild
+++ b/x11-libs/wxGTK/wxGTK-3.2.2.1-r3.ebuild
@@ -21,7 +21,7 @@ S="${WORKDIR}/wxWidgets-${PV}"
 LICENSE="wxWinLL-3 GPL-2 doc? ( wxWinFDL-3 )"
 SLOT="${WXRELEASE}"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="+X curl doc debug keyring gstreamer libnotify +lzma opengl pch sdl +spell test tiff wayland webkit"
+IUSE="+X curl doc debug keyring gstreamer libnotify +lzma opengl egl pch sdl +spell test tiff wayland webkit"
 REQUIRED_USE="test? ( tiff ) tiff? ( X ) spell? ( X ) keyring? ( X )"
 RESTRICT="!test? ( test )"
 
@@ -146,8 +146,19 @@ multilib_src_configure() {
 		--libdir='${prefix}'/$(get_libdir)
 	)
 
-	# Switch to wxGLCanvas GLX instead of EGL, resolves many OpenGL issues.
-	myeconfargs+=( "--disable-glcanvasegl" )
+	# By default, we now build with the GLX GLCanvas because some software like
+	# PrusaSlicer does not yet support EGL.  However, under Wayland EGL is the
+	# only working OpenGL implementation, so we allow the user to specify the
+	# egl USE flag to override this behavior and not disable the EGL GLCanvas.
+	#
+	# Upstream issue to improve this situation by instantiating the GLX
+	# GLCanvas under X11 dynamically:
+	#
+	# https://github.com/wxWidgets/wxWidgets/issues/23833
+	#
+	if ! use egl; then
+		myeconfargs+=( "--disable-glcanvasegl" )
+	fi
 
 	# debug in >=2.9
 	# there is no longer separate debug libraries (gtk2ud)
-- 
2.42.0



  reply	other threads:[~2023-09-10 15:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-10 15:45 [gentoo-dev] [PATCH 1/2] profiles: make egl a global USE flag Rafael Kitover
2023-09-10 15:45 ` Rafael Kitover [this message]
2023-09-10 16:01   ` [gentoo-dev] [PATCH 2/2] x11-libs/wxGTK: egl USE flag for OpenGL on Wayland Sam James
2023-09-10 18:28 ` [gentoo-dev] [PATCH 1/2] profiles: make egl a global USE flag Ionen Wolkens
2023-09-10 18:42   ` Ionen Wolkens
2023-09-10 19:40     ` Rafael Kitover

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=20230910154522.3472260-2-rkitover@gmail.com \
    --to=rkitover@gmail.com \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=x11@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