Line
Link Here
|
0 |
-- eclass/depend.apache.eclass |
0 |
++ eclass/depend.apache.eclass |
Lines 1-4
Link Here
|
1 |
# Copyright 1999-2007 Gentoo Foundation |
1 |
# Copyright 1999-2009 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/eclass/depend.apache.eclass,v 1.44 2008/03/04 10:59:27 hollow Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/eclass/depend.apache.eclass,v 1.44 2008/03/04 10:59:27 hollow Exp $ |
4 |
|
4 |
|
Lines 34-39
Link Here
|
34 |
# DEPEND="server? ( virtual/Perl-CGI )" |
34 |
# DEPEND="server? ( virtual/Perl-CGI )" |
35 |
# RDEPEND="${DEPEND}" |
35 |
# RDEPEND="${DEPEND}" |
36 |
# want_apache2 server |
36 |
# want_apache2 server |
|
|
37 |
# |
38 |
# pkg_setup() { |
39 |
# apache2_optional_init server |
40 |
# } |
37 |
# @CODE |
41 |
# @CODE |
38 |
|
42 |
|
39 |
inherit multilib |
43 |
inherit multilib |
Lines 137-142
Link Here
|
137 |
# @DESCRIPTION: |
141 |
# @DESCRIPTION: |
138 |
# An ebuild calls this to get the dependency information for optional apache |
142 |
# An ebuild calls this to get the dependency information for optional apache |
139 |
# support. If the myiuse parameter is not given it defaults to apache2. |
143 |
# support. If the myiuse parameter is not given it defaults to apache2. |
|
|
144 |
# An ebuild should additionally call apache2_optional_init() in pkg_setup(). |
140 |
want_apache() { |
145 |
want_apache() { |
141 |
debug-print-function $FUNCNAME $* |
146 |
debug-print-function $FUNCNAME $* |
142 |
want_apache2 "$@" |
147 |
want_apache2 "$@" |
Lines 147-152
Link Here
|
147 |
# @DESCRIPTION: |
152 |
# @DESCRIPTION: |
148 |
# An ebuild calls this to get the dependency information for optional apache-2.x |
153 |
# An ebuild calls this to get the dependency information for optional apache-2.x |
149 |
# support. If the myiuse parameter is not given it defaults to apache2. |
154 |
# support. If the myiuse parameter is not given it defaults to apache2. |
|
|
155 |
# An ebuild should additionally call apache2_optional_init() in pkg_setup(). |
150 |
want_apache2() { |
156 |
want_apache2() { |
151 |
debug-print-function $FUNCNAME $* |
157 |
debug-print-function $FUNCNAME $* |
152 |
|
158 |
|
Lines 154-165
Link Here
|
154 |
IUSE="${IUSE} ${myiuse}" |
160 |
IUSE="${IUSE} ${myiuse}" |
155 |
DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_DEPEND} )" |
161 |
DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_DEPEND} )" |
156 |
RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_DEPEND} )" |
162 |
RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_DEPEND} )" |
157 |
|
|
|
158 |
if use ${myiuse}; then |
159 |
_init_apache2 |
160 |
else |
161 |
_init_no_apache |
162 |
fi |
163 |
} |
163 |
} |
164 |
|
164 |
|
165 |
# @FUNCTION: want_apache2_2 |
165 |
# @FUNCTION: want_apache2_2 |
Lines 168-173
Link Here
|
168 |
# An ebuild calls this to get the dependency information for optional |
168 |
# An ebuild calls this to get the dependency information for optional |
169 |
# apache-2.2.x support. If the myiuse parameter is not given it defaults to |
169 |
# apache-2.2.x support. If the myiuse parameter is not given it defaults to |
170 |
# apache2. |
170 |
# apache2. |
|
|
171 |
# An ebuild should additionally call apache2_optional_init() in pkg_setup(). |
171 |
want_apache2_2() { |
172 |
want_apache2_2() { |
172 |
debug-print-function $FUNCNAME $* |
173 |
debug-print-function $FUNCNAME $* |
173 |
|
174 |
|
Lines 175-181
Link Here
|
175 |
IUSE="${IUSE} ${myiuse}" |
176 |
IUSE="${IUSE} ${myiuse}" |
176 |
DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )" |
177 |
DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )" |
177 |
RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )" |
178 |
RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )" |
|
|
179 |
} |
178 |
|
180 |
|
|
|
181 |
# @FUNCTION: apache2_optional_init |
182 |
# @USAGE: [myiuse] |
183 |
# @DESCRIPTION: |
184 |
# An ebuild calls this in pkg_setup() to initialize variables for optional |
185 |
# apache-2.x support. If the myiuse parameter is not given it defaults to |
186 |
# apache2. |
187 |
apache2_optional_init() { |
188 |
debug-print-function $FUNCNAME $* |
189 |
|
190 |
if [[ "${EBUILD_PHASE}" != "setup" ]]; then |
191 |
die "apache2_optional_init() should be called in pkg_setup()" |
192 |
fi |
193 |
|
194 |
local myiuse=${1:-apache2} |
179 |
if use ${myiuse}; then |
195 |
if use ${myiuse}; then |
180 |
_init_apache2 |
196 |
_init_apache2 |
181 |
else |
197 |
else |