Gentoo Archives: gentoo-commits

From: Conrad Kostecki <conikost@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-simulation/openrct2/
Date: Wed, 19 Aug 2020 22:45:11
Message-Id: 1597877099.5634e3dc81fbc76b2b1376854421761521e8c878.conikost@gentoo
1 commit: 5634e3dc81fbc76b2b1376854421761521e8c878
2 Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 19 22:19:32 2020 +0000
4 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 19 22:44:59 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5634e3dc
7
8 games-simulation/openrct2: bump to version 0.3.0
9
10 Package-Manager: Portage-3.0.1, Repoman-2.3.23
11 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
12
13 games-simulation/openrct2/Manifest | 1 +
14 games-simulation/openrct2/openrct2-0.3.0.ebuild | 166 ++++++++++++++++++++++++
15 2 files changed, 167 insertions(+)
16
17 diff --git a/games-simulation/openrct2/Manifest b/games-simulation/openrct2/Manifest
18 index 19c4c945e1d..4e6324b24d6 100644
19 --- a/games-simulation/openrct2/Manifest
20 +++ b/games-simulation/openrct2/Manifest
21 @@ -1,4 +1,5 @@
22 DIST openrct2-0.2.6.tar.gz 11094308 BLAKE2B 4aed899fee4735a0237558c1c34f67f37ecc9b8138f8a66314a9abc013cf10ad3a9f80fd5159afc5860ded780d4c705fd9e394b38f981aac90c8cee883356996 SHA512 abe7c344b7588b169c95ffe0ab9028f72614d9b5783d81fa4f97f206d90d8cbaa0b91f04314c10926dbd5f68bba166558c428557f598abb343d306800611fb24
23 +DIST openrct2-0.3.0.tar.gz 11754657 BLAKE2B 66d956fd85829bc6b4825a59db9f3a3eebbb1e4565a4c8afdb8c05d9d7b3f339f75ff1d9fbc0a0f48d3c0673ac3fc335fb6bec5fe458513de2a0611ccfa3d48d SHA512 585bcd7a077114dc5332b95cb44f7c689e47fcbd7cff7c2ab32a24253a4fd87f50e79f40f9428c79ea6bc6d8cd88019b4edfce88509c03bc2d43854926d21317
24 DIST openrct2-objects-1.0.14.zip 2237331 BLAKE2B 39a0c92674abc0d16fc3dd463b68e2ee8f3f7dd1c2a944d5448173ca58e6c3c4a79092a40e66ac8e919f75be2d2d691a76dc046e41caf7237138815a4e6ad526 SHA512 66e7a55ca894f2ea11af1c6300f934ef00f659137dded06f54bf749f490ff6063f95da800ae3cbfbbffe1c3e7d995e307d1281d57e4454ded6fed5affde84f8e
25 DIST openrct2-objects-1.0.16.zip 3056214 BLAKE2B 7d8d938ba20ce612f7845dce1038134ec60d7e17e0f7d78a67480ae1ae2e6f8dd043f266742acd2dbd8539390349a2dcd7b8c73859a3caef3b5cd8565a4ec1c7 SHA512 2a8696467320f7894330d0fbb4894dd6effb2d6844fcf643e1f8e15a7b0b45411a7c205b75a9e9d7ea0627bc70b7a7e1e2213e0f7db1c7b489ae8b485670dba5
26 DIST openrct2-replays-0.0.17.zip 1825315 BLAKE2B 9c22b52302c37abe5e802662eb4b6805fa3e229a71ab9f901b57eee30641ae4b86de9b1315476d158a3feb57c6be2a26c1ccca7c94328fe35bf57b46e2364c32 SHA512 103a8ba5b5b2dd76c18b642720d262553bb15ad26d59892f895327bf5e87b73e476b255af6556286faacb668aae49aa1ee29a14bcca2bb75d855383d12e60f4a
27
28 diff --git a/games-simulation/openrct2/openrct2-0.3.0.ebuild b/games-simulation/openrct2/openrct2-0.3.0.ebuild
29 new file mode 100644
30 index 00000000000..24c511c6a59
31 --- /dev/null
32 +++ b/games-simulation/openrct2/openrct2-0.3.0.ebuild
33 @@ -0,0 +1,166 @@
34 +# Copyright 1999-2020 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +inherit cmake readme.gentoo-r1 xdg-utils
40 +
41 +MY_PN="OpenRCT2"
42 +MY_PN_OBJ="objects"
43 +MY_PN_RPL="replays"
44 +MY_PN_TS="title-sequences"
45 +MY_PV_OBJ="1.0.16"
46 +MY_PV_RPL="0.0.17"
47 +MY_PV_TS="0.1.2c"
48 +
49 +DESCRIPTION="An open source re-implementation of Chris Sawyer's RollerCoaster Tycoon 2"
50 +HOMEPAGE="https://openrct2.org/"
51 +SRC_URI="
52 + https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
53 + https://github.com/${MY_PN}/${MY_PN_OBJ}/releases/download/v${MY_PV_OBJ}/${MY_PN_OBJ}.zip -> ${PN}-${MY_PN_OBJ}-${MY_PV_OBJ}.zip
54 + https://github.com/${MY_PN}/${MY_PN_TS}/releases/download/v${MY_PV_TS}/${MY_PN_TS}.zip -> ${PN}-${MY_PN_TS}-${MY_PV_TS}.zip
55 + test? ( https://github.com/${MY_PN}/${MY_PN_RPL}/releases/download/v${MY_PV_RPL}/${MY_PN_RPL}.zip -> ${PN}-${MY_PN_RPL}-${MY_PV_RPL}.zip )
56 +"
57 +
58 +LICENSE="GPL-3"
59 +SLOT="0"
60 +KEYWORDS="~amd64 ~arm64 ~x86"
61 +IUSE="dedicated libressl +lightfx +opengl scripting test +truetype"
62 +
63 +COMMON_DEPEND="
64 + dev-libs/icu:=
65 + dev-libs/jansson
66 + dev-libs/libzip:=
67 + media-libs/libpng:0=
68 + net-misc/curl[ssl]
69 + sys-libs/zlib
70 + !dedicated? (
71 + media-libs/libsdl2
72 + media-libs/speexdsp
73 + opengl? ( virtual/opengl )
74 + )
75 + libressl? ( dev-libs/libressl:0= )
76 + !libressl? ( dev-libs/openssl:0= )
77 + scripting? ( dev-lang/duktape )
78 + truetype? (
79 + media-libs/fontconfig:1.0
80 + media-libs/freetype:2
81 + )
82 +"
83 +
84 +RDEPEND="
85 + ${COMMON_DEPEND}
86 + dedicated? (
87 + acct-group/openrct2
88 + acct-user/openrct2
89 + )
90 +"
91 +
92 +DEPEND="
93 + ${COMMON_DEPEND}
94 + test? ( dev-cpp/gtest )
95 +"
96 +
97 +BDEPEND="
98 + app-arch/unzip
99 + virtual/pkgconfig
100 +"
101 +
102 +RESTRICT="!test? ( test )"
103 +
104 +S="${WORKDIR}/${MY_PN}-${PV}"
105 +
106 +PATCHES=(
107 + "${FILESDIR}/${PN}-0.2.4-include-additional-paths.patch"
108 + "${FILESDIR}/${PN}-0.2.6-gtest-1.10.patch"
109 +)
110 +
111 +src_unpack() {
112 + unpack "${P}".tar.gz
113 +
114 + mkdir -p "${S}"/data/sequence || die
115 + cd "${S}"/data/sequence || die
116 + unpack "${PN}-${MY_PN_TS}-${MY_PV_TS}".zip
117 +
118 + mkdir -p "${S}"/data/object || die
119 + cd "${S}"/data/object || die
120 + unpack "${PN}-${MY_PN_OBJ}-${MY_PV_OBJ}".zip
121 +
122 + if use test; then
123 + mkdir -p "${S}"/testdata/replays || die
124 + cd "${S}"/testdata/replays || die
125 + unpack "${PN}-${MY_PN_RPL}-${MY_PV_RPL}".zip
126 + fi
127 +}
128 +
129 +src_prepare() {
130 + cmake_src_prepare
131 +
132 + # Don't treat warnings as errors.
133 + sed -e 's/-Werror//' -i CMakeLists.txt || die
134 +}
135 +
136 +src_configure() {
137 + # Note: There is currently no support for Disord-RPC and Google Benchmark,
138 + # as both packages do not exist in Gentoo, so support for them has been disabled.
139 + local mycmakeargs=(
140 + -DDISABLE_DISCORD_RPC=ON
141 + -DDISABLE_GOOGLE_BENCHMARK=ON
142 + -DDISABLE_GUI=$(usex dedicated)
143 + -DDISABLE_HTTP=OFF
144 + -DDISABLE_NETWORK=OFF
145 + $(usex !dedicated "-DDISABLE_OPENGL=$(usex !opengl)" "")
146 + -DDISABLE_TTF=$(usex !truetype)
147 + -DDOWNLOAD_OBJECTS=OFF
148 + -DDOWNLOAD_REPLAYS=OFF
149 + -DDOWNLOAD_TITLE_SEQUENCES=OFF
150 + -DENABLE_LIGHTFX=$(usex lightfx)
151 + -DENABLE_SCRIPTING=$(usex scripting)
152 + -DOPENRCT2_USE_CCACHE=OFF
153 + -DPORTABLE=OFF
154 + -DSTATIC=OFF
155 + $(usex test "-DSYSTEM_GTEST=ON" "")
156 + -DWITH_TESTS=$(usex test)
157 + -DUSE_MMAP=ON
158 + )
159 +
160 + cmake_src_configure
161 +}
162 +
163 +src_test() {
164 + # Since the tests need the OpenRCT2 data,
165 + # we need to symlink them into the build directory,
166 + # otherwise some tests will fail, as they don't find the OpenRCT2 data.
167 + # It is currently not possible to override that path.
168 + # See: https://github.com/OpenRCT2/OpenRCT2/issues/6473
169 + ln -s "${S}"/data "${BUILD_DIR}" || die
170 +
171 + cmake_src_test
172 +}
173 +
174 +src_install() {
175 + use scripting && DOCS+=( "distribution/scripting.md" "distribution/openrct2.d.ts" )
176 +
177 + cmake_src_install
178 +
179 + if use dedicated; then
180 + newinitd "${FILESDIR}"/openrct2.initd openrct2
181 + newconfd "${FILESDIR}"/openrct2.confd openrct2
182 + fi
183 +
184 + readme.gentoo_create_doc
185 +}
186 +
187 +pkg_postinst() {
188 + readme.gentoo_print_elog
189 +
190 + xdg_desktop_database_update
191 + xdg_icon_cache_update
192 + xdg_mimeinfo_database_update
193 +}
194 +
195 +pkg_postrm() {
196 + xdg_desktop_database_update
197 + xdg_icon_cache_update
198 + xdg_mimeinfo_database_update
199 +}