Gentoo Archives: gentoo-devhelp

From: Daniel Pielmeier <daniel.pielmeier@××××××××××.com>
To: gentoo-devhelp@l.g.o
Subject: Re: [gentoo-devhelp] LINGUAS vs LANGUAGES
Date: Fri, 15 May 2009 16:35:49
In Reply to: Re: [gentoo-devhelp] LINGUAS vs LANGUAGES by Daniel Pielmeier
Daniel Pielmeier schrieb am 15.05.2009 17:01:
> 2009/5/15 Nikos Chantziaras <realnc@×××××.de>: >> >> # Install everything except documentation and i18n. >> emake INSTALL_ROOT="${D}" install_target install_charmaps \ >> || die "make install failed" >> # Install i18n files. >> if use linguas_de; then >> insinto "${GAMES_DATADIR}/${PN}/i18n" >> doins "${PN}_de.qm" || die "doins ${PN}_de.qm failed" >> fi
You also might consider using a loop for installing the linguas else you have to add the same almost identical block for every new language introduced. This way the intermediate variable LANGS used for IUSE injection comes handy. # IUSE definition: IUSE="flags" LANGS="de en" for i in ${LANGS}; do IUSE="${IUSE} linguas_${i}" done # in src_install: local my_langs for j in ${LINGUAS}; do if has ${j} ${LANGS}; then my_langs="${j} ${my_langs}" fi done insinto "${GAMES_DATADIR}/${PN}/i18n" for k in ${my_langs}; do doins "${PN}_${k}.qm" || die "doins ${PN}_${k}.qm failed" done -- Daniel Pielmeier


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


Subject Author
[gentoo-devhelp] Re: LINGUAS vs LANGUAGES Nikos Chantziaras <realnc@×××××.de>