| 1 |
On Sun, 2012-05-20 at 06:32 -0400, Mike Frysinger wrote: |
| 2 |
> i've extended eautoreconf to automatically call autopoint when the package |
| 3 |
> uses gettext. the configure check might seem naïve, but this is how autoreconf |
| 4 |
> itself does it. this hopefully shouldn't break any packages (at least, none |
| 5 |
> that weren't already broken), but if you guys start seeing eautoreconf |
| 6 |
> failures where there were none before, feel free to cc base-system. |
| 7 |
> -mike |
| 8 |
> |
| 9 |
> --- autotools.eclass |
| 10 |
> +++ autotools.eclass |
| 11 |
> @@ -162,6 +162,9 @@ eautoreconf() { |
| 12 |
> einfo "Running eautoreconf in '${PWD}' ..." |
| 13 |
> [[ -n ${auxdir}${macdir} ]] && mkdir -p ${auxdir} ${macdir} |
| 14 |
> eaclocal |
| 15 |
> + if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? ; then |
| 16 |
> + eautopoint --force |
| 17 |
> + fi |
| 18 |
> [[ ${CHOST} == *-darwin* ]] && g=g |
| 19 |
> if ${LIBTOOLIZE:-${g}libtoolize} -n --install >& /dev/null ; then |
| 20 |
> _elibtoolize --copy --force --install |
| 21 |
|
| 22 |
This change broke many gnome-related packages, see bug #416789. You |
| 23 |
cannot assume that every package that uses AM_GNU_GETTEXT_VERSION wants |
| 24 |
(just) autopoint; there are also packages that use intltool (to be run |
| 25 |
after autopoint) or glib-gettext (in which case autopoint should not be |
| 26 |
used at all). |
| 27 |
|
| 28 |
Unless there are major nacks, I intend to apply the following patch |
| 29 |
today in order to unbreak gnome. The patch follows the logic in |
| 30 |
gnome2-live.eclass (in the gnome overlay) and gnome-autogen.sh, and is |
| 31 |
therefore known to work. |
| 32 |
|
| 33 |
Note that the patch adds a build dependency on intltool by default. This |
| 34 |
should not be a problem because (1) intltool is keyworded everywhere, |
| 35 |
and (2) basically every gentoo build machine already has it installed. |
| 36 |
|
| 37 |
Index: autotools.eclass |
| 38 |
=================================================================== |
| 39 |
RCS file: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v |
| 40 |
retrieving revision 1.138 |
| 41 |
diff -u -r1.138 autotools.eclass |
| 42 |
--- autotools.eclass 20 May 2012 13:01:22 -0000 1.138 |
| 43 |
+++ autotools.eclass 21 May 2012 06:31:48 -0000 |
| 44 |
@@ -28,6 +28,11 @@ |
| 45 |
# The major version of automake your package needs |
| 46 |
: ${WANT_AUTOMAKE:=latest} |
| 47 |
|
| 48 |
+# @ECLASS-VARIABLE: WANT_INTLTOOL |
| 49 |
+# @DESCRIPTION: |
| 50 |
+# Do you want intltool? Valid values here are "latest" and "none". |
| 51 |
+: ${WANT_INTLTOOL:=latest} |
| 52 |
+ |
| 53 |
# @ECLASS-VARIABLE: WANT_LIBTOOL |
| 54 |
# @DESCRIPTION: |
| 55 |
# Do you want libtool? Valid values here are "latest" and "none". |
| 56 |
@@ -77,6 +82,16 @@ |
| 57 |
export WANT_AUTOCONF |
| 58 |
fi |
| 59 |
|
| 60 |
+_intltool_atom="dev-util/intltool" |
| 61 |
+if [[ -n ${WANT_INTLTOOL} ]] ; then |
| 62 |
+ case ${WANT_INTLTOOL} in |
| 63 |
+ none) _intltool_atom="" ;; |
| 64 |
+ latest) ;; |
| 65 |
+ *) die "Invalid WANT_INTLTOOL value '${WANT_INTLTOOL}'" ;; |
| 66 |
+ esac |
| 67 |
+ export WANT_LIBTOOL |
| 68 |
+fi |
| 69 |
+ |
| 70 |
_libtool_atom="sys-devel/libtool" |
| 71 |
if [[ -n ${WANT_LIBTOOL} ]] ; then |
| 72 |
case ${WANT_LIBTOOL} in |
| 73 |
@@ -87,7 +102,7 @@ |
| 74 |
export WANT_LIBTOOL |
| 75 |
fi |
| 76 |
|
| 77 |
-AUTOTOOLS_DEPEND="${_automake_atom} ${_autoconf_atom} ${_libtool_atom}" |
| 78 |
+AUTOTOOLS_DEPEND="${_automake_atom} ${_autoconf_atom} ${_intltool_atom} ${_libtool_atom}" |
| 79 |
RDEPEND="" |
| 80 |
|
| 81 |
# @ECLASS-VARIABLE: AUTOTOOLS_AUTO_DEPEND |
| 82 |
@@ -163,9 +178,13 @@ |
| 83 |
[[ -n ${m4dirs} ]] && mkdir -p ${m4dirs} |
| 84 |
|
| 85 |
eaclocal |
| 86 |
- if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? ; then |
| 87 |
+ # Follow gnome2-live.eclass and gnome-autogen.sh logic; bug #416789 |
| 88 |
+ if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? && ! grep -q '^AM_GLIB_GNU_GETTEXT' configure.?? ; then |
| 89 |
eautopoint --force |
| 90 |
fi |
| 91 |
+ if grep -q "^AC_PROG_INTLTOOL\|^IT_PROG_INTLTOOL" configure.?? ; then |
| 92 |
+ autotools_run_tool intltoolize --force --copy --automake |
| 93 |
+ fi |
| 94 |
_elibtoolize --install --copy --force |
| 95 |
eautoconf |
| 96 |
eautoheader |