diff options
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/Manifest.gz | bin | 41498 -> 41496 bytes | |||
-rw-r--r-- | eclass/systemd.eclass | 21 |
2 files changed, 21 insertions, 0 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz Binary files differindex 496fc5c1676e..15358835221c 100644 --- a/eclass/Manifest.gz +++ b/eclass/Manifest.gz 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: |