commit:     fff54f89818785bb2fa31a463a6242b285bf45a8
Author:     Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 21 14:57:05 2016 +0000
Commit:     Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
CommitDate: Sun Aug 21 15:01:35 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fff54f89

sys-fs/multipath-tools: fix systemd version detection (bug #590604)

Package-Manager: portage-2.3.0

 sys-fs/multipath-tools/multipath-tools-0.6.2-r1.ebuild | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/sys-fs/multipath-tools/multipath-tools-0.6.2-r1.ebuild 
b/sys-fs/multipath-tools/multipath-tools-0.6.2-r1.ebuild
index 3ec454b..f5044df 100644
--- a/sys-fs/multipath-tools/multipath-tools-0.6.2-r1.ebuild
+++ b/sys-fs/multipath-tools/multipath-tools-0.6.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -30,10 +30,16 @@ PATCHES=(
        "${FILESDIR}"/${PN}-0.6.2-makefile.patch
 )
 
+get_systemd_pv() {
+       use systemd && \
+               $(tc-getPKG_CONFIG) --modversion systemd
+}
+
 src_compile() {
        # LIBDM_API_FLUSH involves grepping files in /usr/include,
        # so force the test to go the way we want #411337.
-       emake LIBDM_API_FLUSH=1 CC="$(tc-getCC)" SYSTEMD=$(usex systemd 1 "")
+       emake \
+               LIBDM_API_FLUSH=1 CC="$(tc-getCC)" SYSTEMD="$(get_systemd_pv)"
 }
 
 src_install() {
@@ -42,7 +48,7 @@ src_install() {
        dodir /sbin /usr/share/man/man{5,8}
        emake \
                DESTDIR="${D}" \
-               SYSTEMD=$(usex systemd 1 "") \
+               SYSTEMD=$(get_systemd_pv) \
                unitdir="$(systemd_get_systemunitdir)" \
                libudevdir='${prefix}'/"${udevdir}" \
                install

Reply via email to