Thomas De Schampheleire | 30 Jul 14:28 2013
Picon

Removing/solving gettext dependencies in libuio

Hi,

I'm adding the library libuio to buildroot
(https://github.com/Linutronix/libuio/).
This library expects gettext to be present, but I want to avoid adding
this dependency to buildroot because it really isn't needed.

What is the best way to solve this?
The first alternative is to patch the package and remove the
problematic code. These changes are in configure.ac, Makefile.am, the
patch is fairly short. This change is not acceptable upstream (I
guess).

A second alternative is to change libuio to recognize --disable-nls.
However, I'm not sure how to do that.
The configure.ac file contains:

  AM_GNU_GETTEXT([external])
  AM_GNU_GETTEXT_VERSION([0.17])

This macro is provided by gettext itself, so without gettext this doesn't work.
I tried something like:

AC_ARG_ENABLE([nls], AC_HELP_STRING([--disable-nls], [Do not use
Native Language Support]),
              USE_NLS=$enableval, USE_NLS=yes)

AC_SUBST(USE_NLS)

AS_IF([test "x$enable_nls" == xyes],
(Continue reading)

Arnout Vandecappelle | 12 Aug 21:36 2013
Picon

Re: Removing/solving gettext dependencies in libuio

On 30/07/13 14:28, Thomas De Schampheleire wrote:
> Hi,
>
> I'm adding the library libuio to buildroot
> (https://github.com/Linutronix/libuio/).
> This library expects gettext to be present, but I want to avoid adding
> this dependency to buildroot because it really isn't needed.
>
> What is the best way to solve this?

  Isn't docs/manual/adding-packages-gettext.txt sufficient?

  Regards,
  Arnout

> The first alternative is to patch the package and remove the
> problematic code. These changes are in configure.ac, Makefile.am, the
> patch is fairly short. This change is not acceptable upstream (I
> guess).
>
> A second alternative is to change libuio to recognize --disable-nls.
> However, I'm not sure how to do that.
> The configure.ac file contains:
>
>    AM_GNU_GETTEXT([external])
>    AM_GNU_GETTEXT_VERSION([0.17])
>
> This macro is provided by gettext itself, so without gettext this doesn't work.
> I tried something like:
>
(Continue reading)

Thomas De Schampheleire | 19 Aug 16:41 2013
Picon

Re: Removing/solving gettext dependencies in libuio

Hi Arnout,

On Mon, Aug 12, 2013 at 9:36 PM, Arnout Vandecappelle <arnout@...> wrote:
> On 30/07/13 14:28, Thomas De Schampheleire wrote:
>>
>> Hi,
>>
>> I'm adding the library libuio to buildroot
>> (https://github.com/Linutronix/libuio/).
>> This library expects gettext to be present, but I want to avoid adding
>> this dependency to buildroot because it really isn't needed.
>>
>> What is the best way to solve this?
>
>
>  Isn't docs/manual/adding-packages-gettext.txt sufficient?
>

I think not. That document (which I already read, but should've
mentioned) describes two scenarios:
1. the package needs gettext unconditionally
2. the package needs gettext when locale support is enabled

In the case of libuio, I'm strictly speaking in case 1 (unconditional
need for gettext). However, I'm contesting the unconditional need. In
reality, there is little use for that, since the only tool using it is
lsuio, a helper tool, for which no translations are currently
provided. The actual libuio library does not output strings through
gettext.

(Continue reading)

Thomas Petazzoni | 20 Aug 00:25 2013

Re: Removing/solving gettext dependencies in libuio

Dear Thomas De Schampheleire,

On Tue, 30 Jul 2013 14:28:05 +0200, Thomas De Schampheleire wrote:

> A second alternative is to change libuio to recognize --disable-nls.
> However, I'm not sure how to do that.
> The configure.ac file contains:
> 
>   AM_GNU_GETTEXT([external])
>   AM_GNU_GETTEXT_VERSION([0.17])
> 
> This macro is provided by gettext itself, so without gettext this doesn't work.

This should only require host-gettext, which provides the .m4 file that
contains the m4 macro to autoreconf the package. Once you upstream the
patch, at the next release an updated 'configure' script will be part
of lsuio tarball, and we'll be able to remove the _AUTORECONF=YES and
therefore the dependency on host-gettext.

Am I missing something here?

Best regards,

Thomas
--

-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
(Continue reading)

Thomas De Schampheleire | 20 Aug 07:00 2013
Picon

Re: Removing/solving gettext dependencies in libuio


Op 20-aug.-2013 00:26 schreef "Thomas Petazzoni" <thomas.petazzoni <at> free-electrons.com> het volgende:
>
> Dear Thomas De Schampheleire,
>
> On Tue, 30 Jul 2013 14:28:05 +0200, Thomas De Schampheleire wrote:
>
> > A second alternative is to change libuio to recognize --disable-nls.
> > However, I'm not sure how to do that.
> > The configure.ac file contains:
> >
> >   AM_GNU_GETTEXT([external])
> >   AM_GNU_GETTEXT_VERSION([0.17])
> >
> > This macro is provided by gettext itself, so without gettext this doesn't work.
>
> This should only require host-gettext, which provides the .m4 file that
> contains the m4 macro to autoreconf the package. Once you upstream the
> patch, at the next release an updated 'configure' script will be part
> of lsuio tarball, and we'll be able to remove the _AUTORECONF=YES and
> therefore the dependency on host-gettext.
>
> Am I missing something here?
>

Can you elaborate a bit?

With 'patch', do you mean the proposal of adding --disable-nls as I sent in my first mail ? Come to think of it, does that even make sense? Isn't that flag normally provided by gettext itself?

Regardless, how will upstreaming that patch remove the dependency on gettext? Who will provide a definition for AM_GNU_GETTEXT?

(I think I now understand part of the confusion: libuio comes from git, there are no packaged tarballs with a preboiled configure script. Hence, autoreconf is always necessary.)

Thanks,
Thomas

_______________________________________________
buildroot mailing list
buildroot@...
http://lists.busybox.net/mailman/listinfo/buildroot

Gmane