summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2016-10-29 13:10:10 +0200
committerJustin Lecher <jlec@gentoo.org>2016-10-29 13:10:59 +0200
commit8800d8cb84bdc95a7aa18221072a7c82037429e5 (patch)
tree8e0d700bd0c35ddaad5196894c94f13079ffc79b
parentsys-kernel/aufs-sources: Bump to latest genpatches and linux release (diff)
downloadgentoo-8800d8cb84bdc95a7aa18221072a7c82037429e5.tar.gz
gentoo-8800d8cb84bdc95a7aa18221072a7c82037429e5.tar.bz2
gentoo-8800d8cb84bdc95a7aa18221072a7c82037429e5.zip
app-office/scribus: Fix LINGUAS usage
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=583760 Package-Manager: portage-2.3.2 Signed-off-by: Justin Lecher <jlec@gentoo.org>
-rw-r--r--app-office/scribus/scribus-1.4.6.ebuild16
-rw-r--r--app-office/scribus/scribus-1.5.0-r1.ebuild69
-rw-r--r--app-office/scribus/scribus-1.5.2-r1.ebuild7
-rw-r--r--app-office/scribus/scribus-9999.ebuild92
-rw-r--r--profiles/desc/linguas.desc3
5 files changed, 110 insertions, 77 deletions
diff --git a/app-office/scribus/scribus-1.4.6.ebuild b/app-office/scribus/scribus-1.4.6.ebuild
index 5d2dad6b5636..44240c674452 100644
--- a/app-office/scribus/scribus-1.4.6.ebuild
+++ b/app-office/scribus/scribus-1.4.6.ebuild
@@ -19,7 +19,7 @@ KEYWORDS="amd64 hppa ppc ppc64 ~sparc x86"
IUSE="cairo debug examples hunspell +minimal +pdf scripts templates tk"
# a=$(ls resources/translations/po/scribus.*ts | sed -e 's:\.: :g' | awk '{print $2}'); echo ${a}
-IUSE_LINGUAS=" af ar bg br ca cs_CZ cy da_DK de_1901 de_CH de el en_AU en_GB en_US eo es_ES et eu fi fr gl hu id it ja ko lt_LT nb_NO nl pl_PL pt_BR pt ru sa sk_SK sl sq sr sv th_TH tr uk zh_CN zh_TW"
+IUSE_LINGUAS=" af ar bg br ca cs_CZ cy da_DK de@1901 de_CH de el en_AU en_GB en_US eo es_ES et eu fi fr gl hu id it ja ko lt_LT nb_NO nl pl_PL pt_BR pt ru sa sk_SK sl sq sr sv th_TH tr uk zh_CN zh_TW"
IUSE+=" ${IUSE_LINGUAS// / linguas_}"
REQUIRED_USE="
@@ -76,12 +76,13 @@ src_prepare() {
}
src_configure() {
- local lang langs
+ local _lang lang langs
for lang in ${IUSE_LINGUAS}; do
+ _lang=$(translate_lang ${lang})
if use linguas_${lang}; then
- langs+=",${lang}"
+ langs+=",${_lang}"
else
- sed -e "/${lang}/d" -i scribus/doc/CMakeLists.txt || die
+ sed -e "/${_lang}/d" -i scribus/doc/CMakeLists.txt || die
fi
done
@@ -149,3 +150,10 @@ pkg_postrm() {
fdo-mime_desktop_database_update
fdo-mime_mime_database_update
}
+
+translate_lang() {
+ _lang=${1}
+ [[ ${1} == "ru_RU" ]] && _lang+=_0
+ [[ ${1} == "de@1901" ]] && _lang=de_1901
+ echo ${_lang}
+}
diff --git a/app-office/scribus/scribus-1.5.0-r1.ebuild b/app-office/scribus/scribus-1.5.0-r1.ebuild
index aae0c4c25ca9..8c27730ecb5f 100644
--- a/app-office/scribus/scribus-1.5.0-r1.ebuild
+++ b/app-office/scribus/scribus-1.5.0-r1.ebuild
@@ -19,7 +19,7 @@ KEYWORDS="~amd64 ~x86"
IUSE="+boost debug examples graphicsmagick hunspell +minimal osg +pdf scripts templates tk"
#a=$((ls resources/translations/scribus.*ts | sed -e 's:\.: :g' | awk '{print $2}'; ls resources/loremipsum/*xml | sed -e 's:\.: :g' -e 's:loremipsum\/: :g'| awk '{print $2}'; ls resources/dicts/hyph*dic | sed -e 's:\.: :g' -e 's:hyph_: :g' | awk '{print $2}'; ls resources/dicts/README_*txt | sed -e 's:_hyph::g' -e 's:\.: :g' -e 's:README_: :g' | awk '{print $2}') | sort | uniq); echo $a
-IUSE_LINGUAS=" af ar bg br ca ca_ES cs cs_CZ cy cy_GB da da_DK de de_1901 de_CH de_DE el en_AU en_EN en_GB en_US eo es es_ES et eu fi fi_FI fr gl he hr hu hu_HU ia id id_ID is is_IS it ja ko ku la lt lt_LT nb_NO nl nn_NO pl pl_PL pt pt_BR pt_PT ro ro_RO ru ru_RU_0 sa sk sk_SK sl sl_SI sq sr sv sv_SE th_TH tr uk uk_UA zh_CN zh_TW"
+IUSE_LINGUAS=" af ar bg br ca ca_ES cs cs_CZ cy cy_GB da da_DK de de@1901 de_CH de_DE el en_AU en_GB en_US eo es es_ES et eu fi fi_FI fr gl he hr hu hu_HU ia id id_ID is is_IS it ja ko ku la lt lt_LT nb_NO nl nn_NO pl pl_PL pt pt_BR pt_PT ro ro_RO ru ru_RU sa sk sk_SK sl sl_SI sq sr sv sv_SE th_TH tr uk uk_UA zh_CN zh_TW"
IUSE+=" ${IUSE_LINGUAS// / linguas_}"
REQUIRED_USE="
@@ -105,20 +105,28 @@ src_prepare() {
}
src_configure() {
- local lang langs
+ local _lang lang langs
for lang in ${IUSE_LINGUAS}; do
+ _lang=$(translate_lang ${lang})
if use linguas_${lang} || [[ ${lang} == "en" ]]; then
# From the CMakeLists.txt
# "#Bit of a hack, preprocess all the filenames to generate our language string, needed for -DWANT_GUI_LANG=en_GB;de_DE , etc"
- langs+=";${lang}"
+ langs+=";${_lang}"
else
# Don't install localized documentation
- sed -e "/${lang}/d" -i doc/CMakeLists.txt || die
- safe_delete file ./resources/dicts/README_${lang}.txt
- safe_delete file ./resources/dicts/README_hyph_${lang}.txt
- safe_delete file ./resources/dicts/hyph_${lang}.dic
- safe_delete file ./resources/loremipsum/${lang}.xml
+ sed -e "/${_lang}/d" -i doc/CMakeLists.txt || die
+ safe_delete \
+ ./resources/dicts/README_${_lang}.txt \
+ ./resources/dicts/README_hyph_${_lang}.txt \
+ ./resources/dicts/hyph_${_lang}.dic \
+ ./resources/loremipsum/${_lang}.xml
fi
+ sed -e "/en_EN/d" -i doc/CMakeLists.txt || die
+ safe_delete \
+ ./resources/dicts/README_en_EN.txt \
+ ./resources/dicts/README_hyph_en_EN.txt \
+ ./resources/dicts/hyph_en_EN.dic \
+ ./resources/loremipsum/en_EN.xml
done
local mycmakeargs=(
@@ -144,10 +152,12 @@ src_configure() {
src_install() {
cmake-utils_src_install
- local lang
+ local lang _lang
+ # en_EN can be deleted always
for lang in ${IUSE_LINGUAS}; do
if ! use linguas_${lang}; then
- safe_delete dir "${ED}"/usr/share/man/${lang}
+ _lang=$(translate_lang)
+ safe_delete "${ED}"/usr/share/man/${_lang}
fi
done
@@ -184,22 +194,25 @@ pkg_postrm() {
}
safe_delete () {
- case $1 in
- dir)
- if [[ -d "${2}" ]]; then
- ebegin "Deleting ${2} recursively"
- rm -r "${2}" || die
- eend $?
- fi
- ;;
- file)
- if [[ -f "${2}" ]]; then
- ebegin "Deleting ${2}"
- rm "${2}" || die
- eend $?
- fi
- ;;
- *)
- die "Wrong usage"
- esac
+ local x
+ for x in ${@}; do
+ if [[ -d "${x}" ]]; then
+ ebegin "Deleting ${x} recursively"
+ rm -r "${x}" || die
+ eend $?
+ elif [[ -f "${x}" ]]; then
+ ebegin "Deleting ${x}"
+ rm "${x}" || die
+ eend $?
+ else
+ ewarn "${x} not found"
+ fi
+ done
+}
+
+translate_lang() {
+ _lang=${1}
+ [[ ${1} == "ru_RU" ]] && _lang+=_0
+ [[ ${1} == "de@1901" ]] && _lang=de_1901
+ echo ${_lang}
}
diff --git a/app-office/scribus/scribus-1.5.2-r1.ebuild b/app-office/scribus/scribus-1.5.2-r1.ebuild
index 939d847793e5..b924a96c5ce6 100644
--- a/app-office/scribus/scribus-1.5.2-r1.ebuild
+++ b/app-office/scribus/scribus-1.5.2-r1.ebuild
@@ -6,6 +6,7 @@ EAPI=6
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="tk?"
+CMAKE_MAKEFILE_GENERATOR=ninja
inherit cmake-utils fdo-mime flag-o-matic multilib python-single-r1
@@ -19,7 +20,7 @@ KEYWORDS="~amd64 ~x86"
IUSE="+boost debug examples graphicsmagick hunspell +minimal osg +pdf scripts templates tk"
#a=$((ls resources/translations/scribus.*ts | sed -e 's:\.: :g' | awk '{print $2}'; ls resources/loremipsum/*xml | sed -e 's:\.: :g' -e 's:loremipsum\/: :g'| awk '{print $2}'; ls resources/dicts/hyph*dic | sed -e 's:\.: :g' -e 's:hyph_: :g' | awk '{print $2}'; ls resources/dicts/README_*txt | sed -e 's:_hyph::g' -e 's:\.: :g' -e 's:README_: :g' | awk '{print $2}') | sort | uniq); echo $a
-IUSE_LINGUAS=" af ar bg br ca ca_ES cs cs_CZ cy cy_GB da da_DK de de_1901 de_CH de_DE el en_AU en_GB en_US eo es es_ES et eu fi fi_FI fr gl he hr hu hu_HU ia id id_ID is is_IS it ja ko ku la lt lt_LT nb_NO nl nn_NO pl pl_PL pt pt_BR pt_PT ro ro_RO ru ru_RU_0 sa sk sk_SK sl sl_SI sq sr sv sv_SE th_TH tr uk uk_UA zh_CN zh_TW"
+IUSE_LINGUAS=" af ar bg br ca ca_ES cs cs_CZ cy cy_GB da da_DK de de@1901 de_CH de_DE el en_AU en_GB en_US eo es es_ES et eu fi fi_FI fr gl he hr hu hu_HU ia id id_ID is is_IS it ja ko ku la lt lt_LT nb_NO nl nn_NO pl pl_PL pt pt_BR pt_PT ro ro_RO ru ru_RU sa sk sk_SK sl sl_SI sq sr sv sv_SE th_TH tr uk uk_UA zh_CN zh_TW"
IUSE+=" ${IUSE_LINGUAS// / linguas_}"
REQUIRED_USE="
@@ -157,7 +158,6 @@ src_install() {
_lang=$(translate_lang)
safe_delete "${ED}"/usr/share/man/${_lang}
fi
- safe_delete "${ED}"/usr/share/man/${_lang}
done
if ! use scripts; then
@@ -211,6 +211,7 @@ safe_delete () {
translate_lang() {
_lang=${1}
-# [[ ${1} == "ru_RU" ]] && _lang+=_0
+ [[ ${1} == "ru_RU" ]] && _lang+=_0
+ [[ ${1} == "de@1901" ]] && _lang=de_1901
echo ${_lang}
}
diff --git a/app-office/scribus/scribus-9999.ebuild b/app-office/scribus/scribus-9999.ebuild
index 59b904e29ffe..e96e3f6e8417 100644
--- a/app-office/scribus/scribus-9999.ebuild
+++ b/app-office/scribus/scribus-9999.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
+EAPI=6
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="tk?"
@@ -22,7 +22,7 @@ KEYWORDS=""
IUSE="+boost debug examples graphicsmagick hunspell +minimal osg +pdf scripts templates tk"
#a=$((ls resources/translations/scribus.*ts | sed -e 's:\.: :g' | awk '{print $2}'; ls resources/loremipsum/*xml | sed -e 's:\.: :g' -e 's:loremipsum\/: :g'| awk '{print $2}'; ls resources/dicts/hyph*dic | sed -e 's:\.: :g' -e 's:hyph_: :g' | awk '{print $2}'; ls resources/dicts/README_*txt | sed -e 's:_hyph::g' -e 's:\.: :g' -e 's:README_: :g' | awk '{print $2}') | sort | uniq); echo $a
-IUSE_LINGUAS=" af ar bg br ca ca_ES cs cs_CZ cy cy_GB da da_DK de de_1901 de_CH de_DE el en_AU en_EN en_GB en_US eo es es_ES et eu fi fi_FI fr gl he hr hu hu_HU ia id id_ID is is_IS it ja ko ku la lt lt_LT nb_NO nl nn_NO pl pl_PL pt pt_BR pt_PT ro ro_RO ru ru_RU_0 sa sk sk_SK sl sl_SI sq sr sv sv_SE th_TH tr uk uk_UA zh_CN zh_TW"
+IUSE_LINGUAS=" af ar bg br ca ca_ES cs cs_CZ cy cy_GB da da_DK de de@1901 de_CH de_DE el en_AU en_GB en_US eo es es_ES et eu fi fi_FI fr gl he hr hu hu_HU ia id id_ID is is_IS it ja ko ku la lt lt_LT nb_NO nl nn_NO pl pl_PL pt pt_BR pt_PT ro ro_RO ru ru_RU sa sk sk_SK sl sl_SI sq sr sv sv_SE th_TH tr uk uk_UA zh_CN zh_TW"
IUSE+=" ${IUSE_LINGUAS// / linguas_}"
REQUIRED_USE="
@@ -45,7 +45,6 @@ COMMON_DEPEND="
dev-qt/qtopengl:5
dev-qt/qtprintsupport:5
dev-qt/qtquickcontrols:5
- dev-qt/qtwebkit:5
dev-qt/qtwidgets:5
dev-qt/qtxml:5
media-libs/fontconfig
@@ -76,6 +75,7 @@ DEPEND="${COMMON_DEPEND}
PATCHES=(
"${FILESDIR}"/${PN}-1.5.0-docdir.patch
+ "${FILESDIR}"/${PN}-1.5.2-fpic.patch
)
src_prepare() {
@@ -103,24 +103,31 @@ src_prepare() {
fi
cmake-utils_src_prepare
- subversion_src_prepare
}
src_configure() {
- local lang langs
+ local _lang lang langs
for lang in ${IUSE_LINGUAS}; do
+ _lang=$(translate_lang ${lang})
if use linguas_${lang} || [[ ${lang} == "en" ]]; then
# From the CMakeLists.txt
# "#Bit of a hack, preprocess all the filenames to generate our language string, needed for -DWANT_GUI_LANG=en_GB;de_DE , etc"
- langs+=";${lang}"
+ langs+=";${_lang}"
else
# Don't install localized documentation
- sed -e "/${lang}/d" -i doc/CMakeLists.txt || die
- safe_delete file ./resources/dicts/README_${lang}.txt
- safe_delete file ./resources/dicts/README_hyph_${lang}.txt
- safe_delete file ./resources/dicts/hyph_${lang}.dic
- safe_delete file ./resources/loremipsum/${lang}.xml
+ sed -e "/${_lang}/d" -i doc/CMakeLists.txt || die
+ safe_delete \
+ ./resources/dicts/README_${_lang}.txt \
+ ./resources/dicts/README_hyph_${_lang}.txt \
+ ./resources/dicts/hyph_${_lang}.dic \
+ ./resources/loremipsum/${_lang}.xml
fi
+ sed -e "/en_EN/d" -i doc/CMakeLists.txt || die
+ safe_delete \
+ ./resources/dicts/README_en_EN.txt \
+ ./resources/dicts/README_hyph_en_EN.txt \
+ ./resources/dicts/hyph_en_EN.dic \
+ ./resources/loremipsum/en_EN.xml
done
local mycmakeargs=(
@@ -130,15 +137,15 @@ src_configure() {
-DWANT_DISTROBUILD=ON
-DDOCDIR="/usr/share/doc/${PF}/"
-DWANT_GUI_LANG="${langs#;};en"
- $(cmake-utils_use_with pdf PODOFO)
- $(cmake-utils_use_with boost)
- $(cmake-utils_use_want graphicsmagick)
- $(cmake-utils_use !osg WANT_NOOSG)
- $(cmake-utils_use_want debug DEBUG)
- $(cmake-utils_use_want minimal NOHEADERINSTALL)
- $(cmake-utils_use_want hunspell HUNSPELL)
- $(cmake-utils_use_want !examples NOEXAMPLES)
- $(cmake-utils_use_want !templates NOTEMPLATES)
+ -DWITH_PODOFO="$(usex pdf)"
+ -DWITH_BOOST="$(usex boost)"
+ -DWANT_GRAPHICSMAGICK="$(usex graphicsmagick)"
+ -DWANT_NOOSG="$(usex !osg)"
+ -DWANT_DEBUG="$(usex debug)"
+ -DWANT_NOHEADERINSTALL="$(usex minimal)"
+ -DWANT_HUNSPELL="$(usex hunspell)"
+ -DWANT_NOEXAMPLES="$(usex !examples)"
+ -DWANT_NOTEMPLATES="$(usex !templates)"
)
cmake-utils_src_configure
}
@@ -146,10 +153,12 @@ src_configure() {
src_install() {
cmake-utils_src_install
- local lang
+ local lang _lang
+ # en_EN can be deleted always
for lang in ${IUSE_LINGUAS}; do
if ! use linguas_${lang}; then
- safe_delete dir "${ED}"/usr/share/man/${lang}
+ _lang=$(translate_lang)
+ safe_delete "${ED}"/usr/share/man/${_lang}
fi
done
@@ -186,22 +195,25 @@ pkg_postrm() {
}
safe_delete () {
- case $1 in
- dir)
- if [[ -d "${2}" ]]; then
- ebegin "Deleting ${2} recursively"
- rm -r "${2}" || die
- eend $?
- fi
- ;;
- file)
- if [[ -f "${2}" ]]; then
- ebegin "Deleting ${2}"
- rm "${2}" || die
- eend $?
- fi
- ;;
- *)
- die "Wrong usage"
- esac
+ local x
+ for x in ${@}; do
+ if [[ -d "${x}" ]]; then
+ ebegin "Deleting ${x} recursively"
+ rm -r "${x}" || die
+ eend $?
+ elif [[ -f "${x}" ]]; then
+ ebegin "Deleting ${x}"
+ rm "${x}" || die
+ eend $?
+ else
+ ewarn "${x} not found"
+ fi
+ done
+}
+
+translate_lang() {
+ _lang=${1}
+ [[ ${1} == "ru_RU" ]] && _lang+=_0
+ [[ ${1} == "de@1901" ]] && _lang=de_1901
+ echo ${_lang}
}
diff --git a/profiles/desc/linguas.desc b/profiles/desc/linguas.desc
index 69b45afd1823..c1ec2d677aff 100644
--- a/profiles/desc/linguas.desc
+++ b/profiles/desc/linguas.desc
@@ -48,7 +48,7 @@ cy_GB - Welsh locale
da - Danish locale
da_DK - Danish locale for Denmark
de - German locale
-de_1901 - German locale with old spelling
+de@1901 - German locale with old spelling
de_CH - German locale for Switzerland
de_DE - German locale for Germany
dgo - Dogri locale for India
@@ -201,7 +201,6 @@ ro - Romanian locale
ro_RO - Romanian locale for Romania
ru - Russian locale
ru_RU - Russian locale for Russia
-ru_RU_0 - Russian locale for Russia
rue - Rusyn locale
rw - Kinyarwanda locale
sa - Sanskrit locale