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

Diff of /eclass/depend.php.eclass

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

Revision 1.13 Revision 1.15
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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.php.eclass,v 1.13 2006/04/20 12:15:35 chtekk Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/depend.php.eclass,v 1.15 2006/05/13 15:39:11 chtekk Exp $
4# 4#
5# ======================================================================== 5# ========================================================================
6# 6#
7# depend.php.eclass 7# depend.php.eclass
8# functions to allow ebuilds to depend on php4 and/or php5 8# functions to allow ebuilds to depend on php4 and/or php5
193 has_php 193 has_php
194 194
195 local missing_use="" 195 local missing_use=""
196 local x 196 local x
197 197
198 einfo "Checking for required PHP feature(s):" 198 einfo "Checking for required PHP feature(s) ..."
199 199
200 for x in $@ ; do 200 for x in $@ ; do
201 if ! built_with_use =${PHP_PKG} ${x} && ! phpconfutils_built_with_use =${PHP_PKG} ${x} ; then 201 if ! built_with_use =${PHP_PKG} ${x} && ! phpconfutils_built_with_use =${PHP_PKG} ${x} ; then
202 einfo " Discovered missing USE flag ${x}" 202 einfo " Discovered missing USE flag: ${x}"
203 missing_use="${missing_use} ${x}" 203 missing_use="${missing_use} ${x}"
204 fi 204 fi
205 done 205 done
206 206
207 if [[ -z ${missing_use} ]] ; then 207 if [[ -z "${missing_use}" ]] ; then
208 if [[ -z "${PHPCHECKNODIE}" ]] ; then
208 return 209 return
210 else
211 return 0
209 fi 212 fi
213 fi
210 214
215 if [[ -z "${PHPCHECKNODIE}" ]] ; then
211 eerror 216 eerror
212 eerror "${PHP_PKG} needs to be re-installed with all of the following" 217 eerror "${PHP_PKG} needs to be re-installed with all of the following"
213 eerror "USE flags enabled:" 218 eerror "USE flags enabled:"
214 eerror 219 eerror
215 eerror " $@" 220 eerror " $@"
216 eerror 221 eerror
217 die "Missing PHP USE flags found" 222 die "Missing PHP USE flags found"
223 else
224 return 1
225 fi
218} 226}
219 227
220# Call this function from pkg_setup if your package requires PHP compiled 228# Call this function from pkg_setup if your package requires PHP compiled
221# with any of specified USE flags 229# with any of specified USE flags
222# 230#
229 has_php 237 has_php
230 238
231 local missing_use="" 239 local missing_use=""
232 local x 240 local x
233 241
234 einfo "Checking for required PHP feature(s):" 242 einfo "Checking for required PHP feature(s) ..."
235 243
236 for x in $@ ; do 244 for x in $@ ; do
237 if built_with_use =${PHP_PKG} ${x} || phpconfutils_built_with_use =${PHP_PKG} ${x} ; then 245 if built_with_use =${PHP_PKG} ${x} || phpconfutils_built_with_use =${PHP_PKG} ${x} ; then
238 einfo " USE flag ${x} is enabled, ok ..." 246 einfo " USE flag ${x} is enabled, ok ..."
239 return 247 return
240 else 248 else
241 missing_use="${missing_use} ${x}" 249 missing_use="${missing_use} ${x}"
242 fi 250 fi
243 done 251 done
244 252
245 if [[ -z ${missing_use} ]] ; then 253 if [[ -z "${missing_use}" ]] ; then
254 if [[ -z "${PHPCHECKNODIE}" ]] ; then
246 return 255 return
256 else
257 return 0
247 fi 258 fi
259 fi
248 260
261 if [[ -z "${PHPCHECKNODIE}" ]] ; then
249 eerror 262 eerror
250 eerror "${PHP_PKG} needs to be re-installed with any of the following" 263 eerror "${PHP_PKG} needs to be re-installed with any of the following"
251 eerror "USE flags enabled:" 264 eerror "USE flags enabled:"
252 eerror 265 eerror
253 eerror " $@" 266 eerror " $@"
254 eerror 267 eerror
255 die "Missing PHP USE flags found" 268 die "Missing PHP USE flags found"
269 else
270 return 1
271 fi
256} 272}
257 273
258# ======================================================================== 274# ========================================================================
259# has_*() functions 275# has_*() functions
260# 276#

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.20