• [gentoo-dev] [PATCH 2/2] x11-libs/wxGTK: egl USE flag for OpenGL on Way

    From Rafael Kitover@21:1/5 to All on Sun Sep 10 17:50:01 2023
    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 wxGL
  • From Sam James@21:1/5 to Rafael Kitover on Sun Sep 10 18:10:02 2023
    Rafael Kitover <rkitover@gmail.com> writes:

    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

    Please tag the kicad bug which kicked this off with Bug:, as well as
    any other relevant ones.

    We want to try not make the same mistake as the original commits
    which caused all this fuss, so more detail in the commit messages
    would be good (although yours reads fine, just saying if you can
    think of anything else).


    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)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)