commit:     bdfd1f10d86cdbc4bf8ba820dba452dae9afd132
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed May 28 16:17:07 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed May 28 16:18:34 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bdfd1f10

net-dns/bind: fix automagic dtrace/systemtap use

Noticed because it automagically tries to use DTrace and with LTO, that
goes wrong (for now, but that's being worked on right now).

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-dns/bind/bind-9.20.7-r1.ebuild | 11 ++++++++++-
 net-dns/bind/metadata.xml          |  1 +
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/net-dns/bind/bind-9.20.7-r1.ebuild 
b/net-dns/bind/bind-9.20.7-r1.ebuild
index 5e2ec26cf327..010456b8ad3d 100644
--- a/net-dns/bind/bind-9.20.7-r1.ebuild
+++ b/net-dns/bind/bind-9.20.7-r1.ebuild
@@ -16,7 +16,7 @@ S="${WORKDIR}/${PN}-${MY_PV}"
 LICENSE="MPL-2.0"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv 
~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="dnstap doc doh fixed-rrset idn jemalloc geoip gssapi lmdb selinux 
static-libs test xml"
+IUSE="dnstap doc doh fixed-rrset idn jemalloc geoip gssapi lmdb selinux 
static-libs systemtap test xml"
 RESTRICT="!test? ( test )"
 
 DEPEND="
@@ -54,6 +54,9 @@ BDEPEND="
        test? (
                dev-util/cmocka
        )
+       systemtap? (
+               dev-debug/systemtap
+       )
 "
 
 src_prepare() {
@@ -68,6 +71,11 @@ src_configure() {
        # are available. Force fallback to prebuilt ones.
        use doc || export ac_cv_path_SPHINX_BUILD= SPHINX_BUILD=
 
+       # Workaround for bug #938302
+       if use systemtap && has_version 
"dev-debug/systemtap[-dtrace-symlink(+)]" ; then
+               export DTRACE="${BROOT}"/usr/bin/stap-dtrace
+       fi
+
        local myeconfargs=(
                --prefix="${EPREFIX}"/usr
                --sysconfdir="${EPREFIX}"/etc/bind
@@ -83,6 +91,7 @@ src_configure() {
                $(use_with doh libnghttp2)
                $(use_enable static-libs static)
                $(use_enable geoip)
+               $(use_enable systemtap tracing)
                $(use_with test cmocka)
                $(use_with geoip maxminddb)
                $(use_with gssapi)

diff --git a/net-dns/bind/metadata.xml b/net-dns/bind/metadata.xml
index 5dfa7226e586..1f55c6ba2737 100644
--- a/net-dns/bind/metadata.xml
+++ b/net-dns/bind/metadata.xml
@@ -12,5 +12,6 @@
                <flag name="fixed-rrset">Enables fixed rrset-order option</flag>
                <flag name="gssapi">Enable gssapi support</flag>
                <flag name="lmdb">Enable LMDB support to store configuration 
for 'addzone' zones</flag>
+               <flag name="systemtap">Build support for profiling and tracing 
using <pkg>dev-debug/systemtap</pkg></flag>
        </use>
 </pkgmetadata>

Reply via email to