Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-strategy/warzone2100/
Date: Wed, 27 Oct 2021 07:22:39
Message-Id: 1635319256.1a62e17d25609e64d741d71501ca9ffd4e5332fb.sam@gentoo
1 commit: 1a62e17d25609e64d741d71501ca9ffd4e5332fb
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 27 07:20:56 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 27 07:20:56 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a62e17d
7
8 games-strategy/warzone2100: add 4.2.0
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 games-strategy/warzone2100/Manifest | 1 +
13 .../warzone2100/warzone2100-4.2.0.ebuild | 116 +++++++++++++++++++++
14 2 files changed, 117 insertions(+)
15
16 diff --git a/games-strategy/warzone2100/Manifest b/games-strategy/warzone2100/Manifest
17 index 3213c458eb6..c4b8c67cc91 100644
18 --- a/games-strategy/warzone2100/Manifest
19 +++ b/games-strategy/warzone2100/Manifest
20 @@ -1,2 +1,3 @@
21 DIST warzone2100-4.1.3.tar.xz 337479212 BLAKE2B 07d1788fc2f8e5073a15231d5bf0c8c50dc0413522ea1589b064190144906fb58008faab66a295cec7759a1036f4d007ef8a42cffd9ef588fde1116b6cd7a38b SHA512 64126a1a5aab8b766cdfc70b8d96465ad451bd6a31e33be963eb89664b062dfe58e195ac3cbc087a9c008519c0e13003d9750bcb428b0e0ff12c82bf9940be3f
22 +DIST warzone2100-4.2.0.tar.xz 338587136 BLAKE2B e29147ce573c7a07e0ab856b1c74000bfc866437784e314393335d21e735fb78fcdbe71aa19f9c806f280f0ca2d33aff15815a09971c9e5ab85cf8b31e9a7864 SHA512 d2dfb8f2710493cbdacb01ca26cf69b476ad906f4851bc384a7a506a37bc296c2bd2e8c464f1a7a86e50924c66839459413d00c73031f9fe024afef8173c820c
23 DIST warzone2100-videos-2.2.wz 571937134 BLAKE2B 60b70a71bd920e2d72ded5d519b17db2f3db4b0289edadeb58059a21aba7038b95219dc44cb807754461d1a9bdca60f0d7698be68622b8bd64a55efa949622d3 SHA512 ca1a1af51296afdaca137114821508c5783f077090e665eae0f6df895855f57c43f84434706309e819417f5f35d1c649bd14e96dc9fbbb1252d30a4f9a223cf6
24
25 diff --git a/games-strategy/warzone2100/warzone2100-4.2.0.ebuild b/games-strategy/warzone2100/warzone2100-4.2.0.ebuild
26 new file mode 100644
27 index 00000000000..929af63b820
28 --- /dev/null
29 +++ b/games-strategy/warzone2100/warzone2100-4.2.0.ebuild
30 @@ -0,0 +1,116 @@
31 +# Copyright 2021 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +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"
37 +inherit cmake plocale xdg
38 +
39 +MY_PV=$(ver_cut 1-2)
40 +VIDEOS_PV=2.2
41 +VIDEOS_P=${PN}-videos-${VIDEOS_PV}.wz
42 +DESCRIPTION="3D real-time strategy game"
43 +HOMEPAGE="https://wz2100.net/"
44 +SRC_URI="mirror://sourceforge/warzone2100/releases/${PV}/${PN}_src.tar.xz -> ${P}.tar.xz
45 + videos? ( mirror://sourceforge/warzone2100/warzone2100/Videos/${VIDEOS_PV}/high-quality-en/sequences.wz -> ${VIDEOS_P} )"
46 +S="${WORKDIR}/${PN}"
47 +
48 +LICENSE="GPL-2+ CC-BY-SA-3.0 public-domain vulkan? ( GPL-3 )"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~x86"
51 +# Upstream requested debug support
52 +IUSE="debug discord nls videos vulkan"
53 +
54 +CDEPEND="
55 + >=dev-games/physfs-2[zip]
56 + dev-db/sqlite:3
57 + >=dev-libs/libsodium-1.0.14:=
58 + media-libs/freetype:2
59 + media-libs/harfbuzz:=
60 + media-libs/libogg
61 + media-libs/libpng:=
62 + media-libs/libsdl2[opengl,video,X]
63 + media-libs/libtheora
64 + media-libs/libvorbis
65 + media-libs/openal
66 + net-libs/miniupnpc:=
67 + net-misc/curl
68 + sys-libs/zlib
69 + nls? ( virtual/libintl )
70 + vulkan? ( media-libs/libsdl2:=[vulkan] )
71 +"
72 +DEPEND="
73 + ${CDEPEND}
74 + dev-libs/fribidi
75 + media-libs/fontconfig
76 +"
77 +RDEPEND="
78 + ${CDEPEND}
79 + media-fonts/dejavu
80 +"
81 +BDEPEND="
82 + app-arch/zip
83 + app-text/asciidoc
84 + virtual/pkgconfig
85 + nls? ( sys-devel/gettext )
86 +"
87 +
88 +HTML_DOCS=( doc/quickstartguide.html doc/docbook-xsl.css doc/ScriptingManual.htm )
89 +DOCS=( README.md doc/images doc/Scripting.md doc/js-globals.md )
90 +
91 +PATCHES=(
92 + "${FILESDIR}"/${PN}-4.1.3-no-compress-manpages.patch
93 +)
94 +
95 +src_unpack() {
96 + unpack ${P}.tar.xz
97 +}
98 +
99 +src_prepare() {
100 + sed -i -e 's/#top_builddir/top_builddir/' po/Makevars || die
101 +
102 + # Delete translations we're not using
103 + cleanup_po() {
104 + local locale=${1}
105 + einfo "Cleaning up disabled locale: ${locale}"
106 + rm po/${locale}.po || die
107 + }
108 +
109 + plocale_for_each_disabled_locale cleanup_po
110 +
111 + cmake_src_prepare
112 +}
113 +
114 +src_configure() {
115 + local mycmakeargs=(
116 + -DWZ_DISTRIBUTOR="Gentoo Linux"
117 + -DWZ_ENABLE_WARNINGS_AS_ERRORS=OFF
118 + -DWZ_ENABLE_BACKEND_VULKAN=$(usex vulkan)
119 + -DBUILD_SHARED_LIBS=OFF
120 + -DENABLE_NLS=$(usex nls)
121 + -DENABLE_DISCORD=$(usex discord)
122 + )
123 +
124 + cmake_src_configure
125 +}
126 +
127 +src_compile() {
128 + cmake_src_compile
129 +
130 + asciidoc -b html5 doc/quickstartguide.asciidoc || die
131 +}
132 +
133 +src_install() {
134 + cmake_src_install
135 +
136 + rm "${ED}"/usr/bin/.portable || die
137 +
138 + # We cover licencing within the ebuild itself
139 + rm "${ED}"/usr/share/doc/${PF}/COPYING* \
140 + "${ED}"/usr/share/doc/${PF}/copyright || die
141 +
142 + if use videos ; then
143 + insinto /usr/share/${PN}
144 + newins "${DISTDIR}"/${VIDEOS_P} sequences.wz
145 + fi
146 +}