Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Michał Górny <mgorny@g.o>
Subject: Re: Patch: Linguas USE support for cmake-utils.eclass
Date: Sun, 24 Jun 2012 10:48:25 +0200
On Sun, 24 Jun 2012 16:34:55 +0800
Ben de Groot <yngwin@g.o> wrote:

> On 24 June 2012 01:57, Michał Górny <mgorny@g.o> wrote:
> > On Sun, 24 Jun 2012 03:37:59 +1000
> > Michael Palimaka <kensington@g.o> wrote:
> >
> >> --- cmake-utils.eclass
> >> +++ cmake-utils.eclass
> >> @@ -20,0 +21,29 @@
> >> +# @ECLASS-VARIABLE: LANGS
> >
> > Please prefix.
> >
> >> +# @DEFAULT_UNSET
> >> +# @DESCRIPTION:
> >> +# In case your application provides various translations, use this
> >> variable to specify
> >> +# them in order to populate "linguas_*" IUSE automatically. Make
> >> sure that you set this
> >> +# variable before inheriting cmake-utils eclass.
> >> +# Example:
> >> +# @CODE
> >> +#   LANGS="en el de"
> >> +# @CODE
> >> +for x in ${LANGS}; do
> >> +       IUSE+=" linguas_${x}"
> >> +done
> >> +
> >> +# @ECLASS-VARIABLE: LANGSLONG
> >> +# @DEFAULT_UNSET
> >> +# @DESCRIPTION:
> >> +# Same as above, but this variable is for LINGUAS that must be in
> >> long format.
> >> +# Remember to set this variable before inheriting cmake-utils
> >> eclass. +# Look at ${PORTDIR}/profiles/desc/linguas.desc for
> >> details. +# Example:
> >> +# @CODE
> >> +#   LANGS="de_DE hu_HU"
> >> +# @CODE
> >
> > Shouldn't this be LANGSLONG?
> >
> >> +for x in ${LANGSLONG}; do
> >> +       IUSE+=" linguas_${x%_*}"
> >> +done
> >> +unset x
> >> +
> >
> > And how does it exactly differ from LANGS above? Is there a reason
> > those two can't be coerced into a single variable?
> 
> Some linguas correspond 1:1 between the package and portage's
> linguas.desc, while others need the long form (e.g. el_GR) for the
> package, but the short form (el) is used in portage.

Ah, I see. I was confused because the code doesn't use these vars
anywhere else.

> > Shouldn't those do something more than setting IUSE? For example,
> > actually ensuring those LINGUAS will be installed?
> 
> That would be a nice improvement.
> 
> We at qt@ have been discussing this on and off. We would like to
> see a linguas.eclass happen, because already now we start having
> code duplication. So instead of this duplication of code between
> qt4-r2 and cmake-utils eclasses, why not put this into a separate
> linguas.eclass that both can inherit?

Yes, it's a much better idea than keeping two copies in sync.
 
> Obviously the problem with handling more than just setting IUSE
> is the variety of ways in which linguas are handled by different
> packages and different build systems.

Yes, that's one problem. Certainly, those flags have to be handled
by the build system and the disabled LINGUAS should not be built
at all. If there are built already, there's no point in removing them
later.

Of course, another question is whether LINGUAS does actually benefit
users. If compiling another .po files takes a lot of time, probably
yes. If it doesn't, I would think about getting rid of that and just
installing everything. Additional removal can be handled through
INSTALL_MASK.

-- 
Best regards,
Michał Górny
Attachment:
signature.asc (PGP signature)
Replies:
Re: Patch: Linguas USE support for cmake-utils.eclass
-- Michael Palimaka
References:
Patch: Linguas USE support for cmake-utils.eclass
-- Michael Palimaka
Re: Patch: Linguas USE support for cmake-utils.eclass
-- Michał Górny
Re: Patch: Linguas USE support for cmake-utils.eclass
-- Ben de Groot
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Patch: Linguas USE support for cmake-utils.eclass
Next by thread:
Re: Patch: Linguas USE support for cmake-utils.eclass
Previous by date:
Re: Patch: Linguas USE support for cmake-utils.eclass
Next by date:
Re: RFC: PROPERTIES=funky-slots


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.