1 |
hollow 08/03/04 10:59:28 |
2 |
|
3 |
Modified: depend.apache.eclass |
4 |
Log: |
5 |
add has_apache; cleanup |
6 |
|
7 |
Revision Changes Path |
8 |
1.44 eclass/depend.apache.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/depend.apache.eclass?rev=1.44&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/depend.apache.eclass?rev=1.44&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/depend.apache.eclass?r1=1.43&r2=1.44 |
13 |
|
14 |
Index: depend.apache.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/depend.apache.eclass,v |
17 |
retrieving revision 1.43 |
18 |
retrieving revision 1.44 |
19 |
diff -u -r1.43 -r1.44 |
20 |
--- depend.apache.eclass 6 Feb 2008 23:45:13 -0000 1.43 |
21 |
+++ depend.apache.eclass 4 Mar 2008 10:59:27 -0000 1.44 |
22 |
@@ -1,9 +1,10 @@ |
23 |
# Copyright 1999-2007 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/depend.apache.eclass,v 1.43 2008/02/06 23:45:13 hollow Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/depend.apache.eclass,v 1.44 2008/03/04 10:59:27 hollow Exp $ |
27 |
|
28 |
# @ECLASS: depend.apache.eclass |
29 |
-# @MAINTAINER: apache-devs@g.o |
30 |
+# @MAINTAINER: |
31 |
+# apache-devs@g.o |
32 |
# @BLURB: Functions to allow ebuilds to depend on apache |
33 |
# @DESCRIPTION: |
34 |
# This eclass handles depending on apache in a sane way and provides information |
35 |
@@ -21,18 +22,18 @@ |
36 |
# Here is an example of an ebuild depending on apache: |
37 |
# |
38 |
# @CODE |
39 |
-# DEPEND="virtual/Perl-CGI" |
40 |
-# RDEPEND="${DEPEND}" |
41 |
-# need_apache2 |
42 |
+# DEPEND="virtual/Perl-CGI" |
43 |
+# RDEPEND="${DEPEND}" |
44 |
+# need_apache2 |
45 |
# @CODE |
46 |
# |
47 |
# Another example which demonstrates non-standard IUSE options for optional |
48 |
# apache support: |
49 |
# |
50 |
# @CODE |
51 |
-# DEPEND="server? ( virtual/Perl-CGI )" |
52 |
-# RDEPEND="${DEPEND}" |
53 |
-# want_apache2 server |
54 |
+# DEPEND="server? ( virtual/Perl-CGI )" |
55 |
+# RDEPEND="${DEPEND}" |
56 |
+# want_apache2 server |
57 |
# @CODE |
58 |
|
59 |
inherit multilib |
60 |
@@ -154,7 +155,7 @@ |
61 |
DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_DEPEND} )" |
62 |
RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_DEPEND} )" |
63 |
|
64 |
- if use ${myiuse} ; then |
65 |
+ if use ${myiuse}; then |
66 |
_init_apache2 |
67 |
else |
68 |
_init_no_apache |
69 |
@@ -175,7 +176,7 @@ |
70 |
DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )" |
71 |
RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )" |
72 |
|
73 |
- if use ${myiuse} ; then |
74 |
+ if use ${myiuse}; then |
75 |
_init_apache2 |
76 |
else |
77 |
_init_no_apache |
78 |
@@ -212,6 +213,21 @@ |
79 |
_init_apache2 |
80 |
} |
81 |
|
82 |
+# @FUNCTION: has_apache |
83 |
+# @DESCRIPTION: |
84 |
+# An ebuild calls this to get runtime variables for an indirect apache |
85 |
+# dependency without USE-flag, in which case want_apache does not work. |
86 |
+# DO NOT call this function in global scope. |
87 |
+has_apache() { |
88 |
+ debug-print-function $FUNCNAME $* |
89 |
+ |
90 |
+ if has_version '>=www-servers/apache-2'; then |
91 |
+ _init_apache2 |
92 |
+ else |
93 |
+ _init_no_apache |
94 |
+ fi |
95 |
+} |
96 |
+ |
97 |
# @FUNCTION: has_apache_threads |
98 |
# @USAGE: [myflag] |
99 |
# @DESCRIPTION: |
100 |
@@ -221,13 +237,13 @@ |
101 |
has_apache_threads() { |
102 |
debug-print-function $FUNCNAME $* |
103 |
|
104 |
- if ! built_with_use www-servers/apache threads ; then |
105 |
+ if ! built_with_use www-servers/apache threads; then |
106 |
return |
107 |
fi |
108 |
|
109 |
local myflag="${1:-threads}" |
110 |
|
111 |
- if ! use ${myflag} ; then |
112 |
+ if ! use ${myflag}; then |
113 |
echo |
114 |
eerror "You need to enable USE flag '${myflag}' to build a thread-safe version" |
115 |
eerror "of ${CATEGORY}/${PN} for use with www-servers/apache" |
116 |
@@ -244,14 +260,14 @@ |
117 |
has_apache_threads_in() { |
118 |
debug-print-function $FUNCNAME $* |
119 |
|
120 |
- if ! built_with_use www-servers/apache threads ; then |
121 |
+ if ! built_with_use www-servers/apache threads; then |
122 |
return |
123 |
fi |
124 |
|
125 |
local myforeign="$1" |
126 |
local myflag="${2:-threads}" |
127 |
|
128 |
- if ! built_with_use ${myforeign} ${myflag} ; then |
129 |
+ if ! built_with_use ${myforeign} ${myflag}; then |
130 |
echo |
131 |
eerror "You need to enable USE flag '${myflag}' in ${myforeign} to" |
132 |
eerror "build a thread-safe version of ${CATEGORY}/${PN} for use" |
133 |
|
134 |
|
135 |
|
136 |
-- |
137 |
gentoo-commits@l.g.o mailing list |