commit:     380c42e72b56c19de92e11ef6197cbaa23861524
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun May 14 00:36:55 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun May 14 00:37:45 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=380c42e7

sys-fs/lvm2: add Valgrind annotation support

The headers are needed to get Valgrind annotations.

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

 sys-fs/lvm2/lvm2-2.03.21.ebuild | 27 ++++++++++++++++++---------
 sys-fs/lvm2/metadata.xml        |  1 +
 2 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/sys-fs/lvm2/lvm2-2.03.21.ebuild b/sys-fs/lvm2/lvm2-2.03.21.ebuild
index c322d60907e5..2edbb12b2d1f 100644
--- a/sys-fs/lvm2/lvm2-2.03.21.ebuild
+++ b/sys-fs/lvm2/lvm2-2.03.21.ebuild
@@ -14,12 +14,13 @@ S="${WORKDIR}/${PN^^}.${PV}"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="lvm readline sanlock selinux static static-libs systemd thin +udev"
+IUSE="lvm readline sanlock selinux static static-libs systemd thin +udev 
valgrind"
 REQUIRED_USE="
        static? ( !systemd !udev )
        static-libs? ( static !udev )
        systemd? ( udev )
-       thin? ( lvm )"
+       thin? ( lvm )
+"
 
 DEPEND_COMMON="
        udev? ( virtual/libudev:= )
@@ -29,18 +30,22 @@ DEPEND_COMMON="
                readline? ( sys-libs/readline:= )
                sanlock? ( sys-cluster/sanlock )
                systemd? ( sys-apps/systemd:= )
-       )"
+       )
+"
 # /run is now required for locking during early boot. /var cannot be assumed to
 # be available -- thus, pull in recent enough baselayout for /run.
 # This version of LVM is incompatible with cryptsetup <1.1.2.
-RDEPEND="${DEPEND_COMMON}
+RDEPEND="
+       ${DEPEND_COMMON}
        >=sys-apps/baselayout-2.2
        lvm? (
                virtual/tmpfiles
                thin? ( sys-block/thin-provisioning-tools )
-       )"
-# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
-DEPEND="${DEPEND_COMMON}
+       )
+"
+# note: thin-0.3.0 is required to avoid --disable-thin_check_needs_check
+DEPEND="
+       ${DEPEND_COMMON}
        static? (
                lvm? (
                        dev-libs/libaio[static-libs]
@@ -48,10 +53,13 @@ DEPEND="${DEPEND_COMMON}
                        readline? ( sys-libs/readline[static-libs] )
                )
                selinux? ( sys-libs/libselinux[static-libs] )
-       )"
+       )
+       valgrind? ( >=dev-util/valgrind-3.6 )
+"
 BDEPEND="
        sys-devel/autoconf-archive
-       virtual/pkgconfig"
+       virtual/pkgconfig
+"
 
 PATCHES=(
        # Gentoo specific modification(s):
@@ -160,6 +168,7 @@ src_configure() {
                $(use_enable systemd app-machineid)
                $(use_enable systemd systemd-journal)
                $(use_with systemd systemd-run "/usr/bin/systemd-run")
+               $(use_enable valgrind valgrind-pool)
                --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
                CLDFLAGS="${LDFLAGS}"
        )

diff --git a/sys-fs/lvm2/metadata.xml b/sys-fs/lvm2/metadata.xml
index e668a8bb6fae..de0118331fb3 100644
--- a/sys-fs/lvm2/metadata.xml
+++ b/sys-fs/lvm2/metadata.xml
@@ -14,6 +14,7 @@
                        If your system uses LVM2 for managing disks and 
partitions, enable this flag.
                </flag>
                <flag name="sanlock">Enable lvmlockd with support for 
sanlock</flag>
+               <flag name="valgrind">Make Valgrind 
(<pkg>dev-util/valgrind</pkg>) aware of LVM2's pool allocator.</flag>
        </use>
        <upstream>
                <remote-id type="cpe">cpe:/a:heinz_mauelshagen:lvm2</remote-id>

Reply via email to