public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] autotools.eclass:eautoreconf now runs autopoint for you
@ 2012-05-20 10:32 Mike Frysinger
  2012-05-20 12:19 ` Nirbheek Chauhan
  2012-05-21  6:41 ` Alexandre Rostovtsev
  0 siblings, 2 replies; 10+ messages in thread
From: Mike Frysinger @ 2012-05-20 10:32 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 830 bytes --]

i've extended eautoreconf to automatically call autopoint when the package 
uses gettext.  the configure check might seem naïve, but this is how autoreconf 
itself does it.  this hopefully shouldn't break any packages (at least, none 
that weren't already broken), but if you guys start seeing eautoreconf 
failures where there were none before, feel free to cc base-system.
-mike

--- autotools.eclass
+++ autotools.eclass
@@ -162,6 +162,9 @@ eautoreconf() {
 	einfo "Running eautoreconf in '${PWD}' ..."
 	[[ -n ${auxdir}${macdir} ]] && mkdir -p ${auxdir} ${macdir}
 	eaclocal
+	if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? ; then
+		eautopoint --force
+	fi
 	[[ ${CHOST} == *-darwin* ]] && g=g
 	if ${LIBTOOLIZE:-${g}libtoolize} -n --install >& /dev/null ; then
 		_elibtoolize --copy --force --install

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] autotools.eclass:eautoreconf now runs autopoint for you
  2012-05-20 10:32 [gentoo-dev] autotools.eclass:eautoreconf now runs autopoint for you Mike Frysinger
@ 2012-05-20 12:19 ` Nirbheek Chauhan
  2012-05-21  6:41 ` Alexandre Rostovtsev
  1 sibling, 0 replies; 10+ messages in thread
From: Nirbheek Chauhan @ 2012-05-20 12:19 UTC (permalink / raw
  To: gentoo-dev

On Sun, May 20, 2012 at 4:02 PM, Mike Frysinger <vapier@gentoo.org> wrote:
>
> i've extended eautoreconf to automatically call autopoint when the package
> uses gettext.  the configure check might seem naïve, but this is how
> autoreconf
> itself does it.  this hopefully shouldn't break any packages (at least,
> none
> that weren't already broken), but if you guys start seeing eautoreconf
> failures where there were none before, feel free to cc base-system.

We went through this cycle in the GNOME team while working on live ebuilds.

http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=blob;f=eclass/gnome2-live.eclass;h=897adf863cb3f653ed96f45b14b637f7af651b1a;hb=HEAD#l110

You might want to cherry-pick some of those?

Cheers,

--
~Nirbheek Chauhan

Gentoo GNOME+Mozilla Team



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] autotools.eclass:eautoreconf now runs autopoint for you
  2012-05-20 10:32 [gentoo-dev] autotools.eclass:eautoreconf now runs autopoint for you Mike Frysinger
  2012-05-20 12:19 ` Nirbheek Chauhan
@ 2012-05-21  6:41 ` Alexandre Rostovtsev
  2012-05-21  6:56   ` Alexandre Rostovtsev
                     ` (3 more replies)
  1 sibling, 4 replies; 10+ messages in thread
