Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: autotools.eclass
Date: Thu, 07 Jun 2012 04:50:19
Message-Id: 20120607045004.45E7B2004B@flycatcher.gentoo.org
1 vapier 12/06/07 04:50:04
2
3 Modified: autotools.eclass
4 Log:
5 allow gtkdoc steps to be skipped if the tools are not installed #419979 -- if packages want these steps, they can DEPEND on the pkg in question; similarly, give a blanket pass to autopoint for embedded/USE=-nls systems that do not install the gettext package #417641
6
7 Revision Changes Path
8 1.145 eclass/autotools.eclass
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/autotools.eclass?rev=1.145&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/autotools.eclass?rev=1.145&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/autotools.eclass?r1=1.144&r2=1.145
13
14 Index: autotools.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v
17 retrieving revision 1.144
18 retrieving revision 1.145
19 diff -u -r1.144 -r1.145
20 --- autotools.eclass 6 Jun 2012 17:15:08 -0000 1.144
21 +++ autotools.eclass 7 Jun 2012 04:50:04 -0000 1.145
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2012 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.144 2012/06/06 17:15:08 mgorny Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.145 2012/06/07 04:50:04 vapier Exp $
27
28 # @ECLASS: autotools.eclass
29 # @MAINTAINER:
30 @@ -166,11 +166,11 @@
31 local i tools=(
32 # <tool> <was run> <command>
33 glibgettext false "autotools_run_tool glib-gettextize --copy --force"
34 - gettext false "eautopoint --force"
35 + gettext false "autotools_run_tool --at-missing autopoint --force"
36 # intltool must come after autopoint.
37 intltool false "autotools_run_tool intltoolize --automake --copy --force"
38 - gtkdoc false "autotools_run_tool gtkdocize --copy"
39 - gnomedoc false "autotools_run_tool gnome-doc-prepare --copy --force"
40 + gtkdoc false "autotools_run_tool --at-missing gtkdocize --copy"
41 + gnomedoc false "autotools_run_tool --at-missing gnome-doc-prepare --copy --force"
42 libtool false "_elibtoolize --install --copy --force"
43 )
44 for (( i = 0; i < ${#tools[@]}; i += 3 )) ; do
45 @@ -402,18 +402,19 @@
46 }
47
48 # @FUNCTION: autotools_run_tool
49 -# @USAGE: [--at-no-fail] [--at-m4flags] <autotool> [tool-specific flags]
50 +# @USAGE: [--at-no-fail] [--at-m4flags] [--at-missing] <autotool> [tool-specific flags]
51 # @INTERNAL
52 # @DESCRIPTION:
53 # Run the specified autotool helper, but do logging and error checking
54 # around it in the process.
55 autotools_run_tool() {
56 # Process our own internal flags first
57 - local autofail=true m4flags=false
58 + local autofail=true m4flags=false missing_ok=false
59 while [[ -n $1 ]] ; do
60 case $1 in
61 --at-no-fail) autofail=false;;
62 --at-m4flags) m4flags=true;;
63 + --at-missing) missing_ok=true;;
64 # whatever is left goes to the actual tool
65 *) break;;
66 esac
67 @@ -424,6 +425,11 @@
68 ewarn "QA Warning: running $1 in ${EBUILD_PHASE} phase"
69 fi
70
71 + if ${missing_ok} && ! type -P ${1} >/dev/null ; then
72 + einfo "Skipping '$*' due $1 not installed"
73 + return 0
74 + fi
75 +
76 autotools_env_setup
77
78 local STDERR_TARGET="${T}/$1.out"