1 |
commit: 332e64d0413a0ef8bec096c2f6c1a04829e4752c |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 30 06:36:22 2011 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 30 06:45:15 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=332e64d0 |
7 |
|
8 |
[eclass] Introduce systemd_to_myeconfargs(). |
9 |
|
10 |
--- |
11 |
eclass/systemd.eclass | 17 ++++++++++++++++- |
12 |
1 files changed, 16 insertions(+), 1 deletions(-) |
13 |
|
14 |
diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass |
15 |
index 517026a..d392fc3 100644 |
16 |
--- a/eclass/systemd.eclass |
17 |
+++ b/eclass/systemd.eclass |
18 |
@@ -64,9 +64,24 @@ systemd_enable_service() { |
19 |
# @DESCRIPTION: |
20 |
# Output '--with-systemdsystemunitdir' as expected by systemd-aware configure |
21 |
# scripts. This function always succeeds. Its output may be quoted in order |
22 |
-# to preserve whitespace in paths. |
23 |
+# to preserve whitespace in paths. systemd_to_myeconfargs() is preferred over |
24 |
+# this function. |
25 |
systemd_with_unitdir() { |
26 |
debug-print-function ${FUNCNAME} "${@}" |
27 |
|
28 |
echo -n --with-systemdsystemunitdir="$(systemd_get_unitdir)" |
29 |
} |
30 |
+ |
31 |
+# @FUNCTION: systemd_to_myeconfargs |
32 |
+# @DESCRIPTION: |
33 |
+# Add '--with-systemdsystemunitdir' as expected by systemd-aware configure |
34 |
+# scripts to the myeconfargs variable used by autotools-utils eclass. Handles |
35 |
+# quoting automatically. |
36 |
+systemd_to_myeconfargs() { |
37 |
+ debug-print-function ${FUNCNAME} "${@}" |
38 |
+ |
39 |
+ myeconfargs=( |
40 |
+ "${myeconfargs[@]}" |
41 |
+ --with-systemdsystemunitdir="$(systemd_get_unitdir)" |
42 |
+ ) |
43 |
+} |