x11-misc/xkeyboard-config: workaround portage collision issue

Don't really like this, but unless portage either relax its
checks or improve merging process there's probably(?) not a
better option (would still need workaround for old portage
anyway).

Can probably drop this sometime in 2+ years after 2.45 is old
enough, or if the symlink is ever removed.

Unsure if maintainer would rather the workaround done a bit
differently but that can be changed later (just do not want
to leave this broken for longer).

Closes: https://bugs.gentoo.org/957712
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
Ionen Wolkens
2025-06-10 02:00:18 -04:00
parent de304006f2
commit d4239fb331
2 changed files with 33 additions and 1 deletions

View File

@@ -64,3 +64,19 @@ src_configure() {
)
meson_src_configure
}
src_install() {
meson_src_install
# Workaround for portage's collision checks, see pkg_preinst (bug #957712)
if has_version "<${CATEGORY}/${PN}-2.45"; then
mv "${ED}"/usr/share/X11/xkb{,.workaround} || die
fi
}
pkg_preinst() {
if [[ -L ${ED}/usr/share/X11/xkb.workaround ]]; then
rm -rf "${EROOT}"/usr/share/X11/xkb || die
mv "${ED}"/usr/share/X11/xkb{.workaround,} || die
fi
}

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -64,3 +64,19 @@ src_configure() {
)
meson_src_configure
}
src_install() {
meson_src_install
# Workaround for portage's collision checks, see pkg_preinst (bug #957712)
if has_version "<${CATEGORY}/${PN}-2.45"; then
mv "${ED}"/usr/share/X11/xkb{,.workaround} || die
fi
}
pkg_preinst() {
if [[ -L ${ED}/usr/share/X11/xkb.workaround ]]; then
rm -rf "${EROOT}"/usr/share/X11/xkb || die
mv "${ED}"/usr/share/X11/xkb{.workaround,} || die
fi
}