From: Alexandre Rostovtsev @ 2012-05-21  6:41 UTC (permalink / raw
  To: gentoo-dev

On Sun, 2012-05-20 at 06:32 -0400, Mike Frysinger wrote:
> i've extended eautoreconf to automatically call autopoint when the package 
> uses gettext.  the configure check might seem naïve, but this is how autoreconf 
> itself does it.  this hopefully shouldn't break any packages (at least, none 
> that weren't already broken), but if you guys start seeing eautoreconf 
> failures where there were none before, feel free to cc base-system.
> -mike
> 
> --- autotools.eclass
> +++ autotools.eclass
> @@ -162,6 +162,9 @@ eautoreconf() {
>  	einfo "Running eautoreconf in '${PWD}' ..."
>  	[[ -n ${auxdir}${macdir} ]] && mkdir -p ${auxdir} ${macdir}
>  	eaclocal
> +	if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? ; then
> +		eautopoint --force
> +	fi
>  	[[ ${CHOST} == *-darwin* ]] && g=g
>  	if ${LIBTOOLIZE:-${g}libtoolize} -n --install >& /dev/null ; then
>  		_elibtoolize --copy --force --install

This change broke many gnome-related packages, see bug #416789. You
cannot assume that every package that uses AM_GNU_GETTEXT_VERSION wants
(just) autopoint; there are also packages that use intltool (to be run
after autopoint) or glib-gettext (in which case autopoint should not be
used at all).

Unless there are major nacks, I intend to apply the following patch
today in order to unbreak gnome. The patch follows the logic in
gnome2-live.eclass (in the gnome overlay) and gnome-autogen.sh, and is
therefore known to work.

Note that the patch adds a build dependency on intltool by default. This
should not be a problem because (1) intltool is keyworded everywhere,
and (2) basically every gentoo build machine already has it installed.

Index: autotools.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v
retrieving revision 1.138
diff -u -r1.138 autotools.eclass
--- autotools.eclass	20 May 2012 13:01:22 -0000	1.138
+++ autotools.eclass	21 May 2012 06:31:48 -0000
@@ -28,6 +28,11 @@
 # The major version of automake your package needs
 : ${WANT_AUTOMAKE:=latest}
 
+# @ECLASS-VARIABLE: WANT_INTLTOOL
+# @DESCRIPTION:
+# Do you want intltool?  Valid values here are "latest" and "none".
+: ${WANT_INTLTOOL:=latest}
+
 # @ECLASS-VARIABLE: WANT_LIBTOOL
 # @DESCRIPTION:
 # Do you want libtool?  Valid values here are "latest" and "none".
@@ -77,6 +82,16 @@
 	export WANT_AUTOCONF
 fi
 
+_intltool_atom="dev-util/intltool"
+if [[ -n ${WANT_INTLTOOL} ]] ; then
+	case ${WANT_INTLTOOL} in
+		none)   _intltool_atom="" ;;
+		latest) ;;
+		*)      die "Invalid WANT_INTLTOOL value '${WANT_INTLTOOL}'" ;;
+	esac
+	export WANT_LIBTOOL
+fi
+
 _libtool_atom="sys-devel/libtool"
 if [[ -n ${WANT_LIBTOOL} ]] ; then
 	case ${WANT_LIBTOOL} in
@@ -87,7 +102,7 @@
 	export WANT_LIBTOOL
 fi
 
-AUTOTOOLS_DEPEND="${_automake_atom} ${_autoconf_atom} ${_libtool_atom}"
+AUTOTOOLS_DEPEND="${_automake_atom} ${_autoconf_atom} ${_intltool_atom} ${_libtool_atom}"
 RDEPEND=""
 
 # @ECLASS-VARIABLE: AUTOTOOLS_AUTO_DEPEND
@@ -163,9 +178,13 @@
 	[[ -n ${m4dirs} ]] && mkdir -p ${m4dirs}
 
 	eaclocal
-	if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? ; then
+	# Follow gnome2-live.eclass and gnome-autogen.sh logic; bug #416789
+	if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? && ! grep -q '^AM_GLIB_GNU_GETTEXT' configure.?? ; then
 		eautopoint --force
 	fi
