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