| 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.eclass,v 1.103 2011/05/16 03:44:26 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.106 2011/08/22 19:39:52 vapier Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: autotools.eclass |
5 | # @ECLASS: autotools.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # base-system@gentoo.org |
7 | # base-system@gentoo.org |
| 8 | # @BLURB: Regenerates auto* build scripts |
8 | # @BLURB: Regenerates auto* build scripts |
| … | |
… | |
| 21 | |
21 | |
| 22 | # @ECLASS-VARIABLE: WANT_AUTOMAKE |
22 | # @ECLASS-VARIABLE: WANT_AUTOMAKE |
| 23 | # @DESCRIPTION: |
23 | # @DESCRIPTION: |
| 24 | # The major version of automake your package needs |
24 | # The major version of automake your package needs |
| 25 | : ${WANT_AUTOMAKE:=latest} |
25 | : ${WANT_AUTOMAKE:=latest} |
|
|
26 | |
|
|
27 | # @ECLASS-VARIABLE: WANT_LIBTOOL |
|
|
28 | # @DESCRIPTION: |
|
|
29 | # Do you want libtool? Valid values here are "latest" and "none". |
|
|
30 | : ${WANT_LIBTOOL:=latest} |
| 26 | |
31 | |
| 27 | # @ECLASS-VARIABLE: _LATEST_AUTOMAKE |
32 | # @ECLASS-VARIABLE: _LATEST_AUTOMAKE |
| 28 | # @INTERNAL |
33 | # @INTERNAL |
| 29 | # @DESCRIPTION: |
34 | # @DESCRIPTION: |
| 30 | # CONSTANT! |
35 | # CONSTANT! |
| … | |
… | |
| 51 | case ${WANT_AUTOCONF} in |
56 | case ${WANT_AUTOCONF} in |
| 52 | none) _autoconf_atom="" ;; # some packages don't require autoconf at all |
57 | none) _autoconf_atom="" ;; # some packages don't require autoconf at all |
| 53 | 2.1) _autoconf_atom="=sys-devel/autoconf-${WANT_AUTOCONF}*" ;; |
58 | 2.1) _autoconf_atom="=sys-devel/autoconf-${WANT_AUTOCONF}*" ;; |
| 54 | # if you change the “latest” version here, change also autotools_run_tool |
59 | # if you change the “latest” version here, change also autotools_run_tool |
| 55 | latest|2.5) _autoconf_atom=">=sys-devel/autoconf-2.61" ;; |
60 | latest|2.5) _autoconf_atom=">=sys-devel/autoconf-2.61" ;; |
| 56 | *) _autoconf_atom="INCORRECT-WANT_AUTOCONF-SETTING-IN-EBUILD" ;; |
61 | *) die "Invalid WANT_AUTOCONF value '${WANT_AUTOCONF}'" ;; |
| 57 | esac |
62 | esac |
| 58 | export WANT_AUTOCONF |
63 | export WANT_AUTOCONF |
| 59 | fi |
64 | fi |
| 60 | |
65 | |
|
|
66 | _libtool_atom="sys-devel/libtool" |
|
|
67 | if [[ -n ${WANT_LIBTOOL} ]] ; then |
|
|
68 | case ${WANT_LIBTOOL} in |
|
|
69 | none) _libtool_atom="" ;; |
|
|
70 | latest) ;; |
|
|
71 | *) die "Invalid WANT_LIBTOOL value '${WANT_LIBTOOL}'" ;; |
|
|
72 | esac |
|
|
73 | export WANT_LIBTOOL |
|
|
74 | fi |
|
|
75 | |
| 61 | AUTOTOOLS_DEPEND="${_automake_atom} ${_autoconf_atom}" |
76 | AUTOTOOLS_DEPEND="${_automake_atom} ${_autoconf_atom} ${_libtool_atom}" |
| 62 | [[ ${CATEGORY}/${PN} != "sys-devel/libtool" ]] && AUTOTOOLS_DEPEND="${AUTOTOOLS_DEPEND} >=sys-devel/libtool-2.2.6b" |
|
|
| 63 | RDEPEND="" |
77 | RDEPEND="" |
| 64 | |
78 | |
| 65 | # @ECLASS-VARIABLE: AUTOTOOLS_AUTO_DEPEND |
79 | # @ECLASS-VARIABLE: AUTOTOOLS_AUTO_DEPEND |
| 66 | # @DESCRIPTION: |
80 | # @DESCRIPTION: |
| 67 | # Set to 'no' to disable automatically adding to DEPEND. This lets |
81 | # Set to 'no' to disable automatically adding to DEPEND. This lets |
| … | |
… | |
| 285 | |
299 | |
| 286 | local STDERR_TARGET="${T}/$1.out" |
300 | local STDERR_TARGET="${T}/$1.out" |
| 287 | # most of the time, there will only be one run, but if there are |
301 | # most of the time, there will only be one run, but if there are |
| 288 | # more, make sure we get unique log filenames |
302 | # more, make sure we get unique log filenames |
| 289 | if [[ -e ${STDERR_TARGET} ]] ; then |
303 | if [[ -e ${STDERR_TARGET} ]] ; then |
|
|
304 | local i=1 |
|
|
305 | while :; do |
| 290 | STDERR_TARGET="${T}/$1-$$.out" |
306 | STDERR_TARGET="${T}/$1-${i}.out" |
|
|
307 | [[ -e ${STDERR_TARGET} ]] || break |
|
|
308 | : $(( i++ )) |
|
|
309 | done |
| 291 | fi |
310 | fi |
| 292 | |
311 | |
| 293 | printf "***** $1 *****\n***** PWD: ${PWD}\n***** $*\n\n" > "${STDERR_TARGET}" |
312 | printf "***** $1 *****\n***** PWD: ${PWD}\n***** $*\n\n" > "${STDERR_TARGET}" |
| 294 | |
313 | |
| 295 | ebegin "Running $@" |
314 | ebegin "Running $@" |