/[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.33 Revision 1.34
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.33 2007/07/29 16:36:23 phreak Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/depend.apache.eclass,v 1.34 2007/09/08 14:06:12 hollow Exp $
4 4
5inherit multilib 5inherit multilib
6 6
7# This eclass handles depending on apache in a sane way and providing 7# This eclass handles depending on apache in a sane way and providing
8# information about where certain interfaces are located. 8# information about where certain interfaces are located.
105 105
106NEED_APACHE_DEPEND="${APACHE2_DEPEND}" 106NEED_APACHE_DEPEND="${APACHE2_DEPEND}"
107WANT_APACHE_DEPEND="apache2? ( ${APACHE2_DEPEND} )" 107WANT_APACHE_DEPEND="apache2? ( ${APACHE2_DEPEND} )"
108 108
109#### 109####
110## apr_config/apu_config
111##
112## Version magic to get the correct apr-config/apu-config
113## based on the (probably) installed version of apache.
114## This is needed to get modules to link to the same apr/apu
115## as apache (i.e. link 0.9 for 2.0, 1.x for 2.2)
116####
117apr_config() {
118 local default="${1:-1}"
119 if [[ "${USE_APACHE}" == "2" ]]; then
120 if has_version ${APACHE2_0_DEPEND}; then
121 echo apr-config
122 else
123 echo apr-1-config
124 fi
125 else
126 if [[ "${default}" == "0" ]]; then
127 echo apr-config
128 elif [[ "${default}" == "1" ]]; then
129 echo apr-1-config
130 else
131 die "Unknown version specifier: ${default}"
132 fi
133 fi
134}
135
136apu_config() {
137 local default="${1:-1}"
138 if [[ "${USE_APACHE}" == "2" ]]; then
139 if has_version ${APACHE2_0_DEPEND}; then
140 echo apu-config
141 else
142 echo apu-1-config
143 fi
144 else
145 if [[ "${default}" == "0" ]]; then
146 echo apu-config
147 elif [[ "${default}" == "1" ]]; then
148 echo apu-1-config
149 else
150 die "Unknown version specifier: ${default}"
151 fi
152 fi
153}
154
155####
110# uses_apache1() - !!! DEPRECATED !!! 156# uses_apache1() - !!! DEPRECATED !!!
111#### 157####
112 158
113uses_apache1() { 159uses_apache1() {
114 debug-print-function $FUNCNAME $* 160 debug-print-function $FUNCNAME $*
115 # WARNING: Do not use these variables with anything that is put 161 # WARNING: Do not use these variables with anything that is put
116 # into the dependency cache (DEPEND/RDEPEND/etc) 162 # into the dependency cache (DEPEND/RDEPEND/etc)
117 APACHE_VERSION="1" 163 APACHE_VERSION="1"
118 APXS="${APXS1}" 164 APXS="${APXS1}"
119 USE_APACHE2="" 165 USE_APACHE="1"
120 APACHECTL="${APACHECTL1}" 166 APACHECTL="${APACHECTL1}"
121 APACHE_BASEDIR="${APACHE1_BASEDIR}" 167 APACHE_BASEDIR="${APACHE1_BASEDIR}"
122 APACHE_CONFDIR="${APACHE1_CONFDIR}" 168 APACHE_CONFDIR="${APACHE1_CONFDIR}"
123 APACHE_MODULES_CONFDIR="${APACHE1_MODULES_CONFDIR}" 169 APACHE_MODULES_CONFDIR="${APACHE1_MODULES_CONFDIR}"
124 APACHE_VHOSTSDIR="${APACHE1_VHOSTSDIR}" 170 APACHE_VHOSTSDIR="${APACHE1_VHOSTSDIR}"
134uses_apache2() { 180uses_apache2() {
135 debug-print-function $FUNCNAME $* 181 debug-print-function $FUNCNAME $*
136 # WARNING: Do not use these variables with anything that is put 182 # WARNING: Do not use these variables with anything that is put
137 # into the dependency cache (DEPEND/RDEPEND/etc) 183 # into the dependency cache (DEPEND/RDEPEND/etc)
138 APACHE_VERSION="2" 184 APACHE_VERSION="2"
139 USE_APACHE2="2" 185 USE_APACHE="2"
140 APXS="${APXS2}" 186 APXS="${APXS2}"
141 APACHECTL="${APACHECTL2}" 187 APACHECTL="${APACHECTL2}"
142 APACHE_BASEDIR="${APACHE2_BASEDIR}" 188 APACHE_BASEDIR="${APACHE2_BASEDIR}"
143 APACHE_CONFDIR="${APACHE2_CONFDIR}" 189 APACHE_CONFDIR="${APACHE2_CONFDIR}"
144 APACHE_MODULES_CONFDIR="${APACHE2_MODULES_CONFDIR}" 190 APACHE_MODULES_CONFDIR="${APACHE2_MODULES_CONFDIR}"
147} 193}
148 194
149doesnt_use_apache() { 195doesnt_use_apache() {
150 debug-print-function $FUNCNAME $* 196 debug-print-function $FUNCNAME $*
151 APACHE_VERSION="0" 197 APACHE_VERSION="0"
152 USE_APACHE="" 198 USE_APACHE="0"
153} 199}
154 200
155#### 201####
156## need_apache1 - !!! DEPRECATED !!! 202## need_apache1 - !!! DEPRECATED !!!
157#### 203####

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

  ViewVC Help
Powered by ViewVC 1.1.20