+	if grep -q "^AC_PROG_INTLTOOL\|^IT_PROG_INTLTOOL" configure.?? ; then
+		autotools_run_tool intltoolize --force --copy --automake
+	fi
 	_elibtoolize --install --copy --force
 	eautoconf
 	eautoheader




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] autotools.eclass:eautoreconf now runs autopoint for you
  2012-05-21  6:41 ` Alexandre Rostovtsev
@ 2012-05-21  6:56   ` Alexandre Rostovtsev
  2012-05-21  8:19   ` Pacho Ramos
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Alexandre Rostovtsev @ 2012-05-21  6:56 UTC (permalink / raw
  To: gentoo-dev

On Mon, 2012-05-21 at 02:41 -0400, Alexandre Rostovtsev wrote:
> Index: autotools.eclass
> ===================================================================
> RCS file: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v
> retrieving revision 1.138
> diff -u -r1.138 autotools.eclass
> --- autotools.eclass	20 May 2012 13:01:22 -0000	1.138
> +++ autotools.eclass	21 May 2012 06:31:48 -0000
> @@ -28,6 +28,11 @@
>  # The major version of automake your package needs
>  : ${WANT_AUTOMAKE:=latest}
>  
> +# @ECLASS-VARIABLE: WANT_INTLTOOL
> +# @DESCRIPTION:
> +# Do you want intltool?  Valid values here are "latest" and "none".
> +: ${WANT_INTLTOOL:=latest}
> +
>  # @ECLASS-VARIABLE: WANT_LIBTOOL
>  # @DESCRIPTION:
>  # Do you want libtool?  Valid values here are "latest" and "none".
> @@ -77,6 +82,16 @@
>  	export WANT_AUTOCONF
>  fi
>  
> +_intltool_atom="dev-util/intltool"
> +if [[ -n ${WANT_INTLTOOL} ]] ; then
> +	case ${WANT_INTLTOOL} in
> +		none)   _intltool_atom="" ;;
> +		latest) ;;
> +		*)      die "Invalid WANT_INTLTOOL value '${WANT_INTLTOOL}'" ;;
> +	esac
> +	export WANT_LIBTOOL

Sorry, typo; should be

	export WANT_INTLTOOL

> +fi
> +
>  _libtool_atom="sys-devel/libtool"
>  if [[ -n ${WANT_LIBTOOL} ]] ; then
>  	case ${WANT_LIBTOOL} in
> @@ -87,7 +102,7 @@
>  	export WANT_LIBTOOL
>  fi
>  
> -AUTOTOOLS_DEPEND="${_automake_atom} ${_autoconf_atom} ${_libtool_atom}"
> +AUTOTOOLS_DEPEND="${_automake_atom} ${_autoconf_atom} ${_intltool_atom} ${_libtool_atom}"
>  RDEPEND=""
>  
>  # @ECLASS-VARIABLE: AUTOTOOLS_AUTO_DEPEND
> @@ -163,9 +178,13 @@
>  	[[ -n ${m4dirs} ]] && mkdir -p ${m4dirs}
>  
>  	eaclocal
> -	if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? ; then
> +	# Follow gnome2-live.eclass and gnome-autogen.sh logic; bug #416789
> +	if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? && ! grep -q '^AM_GLIB_GNU_GETTEXT' configure.?? ; then
>  		eautopoint --force
>  	fi
> +	if grep -q "^AC_PROG_INTLTOOL\|^IT_PROG_INTLTOOL" configure.?? ; then
> +		autotools_run_tool intltoolize --force --copy --automake
> +	fi
>  	_elibtoolize --install --copy --force
>  	eautoconf
>  	eautoheader
> 
> 





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] autotools.eclass:eautoreconf now runs autopoint for you
  2012-05-21  6:41 ` Alexandre Rostovtsev
  2012-05-21  6:56   ` Alexandre Rostovtsev
@ 2012-05-21  8:19   ` Pacho Ramos
  2012-05-21 15:36   ` Mike Frysinger
  2012-05-21 17:54   ` Mike Frysinger
  3 siblings, 0 replies; 10+ messages in thread
From: Pacho Ramos @ 2012-05-21  8:19 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]

El lun, 21-05-2012 a las 02:41 -0400, Alexandre Rostovtsev escribió:
> On Sun, 2012-05-20 at 06:32 -0400, Mike Frysinger wrote:
> > i've extended eautoreconf to automatically call autopoint when the package 
> > uses gettext.  the configure check might seem naïve, but this is how autoreconf 
> > itself does it.  this hopefully shouldn't break any packages (at least, none 
> > that weren't already broken), but if you guys start seeing eautoreconf 
> > failures where there were none before, feel free to cc base-system.
> > -mike
> > 
[...]
>  	eaclocal
> -	if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? ; then
> +	# Follow gnome2-live.eclass and gnome-autogen.sh logic; bug #416789
> +	if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? && ! grep -q '^AM_GLIB_GNU_GETTEXT' configure.?? ; then
>  		eautopoint --force
>  	fi
> +	if grep -q "^AC_PROG_INTLTOOL\|^IT_PROG_INTLTOOL" configure.?? ; then
> +		autotools_run_tool intltoolize --force --copy --automake
> +	fi
>  	_elibtoolize --install --copy --force
>  	eautoconf
>  	eautoheader
> 
> 
> 

With this change, we can start to no longer call "intltoolize --force
--copy --automake" directly in ebuilds I guess, no?

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] autotools.eclass:eautoreconf now runs autopoint for you
  2012-05-21  6:41 ` Alexandre Rostovtsev
  2012-05-21  6:56   ` Alexandre Rostovtsev
  2012-05-21  8:19   ` Pacho Ramos
@ 2012-05-21 15:36   ` Mike Frysinger
  2012-05-21 16:08     ` Alexandre Rostovtsev
  2012-05-21 17:54   ` Mike Frysinger
  3 siblings, 1 reply; 10+ messages in thread
