From 60b694853c5a829fc4fc7416ffdcf24c59c61416 Mon Sep 17 00:00:00 2001 From: damex Date: Thu, 6 Jun 2019 12:50:04 +0000 Subject: [PATCH] [media-sound/deadbeef] #35 #38 update l10n, add missing lv locale "lv" locale was missing still stick to LINGUAS and l10n eclass fix conditional checking for ru and pt_BR locales for removal start removing unused locales from po/LINGUAS with l10n helper --- media-sound/deadbeef/deadbeef-0.7.2-r3.ebuild | 15 +++++++++++---- media-sound/deadbeef/deadbeef-1.8.0.ebuild | 11 +++++++++-- media-sound/deadbeef/deadbeef-9999.ebuild | 14 +++++++++++++- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/media-sound/deadbeef/deadbeef-0.7.2-r3.ebuild b/media-sound/deadbeef/deadbeef-0.7.2-r3.ebuild index e4d6102..f9f1f99 100644 --- a/media-sound/deadbeef/deadbeef-0.7.2-r3.ebuild +++ b/media-sound/deadbeef/deadbeef-0.7.2-r3.ebuild @@ -4,7 +4,7 @@ EAPI="7" PLOCALES="be bg bn ca cs da de el en_GB es et eu fa fi fr gl he hr hu id it ja kk km lg - lt nl pl pt pt_BR ro ru si_LK sk sl sr sr@latin sv te tr ug uk vi zh_CN zh_TW" + lt lv nl pl pt pt_BR ro ru si_LK sk sl sr sr@latin sv te tr ug uk vi zh_CN zh_TW" PLOCALE_BACKUP="en_GB" @@ -136,21 +136,28 @@ DEPEND="${RDEPEND} S="${WORKDIR}/${P}" src_prepare() { - if ! use_if_iuse linguas_pt_BR && use_if_iuse linguas_ru ; then + if [[ $(l10n_get_locales disabled) =~ "pt_BR" ]] && [[ $(l10n_get_locales) =~ "ru" ]] ; then eapply "${FILESDIR}/${PN}-0.7.2-remove-pt_br-help-translation.patch" rm -v "${S}/translation/help.pt_BR.txt" || die fi - if ! use_if_iuse linguas_ru && use_if_iuse linguas_pt_BR ; then + if [[ $(l10n_get_locales disabled) =~ "ru" ]] && [[ $(l10n_get_locales) =~ "pt_BR" ]] ; then eapply "${FILESDIR}/${PN}-0.7.2-remove-ru-help-translation.patch" rm -v "${S}/translation/help.ru.txt" || die fi - if ! use_if_iuse linguas_pt_BR && ! use_if_iuse linguas_ru ; then + if [[ $(l10n_get_locales disabled) =~ "pt_BR" ]] && [[ $(l10n_get_locales disabled) =~ "ru" ]] ; then eapply "${FILESDIR}/${PN}-0.7.2-remove-pt_br-and-ru-help-translation.patch" rm -v "${S}/translation/help.pt_BR.txt" "${S}/translation/help.ru.txt" || die fi + remove_locale() { + sed -e "/${1}/d" \ + -i "${S}/po/LINGUAS" || die + } + + l10n_for_each_disabled_locale_do remove_locale + if use midi ; then # set default gentoo path sed -e 's;/etc/timidity++/timidity-freepats.cfg;/usr/share/timidity/freepats/timidity.cfg;g' \ diff --git a/media-sound/deadbeef/deadbeef-1.8.0.ebuild b/media-sound/deadbeef/deadbeef-1.8.0.ebuild index 441d4da..77f68e6 100644 --- a/media-sound/deadbeef/deadbeef-1.8.0.ebuild +++ b/media-sound/deadbeef/deadbeef-1.8.0.ebuild @@ -4,7 +4,7 @@ EAPI="7" PLOCALES="be bg bn ca cs da de el en_GB es et eu fa fi fr gl he hr hu id it ja kk km lg - lt nl pl pt pt_BR ro ru si_LK sk sl sr sr@latin sv te tr ug uk vi zh_CN zh_TW" + lt lv nl pl pt pt_BR ro ru si_LK sk sl sr sr@latin sv te tr ug uk vi zh_CN zh_TW" PLOCALE_BACKUP="en_GB" @@ -138,11 +138,18 @@ DEPEND="${RDEPEND} S="${WORKDIR}/${P}" src_prepare() { - if ! use_if_iuse linguas_ru ; then + if [[ "$(l10n_get_locales disabled)" =~ "ru" ]] ; then eapply "${FILESDIR}/${P}-remove-ru-help-translation.patch" rm -v "${S}/translation/help.ru.txt" || die fi + remove_locale() { + sed -e "/${1}/d" \ + -i "${S}/po/LINGUAS" || die + } + + l10n_for_each_disabled_locale_do remove_locale + if use midi ; then # set default gentoo path sed -e 's;/etc/timidity++/timidity-freepats.cfg;/usr/share/timidity/freepats/timidity.cfg;g' \ diff --git a/media-sound/deadbeef/deadbeef-9999.ebuild b/media-sound/deadbeef/deadbeef-9999.ebuild index 6d79e95..7d9ae0a 100644 --- a/media-sound/deadbeef/deadbeef-9999.ebuild +++ b/media-sound/deadbeef/deadbeef-9999.ebuild @@ -4,7 +4,7 @@ EAPI="7" PLOCALES="be bg bn ca cs da de el en_GB es et eu fa fi fr gl he hr hu id it ja kk km lg - lt nl pl pt pt_BR ro ru si_LK sk sl sr sr@latin sv te tr ug uk vi zh_CN zh_TW" + lt lv nl pl pt pt_BR ro ru si_LK sk sl sr sr@latin sv te tr ug uk vi zh_CN zh_TW" PLOCALE_BACKUP="en_GB" @@ -137,6 +137,18 @@ DEPEND="${RDEPEND} amd64? ( dev-lang/yasm:0 ) )" src_prepare() { + if [[ $(l10n_get_locales disabled) =~ "ru" ]] ; then + eapply "${FILESDIR}/${P}-remove-ru-help-translation.patch" + rm -v "${S}/translation/help.ru.txt" || die + fi + + remove_locale() { + sed -e "/${1}/d" \ + -i "${S}/po/LINGUAS" || die + } + + l10n_for_each_disabled_locale_do remove_locale + if ! use_if_iuse linguas_ru ; then eapply "${FILESDIR}/${P}-remove-ru-help-translation.patch" rm -v "${S}/translation/help.ru.txt" || die