Gentoo Archives: gentoo-devhelp

From: Mike Frysinger <vapier@g.o>
To: gentoo-devhelp@l.g.o
Cc: Steven J Long <slong@××××××××××××××××××.uk>
Subject: Re: [gentoo-devhelp] Re: LINGUAS vs LANGUAGES
Date: Sun, 26 Jul 2009 20:51:48
Message-Id: 200907261651.44164.vapier@gentoo.org
In Reply to: [gentoo-devhelp] Re: LINGUAS vs LANGUAGES by Steven J Long
1 On Tuesday 21 July 2009 06:13:25 Steven J Long wrote:
2 > Nikos Chantziaras wrote:
3 > > Thanks. I ended up doing it this way, though with only one loop in
4 > > src_install(), which seems to be a bit more efficient and shorter:
5 > >
6 > >
7 > > LANGUAGES="de"
8 > > for i in ${LANGUAGES}; do
9 > > IUSE="${IUSE} linguas_${i}"
10 > > done
11 >
12 > Just on a side-note (not saying it's how you want to do this one), this is
13 > something that BASH arrays are nice for (saving another loop):
14 > $ foo=(bar baz quux)
15 > $ echo "prefixed: '${foo[*]/#/pfx_}'"
16 > prefixed: 'pfx_bar pfx_baz pfx_quux'
17
18 printf would probably be better as it is typically a shell builtin and it
19 doesnt require use of arrays/uncommon syntax.
20 media-gfx/exiv2/exiv2-0.18.ebuild:
21 IUSE_LINGUAS="de es fi fr pl ru sk"
22 IUSE="${IUSE} $(printf 'linguas_%s ' ${IUSE_LINGUAS})"
23 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
[gentoo-devhelp] Re: Re: LINGUAS vs LANGUAGES Steven J Long <slong@××××××××××××××××××.uk>