From: Mike Frysinger @ 2012-05-21 15:36 UTC (permalink / raw
  To: gentoo-dev; +Cc: Alexandre Rostovtsev

[-- Attachment #1: Type: Text/Plain, Size: 2401 bytes --]

On Monday 21 May 2012 02:41:18 Alexandre Rostovtsev wrote:
> On Sun, 2012-05-20 at 06:32 -0400, Mike Frysinger wrote:
> > i've extended eautoreconf to automatically call autopoint when the
> > package uses gettext.  the configure check might seem naïve, but this is
> > how autoreconf itself does it.  this hopefully shouldn't break any
> > packages (at least, none that weren't already broken), but if you guys
> > start seeing eautoreconf failures where there were none before, feel
> > free to cc base-system. -mike
> > 
> > --- autotools.eclass
> > +++ autotools.eclass
> > @@ -162,6 +162,9 @@ eautoreconf() {
> > 
> >  	einfo "Running eautoreconf in '${PWD}' ..."
> >  	[[ -n ${auxdir}${macdir} ]] && mkdir -p ${auxdir} ${macdir}
> >  	eaclocal
> > 
> > +	if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? ; then
> > +		eautopoint --force
> > +	fi
> > 
> >  	[[ ${CHOST} == *-darwin* ]] && g=g
> >  	if ${LIBTOOLIZE:-${g}libtoolize} -n --install >& /dev/null ; then
> >  	
> >  		_elibtoolize --copy --force --install
> 
> This change broke many gnome-related packages, see bug #416789. You
> cannot assume that every package that uses AM_GNU_GETTEXT_VERSION wants
> (just) autopoint;

two things:
 - eautoreconf acts like autoreconf which means it can assume that use of 
AM_GNU_GETTEXT_VERSION implies use of `autopoint`
 - it doesn't assume *just* autopoint -- nothing is stopping you from running 
any other random tools you like (such as intltool)

> there are also packages that use intltool (to be run
> after autopoint) or glib-gettext (in which case autopoint should not be
> used at all).

so attempting to run `autoreconf` in those packages fails ?

> +# @ECLASS-VARIABLE: WANT_INTLTOOL
> +# @DESCRIPTION:
> +# Do you want intltool?  Valid values here are "latest" and "none".
> +: ${WANT_INTLTOOL:=latest}
> ...
> +_intltool_atom="dev-util/intltool"
> +if [[ -n ${WANT_INTLTOOL} ]] ; then
> +	case ${WANT_INTLTOOL} in
> +		none)   _intltool_atom="" ;;
> +		latest) ;;
> +		*)      die "Invalid WANT_INTLTOOL value '${WANT_INTLTOOL}'" ;;
> +	esac
> +	export WANT_LIBTOOL
> +fi
> ...
> -AUTOTOOLS_DEPEND="${_automake_atom} ${_autoconf_atom} ${_libtool_atom}"
> +AUTOTOOLS_DEPEND="${_automake_atom} ${_autoconf_atom} ${_intltool_atom}

no.  this adds intltool as a dependency to every package inherting this 
eclass.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] autotools.eclass:eautoreconf now runs autopoint for you
  2012-05-21 15:36   ` Mike Frysinger
@ 2012-05-21 16:08     ` Alexandre Rostovtsev
  2012-05-21 17:29       ` Mike Frysinger
  0 siblings, 1 reply; 10+ messages in thread
From: Alexandre Rostovtsev @ 2012-05-21 16:08 UTC (permalink / raw
  To: Mike Frysinger; +Cc: gentoo-dev

On Mon, 2012-05-21 at 11:36 -0400, Mike Frysinger wrote:
> On Monday 21 May 2012 02:41:18 Alexandre Rostovtsev wrote:
> > On Sun, 2012-05-20 at 06:32 -0400, Mike Frysinger wrote:
> > > i've extended eautoreconf to automatically call autopoint when the
> > > package uses gettext.  the configure check might seem naïve, but this is
> > > how autoreconf itself does it.  this hopefully shouldn't break any
> > > packages (at least, none that weren't already broken), but if you guys
> > > start seeing eautoreconf failures where there were none before, feel
> > > free to cc base-system. -mike
> > > 
> > > --- autotools.eclass
> > > +++ autotools.eclass
> > > @@ -162,6 +162,9 @@ eautoreconf() {
> > > 
> > >  	einfo "Running eautoreconf in '${PWD}' ..."
> > >  	[[ -n ${auxdir}${macdir} ]] && mkdir -p ${auxdir} ${macdir}
> > >  	eaclocal
> > > 
> > > +	if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? ; then
> > > +		eautopoint --force
> > > +	fi
> > > 
> > >  	[[ ${CHOST} == *-darwin* ]] && g=g
> > >  	if ${LIBTOOLIZE:-${g}libtoolize} -n --install >& /dev/null ; then
> > >  	
> > >  		_elibtoolize --copy --force --install
> > 
> > This change broke many gnome-related packages, see bug #416789. You
> > cannot assume that every package that uses AM_GNU_GETTEXT_VERSION wants
> > (just) autopoint;
> 
> two things:
>  - eautoreconf acts like autoreconf which means it can assume that use of 
> AM_GNU_GETTEXT_VERSION implies use of `autopoint`
>  - it doesn't assume *just* autopoint -- nothing is stopping you from running 
> any other random tools you like (such as intltool)

Changing eautoreconf's behavior to exactly match vanilla autoconf may
make sense from your point of view as an autotools maintainer, but it
breaks ebuilds that do not want vanilla autoconf semantics and that are
relying on eautoreconf's old, intltool-friendly behavior.

> > there are also packages that use intltool (to be run
> > after autopoint) or glib-gettext (in which case autopoint should not be
> > used at all).
> 
> so attempting to run `autoreconf` in those packages fails ?

It results in configure failure. E.g.

>>> Emerging (1 of 1) gnome-extra/evolution-data-server-3.2.3-r2
[...]
 * Running eautoreconf in '/var/tmp/portage/gnome-extra/evolution-data-server-3.2.3-r2/work/evolution-data-server-3.2.3' ...
 * Running aclocal -I m4 ...                                            [ ok ]
 * Running autopoint --force ...                                        [ ok ]
 * Running libtoolize --install --copy --force --automake ...           [ ok ]
 * Running aclocal -I m4 ...                                            [ ok ]
 * Running autoconf ...                                                 [ ok ]
 * Running autoheader ...                                               [ ok ]
 * Running automake --add-missing --copy --foreign ...                  [ ok ]
 * Running elibtoolize in: evolution-data-server-3.2.3/
 *   Applying portage/1.2.0 patch ...
 *   Applying sed/1.5.6 patch ...
 * Fixing OMF Makefiles ...                                             [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/gnome-extra/evolution-data-server-3.2.3-r2/work/evolution-data-server-3.2.3 ...
[...]
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
config.status: executing libtool commands
config.status: executing po/stamp-it commands
config.status: error: po/Makefile.in.in was not created by intltoolize.

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/gnome-extra/evolution-data-server-3.2.3-r2/work/evolution-data-server-3.2.3/config.log
 * ERROR: gnome-extra/evolution-data-server-3.2.3-r2 failed (configure phase):
 *   econf failed

> > +# @ECLASS-VARIABLE: WANT_INTLTOOL
> > +# @DESCRIPTION:
> > +# Do you want intltool?  Valid values here are "latest" and "none".
> > +: ${WANT_INTLTOOL:=latest}
> > ...
> > +_intltool_atom="dev-util/intltool"
> > +if [[ -n ${WANT_INTLTOOL} ]] ; then
> > +	case ${WANT_INTLTOOL} in
> > +		none)   _intltool_atom="" ;;
> > +		latest) ;;
> > +		*)      die "Invalid WANT_INTLTOOL value '${WANT_INTLTOOL}'" ;;
> > +	esac
> > +	export WANT_LIBTOOL
> > +fi
> > ...
> > -AUTOTOOLS_DEPEND="${_automake_atom} ${_autoconf_atom} ${_libtool_atom}"
> > +AUTOTOOLS_DEPEND="${_automake_atom} ${_autoconf_atom} ${_intltool_atom}
> 
> no.  this adds intltool as a dependency to every package inherting this 
> eclass.

Why is that unacceptable? Realistically, every Gentoo machine, with the
exception of pure deployment installations that don't build any packages
(and therefore don't care about autotools.eclass anyway), already has
intltool installed.

-Alexandre.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] autotools.eclass:eautoreconf now runs autopoint for you
  2012-05-21 16:08     ` Alexandre Rostovtsev
