From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EA00F13824A for ; Sun, 8 May 2016 16:28:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C81A721C012; Sun, 8 May 2016 16:28:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1677A21C093 for ; Sun, 8 May 2016 16:28:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0A5E9340A15 for ; Sun, 8 May 2016 16:28:08 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4095D860 for ; Sun, 8 May 2016 16:28:04 +0000 (UTC) From: "James Le Cuirot" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "James Le Cuirot" Message-ID: <1462724805.c1c9e268fe5997000ea124eeacc5b9d8fd5006d5.chewi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/makemkv/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-video/makemkv/makemkv-1.9.10.ebuild X-VCS-Directories: media-video/makemkv/ X-VCS-Committer: chewi X-VCS-Committer-Name: James Le Cuirot X-VCS-Revision: c1c9e268fe5997000ea124eeacc5b9d8fd5006d5 X-VCS-Branch: master Date: Sun, 8 May 2016 16:28:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b1da6f58-5f1e-42d6-9815-df93e8f524cb X-Archives-Hash: 69dc38709c007a0b8d076522b0c81719 commit: c1c9e268fe5997000ea124eeacc5b9d8fd5006d5 Author: James Le Cuirot gentoo org> AuthorDate: Sat May 7 22:35:31 2016 +0000 Commit: James Le Cuirot gentoo org> CommitDate: Sun May 8 16:26:45 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1c9e268 media-video/makemkv: Use the l10n eclass to select locales Upstream uses non-standard locale names so map them with an associative array and perform some tricks. Thanks to Jan Chren for the initial work on this. Package-Manager: portage-2.2.28 media-video/makemkv/makemkv-1.9.10.ebuild | 52 ++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/media-video/makemkv/makemkv-1.9.10.ebuild b/media-video/makemkv/makemkv-1.9.10.ebuild index 58a4765..d1daf39 100644 --- a/media-video/makemkv/makemkv-1.9.10.ebuild +++ b/media-video/makemkv/makemkv-1.9.10.ebuild @@ -43,6 +43,28 @@ RDEPEND=" " DEPEND="${RDEPEND}" +# Upstream uses non-standard locale names so map them with this +# associative array and perform some tricks below. +declare -A MY_LOCALES +MY_LOCALES=( + [zh]=chi + [da]=dan + [de]=deu + [nl]=dut + [fr]=fra + [it]=ita + [ja]=jpn + [no]=nor + [fa]=per + [pl]=pol + [pt_BR]=ptb + [es]=spa + [sv]=swe +) + +PLOCALES="${!MY_LOCALES[@]}" +inherit l10n + S="${WORKDIR}/makemkv-oss-${PV}" src_prepare() { @@ -57,6 +79,9 @@ src_prepare() { PATCHES+=( "${FILESDIR}"/${PN}-qt5.patch ) fi + # Check for locale changes against the non-standard names. + PLOCALES="${MY_LOCALES[@]}" l10n_find_plocales_changes "${WORKDIR}"/${MY_PB}/src/share makemkv_ .mo.gz + default } @@ -103,24 +128,29 @@ src_install() { make_desktop_entry ${PN} MakeMKV ${PN} 'Qt;AudioVideo;Video' fi - # install bin package - pushd "${WORKDIR}"/${MY_PB}/bin >/dev/null + cd "${WORKDIR}"/${MY_PB} || die + + # install prebuilt bins if use x86; then - dobin i386/{makemkvcon,mmdtsdec} + dobin bin/i386/{makemkvcon,mmdtsdec} elif use amd64; then - dobin amd64/makemkvcon - use multilib && dobin i386/mmdtsdec + dobin bin/amd64/makemkvcon + use multilib && dobin bin/i386/mmdtsdec fi - popd >/dev/null - # install license and default profile - pushd "${WORKDIR}"/${MY_PB}/src/share >/dev/null insinto /usr/share/MakeMKV - doins *.{gz,xml} - popd >/dev/null + + # install profiles + doins src/share/*.xml + + # install locales + local locale + for locale in $(l10n_get_locales); do + doins src/share/makemkv_${MY_LOCALES[${locale}]}.mo.gz + done } -pkg_preinst() { gnome2_icon_savelist; } +pkg_preinst() { gnome2_icon_savelist; } pkg_postinst() { gnome2_icon_cache_update