/[gentoo-x86]/eclass/depend.apache.eclass
Gentoo

Diff of /eclass/depend.apache.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.38 Revision 1.39
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 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.38 2008/02/03 11:51:36 hollow Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/depend.apache.eclass,v 1.39 2008/02/03 14:12:44 hollow Exp $
4 4
5# @ECLASS: depend.apache.eclass 5# @ECLASS: depend.apache.eclass
6# @MAINTAINER: apache-devs@gentoo.org 6# @MAINTAINER: apache-devs@gentoo.org
7# @BLURB: Functions to allow ebuilds to depend on apache 7# @BLURB: Functions to allow ebuilds to depend on apache
8# @DESCRIPTION: 8# @DESCRIPTION:
67# @ECLASS-VARIABLE: APACHE2_2_DEPEND 67# @ECLASS-VARIABLE: APACHE2_2_DEPEND
68# @DESCRIPTION: 68# @DESCRIPTION:
69# Dependencies for Apache 2.2.x 69# Dependencies for Apache 2.2.x
70APACHE2_2_DEPEND="=www-servers/apache-2.2*" 70APACHE2_2_DEPEND="=www-servers/apache-2.2*"
71 71
72# @ECLASS-VARIABLE: WANT_APACHE_DEPEND
73# @DESCRIPTION:
74# Dependency magic based on useflag to use the right DEPEND
75WANT_APACHE_DEPEND="apache2? ( ${APACHE_DEPEND} )"
76
77# @ECLASS-VARIABLE: WANT_APACHE2_DEPEND
78# @DESCRIPTION:
79# Dependency magic based on useflag to use the right DEPEND
80WANT_APACHE2_DEPEND="apache2? ( ${APACHE2_DEPEND} )"
81
82# @ECLASS-VARIABLE: WANT_APACHE2_2_DEPEND
83# @DESCRIPTION:
84# Dependency magic based on useflag to use the right DEPEND
85WANT_APACHE2_2_DEPEND="apache2? ( ${APACHE2_2_DEPEND} )"
86
87# ============================================================================== 72# ==============================================================================
88# INTERNAL FUNCTIONS 73# INTERNAL FUNCTIONS
89# ============================================================================== 74# ==============================================================================
90 75
91_init_apache2() { 76_init_apache2() {
120# An ebuild calls this to get the dependency information for optional apache-2.x 105# An ebuild calls this to get the dependency information for optional apache-2.x
121# support. 106# support.
122want_apache2() { 107want_apache2() {
123 debug-print-function $FUNCNAME $* 108 debug-print-function $FUNCNAME $*
124 109
125 IUSE="${IUSE} apache2" 110 local myiuse=${1:-apache2}
111 IUSE="${IUSE} ${myiuse}"
126 DEPEND="${DEPEND} ${WANT_APACHE2_DEPEND}" 112 DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_DEPEND} )"
127 RDEPEND="${RDEPEND} ${WANT_APACHE2_DEPEND}" 113 RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_DEPEND} )"
128 114
129 if use apache2 ; then 115 if use ${myiuse} ; then
130 _init_apache2 116 _init_apache2
131 else 117 else
132 _init_no_apache 118 _init_no_apache
133 fi 119 fi
134} 120}
138# An ebuild calls this to get the dependency information for optional 124# An ebuild calls this to get the dependency information for optional
139# apache-2.2.x support. 125# apache-2.2.x support.
140want_apache2_2() { 126want_apache2_2() {
141 debug-print-function $FUNCNAME $* 127 debug-print-function $FUNCNAME $*
142 128
143 IUSE="${IUSE} apache2" 129 local myiuse=${1:-apache2}
130 IUSE="${IUSE} ${myiuse}"
144 DEPEND="${DEPEND} ${WANT_APACHE2_2_DEPEND}" 131 DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )"
145 RDEPEND="${RDEPEND} ${WANT_APACHE2_2_DEPEND}" 132 RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )"
146 133
147 if use apache2 ; then 134 if use ${myiuse} ; then
148 _init_apache2 135 _init_apache2
149 else 136 else
150 _init_no_apache 137 _init_no_apache
151 fi 138 fi
152} 139}
154# @FUNCTION: want_apache 141# @FUNCTION: want_apache
155# @DESCRIPTION: 142# @DESCRIPTION:
156# An ebuild calls this to get the dependency information for optional apache 143# An ebuild calls this to get the dependency information for optional apache
157# support. 144# support.
158want_apache() { 145want_apache() {
146 debug-print-function $FUNCNAME $*
159 want_apache2 147 want_apache2 "$@"
160} 148}
161 149
162# @FUNCTION: need_apache2 150# @FUNCTION: need_apache2
163# @DESCRIPTION: 151# @DESCRIPTION:
164# Works like need_apache, but its used by modules that only support 152# Works like need_apache, but its used by modules that only support
188# An ebuild calls this to get the dependency information for apache. An 176# An ebuild calls this to get the dependency information for apache. An
189# ebuild should use this in order for future changes to the build infrastructure 177# ebuild should use this in order for future changes to the build infrastructure
190# to happen seamlessly. All an ebuild needs to do is include the line 178# to happen seamlessly. All an ebuild needs to do is include the line
191# need_apache somewhere. 179# need_apache somewhere.
192need_apache() { 180need_apache() {
181 debug-print-function $FUNCNAME $*
193 need_apache2 182 need_apache2
194} 183}

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39

  ViewVC Help
Powered by ViewVC 1.1.20