@ 2012-05-21 17:29       ` Mike Frysinger
  2012-05-21 18:16         ` Alexandre Rostovtsev
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Frysinger @ 2012-05-21 17:29 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: Text/Plain, Size: 3853 bytes --]

On Monday 21 May 2012 12:08:21 Alexandre Rostovtsev wrote:
> On Mon, 2012-05-21 at 11:36 -0400, Mike Frysinger wrote:
> > On Monday 21 May 2012 02:41:18 Alexandre Rostovtsev wrote:
> > > On Sun, 2012-05-20 at 06:32 -0400, Mike Frysinger wrote:
> > > > i've extended eautoreconf to automatically call autopoint when the
> > > > package uses gettext.  the configure check might seem naïve, but this
> > > > is how autoreconf itself does it.  this hopefully shouldn't break
> > > > any packages (at least, none that weren't already broken), but if
> > > > you guys start seeing eautoreconf failures where there were none
> > > > before, feel free to cc base-system. -mike
> > > > 
> > > > --- autotools.eclass
> > > > +++ autotools.eclass
> > > > @@ -162,6 +162,9 @@ eautoreconf() {
> > > > 
> > > >  	einfo "Running eautoreconf in '${PWD}' ..."
> > > >  	[[ -n ${auxdir}${macdir} ]] && mkdir -p ${auxdir} ${macdir}
> > > >  	eaclocal
> > > > 
> > > > +	if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? ; then
> > > > +		eautopoint --force
> > > > +	fi
> > > > 
> > > >  	[[ ${CHOST} == *-darwin* ]] && g=g
> > > >  	if ${LIBTOOLIZE:-${g}libtoolize} -n --install >& /dev/null ;then
> > > >  	
> > > >  		_elibtoolize --copy --force --install
> > > 
> > > This change broke many gnome-related packages, see bug #416789. You
> > > cannot assume that every package that uses AM_GNU_GETTEXT_VERSION wants
> > > (just) autopoint;
> > 
> > two things:
> >  - eautoreconf acts like autoreconf which means it can assume that use of
> > AM_GNU_GETTEXT_VERSION implies use of `autopoint`
> >  - it doesn't assume *just* autopoint -- nothing is stopping you from
> >  running any other random tools you like (such as intltool)
> 
> Changing eautoreconf's behavior to exactly match vanilla autoconf may
> make sense from your point of view as an autotools maintainer, but it
> breaks ebuilds that do not want vanilla autoconf semantics and that are
> relying on eautoreconf's old, intltool-friendly behavior.

it still makes sense.  i don't have a problem integrating a call to intltool, 
but your proposed code isn't the way to go.

> > > there are also packages that use intltool (to be run
> > > after autopoint) or glib-gettext (in which case autopoint should not be
> > > used at all).
> > 
> > so attempting to run `autoreconf` in those packages fails ?
> 
> It results in configure failure. E.g.

so the answer is "yes, these packages fail to work with `autoreconf`"

> > > +# @ECLASS-VARIABLE: WANT_INTLTOOL
> > > +# @DESCRIPTION:
> > > +# Do you want intltool?  Valid values here are "latest" and "none".
> > > +: ${WANT_INTLTOOL:=latest}
> > > ...
> > > +_intltool_atom="dev-util/intltool"
> > > +if [[ -n ${WANT_INTLTOOL} ]] ; then
> > > +	case ${WANT_INTLTOOL} in
> > > +		none)   _intltool_atom="" ;;
> > > +		latest) ;;
> > > +		*)      die "Invalid WANT_INTLTOOL value '${WANT_INTLTOOL}'" ;;
> > > +	esac
> > > +	export WANT_LIBTOOL
> > > +fi
> > > ...
> > > -AUTOTOOLS_DEPEND="${_automake_atom} ${_autoconf_atom} ${_libtool_atom}"
> > > +AUTOTOOLS_DEPEND="${_automake_atom} ${_autoconf_atom} ${_intltool_atom}
> > 
> > no.  this adds intltool as a dependency to every package inherting this
> > eclass.
> 
> Why is that unacceptable?

