diff options
author | Michał Górny <mgorny@gentoo.org> | 2011-06-16 16:39:18 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2011-06-16 16:39:18 +0000 |
commit | ec905e9281bad20a5cafe8dddb173e8409f197d5 (patch) | |
tree | 88f94ae1a227e57972eae8c437df915111c1f718 /eclass | |
parent | Revision bump now that we have a flawless version, and remove the previous tw... (diff) | |
download | gentoo-2-ec905e9281bad20a5cafe8dddb173e8409f197d5.tar.gz gentoo-2-ec905e9281bad20a5cafe8dddb173e8409f197d5.tar.bz2 gentoo-2-ec905e9281bad20a5cafe8dddb173e8409f197d5.zip |
Support passing an optional configure option name to systemd_with_unitdir.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/systemd.eclass | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass index 1cee9e0fd09a..34106223795d 100644 --- a/eclass/systemd.eclass +++ b/eclass/systemd.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.3 2011/06/11 06:06:43 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.4 2011/06/16 16:39:18 mgorny Exp $ # @ECLASS: systemd.eclass # @MAINTAINER: @@ -88,15 +88,22 @@ systemd_enable_service() { } # @FUNCTION: systemd_with_unitdir +# @USAGE: [configure option] # @DESCRIPTION: # Output '--with-systemdsystemunitdir' as expected by systemd-aware configure # scripts. This function always succeeds. Its output may be quoted in order # to preserve whitespace in paths. systemd_to_myeconfargs() is preferred over # this function. +# +# If upstream does use invalid configure option to handle installing systemd +# units (e.g. `--with-systemdunitdir'), you can pass the 'suffix' as an optional +# argument to this function (`$(systemd_with_unitdir systemdunitdir)'). Please +# remember to report a bug upstream as well. systemd_with_unitdir() { debug-print-function ${FUNCNAME} "${@}" + local optname=${1:-systemdsystemunitdir} - echo -n --with-systemdsystemunitdir="$(systemd_get_unitdir)" + echo -n --with-${optname}="$(systemd_get_unitdir)" } # @FUNCTION: systemd_to_myeconfargs |