/[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.37 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.37 2008/02/02 14:31:42 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() {
93 78
94 # WARNING: Do not use these variables with anything that is put 79 # WARNING: Do not use these variables with anything that is put
95 # into the dependency cache (DEPEND/RDEPEND/etc) 80 # into the dependency cache (DEPEND/RDEPEND/etc)
96 APACHE_VERSION="2" 81 APACHE_VERSION="2"
97 APXS="/usr/sbin/apxs2" 82 APXS="/usr/sbin/apxs2"
83 APACHE_BIN="/usr/sbin/apache2"
98 APACHECTL="/usr/sbin/apache2ctl" 84 APACHE_CTL="/usr/sbin/apache2ctl"
85 # legacy alias
86 APACHECTL="${APACHE_CTL}"
99 APACHE_BASEDIR="/usr/$(get_libdir)/apache2" 87 APACHE_BASEDIR="/usr/$(get_libdir)/apache2"
100 APACHE_CONFDIR="/etc/apache2" 88 APACHE_CONFDIR="/etc/apache2"
101 APACHE_MODULES_CONFDIR="${APACHE_CONFDIR}/modules.d" 89 APACHE_MODULES_CONFDIR="${APACHE_CONFDIR}/modules.d"
102 APACHE_VHOSTS_CONFDIR="${APACHE_CONFDIR}/vhosts.d" 90 APACHE_VHOSTS_CONFDIR="${APACHE_CONFDIR}/vhosts.d"
103 APACHE_MODULESDIR="${APACHE_BASEDIR}/modules" 91 APACHE_MODULESDIR="${APACHE_BASEDIR}/modules"
117# 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
118# support. 106# support.
119want_apache2() { 107want_apache2() {
120 debug-print-function $FUNCNAME $* 108 debug-print-function $FUNCNAME $*
121 109
122 IUSE="${IUSE} apache2" 110 local myiuse=${1:-apache2}
111 IUSE="${IUSE} ${myiuse}"
123 DEPEND="${DEPEND} ${WANT_APACHE2_DEPEND}" 112 DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_DEPEND} )"
124 RDEPEND="${RDEPEND} ${WANT_APACHE2_DEPEND}" 113 RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_DEPEND} )"
125 114
126 if use apache2 ; then 115 if use ${myiuse} ; then
127 _init_apache2 116 _init_apache2
128 else 117 else
129 _init_no_apache 118 _init_no_apache
130 fi 119 fi
131} 120}
135# An ebuild calls this to get the dependency information for optional 124# An ebuild calls this to get the dependency information for optional
136# apache-2.2.x support. 125# apache-2.2.x support.
137want_apache2_2() { 126want_apache2_2() {
138 debug-print-function $FUNCNAME $* 127 debug-print-function $FUNCNAME $*
139 128
140 IUSE="${IUSE} apache2" 129 local myiuse=${1:-apache2}
130 IUSE="${IUSE} ${myiuse}"
141 DEPEND="${DEPEND} ${WANT_APACHE2_2_DEPEND}" 131 DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )"
142 RDEPEND="${RDEPEND} ${WANT_APACHE2_2_DEPEND}" 132 RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )"
143 133
144 if use apache2 ; then 134 if use ${myiuse} ; then
145 _init_apache2 135 _init_apache2
146 else 136 else
147 _init_no_apache 137 _init_no_apache
148 fi 138 fi
149} 139}
151# @FUNCTION: want_apache 141# @FUNCTION: want_apache
152# @DESCRIPTION: 142# @DESCRIPTION:
153# 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
154# support. 144# support.
155want_apache() { 145want_apache() {
146 debug-print-function $FUNCNAME $*
156 want_apache2 147 want_apache2 "$@"
157} 148}
158 149
159# @FUNCTION: need_apache2 150# @FUNCTION: need_apache2
160# @DESCRIPTION: 151# @DESCRIPTION:
161# 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
185# 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
186# 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
187# 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
188# need_apache somewhere. 179# need_apache somewhere.
189need_apache() { 180need_apache() {
181 debug-print-function $FUNCNAME $*
190 need_apache2 182 need_apache2
191} 183}

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

  ViewVC Help
Powered by ViewVC 1.1.20