fairly obvious why

> Realistically, every Gentoo machine, with the exception of pure deployment
> installations that don't build any packages (and therefore don't care about
> autotools.eclass anyway), already has intltool installed.

extending the set of machines that you care about to include all setups is 
obviously wrong (i certainly have machines that "build packages" that don't 
have intltool installed).  and even if that wasn't true, it'd be entirely 
irrelevant.  spurious dependencies are not acceptable.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] autotools.eclass:eautoreconf now runs autopoint for you
  2012-05-21  6:41 ` Alexandre Rostovtsev
                     ` (2 preceding siblings ...)
  2012-05-21 15:36   ` Mike Frysinger
@ 2012-05-21 17:54   ` Mike Frysinger
  3 siblings, 0 replies; 10+ messages in thread
From: Mike Frysinger @ 2012-05-21 17:54 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: Text/Plain, Size: 1281 bytes --]

On Monday 21 May 2012 02:41:18 Alexandre Rostovtsev wrote:
> On Sun, 2012-05-20 at 06:32 -0400, Mike Frysinger wrote:
> > i've extended eautoreconf to automatically call autopoint when the
> > package uses gettext.  the configure check might seem naïve, but this is
> > how autoreconf itself does it.  this hopefully shouldn't break any
> > packages (at least, none that weren't already broken), but if you guys
> > start seeing eautoreconf failures where there were none before, feel
> > free to cc base-system. -mike
> > 
> > --- autotools.eclass
> > +++ autotools.eclass
> > @@ -162,6 +162,9 @@ eautoreconf() {
> > 
> >  	einfo "Running eautoreconf in '${PWD}' ..."
> >  	[[ -n ${auxdir}${macdir} ]] && mkdir -p ${auxdir} ${macdir}
> >  	eaclocal
> > 
> > +	if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? ; then
> > +		eautopoint --force
> > +	fi
> > 
> >  	[[ ${CHOST} == *-darwin* ]] && g=g
> >  	if ${LIBTOOLIZE:-${g}libtoolize} -n --install >& /dev/null ; then
> >  	
> >  		_elibtoolize --copy --force --install
> 
> This change broke many gnome-related packages, see bug #416789

should be fixed:
http://sources.gentoo.org/eclass/autotools.eclass?r1=1.139&r2=1.140

end packages that use intltoolize must depend on it themselves
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] autotools.eclass:eautoreconf now runs autopoint for you
  2012-05-21 17:29       ` Mike Frysinger
@ 2012-05-21 18:16         ` Alexandre Rostovtsev
  0 siblings, 0 replies; 10+ messages in thread
From: Alexandre Rostovtsev @ 2012-05-21 18:16 UTC (permalink / raw
  To: gentoo-dev

On Mon, 2012-05-21 at 13:29 -0400, Mike Frysinger wrote:
> On Monday 21 May 2012 12:08:21 Alexandre Rostovtsev wrote:
> > Realistically, every Gentoo machine, with the exception of pure deployment
> > installations that don't build any packages (and therefore don't care about
> > autotools.eclass anyway), already has intltool installed.
> 
> extending the set of machines that you care about to include all setups is 
> obviously wrong (i certainly have machines that "build packages" that don't 
> have intltool installed).  and even if that wasn't true, it'd be entirely 
> irrelevant.  spurious dependencies are not acceptable.
> -mike

I apologize; I must have run "equery d intltool" while experimenting
with a patched autotools.eclass, and that led me to grossly overestimate
the number of packages depending on intltool.

So you are correct, many Gentoo machines do not have any reason to have
intltool installed.

-Alexandre.




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-05-21 18:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-20 10:32 [gentoo-dev] autotools.eclass:eautoreconf now runs autopoint for you Mike Frysinger
2012-05-20 12:19 ` Nirbheek Chauhan
2012-05-21  6:41 ` Alexandre Rostovtsev
2012-05-21  6:56   ` Alexandre Rostovtsev
2012-05-21  8:19   ` Pacho Ramos
2012-05-21 15:36   ` Mike Frysinger
2012-05-21 16:08     ` Alexandre Rostovtsev
2012-05-21 17:29       ` Mike Frysinger
2012-05-21 18:16         ` Alexandre Rostovtsev
2012-05-21 17:54   ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox