1 |
commit: ed6f0ff96641bee2fb4a5f1f997a24abf49149d1 |
2 |
Author: Jonas Frei <freijon <AT> pm <DOT> me> |
3 |
AuthorDate: Sat Apr 2 06:40:59 2022 +0000 |
4 |
Commit: Jonas Frei <freijon <AT> pm <DOT> me> |
5 |
CommitDate: Sat Apr 2 06:40:59 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ed6f0ff9 |
7 |
|
8 |
games-engines/fs2_open: Bump to 22.0.0, Added 'clang' USE flag |
9 |
|
10 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
11 |
Signed-off-by: Jonas Frei <freijon <AT> pm.me> |
12 |
|
13 |
games-engines/fs2_open/Manifest | 3 + |
14 |
.../files/fs2_open-22.0.0-disable-discord.patch | 55 +++++++++++ |
15 |
.../files/fs2_open-22.0.0-dont-build-lz4.patch | 9 ++ |
16 |
...=> fs2_open-22.0.0-make-arch-independent.patch} | 4 +- |
17 |
games-engines/fs2_open/fs2_open-21.4.0.ebuild | 61 ------------ |
18 |
games-engines/fs2_open/fs2_open-22.0.0.ebuild | 103 +++++++++++++++++++++ |
19 |
games-engines/fs2_open/metadata.xml | 1 + |
20 |
7 files changed, 173 insertions(+), 63 deletions(-) |
21 |
|
22 |
diff --git a/games-engines/fs2_open/Manifest b/games-engines/fs2_open/Manifest |
23 |
index fae041c48..e84657f91 100644 |
24 |
--- a/games-engines/fs2_open/Manifest |
25 |
+++ b/games-engines/fs2_open/Manifest |
26 |
@@ -1,3 +1,6 @@ |
27 |
DIST fs2_open-21.4.1-ext_libRocket.tar.gz 2417905 BLAKE2B 0e5ac40b0e811b9213fb84f6f2f0ef38ad7d562ae671e865d96e40615c2d67213905ce153a69192c0b53a3e4f0d1aef077c0769e46d308adf9210c0c9d1fe7c2 SHA512 700e242ecb5207faf729ca7d23ac4f28be819c0ef7a0ba51ca18de1592f1016040cd5e4c1c75a573f91cea69dd43549966ac089804a52c0f1b0cfbaabefc4346 |
28 |
DIST fs2_open-21.4.1-ext_rpavlik-cmake-modules.tar.gz 267464 BLAKE2B d63fa3867aad5fad7bd5d20845dd8d6a6698d59dc30dc511704f3c74bbe958bb6d36160bae3ef5c01027719c50d18e4d24209ea5811c6a52c5af4d3de2a587e9 SHA512 0bb03e2a1c0cafa80849163455cdb5fc5c7200e51f18f0354c36f251b51156f86a04a9f87cd17e2942d14ae8767d8df756062fbcff9b37f04e8399b2e37d306f |
29 |
DIST fs2_open-21.4.1.tar.gz 10441595 BLAKE2B ae59cea98420cbdd6f18832fa0b8ba332993db03a53cbea43a96827dc4c7da375b14694ce60b1633d8275daa88ac32029be7b8211b7efd427baaffdd784720d9 SHA512 a4e6821ee2513cabf8b521f672c36c45aca8fc83fd6901ba19f2c0c0c27b3516c60dabfec1bfae43d82da94c628b9160c447ce853c9927dbb5901c7298986226 |
30 |
+DIST fs2_open-22.0.0-ext_libRocket.tar.gz 2417905 BLAKE2B 0e5ac40b0e811b9213fb84f6f2f0ef38ad7d562ae671e865d96e40615c2d67213905ce153a69192c0b53a3e4f0d1aef077c0769e46d308adf9210c0c9d1fe7c2 SHA512 700e242ecb5207faf729ca7d23ac4f28be819c0ef7a0ba51ca18de1592f1016040cd5e4c1c75a573f91cea69dd43549966ac089804a52c0f1b0cfbaabefc4346 |
31 |
+DIST fs2_open-22.0.0-ext_rpavlik-cmake-modules.tar.gz 267464 BLAKE2B d63fa3867aad5fad7bd5d20845dd8d6a6698d59dc30dc511704f3c74bbe958bb6d36160bae3ef5c01027719c50d18e4d24209ea5811c6a52c5af4d3de2a587e9 SHA512 0bb03e2a1c0cafa80849163455cdb5fc5c7200e51f18f0354c36f251b51156f86a04a9f87cd17e2942d14ae8767d8df756062fbcff9b37f04e8399b2e37d306f |
32 |
+DIST fs2_open-22.0.0.tar.gz 10573800 BLAKE2B b75bd9e44679bf2ad441178b7f8175f4429e321d2feeddf2cf5b4391e51f82c15250c36b73f3750326b1cd3ce71ae319042f57432d48a41b5abab9e30a4a76ba SHA512 e57972348073571947ff88e5a392ae0b4eec9d81cbcfe3d0ff3c2b844dd676cb33f727ddb32a0544e9cd3f1ae9b614429ea137b8921ef625fad27a53f1875081 |
33 |
|
34 |
diff --git a/games-engines/fs2_open/files/fs2_open-22.0.0-disable-discord.patch b/games-engines/fs2_open/files/fs2_open-22.0.0-disable-discord.patch |
35 |
new file mode 100644 |
36 |
index 000000000..1b145d7da |
37 |
--- /dev/null |
38 |
+++ b/games-engines/fs2_open/files/fs2_open-22.0.0-disable-discord.patch |
39 |
@@ -0,0 +1,55 @@ |
40 |
+--- fs2_open/code/CMakeLists.txt 2022-03-27 21:03:27.290788070 +0200 |
41 |
++++ fs2_open/code/CMakeLists.txt 2022-03-27 21:06:50.271782416 +0200 |
42 |
+@@ -41,8 +41,6 @@ |
43 |
+ |
44 |
+ target_link_libraries(code PUBLIC md5) |
45 |
+ |
46 |
+-target_link_libraries(code PUBLIC discord-rpc) |
47 |
+- |
48 |
+ target_link_libraries(code PUBLIC libRocket) |
49 |
+ |
50 |
+ target_link_libraries(code PUBLIC pcp) |
51 |
+--- fs2_open/code/source_groups.cmake 2021-11-01 18:00:53.000000000 +0100 |
52 |
++++ fs2_open/code/source_groups.cmake 2022-03-27 21:35:47.595734025 +0200 |
53 |
+@@ -705,11 +705,6 @@ |
54 |
+ libs/antlr/ErrorListener.h |
55 |
+ ) |
56 |
+ |
57 |
+-add_file_folder("Libs\\\\Discord" |
58 |
+- libs/discord/discord.cpp |
59 |
+- libs/discord/discord.h |
60 |
+-) |
61 |
+- |
62 |
+ if (FSO_BUILD_WITH_FFMPEG) |
63 |
+ add_file_folder("Libs\\\\FFmpeg" |
64 |
+ libs/ffmpeg/FFmpeg.cpp |
65 |
+--- fs2_open/lib/CMakeLists.txt 2022-03-27 21:03:27.287788070 +0200 |
66 |
++++ fs2_open/lib/CMakeLists.txt 2022-03-27 21:07:12.849781787 +0200 |
67 |
+@@ -33,8 +33,6 @@ |
68 |
+ include(FFmpeg.cmake) |
69 |
+ endif() |
70 |
+ |
71 |
+-add_subdirectory(discord) |
72 |
+- |
73 |
+ include(libRocket.cmake) |
74 |
+ |
75 |
+ add_subdirectory(libpcp) |
76 |
+--- fs2_open/freespace2/freespace.cpp 2021-11-01 18:00:53.000000000 +0100 |
77 |
++++ fs2_open/freespace2/freespace.cpp 2022-03-27 21:07:50.111780749 +0200 |
78 |
+@@ -83,7 +83,6 @@ |
79 |
+ #include "jumpnode/jumpnode.h" |
80 |
+ #include "lab/labv2.h" |
81 |
+ #include "lab/wmcgui.h" //So that GUI_System can be initialized |
82 |
+-#include "libs/discord/discord.h" |
83 |
+ #include "libs/ffmpeg/FFmpeg.h" |
84 |
+ #include "lighting/lighting.h" |
85 |
+ #include "localization/localize.h" |
86 |
+@@ -1987,8 +1987,6 @@ |
87 |
+ #ifdef WITH_FFMPEG |
88 |
+ libs::ffmpeg::initialize(); |
89 |
+ #endif |
90 |
+- |
91 |
+- libs::discord::init(); |
92 |
+ } |
93 |
+ |
94 |
+ nprintf(("General", "Ships.tbl is : %s\n", Game_ships_tbl_valid ? "VALID" : "INVALID!!!!")); |
95 |
|
96 |
diff --git a/games-engines/fs2_open/files/fs2_open-22.0.0-dont-build-lz4.patch b/games-engines/fs2_open/files/fs2_open-22.0.0-dont-build-lz4.patch |
97 |
new file mode 100644 |
98 |
index 000000000..60dc982a1 |
99 |
--- /dev/null |
100 |
+++ b/games-engines/fs2_open/files/fs2_open-22.0.0-dont-build-lz4.patch |
101 |
@@ -0,0 +1,9 @@ |
102 |
+--- fs2_open/lib/CMakeLists.txt 2022-04-01 23:30:46.000000000 +0200 |
103 |
++++ fs2_open/lib/CMakeLists.txt 2022-04-02 08:20:16.336924470 +0200 |
104 |
+@@ -52,5 +52,3 @@ |
105 |
+ add_subdirectory(variant) |
106 |
+ |
107 |
+ add_subdirectory(any) |
108 |
+- |
109 |
+-ADD_SUBDIRECTORY(lz4) |
110 |
+\ No newline at end of file |
111 |
|
112 |
diff --git a/games-engines/fs2_open/files/fs2_open-21.4.0-make-arch-independent.patch b/games-engines/fs2_open/files/fs2_open-22.0.0-make-arch-independent.patch |
113 |
similarity index 71% |
114 |
rename from games-engines/fs2_open/files/fs2_open-21.4.0-make-arch-independent.patch |
115 |
rename to games-engines/fs2_open/files/fs2_open-22.0.0-make-arch-independent.patch |
116 |
index 8bd511129..c2f5d7f36 100644 |
117 |
--- a/games-engines/fs2_open/files/fs2_open-21.4.0-make-arch-independent.patch |
118 |
+++ b/games-engines/fs2_open/files/fs2_open-22.0.0-make-arch-independent.patch |
119 |
@@ -1,5 +1,5 @@ |
120 |
---- fs2_open-21.2.0/cmake/version.cmake 2021-05-22 20:20:18.448441242 +0200 |
121 |
-+++ fs2_open-21.2.0/cmake/version.cmake 2021-05-22 20:21:05.493447003 +0200 |
122 |
+--- fs2_open/cmake/version.cmake 2021-05-22 20:20:18.448441242 +0200 |
123 |
++++ fs2_open/cmake/version.cmake 2021-05-22 20:21:05.493447003 +0200 |
124 |
@@ -35,11 +35,6 @@ |
125 |
SET(FSO_BINARY_SUFFIX "${FSO_VERSION_MAJOR}_${FSO_VERSION_MINOR}_${FSO_VERSION_BUILD}_${FSO_VERSION_REVISION_STR}") |
126 |
ENDIF() |
127 |
|
128 |
diff --git a/games-engines/fs2_open/fs2_open-21.4.0.ebuild b/games-engines/fs2_open/fs2_open-21.4.0.ebuild |
129 |
deleted file mode 100644 |
130 |
index efd95c55d..000000000 |
131 |
--- a/games-engines/fs2_open/fs2_open-21.4.0.ebuild |
132 |
+++ /dev/null |
133 |
@@ -1,61 +0,0 @@ |
134 |
-# Copyright 2021 Gentoo Authors |
135 |
-# Distributed under the terms of the GNU General Public License v2 |
136 |
- |
137 |
-EAPI=7 |
138 |
- |
139 |
-inherit git-r3 |
140 |
-inherit cmake |
141 |
- |
142 |
-# Replace "." with "_" in version |
143 |
-_PV=${PV//./_} |
144 |
- |
145 |
-DESCRIPTION="FreeSpace2 Source Code Project game engine" |
146 |
-HOMEPAGE="https://github.com/scp-fs2open/fs2open.github.com/" |
147 |
-EGIT_REPO_URI="https://github.com/scp-fs2open/fs2open.github.com.git" |
148 |
-EGIT_COMMIT="release_${_PV}" |
149 |
- |
150 |
-LICENSE="Unlicense" |
151 |
-SLOT="0" |
152 |
-KEYWORDS="" |
153 |
- |
154 |
-DEPEND=" |
155 |
- media-libs/libjpeg-turbo |
156 |
- media-libs/libpng |
157 |
- media-libs/libtheora |
158 |
- media-libs/libvorbis |
159 |
- >=dev-lang/lua-5.1.0:* |
160 |
- media-libs/mesa |
161 |
- media-libs/openal |
162 |
- media-libs/libsdl2 |
163 |
- media-libs/glu |
164 |
- dev-libs/jansson |
165 |
- app-arch/lz4 |
166 |
-" |
167 |
-RDEPEND="${DEPEND}" |
168 |
-BDEPEND="" |
169 |
- |
170 |
-CMAKE_BUILD_TYPE=Release |
171 |
- |
172 |
-src_prepare() { |
173 |
- eapply "${FILESDIR}/${P}-make-arch-independent.patch" |
174 |
- eapply_user |
175 |
- cmake_src_prepare |
176 |
-} |
177 |
- |
178 |
-src_install() { |
179 |
- exeinto "/opt/${PN}" |
180 |
- doexe "${BUILD_DIR}/bin/${PN}_${_PV}" |
181 |
- insinto "/opt/${PN}" |
182 |
- doins "${BUILD_DIR}/bin/libRocketControls.so" |
183 |
- doins "${BUILD_DIR}/bin/libRocketControlsLua.so" |
184 |
- doins "${BUILD_DIR}/bin/libRocketCore.so" |
185 |
- doins "${BUILD_DIR}/bin/libRocketCoreLua.so" |
186 |
- doins "${BUILD_DIR}/bin/libRocketDebugger.so" |
187 |
- doins "${BUILD_DIR}/bin/libdiscord-rpc.so" |
188 |
-} |
189 |
- |
190 |
-pkg_postinst() { |
191 |
- einfo "This package only generates the engine binary." |
192 |
- einfo "The retail Freespace 2 data is required to play the" |
193 |
- einfo "original game and most mods." |
194 |
-} |
195 |
|
196 |
diff --git a/games-engines/fs2_open/fs2_open-22.0.0.ebuild b/games-engines/fs2_open/fs2_open-22.0.0.ebuild |
197 |
new file mode 100644 |
198 |
index 000000000..8c63d4680 |
199 |
--- /dev/null |
200 |
+++ b/games-engines/fs2_open/fs2_open-22.0.0.ebuild |
201 |
@@ -0,0 +1,103 @@ |
202 |
+# Copyright 2022 Gentoo Authors |
203 |
+# Distributed under the terms of the GNU General Public License v2 |
204 |
+ |
205 |
+EAPI=8 |
206 |
+ |
207 |
+inherit cmake |
208 |
+ |
209 |
+DESCRIPTION="FreeSpace2 Source Code Project game engine" |
210 |
+HOMEPAGE="https://github.com/scp-fs2open/fs2open.github.com/" |
211 |
+ |
212 |
+# Replace "." with "_" in version |
213 |
+_PV=${PV//./_} |
214 |
+ |
215 |
+# Current hashes of external repositories: |
216 |
+HASH_LIBROCKET="ecd648a43aff8a9f3daf064d75ca5725237d5b38" |
217 |
+HASH_CMAKE_MODULES="7cef9577d6fc35057ea57f46b4986a8a28aeff50" |
218 |
+ |
219 |
+SRC_URI=" |
220 |
+ https://github.com/scp-fs2open/fs2open.github.com/archive/refs/tags/release_${_PV}.tar.gz -> ${P}.tar.gz |
221 |
+ https://github.com/asarium/libRocket/archive/${HASH_LIBROCKET}.tar.gz -> ${P}-ext_libRocket.tar.gz |
222 |
+ https://github.com/asarium/cmake-modules/archive/${HASH_CMAKE_MODULES}.tar.gz -> ${P}-ext_rpavlik-cmake-modules.tar.gz |
223 |
+" |
224 |
+ |
225 |
+LICENSE="Unlicense MIT Boost-1.0" |
226 |
+SLOT="0" |
227 |
+KEYWORDS="~amd64" |
228 |
+IUSE="clang debug discord" |
229 |
+ |
230 |
+DEPEND=" |
231 |
+ app-arch/lz4 |
232 |
+ <dev-lang/lua-5.1.6:5.1 |
233 |
+ dev-libs/jansson |
234 |
+ media-libs/freetype:2 |
235 |
+ media-libs/glu |
236 |
+ media-libs/libjpeg-turbo |
237 |
+ media-libs/libpng |
238 |
+ media-libs/libsdl2 |
239 |
+ media-libs/libtheora |
240 |
+ media-libs/libvorbis |
241 |
+ media-libs/mesa |
242 |
+ media-libs/openal |
243 |
+ media-video/ffmpeg |
244 |
+" |
245 |
+RDEPEND="${DEPEND}" |
246 |
+BDEPEND=" |
247 |
+ dev-util/cmake |
248 |
+ clang? ( sys-devel/clang:= ) |
249 |
+" |
250 |
+PATCHES=( |
251 |
+ "${FILESDIR}/${P}-dont-build-lz4.patch" |
252 |
+ "${FILESDIR}/${P}-make-arch-independent.patch" |
253 |
+) |
254 |
+ |
255 |
+CMAKE_BUILD_TYPE=Release |
256 |
+ |
257 |
+S="${WORKDIR}/fs2open.github.com-release_${_PV}" |
258 |
+ |
259 |
+src_unpack() { |
260 |
+ unpack ${A} |
261 |
+ mv libRocket-${HASH_LIBROCKET}/* "${S}/lib/libRocket/" || die |
262 |
+ mv cmake-modules-${HASH_CMAKE_MODULES}/* "${S}/cmake/external/rpavlik-cmake-modules/" || die |
263 |
+} |
264 |
+ |
265 |
+src_configure() { |
266 |
+ if use clang ; then |
267 |
+ # Force clang |
268 |
+ einfo "Enforcing the use of clang due to USE=clang ..." |
269 |
+ AR=llvm-ar |
270 |
+ CC=${CHOST}-clang |
271 |
+ CXX=${CHOST}-clang++ |
272 |
+ LDFLAGS+=" -fuse-ld=lld" |
273 |
+ fi |
274 |
+ cmake_src_configure |
275 |
+} |
276 |
+ |
277 |
+src_prepare() { |
278 |
+ use discord || eapply "${FILESDIR}/${P}-disable-discord.patch" |
279 |
+ eapply_user |
280 |
+ cmake_src_prepare |
281 |
+ use debug && CMAKE_BUILD_TYPE=Debug |
282 |
+} |
283 |
+ |
284 |
+src_install() { |
285 |
+ exeinto "/opt/${PN}" |
286 |
+ if use debug ; then |
287 |
+ doexe "${BUILD_DIR}/bin/${PN}_${_PV}-DEBUG" |
288 |
+ else |
289 |
+ doexe "${BUILD_DIR}/bin/${PN}_${_PV}" |
290 |
+ fi |
291 |
+ insinto "/opt/${PN}" |
292 |
+ doins "${BUILD_DIR}/bin/libRocketControls.so" |
293 |
+ doins "${BUILD_DIR}/bin/libRocketControlsLua.so" |
294 |
+ doins "${BUILD_DIR}/bin/libRocketCore.so" |
295 |
+ doins "${BUILD_DIR}/bin/libRocketCoreLua.so" |
296 |
+ doins "${BUILD_DIR}/bin/libRocketDebugger.so" |
297 |
+ use discord && doins "${BUILD_DIR}/bin/libdiscord-rpc.so" |
298 |
+} |
299 |
+ |
300 |
+pkg_postinst() { |
301 |
+ einfo "This package only generates the engine binary." |
302 |
+ einfo "The retail Freespace 2 data is required to play the" |
303 |
+ einfo "original game and most mods." |
304 |
+} |
305 |
|
306 |
diff --git a/games-engines/fs2_open/metadata.xml b/games-engines/fs2_open/metadata.xml |
307 |
index aef4fd67c..52df334c4 100644 |
308 |
--- a/games-engines/fs2_open/metadata.xml |
309 |
+++ b/games-engines/fs2_open/metadata.xml |
310 |
@@ -16,6 +16,7 @@ |
311 |
<bugs-to>https://github.com/scp-fs2open/fs2open.github.com/issues</bugs-to> |
312 |
</upstream> |
313 |
<use> |
314 |
+ <flag name="clang">Use Clang compiler instead of GCC</flag> |
315 |
<flag name="debug">Debug build to collect logfiles</flag> |
316 |
<flag name="discord">Enable Discord RPC support</flag> |
317 |
</use> |