Use the new meson_add_file helper to pick either --native-file or --cross-file as appropriate.
Don't bother checking the dtrace-symlink USE flag because it's simpler to just invoke stap-dtrace unconditionally. Include systemtap in DEPEND because it's also needed for a header. Export CC because it's needed by systemtap when cross-compiling. Closes: https://bugs.gentoo.org/968718 Signed-off-by: James Le Cuirot <[email protected]> --- dev-libs/glib/glib-2.84.4-r1.ebuild | 14 ++++++++------ dev-libs/glib/glib-2.84.4.ebuild | 14 ++++++++------ dev-libs/glib/glib-2.86.1.ebuild | 14 ++++++++------ 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/dev-libs/glib/glib-2.84.4-r1.ebuild b/dev-libs/glib/glib-2.84.4-r1.ebuild index f6f213fa087c6..2d6c6556c8305 100644 --- a/dev-libs/glib/glib-2.84.4-r1.ebuild +++ b/dev-libs/glib/glib-2.84.4-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -52,7 +52,10 @@ RDEPEND=" elf? ( virtual/libelf:0= ) sysprof? ( >=dev-util/sysprof-capture-3.40.1:4[${MULTILIB_USEDEP}] ) " -DEPEND="${RDEPEND}" +DEPEND=" + ${RDEPEND} + systemtap? ( >=dev-debug/systemtap-1.3 ) +" # libxml2 used for optional tests that get automatically skipped BDEPEND=" app-text/docbook-xsl-stylesheets @@ -356,13 +359,12 @@ multilib_src_configure() { ) # Workaround for bug #938302 - if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then - local native_file="${T}"/meson.${CHOST}.ini.local - cat >> ${native_file} <<-EOF || die + if use systemtap; then + tc-export CC + meson_add_file dtrace <<-EOF [binaries] dtrace='stap-dtrace' EOF - emesonargs+=( --native-file "${native_file}" ) fi meson_src_configure diff --git a/dev-libs/glib/glib-2.84.4.ebuild b/dev-libs/glib/glib-2.84.4.ebuild index 70f333647b66c..15f3741a6d6a0 100644 --- a/dev-libs/glib/glib-2.84.4.ebuild +++ b/dev-libs/glib/glib-2.84.4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -52,7 +52,10 @@ RDEPEND=" elf? ( virtual/libelf:0= ) sysprof? ( >=dev-util/sysprof-capture-3.40.1:4[${MULTILIB_USEDEP}] ) " -DEPEND="${RDEPEND}" +DEPEND=" + ${RDEPEND} + systemtap? ( >=dev-debug/systemtap-1.3 ) +" # libxml2 used for optional tests that get automatically skipped BDEPEND=" app-text/docbook-xsl-stylesheets @@ -352,13 +355,12 @@ multilib_src_configure() { ) # Workaround for bug #938302 - if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then - local native_file="${T}"/meson.${CHOST}.ini.local - cat >> ${native_file} <<-EOF || die + if use systemtap; then + tc-export CC + meson_add_file dtrace <<-EOF [binaries] dtrace='stap-dtrace' EOF - emesonargs+=( --native-file "${native_file}" ) fi meson_src_configure diff --git a/dev-libs/glib/glib-2.86.1.ebuild b/dev-libs/glib/glib-2.86.1.ebuild index dad63c11782c1..a398e0092db2e 100644 --- a/dev-libs/glib/glib-2.86.1.ebuild +++ b/dev-libs/glib/glib-2.86.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -52,7 +52,10 @@ RDEPEND=" elf? ( virtual/libelf:0= ) sysprof? ( >=dev-util/sysprof-capture-3.40.1:4[${MULTILIB_USEDEP}] ) " -DEPEND="${RDEPEND}" +DEPEND=" + ${RDEPEND} + systemtap? ( >=dev-debug/systemtap-1.3 ) +" # libxml2 used for optional tests that get automatically skipped BDEPEND=" app-text/docbook-xsl-stylesheets @@ -352,13 +355,12 @@ multilib_src_configure() { ) # Workaround for bug #938302 - if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then - local native_file="${T}"/meson.${CHOST}.ini.local - cat >> ${native_file} <<-EOF || die + if use systemtap; then + tc-export CC + meson_add_file dtrace <<-EOF [binaries] dtrace='stap-dtrace' EOF - emesonargs+=( --native-file "${native_file}" ) fi meson_src_configure -- 2.52.0
