diff options
author | Sam James <sam@gentoo.org> | 2021-08-14 04:43:31 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-08-14 04:48:25 +0100 |
commit | c47ce3628b55548b199680b1aa57985bc314fa87 (patch) | |
tree | 61239a2ba93d2c09bc453ce7081b72196ea22b41 | |
parent | fixup! net-analyzer/wireshark: add missing subslot dependencies (diff) | |
download | gentoo-c47ce3628b55548b199680b1aa57985bc314fa87.tar.gz gentoo-c47ce3628b55548b199680b1aa57985bc314fa87.tar.bz2 gentoo-c47ce3628b55548b199680b1aa57985bc314fa87.zip |
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 <sam@gentoo.org>
-rw-r--r-- | games-strategy/warzone2100/warzone2100-4.1.3-r1.ebuild | 31 |
1 files 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 d0b3cf7236ab..a76f0c0ace47 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 } |