commit:     5bad3f3c548d366cb1cf3aa8c8dc7a62b5f7fc9e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May 26 09:39:14 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 26 09:42:28 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bad3f3c

wxwidgets.eclass: handle new wxGTK naming/versioning scheme

Previously, we installed with names like 'gtk3-unicode-3.2-gtk3'
which came from our 'versionator' seds which also broke version scripts
and symbol versioning.

Instead, follow upstream naming which yields e.g. 'gtk3-unicode-3.2' instead
(i.e. no extra toolkit suffix). Add a `has_version` to check for wxGTK ebuilds
following the old scheme, and if that doesn't fire, strip out the suffix.

Trying to make the old scheme semi-work wasn't feasible (and I did try).

Bug: https://bugs.gentoo.org/955936
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/wxwidgets.eclass | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/eclass/wxwidgets.eclass b/eclass/wxwidgets.eclass
index 7afea401a646..c861189b6551 100644
--- a/eclass/wxwidgets.eclass
+++ b/eclass/wxwidgets.eclass
@@ -84,7 +84,15 @@ setup-wxwidgets() {
                wxtoolkit="base"
        fi
 
-       wxconf="${wxtoolkit}-unicode-${WX_GTK_VER}"
+       # Older versions used e.g. 'gtk3-unicode-3.2-gtk3', while we've
+       # migrated to the upstream layout of 'gtk3-unicode-3.2' for newer
+       # versions when fixing bug #955936.
+       if has_version -d "<x11-libs/wxGTK-3.2.8.1:3.2-gtk3"; then
+               wxconf="${wxtoolkit}-unicode-${WX_GTK_VER}"
+       else
+               wxconf="${wxtoolkit}-unicode-${WX_GTK_VER%%-*}"
+       fi
+
        for w in "${CHOST:-${CBUILD}}-${wxconf}" "${wxconf}"; do
                [[ -f ${ESYSROOT}/usr/$(get_libdir)/wx/config/${w} ]] && 
wxconf=${w} && break
        done || die "Failed to find configuration ${wxconf}"

Reply via email to