Build and install only selected localizations. Use in Gentoo.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-02-18 20:14:57 +02:00
parent b68653c660
commit e2bd5c51f2
3 changed files with 49 additions and 29 deletions

View File

@ -14,11 +14,11 @@ LICENSE="GPL-3"
SLOT="1"
KEYWORDS="~amd64 ~x86"
LANGS="ru_RU uk_UA de_DE cs_CZ he_IL fr_FR it_IT nl_NL id_ID es_ES fi_FI en_US en_CA en_IN ro_RO"
for X in ${LANGS} ; do
if [[ ${X} != "en" ]]; then
IUSE="${IUSE} linguas_${X}"
fi
# en_IN not supported in Gentoo so not added here
LANGS="ru_RU uk_UA de_DE cs_CZ he_IL fr_FR it_IT nl_NL id_ID es_ES fi_FI en_US en_CA ro_RO"
for LANG in ${LANGS}; do
IUSE="${IUSE} linguas_${LANG}"
done
CDEPEND="
@ -39,7 +39,15 @@ DEPEND="${CDEPEND}
S=${WORKDIR}/dismine-${PN}-44d43351cb59
src_configure() {
eqmake5 CONFIG+=no_ccache CONFIG+=noDebugSymbols Valentina.pro -r
local locales=""
for LANG in ${LANGS}; do
if use linguas_${LANG}; then
locales="${locales} ${LANG}"
fi
done
eqmake5 LOCALES="${locales}" CONFIG+=no_ccache CONFIG+=noDebugSymbols Valentina.pro -r
}
src_install() {

View File

@ -16,11 +16,11 @@ LICENSE="GPL-3"
SLOT="1"
KEYWORDS="~amd64 ~x86"
LANGS="ru_RU uk_UA de_DE cs_CZ he_IL fr_FR it_IT nl_NL id_ID es_ES fi_FI en_US en_CA en_IN ro_RO zh_CN"
for X in ${LANGS} ; do
if [[ ${X} != "en" ]]; then
IUSE="${IUSE} linguas_${X}"
fi
# en_IN not supported in Gentoo so not added here
LANGS="ru_RU uk_UA de_DE cs_CZ he_IL fr_FR it_IT nl_NL id_ID es_ES fi_FI en_US en_CA ro_RO zh_CN"
for LANG in ${LANGS}; do
IUSE="${IUSE} linguas_${LANG}"
done
CDEPEND="
@ -39,7 +39,14 @@ DEPEND="${CDEPEND}
dev-util/ccache"
src_configure() {
eqmake5 Valentina.pro -r
local locales=""
for LANG in ${LANGS}; do
if use linguas_${LANG}; then
locales="${locales} ${LANG}"
fi
done
eqmake5 LOCALES="${locales}" Valentina.pro -r
}
src_install() {

View File

@ -9,23 +9,28 @@ PMSYSTEMS += \
p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30 \
p31 p32 p33 p34 p35 p36 p37 p38 p39 p40 p41 p42 p43 p44 p45 p46 p47 p48 p49 p50 p51 p52 p53 p54 p998
LANGUAGES += \
ru_RU \
uk_UA \
de_DE \
cs_CZ \
he_IL \
fr_FR \
it_IT \
nl_NL \
id_ID \
es_ES \
fi_FI \
en_US \
en_CA \
en_IN \
ro_RO \
zh_CN
# An example of using LOCALES="de_DE nl_NL"
isEmpty(LOCALES){
LANGUAGES += \
ru_RU \
uk_UA \
de_DE \
cs_CZ \
he_IL \
fr_FR \
it_IT \
nl_NL \
id_ID \
es_ES \
fi_FI \
en_US \
en_CA \
en_IN \
ro_RO \
zh_CN
} else {
LANGUAGES = $${LOCALES}
}
for(lang, LANGUAGES) {
INSTALL_TRANSLATIONS += $${TRANSLATIONS_PATH}/valentina_$${lang}.qm