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

Diff of /eclass/confutils.eclass

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

Revision 1.1 Revision 1.2
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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/confutils.eclass,v 1.1 2004/06/27 16:05:26 stuart Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/confutils.eclass,v 1.2 2004/07/14 21:24:06 stuart Exp $
4# 4#
5# eclass/confutils.eclass 5# eclass/confutils.eclass
6# Utility functions to help with configuring a package 6# Utility functions to help with configuring a package
7# 7#
8# Based on Stuart's work for the PHP 5 eclass 8# Based on Stuart's work for the PHP 5 eclass
11# <stuart@gentoo.org> 11# <stuart@gentoo.org>
12# 12#
13# ======================================================================== 13# ========================================================================
14 14
15IUSE="$IUSE shared" 15IUSE="$IUSE shared"
16
17# ========================================================================
18
19# list of USE flags that need deps that aren't yet in Portage
20# this list was originally added for PHP
21
22CONFUTILS_MISSING_DEPS="adabas birdstep qdbm empress empress-bcs frontbase hyperwave-api informix ingres interbase mcve mnogosearch msession msql oci8 oracle7 ovirmos pfpro sapdb"
16 23
17# ======================================================================== 24# ========================================================================
18# confutils_init () 25# confutils_init ()
19# 26#
20# Call this function from your src_compile() function to initialise 27# Call this function from your src_compile() function to initialise
74# 81#
75# Use this function to automatically complain to the user if a USE flag 82# Use this function to automatically complain to the user if a USE flag
76# depends on another USE flag that hasn't been enabled 83# depends on another USE flag that hasn't been enabled
77# 84#
78# $1 - flag that depends on other flags 85# $1 - flag that depends on other flags
79# $2 - error message to show 86# $2 .. - the flags that must be set for $1 to be valid
80# $3 .. -
81 87
82confutils_use_depend_all () { 88confutils_use_depend_all () {
83 if ! useq $1 ; then 89 if ! useq $1 ; then
84 return 90 return
85 fi 91 fi
117# 123#
118# Use this function to automatically complain to the user if a USE flag 124# Use this function to automatically complain to the user if a USE flag
119# depends on another USE flag that hasn't been enabled 125# depends on another USE flag that hasn't been enabled
120# 126#
121# $1 - flag that depends on other flags 127# $1 - flag that depends on other flags
122# $2 - error message to show 128# $2 .. - flags that must be set for $1 to be valid
123# $3 .. -
124 129
125confutils_use_depend_any () { 130confutils_use_depend_any () {
126 if ! useq $1 ; then 131 if ! useq $1 ; then
127 return 132 return
128 fi 133 fi
247 my_conf="${my_conf} --with-$1$my_shared" 252 my_conf="${my_conf} --with-$1$my_shared"
248 else 253 else
249 my_conf="${my_conf} --without-$1" 254 my_conf="${my_conf} --without-$1"
250 fi 255 fi
251} 256}
257
258# ========================================================================
259# confutils_warn_about_external_deps
260
261confutils_warn_about_missing_deps ()
262{
263 local x
264 local my_found=0
265
266 for x in $CONFUTILS_MISSING_DEPS ; do
267 if useq $x ; then
268 ewarn "USE flag $x enables support for software not in Portage"
269 my_found=1
270 fi
271 done
272
273 if [ "$my_found" = "1" ]; then
274 ewarn
275 ewarn "This ebuild will continue, but if you haven't already installed the"
276 ewarn "software required to satisfy the list above, this package will probably"
277 ewarn "fail to compile."
278 ewarn
279 sleep 5
280 fi
281}

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

  ViewVC Help
Powered by ViewVC 1.1.20