/[gentoo-x86]/eclass/phpconfutils.eclass
Gentoo

Diff of /eclass/phpconfutils.eclass

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

Revision 1.2 Revision 1.3
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 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/phpconfutils.eclass,v 1.2 2006/04/18 12:21:14 chtekk Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/phpconfutils.eclass,v 1.3 2006/04/20 12:15:35 chtekk Exp $
4# 4#
5# ######################################################################## 5# ########################################################################
6# 6#
7# eclass/phpconfutils.eclass 7# eclass/phpconfutils.eclass
8# Utility functions to help with configuring PHP 8# Utility functions to help with configuring PHP
91 shift 91 shift
92 local fail_msg="$1" 92 local fail_msg="$1"
93 shift 93 shift
94 94
95 local required_flags="$@" 95 local required_flags="$@"
96 local default_flag="$1"
96 local success="0" 97 local success="0"
97 98
98 while [[ -n "$1" ]] ; do 99 while [[ -n "$1" ]] ; do
99 if useq "$1" ; then 100 if useq "$1" ; then
100 einfo "${success_msg} $1" 101 einfo "${success_msg} $1"
110 return 111 return
111 fi 112 fi
112 113
113 # If we get here, then none of the required USE flags were enabled 114 # If we get here, then none of the required USE flags were enabled
114 eerror 115 eerror
115 eerror "You *must* enable one or more of the following USE flags:" 116 eerror "You should enable one or more of the following USE flags:"
116 eerror " ${required_flags}" 117 eerror " ${required_flags}"
117 eerror 118 eerror
118 eerror "You can do this by enabling these flags in /etc/portage/package.use:" 119 eerror "You can do this by enabling these flags in /etc/portage/package.use:"
119 eerror " =${CATEGORY}/${PN}-${PVR} ${required_flags}" 120 eerror " =${CATEGORY}/${PN}-${PVR} ${required_flags}"
120 eerror 121 eerror
121 die "Missing USE flags found" 122 eerror "The ${default_flag} USE flag was automatically enabled now."
123 eerror
124 PHPCONFUTILS_AUTO_USE="${PHPCONFUTILS_AUTO_USE} ${default_flag}"
122} 125}
123 126
124# ======================================================================== 127# ========================================================================
125# phpconfutils_use_conflict() 128# phpconfutils_use_conflict()
126# 129#

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20