sys-libs/libsepol: use dot-a.eclass

... to avoid installing broken static libraries w/ LTO.

Closes: https://bugs.gentoo.org/957978
Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/45044
Closes: https://github.com/gentoo/gentoo/pull/45044
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Nicolas PARLANT 2025-12-16 06:34:43 +01:00 committed by Sam James
parent 1345f0ba22
commit ffe80045a9
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
2 changed files with 15 additions and 5 deletions

View File

@ -3,7 +3,7 @@
EAPI="8"
inherit toolchain-funcs multilib-minimal
inherit dot-a toolchain-funcs multilib-minimal
MY_PV="${PV//_/-}"
MY_P="${PN}-${MY_PV}"
@ -34,6 +34,7 @@ src_prepare() {
}
my_make() {
use static-libs && lto-guarantee-fat
emake \
PREFIX="${EPREFIX}/usr" \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
@ -51,5 +52,9 @@ multilib_src_compile() {
multilib_src_install() {
my_make DESTDIR="${D}" install
use static-libs || rm "${ED}"/usr/$(get_libdir)/*.a || die
if use static-libs; then
strip-lto-bytecode
else
rm "${ED}"/usr/$(get_libdir)/*.a || die
fi
}

View File

@ -1,9 +1,9 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
inherit toolchain-funcs multilib-minimal
inherit dot-a toolchain-funcs multilib-minimal
MY_PV="${PV//_/-}"
MY_P="${PN}-${MY_PV}"
@ -34,6 +34,7 @@ src_prepare() {
}
my_make() {
use static-libs && lto-guarantee-fat
emake \
PREFIX="${EPREFIX}/usr" \
LIBDIR="\$(PREFIX)/$(get_libdir)" \
@ -51,5 +52,9 @@ multilib_src_compile() {
multilib_src_install() {
my_make DESTDIR="${D}" install
use static-libs || rm "${ED}"/usr/$(get_libdir)/*.a || die
if use static-libs; then
strip-lto-bytecode
else
rm "${ED}"/usr/$(get_libdir)/*.a || die
fi
}