commit:     90a396ff71deb6800c74d33d27a9c47809b7b99c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat May 13 23:12:24 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun May 14 00:31:18 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90a396ff

sys-apps/dbus: add Valgrind annotation support

The headers are needed to get Valgrind annotations.

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

 sys-apps/dbus/dbus-1.15.4-r1.ebuild | 4 +++-
 sys-apps/dbus/metadata.xml          | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/sys-apps/dbus/dbus-1.15.4-r1.ebuild 
b/sys-apps/dbus/dbus-1.15.4-r1.ebuild
index 9f1bd7c14747..9bf17a2cd2b7 100644
--- a/sys-apps/dbus/dbus-1.15.4-r1.ebuild
+++ b/sys-apps/dbus/dbus-1.15.4-r1.ebuild
@@ -25,7 +25,7 @@ 
SRC_URI="https://dbus.freedesktop.org/releases/dbus/${P}.tar.xz";
 LICENSE="|| ( AFL-2.1 GPL-2 )"
 SLOT="0"
 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 
~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="debug doc elogind selinux static-libs systemd test X"
+IUSE="debug doc elogind selinux static-libs systemd test valgrind X"
 RESTRICT="!test? ( test )"
 
 REQUIRED_USE="?? ( elogind systemd )"
@@ -57,6 +57,7 @@ DEPEND="${COMMON_DEPEND}
                ${PYTHON_DEPS}
                >=dev-libs/glib-2.40:2
        )
+       valgrind? ( >=dev-util/valgrind-3.6 )
        X? ( x11-base/xorg-proto )
 "
 RDEPEND="${COMMON_DEPEND}
@@ -149,6 +150,7 @@ multilib_src_configure() {
                --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
                --with-systemduserunitdir="$(systemd_get_userunitdir)"
                --with-dbus-user=messagebus
+               $(multilib_native_use_with valgrind)
                $(use_with X x)
        )
 

diff --git a/sys-apps/dbus/metadata.xml b/sys-apps/dbus/metadata.xml
index 010eeadbdd2c..7dc4c23f223c 100644
--- a/sys-apps/dbus/metadata.xml
+++ b/sys-apps/dbus/metadata.xml
@@ -7,6 +7,7 @@
        <use>
                <flag name="elogind">Use <pkg>sys-auth/elogind</pkg> for 
session tracking.</flag>
                <flag name="systemd">Build with <pkg>sys-apps/systemd</pkg> 
at_console support</flag>
+               <flag name="valgrind">Support Valgrind for 
<pkg>dev-util/valgrind</pkg> annotations to improve results for memcheck.</flag>
        </use>
        <upstream>
                <remote-id type="cpe">cpe:/a:freedesktop:dbus</remote-id>

Reply via email to