Gentoo Archives: gentoo-commits

From: "Benedikt Boehm (hollow)" <hollow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: depend.apache.eclass
Date: Sat, 02 Feb 2008 14:31:46
Message-Id: E1JLJPD-0005F7-9Y@stork.gentoo.org
1 hollow 08/02/02 14:31:43
2
3 Modified: depend.apache.eclass
4 Log:
5 cleanup/sanitize depend.apache.eclass wrt #208033
6
7 Revision Changes Path
8 1.37 eclass/depend.apache.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/depend.apache.eclass?rev=1.37&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/depend.apache.eclass?rev=1.37&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/depend.apache.eclass?r1=1.36&r2=1.37
13
14 Index: depend.apache.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/depend.apache.eclass,v
17 retrieving revision 1.36
18 retrieving revision 1.37
19 diff -u -r1.36 -r1.37
20 --- depend.apache.eclass 2 Feb 2008 12:53:52 -0000 1.36
21 +++ depend.apache.eclass 2 Feb 2008 14:31:42 -0000 1.37
22 @@ -1,6 +1,6 @@
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.36 2008/02/02 12:53:52 hollow Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/depend.apache.eclass,v 1.37 2008/02/02 14:31:42 hollow Exp $
27
28 # @ECLASS: depend.apache.eclass
29 # @MAINTAINER: apache-devs@g.o
30 @@ -54,16 +54,16 @@
31 # @DESCRIPTION:
32 # Path where we install modules
33
34 +# @ECLASS-VARIABLE: APACHE_DEPEND
35 +# @DESCRIPTION:
36 +# Dependencies for Apache
37 +APACHE_DEPEND="www-servers/apache"
38 +
39 # @ECLASS-VARIABLE: APACHE2_DEPEND
40 # @DESCRIPTION:
41 # Dependencies for Apache 2.x
42 APACHE2_DEPEND="=www-servers/apache-2*"
43
44 -# @ECLASS-VARIABLE: APACHE2_0_DEPEND
45 -# @DESCRIPTION:
46 -# Dependencies for Apache 2.0.x
47 -APACHE2_0_DEPEND="=www-servers/apache-2.0*"
48 -
49 # @ECLASS-VARIABLE: APACHE2_2_DEPEND
50 # @DESCRIPTION:
51 # Dependencies for Apache 2.2.x
52 @@ -72,16 +72,23 @@
53 # @ECLASS-VARIABLE: WANT_APACHE_DEPEND
54 # @DESCRIPTION:
55 # Dependency magic based on useflag to use the right DEPEND
56 -WANT_APACHE_DEPEND="apache2? ( ${APACHE2_DEPEND} )"
57 +WANT_APACHE_DEPEND="apache2? ( ${APACHE_DEPEND} )"
58 +
59 +# @ECLASS-VARIABLE: WANT_APACHE2_DEPEND
60 +# @DESCRIPTION:
61 +# Dependency magic based on useflag to use the right DEPEND
62 +WANT_APACHE2_DEPEND="apache2? ( ${APACHE2_DEPEND} )"
63 +
64 +# @ECLASS-VARIABLE: WANT_APACHE2_2_DEPEND
65 +# @DESCRIPTION:
66 +# Dependency magic based on useflag to use the right DEPEND
67 +WANT_APACHE2_2_DEPEND="apache2? ( ${APACHE2_2_DEPEND} )"
68
69 # ==============================================================================
70 # INTERNAL FUNCTIONS
71 # ==============================================================================
72
73 -# @FUNCTION: uses_apache2
74 -# @DESCRIPTION:
75 -# sets up all of the environment variables required for an apache2 module
76 -uses_apache2() {
77 +_init_apache2() {
78 debug-print-function $FUNCNAME $*
79
80 # WARNING: Do not use these variables with anything that is put
81 @@ -96,14 +103,9 @@
82 APACHE_MODULESDIR="${APACHE_BASEDIR}/modules"
83 }
84
85 -# @FUNCTION: doesnt_use_apache
86 -# @DESCRIPTION:
87 -# sets up all of the environment variables required for optional apache usage
88 -doesnt_use_apache() {
89 +_init_no_apache() {
90 debug-print-function $FUNCNAME $*
91 -
92 APACHE_VERSION="0"
93 - USE_APACHE="0"
94 }
95
96 # ==============================================================================
97 @@ -114,61 +116,76 @@
98 # @DESCRIPTION:
99 # An ebuild calls this to get the dependency information for optional apache-2.x
100 # support.
101 -want_apache() {
102 +want_apache2() {
103 debug-print-function $FUNCNAME $*
104
105 IUSE="${IUSE} apache2"
106 - DEPEND="${DEPEND} ${WANT_APACHE_DEPEND}"
107 - RDEPEND="${RDEPEND} ${WANT_APACHE_DEPEND}"
108 + DEPEND="${DEPEND} ${WANT_APACHE2_DEPEND}"
109 + RDEPEND="${RDEPEND} ${WANT_APACHE2_DEPEND}"
110
111 if use apache2 ; then
112 - uses_apache2
113 + _init_apache2
114 else
115 - doesnt_use_apache
116 + _init_no_apache
117 fi
118 }
119
120 -# @FUNCTION: need_apache2
121 +# @FUNCTION: want_apache
122 # @DESCRIPTION:
123 -# An ebuild calls this to get the dependency information for apache-2.x. An
124 -# ebuild should use this in order for future changes to the build infrastructure
125 -# to happen seamlessly. All an ebuild needs to do is include the line
126 -# need_apache2 somewhere.
127 -need_apache2() {
128 +# An ebuild calls this to get the dependency information for optional
129 +# apache-2.2.x support.
130 +want_apache2_2() {
131 debug-print-function $FUNCNAME $*
132
133 - DEPEND="${DEPEND} ${APACHE2_DEPEND}"
134 - RDEPEND="${RDEPEND} ${APACHE2_DEPEND}"
135 - uses_apache2
136 + IUSE="${IUSE} apache2"
137 + DEPEND="${DEPEND} ${WANT_APACHE2_2_DEPEND}"
138 + RDEPEND="${RDEPEND} ${WANT_APACHE2_2_DEPEND}"
139 +
140 + if use apache2 ; then
141 + _init_apache2
142 + else
143 + _init_no_apache
144 + fi
145 }
146
147 -# @FUNCTION: need_apache2_0
148 +# @FUNCTION: want_apache
149 # @DESCRIPTION:
150 -# Works like need_apache2 above, but its used by modules that only support
151 -# apache 2.0 and do not work with higher versions.
152 -need_apache2_0() {
153 +# An ebuild calls this to get the dependency information for optional apache
154 +# support.
155 +want_apache() {
156 + want_apache2
157 +}
158 +
159 +# @FUNCTION: need_apache2
160 +# @DESCRIPTION:
161 +# Works like need_apache, but its used by modules that only support
162 +# apache 2.x and do not work with other versions.
163 +need_apache2() {
164 debug-print-function $FUNCNAME $*
165
166 - DEPEND="${DEPEND} ${APACHE2_0_DEPEND}"
167 - RDEPEND="${RDEPEND} ${APACHE2_0_DEPEND}"
168 - uses_apache2
169 + DEPEND="${DEPEND} ${APACHE2_DEPEND}"
170 + RDEPEND="${RDEPEND} ${APACHE2_DEPEND}"
171 + _init_apache2
172 }
173
174 # @FUNCTION: need_apache2_2
175 # @DESCRIPTION:
176 -# Works like need_apache2 above, but its used by modules that only support
177 -# apache 2.2 and do not work with lower versions.
178 +# Works like need_apache, but its used by modules that only support
179 +# apache 2.2.x and do not work with other versions.
180 need_apache2_2() {
181 debug-print-function $FUNCNAME $*
182
183 DEPEND="${DEPEND} ${APACHE2_2_DEPEND}"
184 RDEPEND="${RDEPEND} ${APACHE2_2_DEPEND}"
185 - uses_apache2
186 + _init_apache2
187 }
188
189 # @FUNCTION: need_apache
190 # @DESCRIPTION:
191 -# Legacy alias for need_apache2
192 +# An ebuild calls this to get the dependency information for apache. An
193 +# ebuild should use this in order for future changes to the build infrastructure
194 +# to happen seamlessly. All an ebuild needs to do is include the line
195 +# need_apache somewhere.
196 need_apache() {
197 need_apache2
198 }
199
200
201
202 --
203 gentoo-commits@l.g.o mailing list