/[gentoo-x86]/eclass/autotools-utils.eclass
Gentoo

Diff of /eclass/autotools-utils.eclass

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

Revision 1.25 Revision 1.29
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2011 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/autotools-utils.eclass,v 1.25 2011/10/14 20:28:29 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.29 2011/11/27 09:57:20 mgorny Exp $
4 4
5# @ECLASS: autotools-utils.eclass 5# @ECLASS: autotools-utils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Maciej Mrozowski <reavertm@gentoo.org> 7# Maciej Mrozowski <reavertm@gentoo.org>
8# Michał Górny <mgorny@gentoo.org> 8# Michał Górny <mgorny@gentoo.org>
9# @BLURB: common ebuild functions for autotools-based packages 9# @BLURB: common ebuild functions for autotools-based packages
10# @DESCRIPTION: 10# @DESCRIPTION:
11# autotools-utils.eclass is autotools.eclass(5) and base.eclass(5) wrapper 11# autotools-utils.eclass is autotools.eclass(5) and base.eclass(5) wrapper
12# providing all inherited features along with econf arguments as Bash array, 12# providing all inherited features along with econf arguments as Bash array,
13# out of source build with overridable build dir location, static archives 13# out of source build with overridable build dir location, static archives
14# handling, libtool files removal, enable/disable debug handling. 14# handling, libtool files removal.
15#
16# Please note note that autotools-utils does not support mixing of its phase
17# functions with regular econf/emake calls. If necessary, please call
18# autotools-utils_src_compile instead of the latter.
15# 19#
16# @EXAMPLE: 20# @EXAMPLE:
17# Typical ebuild using autotools-utils.eclass: 21# Typical ebuild using autotools-utils.eclass:
18# 22#
19# @CODE 23# @CODE
199 if [[ ${removing} ]]; then 203 if [[ ${removing} ]]; then
200 einfo "Removing unnecessary ${f#${D%/}} (${removing})" 204 einfo "Removing unnecessary ${f#${D%/}} (${removing})"
201 rm -f "${f}" || die 205 rm -f "${f}" || die
202 fi 206 fi
203 done 207 done
208
209 # check for invalid eclass use
210 # this is the most commonly used function, so do it here
211 _check_build_dir
212 if [[ ! -d "${AUTOTOOLS_BUILD_DIR}" ]]; then
213 eqawarn "autotools-utils used but autotools-utils_src_configure was never called."
214 eqawarn "This is not supported and never was. Please report a bug against"
215 eqawarn "the offending ebuild. This will become a fatal error in a near future."
216 fi
204} 217}
205 218
206# @FUNCTION: autotools-utils_src_prepare 219# @FUNCTION: autotools-utils_src_prepare
207# @DESCRIPTION: 220# @DESCRIPTION:
208# The src_prepare function. 221# The src_prepare function.
230 [[ -z ${myeconfargs+1} || $(declare -p myeconfargs) == 'declare -a'* ]] \ 243 [[ -z ${myeconfargs+1} || $(declare -p myeconfargs) == 'declare -a'* ]] \
231 || die 'autotools-utils.eclass: myeconfargs has to be an array.' 244 || die 'autotools-utils.eclass: myeconfargs has to be an array.'
232 245
233 # Common args 246 # Common args
234 local econfargs=() 247 local econfargs=()
235
236 # Handle debug found in IUSE
237 if in_iuse debug; then
238 local debugarg=$(use_enable debug)
239 if ! has "${debugarg}" "${myeconfargs[@]}"; then
240 eqawarn 'Implicit $(use_enable debug) for IUSE="debug" is no longer supported.'
241 eqawarn 'Please add the necessary arg to myeconfargs if requested.'
242 eqawarn 'The autotools-utils eclass will stop warning about it on Oct 15th.'
243 fi
244 fi
245 248
246 # Handle static-libs found in IUSE, disable them by default 249 # Handle static-libs found in IUSE, disable them by default
247 if in_iuse static-libs; then 250 if in_iuse static-libs; then
248 econfargs+=( 251 econfargs+=(
249 --enable-shared 252 --enable-shared

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.29

  ViewVC Help
Powered by ViewVC 1.1.20