From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id ECB98139360 for ; Sat, 14 Aug 2021 03:48:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 08CBCE0A88; Sat, 14 Aug 2021 03:48:43 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DC542E0A88 for ; Sat, 14 Aug 2021 03:48:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 176B9342AE3 for ; Sat, 14 Aug 2021 03:48:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 96DD68DA for ; Sat, 14 Aug 2021 03:48:38 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1628912905.c47ce3628b55548b199680b1aa57985bc314fa87.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-strategy/warzone2100/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-strategy/warzone2100/warzone2100-4.1.3-r1.ebuild X-VCS-Directories: games-strategy/warzone2100/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: c47ce3628b55548b199680b1aa57985bc314fa87 X-VCS-Branch: master Date: Sat, 14 Aug 2021 03:48:38 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5d238167-f6d4-4b50-807c-56d5a88059ff X-Archives-Hash: f3354e1d35f271f5abc54eeda9d0d729 commit: c47ce3628b55548b199680b1aa57985bc314fa87 Author: Sam James gentoo org> AuthorDate: Sat Aug 14 03:43:31 2021 +0000 Commit: Sam James gentoo org> CommitDate: Sat Aug 14 03:48:25 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c47ce362 games-strategy/warzone2100: install translations Use the CMake install target instead of our own logic in src_install - this gives us the translations for free. We now use plocale.eclass to install the right subset of translations/localised strings requested by the user. Closes: https://bugs.gentoo.org/807730 Signed-off-by: Sam James gentoo.org> .../warzone2100/warzone2100-4.1.3-r1.ebuild | 31 +++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/games-strategy/warzone2100/warzone2100-4.1.3-r1.ebuild b/games-strategy/warzone2100/warzone2100-4.1.3-r1.ebuild index d0b3cf7236a..a76f0c0ace4 100644 --- a/games-strategy/warzone2100/warzone2100-4.1.3-r1.ebuild +++ b/games-strategy/warzone2100/warzone2100-4.1.3-r1.ebuild @@ -3,7 +3,8 @@ EAPI=7 -inherit cmake desktop xdg +PLOCALES="af_ZA bg_BG ca_ES cs da de el en_GB eo es et_EE fa_IR fi fr fy ga he_IL hr hu id_ID id it ko la lt nb nl pl pt_BR pt ro ru sk sl tr tt_RU uk_UA zh_CN zh_TW" +inherit cmake desktop plocale xdg MY_PV=$(ver_cut 1-2) VIDEOS_PV=2.2 @@ -70,6 +71,15 @@ src_prepare() { sed -i -e 's/#top_builddir/top_builddir/' po/Makevars || die + # Delete translations we're not using + cleanup_po() { + local locale=${1} + einfo "Cleaning up disabled locale: ${1}" + rm po/${1}.po || die + } + + plocale_for_each_disabled_locale cleanup_po + cmake_src_prepare } @@ -92,24 +102,15 @@ src_compile() { } src_install() { - default + cmake_src_install - insinto /usr/bin - dobin "${BUILD_DIR}"/src/${PN} + rm "${ED}"/usr/bin/.portable || die - insinto /usr/share/${PN} - doins "${BUILD_DIR}"/data/base.wz - doins "${BUILD_DIR}"/data/mp.wz + # We cover licencing within the ebuild itself + rm "${ED}"/usr/share/doc/${PF}/COPYING* \ + "${ED}"/usr/share/doc/${PF}/copyright || die if use videos ; then newins "${DISTDIR}"/${VIDEOS_P} sequences.wz fi - - insinto /usr/share/${PN} - doins -r data/music - - doman "${BUILD_DIR}"/doc/warzone2100.6 - - doicon -s 128 icons/warzone2100.png - domenu icons/warzone2100.desktop }