summaryrefslogtreecommitdiff
path: root/eclass/systemd.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-12-10 09:09:16 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-12-10 09:09:16 +0000
commitf45955e60d4da9b7f4a1088c98042f9c06669039 (patch)
tree25ff171e8813c8b99f79a424124ed214a9520850 /eclass/systemd.eclass
parentb9ef7cab6264f1838672efbbcb4ba3b3abd5323f (diff)
gentoo resync : 10.12.2017
Diffstat (limited to 'eclass/systemd.eclass')
-rw-r--r--eclass/systemd.eclass21
1 files changed, 21 insertions, 0 deletions
diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass
index 63ff5609589d..b86646052bef 100644
--- a/eclass/systemd.eclass
+++ b/eclass/systemd.eclass
@@ -45,6 +45,7 @@ _systemd_get_dir() {
if $(tc-getPKG_CONFIG) --exists systemd; then
d=$($(tc-getPKG_CONFIG) --variable="${variable}" systemd) || die
+ d=${d#${EPREFIX}}
else
d=${fallback}
fi
@@ -121,6 +122,26 @@ systemd_get_utildir() {
echo "${EPREFIX}$(_systemd_get_utildir)"
}
+# @FUNCTION: _systemd_get_systemgeneratordir
+# @INTERNAL
+# @DESCRIPTION:
+# Get unprefixed systemgeneratordir.
+_systemd_get_systemgeneratordir() {
+ _systemd_get_dir systemdsystemgeneratordir /usr/lib/systemd/system-generators
+}
+
+# @FUNCTION: systemd_get_systemgeneratordir
+# @DESCRIPTION:
+# Output the path for the systemd system generator directory (not including
+# ${D}). This function always succeeds, even if systemd is not
+# installed.
+systemd_get_systemgeneratordir() {
+ has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
+ debug-print-function ${FUNCNAME} "${@}"
+
+ echo "${EPREFIX}$(_systemd_get_systemgeneratordir)"
+}
+
# @FUNCTION: systemd_dounit
# @USAGE: <unit>...
# @DESCRIPTION: