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

Diff of /eclass/phpconfutils.eclass

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

Revision 1.1 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.1 2006/03/24 23:05:49 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#
393 local x 396 local x
394 local my_found="0" 397 local my_found="0"
395 398
396 for x in ${CONFUTILS_MISSING_DEPS} ; do 399 for x in ${CONFUTILS_MISSING_DEPS} ; do
397 if useq "${x}" || phpconfutils_usecheck "${x}" ; then 400 if useq "${x}" || phpconfutils_usecheck "${x}" ; then
398 ewarn "USE flag ${x} enables support for software not present in Portage" 401 ewarn "USE flag ${x} enables support for software not present in Portage!"
399 my_found="1" 402 my_found="1"
400 fi 403 fi
401 done 404 done
402 405
403 if [[ "${my_found}" == "1" ]] ; then 406 if [[ "${my_found}" == "1" ]] ; then
404 ewarn 407 ewarn
405 ewarn "This ebuild will continue, but if you haven't already installed the" 408 ewarn "This ebuild will continue, but if you haven't already installed the"
406 ewarn "software required to satisfy the list above, this package will probably" 409 ewarn "software required to satisfy the list above, this package will probably"
407 ewarn "fail to compile later on." 410 ewarn "fail to compile later on."
411 ewarn "*DO NOT* file bugs about compile failures or issues you're having"
412 ewarn "when using one of those flags, as we aren't able to support them."
413 ewarn "|=|=|=|=|=|=| You are on your own if you use them! |=|=|=|=|=|=|"
408 ewarn 414 ewarn
409 sleep 5 415 sleep 5
410 fi 416 fi
411} 417}
412 418

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

  ViewVC Help
Powered by ViewVC 1.1.20