sys-apps/dtc: Sync with Gentoo

It's from Gentoo commit 300e466631a529b6a095675253a6406763b9753c.
This commit is contained in:
Flatcar Buildbot 2025-06-16 07:13:25 +00:00 committed by Krzesimir Nowak
parent b995eb56cd
commit 53919e11f4
2 changed files with 13 additions and 10 deletions

View File

@ -3,8 +3,8 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..13} )
inherit meson python-single-r1
PYTHON_COMPAT=( python3_{11..13} )
inherit dot-a meson python-single-r1
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/dtc/dtc.git"
@ -61,6 +61,7 @@ pkg_setup() {
}
src_configure() {
use static-libs && lto-guarantee-fat
local emesonargs=(
-Dtools=true
-Dvalgrind=disabled # only used for some tests
@ -69,14 +70,16 @@ src_configure() {
$(meson_feature yaml)
)
# bug #909366
use static-libs && emesonargs+=( -Dstatic-build=true )
meson_src_configure
}
src_install() {
meson_src_install
if use !static-libs; then
# bug #907940
rm "${ED}/usr/$(get_libdir)"/*.a || die
fi
strip-lto-bytecode
use python && python_optimize "${ED}"
}

View File

@ -3,8 +3,8 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..13} )
inherit meson python-single-r1
PYTHON_COMPAT=( python3_{11..13} )
inherit dot-a meson python-single-r1
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/dtc/dtc.git"
@ -56,7 +56,9 @@ pkg_setup() {
}
src_configure() {
use static-libs && lto-guarantee-fat
local emesonargs=(
-Ddefault_library=$(usex static-libs both shared)
-Dtools=true
-Dvalgrind=disabled # only used for some tests
$(meson_feature python)
@ -64,14 +66,12 @@ src_configure() {
$(meson_feature yaml)
)
# bug #909366
use static-libs && emesonargs+=( -Dstatic-build=true )
meson_src_configure
}
src_install() {
meson_src_install
strip-lto-bytecode
use python && python_optimize "${ED}"
}