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: Michael Palimaka <kensington@g.o>
Subject: Patch: Linguas USE support for cmake-utils.eclass
Date: Sun, 24 Jun 2012 03:37:59 +1000
Hi,

A number of package using cmake and qmake currently do something like this:

LANGS="en de fr"
for x in ${LANGS}; do
         IUSE="${IUSE} linguas_${x}"
done

This is ugly, so for some time the loop has been included in qt4-r2, and 
I'd also like to add it to cmake-utils.

As far as I can see, this change will have no visible effect on ebuilds 
that already manually include the loop, and will cause only one package 
to get linguas_* flags that it doesn't already have (which I'll fix).

Thoughts?

--- cmake-utils.eclass
+++ cmake-utils.eclass
@@ -20,0 +21,29 @@
+# @ECLASS-VARIABLE: LANGS
+# @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
+for x in ${LANGSLONG}; do
+       IUSE+=" linguas_${x%_*}"
+done
+unset x
+

Best regards,
Michael


Replies:
Re: Patch: Linguas USE support for cmake-utils.eclass
-- Mike Frysinger
Re: Patch: Linguas USE support for cmake-utils.eclass
-- Michał Górny
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
RFC: PROPERTIES=funky-slots
Next by thread:
Re: Patch: Linguas USE support for cmake-utils.eclass
Previous by date:
Re: RFC: PROPERTIES=funky-slots
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.