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@gentoo.org>
This commit is contained in:
Sam James
2025-05-26 10:39:14 +01:00
parent 5789f5a5af
commit 5bad3f3c54

View File

@@ -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}"