Gentoo Archives: gentoo-commits

From: Haelwenn Monnier <contact@×××××××××.me>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: games-engines/fs2_open/, games-engines/fs2_open/files/
Date: Sun, 07 Aug 2022 09:13:20
Message-Id: 1659846174.c22890acee0bc64ebedd88da87fc7680ff5e68a8.lanodan@gentoo
1 commit: c22890acee0bc64ebedd88da87fc7680ff5e68a8
2 Author: Jonas Frei <freijon <AT> pm <DOT> me>
3 AuthorDate: Sun Aug 7 04:22:54 2022 +0000
4 Commit: Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
5 CommitDate: Sun Aug 7 04:22:54 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c22890ac
7
8 games-engines/fs2_open: add 22.2.0
9
10 Signed-off-by: Jonas Frei <freijon <AT> pm.me>
11
12 games-engines/fs2_open/Manifest | 3 +
13 .../files/fs2_open-22.2.0-disable-discord.patch | 55 +++++++++++
14 .../files/fs2_open-22.2.0-dont-build-lz4.patch | 9 ++
15 .../fs2_open-22.2.0-make-arch-independent.patch | 14 +++
16 games-engines/fs2_open/fs2_open-22.2.0.ebuild | 103 +++++++++++++++++++++
17 5 files changed, 184 insertions(+)
18
19 diff --git a/games-engines/fs2_open/Manifest b/games-engines/fs2_open/Manifest
20 index e84657f91..612408bc3 100644
21 --- a/games-engines/fs2_open/Manifest
22 +++ b/games-engines/fs2_open/Manifest
23 @@ -4,3 +4,6 @@ DIST fs2_open-21.4.1.tar.gz 10441595 BLAKE2B ae59cea98420cbdd6f18832fa0b8ba33299
24 DIST fs2_open-22.0.0-ext_libRocket.tar.gz 2417905 BLAKE2B 0e5ac40b0e811b9213fb84f6f2f0ef38ad7d562ae671e865d96e40615c2d67213905ce153a69192c0b53a3e4f0d1aef077c0769e46d308adf9210c0c9d1fe7c2 SHA512 700e242ecb5207faf729ca7d23ac4f28be819c0ef7a0ba51ca18de1592f1016040cd5e4c1c75a573f91cea69dd43549966ac089804a52c0f1b0cfbaabefc4346
25 DIST fs2_open-22.0.0-ext_rpavlik-cmake-modules.tar.gz 267464 BLAKE2B d63fa3867aad5fad7bd5d20845dd8d6a6698d59dc30dc511704f3c74bbe958bb6d36160bae3ef5c01027719c50d18e4d24209ea5811c6a52c5af4d3de2a587e9 SHA512 0bb03e2a1c0cafa80849163455cdb5fc5c7200e51f18f0354c36f251b51156f86a04a9f87cd17e2942d14ae8767d8df756062fbcff9b37f04e8399b2e37d306f
26 DIST fs2_open-22.0.0.tar.gz 10573800 BLAKE2B b75bd9e44679bf2ad441178b7f8175f4429e321d2feeddf2cf5b4391e51f82c15250c36b73f3750326b1cd3ce71ae319042f57432d48a41b5abab9e30a4a76ba SHA512 e57972348073571947ff88e5a392ae0b4eec9d81cbcfe3d0ff3c2b844dd676cb33f727ddb32a0544e9cd3f1ae9b614429ea137b8921ef625fad27a53f1875081
27 +DIST fs2_open-22.2.0-ext_libRocket.tar.gz 2417905 BLAKE2B 0e5ac40b0e811b9213fb84f6f2f0ef38ad7d562ae671e865d96e40615c2d67213905ce153a69192c0b53a3e4f0d1aef077c0769e46d308adf9210c0c9d1fe7c2 SHA512 700e242ecb5207faf729ca7d23ac4f28be819c0ef7a0ba51ca18de1592f1016040cd5e4c1c75a573f91cea69dd43549966ac089804a52c0f1b0cfbaabefc4346
28 +DIST fs2_open-22.2.0-ext_rpavlik-cmake-modules.tar.gz 267464 BLAKE2B d63fa3867aad5fad7bd5d20845dd8d6a6698d59dc30dc511704f3c74bbe958bb6d36160bae3ef5c01027719c50d18e4d24209ea5811c6a52c5af4d3de2a587e9 SHA512 0bb03e2a1c0cafa80849163455cdb5fc5c7200e51f18f0354c36f251b51156f86a04a9f87cd17e2942d14ae8767d8df756062fbcff9b37f04e8399b2e37d306f
29 +DIST fs2_open-22.2.0.tar.gz 10690003 BLAKE2B 9d751407ee06877e27e18a9295370ed2c97a48ac65c65757ea57ee1f1d7ba36e07cddb9812a62a763eefb842d5df71151243a81e97aa664a8c3123b7b7913255 SHA512 e72ad40f8f52430549f76330f8b34255ae68fff53ced76f56b04ef19d7ce510026c3bb38fcebdb6f3bfaf7db59ca89df5686e8480e883e01b6408d21cb08cc77
30
31 diff --git a/games-engines/fs2_open/files/fs2_open-22.2.0-disable-discord.patch b/games-engines/fs2_open/files/fs2_open-22.2.0-disable-discord.patch
32 new file mode 100644
33 index 000000000..1b145d7da
34 --- /dev/null
35 +++ b/games-engines/fs2_open/files/fs2_open-22.2.0-disable-discord.patch
36 @@ -0,0 +1,55 @@
37 +--- fs2_open/code/CMakeLists.txt 2022-03-27 21:03:27.290788070 +0200
38 ++++ fs2_open/code/CMakeLists.txt 2022-03-27 21:06:50.271782416 +0200
39 +@@ -41,8 +41,6 @@
40 +
41 + target_link_libraries(code PUBLIC md5)
42 +
43 +-target_link_libraries(code PUBLIC discord-rpc)
44 +-
45 + target_link_libraries(code PUBLIC libRocket)
46 +
47 + target_link_libraries(code PUBLIC pcp)
48 +--- fs2_open/code/source_groups.cmake 2021-11-01 18:00:53.000000000 +0100
49 ++++ fs2_open/code/source_groups.cmake 2022-03-27 21:35:47.595734025 +0200
50 +@@ -705,11 +705,6 @@
51 + libs/antlr/ErrorListener.h
52 + )
53 +
54 +-add_file_folder("Libs\\\\Discord"
55 +- libs/discord/discord.cpp
56 +- libs/discord/discord.h
57 +-)
58 +-
59 + if (FSO_BUILD_WITH_FFMPEG)
60 + add_file_folder("Libs\\\\FFmpeg"
61 + libs/ffmpeg/FFmpeg.cpp
62 +--- fs2_open/lib/CMakeLists.txt 2022-03-27 21:03:27.287788070 +0200
63 ++++ fs2_open/lib/CMakeLists.txt 2022-03-27 21:07:12.849781787 +0200
64 +@@ -33,8 +33,6 @@
65 + include(FFmpeg.cmake)
66 + endif()
67 +
68 +-add_subdirectory(discord)
69 +-
70 + include(libRocket.cmake)
71 +
72 + add_subdirectory(libpcp)
73 +--- fs2_open/freespace2/freespace.cpp 2021-11-01 18:00:53.000000000 +0100
74 ++++ fs2_open/freespace2/freespace.cpp 2022-03-27 21:07:50.111780749 +0200
75 +@@ -83,7 +83,6 @@
76 + #include "jumpnode/jumpnode.h"
77 + #include "lab/labv2.h"
78 + #include "lab/wmcgui.h" //So that GUI_System can be initialized
79 +-#include "libs/discord/discord.h"
80 + #include "libs/ffmpeg/FFmpeg.h"
81 + #include "lighting/lighting.h"
82 + #include "localization/localize.h"
83 +@@ -1987,8 +1987,6 @@
84 + #ifdef WITH_FFMPEG
85 + libs::ffmpeg::initialize();
86 + #endif
87 +-
88 +- libs::discord::init();
89 + }
90 +
91 + nprintf(("General", "Ships.tbl is : %s\n", Game_ships_tbl_valid ? "VALID" : "INVALID!!!!"));
92
93 diff --git a/games-engines/fs2_open/files/fs2_open-22.2.0-dont-build-lz4.patch b/games-engines/fs2_open/files/fs2_open-22.2.0-dont-build-lz4.patch
94 new file mode 100644
95 index 000000000..60dc982a1
96 --- /dev/null
97 +++ b/games-engines/fs2_open/files/fs2_open-22.2.0-dont-build-lz4.patch
98 @@ -0,0 +1,9 @@
99 +--- fs2_open/lib/CMakeLists.txt 2022-04-01 23:30:46.000000000 +0200
100 ++++ fs2_open/lib/CMakeLists.txt 2022-04-02 08:20:16.336924470 +0200
101 +@@ -52,5 +52,3 @@
102 + add_subdirectory(variant)
103 +
104 + add_subdirectory(any)
105 +-
106 +-ADD_SUBDIRECTORY(lz4)
107 +\ No newline at end of file
108
109 diff --git a/games-engines/fs2_open/files/fs2_open-22.2.0-make-arch-independent.patch b/games-engines/fs2_open/files/fs2_open-22.2.0-make-arch-independent.patch
110 new file mode 100644
111 index 000000000..c2f5d7f36
112 --- /dev/null
113 +++ b/games-engines/fs2_open/files/fs2_open-22.2.0-make-arch-independent.patch
114 @@ -0,0 +1,14 @@
115 +--- fs2_open/cmake/version.cmake 2021-05-22 20:20:18.448441242 +0200
116 ++++ fs2_open/cmake/version.cmake 2021-05-22 20:21:05.493447003 +0200
117 +@@ -35,11 +35,6 @@
118 + SET(FSO_BINARY_SUFFIX "${FSO_VERSION_MAJOR}_${FSO_VERSION_MINOR}_${FSO_VERSION_BUILD}_${FSO_VERSION_REVISION_STR}")
119 + ENDIF()
120 +
121 +-IF(IS_64BIT)
122 +- # This is a 64-bit builds
123 +- SET(FSO_BINARY_SUFFIX "${FSO_BINARY_SUFFIX}_x64")
124 +-ENDIF()
125 +-
126 + IF (NOT "${FSO_INSTRUCTION_SET}" STREQUAL "")
127 + SET(FSO_BINARY_SUFFIX "${FSO_BINARY_SUFFIX}_${FSO_INSTRUCTION_SET}")
128 + ENDIF()
129
130 diff --git a/games-engines/fs2_open/fs2_open-22.2.0.ebuild b/games-engines/fs2_open/fs2_open-22.2.0.ebuild
131 new file mode 100644
132 index 000000000..8c63d4680
133 --- /dev/null
134 +++ b/games-engines/fs2_open/fs2_open-22.2.0.ebuild
135 @@ -0,0 +1,103 @@
136 +# Copyright 2022 Gentoo Authors
137 +# Distributed under the terms of the GNU General Public License v2
138 +
139 +EAPI=8
140 +
141 +inherit cmake
142 +
143 +DESCRIPTION="FreeSpace2 Source Code Project game engine"
144 +HOMEPAGE="https://github.com/scp-fs2open/fs2open.github.com/"
145 +
146 +# Replace "." with "_" in version
147 +_PV=${PV//./_}
148 +
149 +# Current hashes of external repositories:
150 +HASH_LIBROCKET="ecd648a43aff8a9f3daf064d75ca5725237d5b38"
151 +HASH_CMAKE_MODULES="7cef9577d6fc35057ea57f46b4986a8a28aeff50"
152 +
153 +SRC_URI="
154 + https://github.com/scp-fs2open/fs2open.github.com/archive/refs/tags/release_${_PV}.tar.gz -> ${P}.tar.gz
155 + https://github.com/asarium/libRocket/archive/${HASH_LIBROCKET}.tar.gz -> ${P}-ext_libRocket.tar.gz
156 + https://github.com/asarium/cmake-modules/archive/${HASH_CMAKE_MODULES}.tar.gz -> ${P}-ext_rpavlik-cmake-modules.tar.gz
157 +"
158 +
159 +LICENSE="Unlicense MIT Boost-1.0"
160 +SLOT="0"
161 +KEYWORDS="~amd64"
162 +IUSE="clang debug discord"
163 +
164 +DEPEND="
165 + app-arch/lz4
166 + <dev-lang/lua-5.1.6:5.1
167 + dev-libs/jansson
168 + media-libs/freetype:2
169 + media-libs/glu
170 + media-libs/libjpeg-turbo
171 + media-libs/libpng
172 + media-libs/libsdl2
173 + media-libs/libtheora
174 + media-libs/libvorbis
175 + media-libs/mesa
176 + media-libs/openal
177 + media-video/ffmpeg
178 +"
179 +RDEPEND="${DEPEND}"
180 +BDEPEND="
181 + dev-util/cmake
182 + clang? ( sys-devel/clang:= )
183 +"
184 +PATCHES=(
185 + "${FILESDIR}/${P}-dont-build-lz4.patch"
186 + "${FILESDIR}/${P}-make-arch-independent.patch"
187 +)
188 +
189 +CMAKE_BUILD_TYPE=Release
190 +
191 +S="${WORKDIR}/fs2open.github.com-release_${_PV}"
192 +
193 +src_unpack() {
194 + unpack ${A}
195 + mv libRocket-${HASH_LIBROCKET}/* "${S}/lib/libRocket/" || die
196 + mv cmake-modules-${HASH_CMAKE_MODULES}/* "${S}/cmake/external/rpavlik-cmake-modules/" || die
197 +}
198 +
199 +src_configure() {
200 + if use clang ; then
201 + # Force clang
202 + einfo "Enforcing the use of clang due to USE=clang ..."
203 + AR=llvm-ar
204 + CC=${CHOST}-clang
205 + CXX=${CHOST}-clang++
206 + LDFLAGS+=" -fuse-ld=lld"
207 + fi
208 + cmake_src_configure
209 +}
210 +
211 +src_prepare() {
212 + use discord || eapply "${FILESDIR}/${P}-disable-discord.patch"
213 + eapply_user
214 + cmake_src_prepare
215 + use debug && CMAKE_BUILD_TYPE=Debug
216 +}
217 +
218 +src_install() {
219 + exeinto "/opt/${PN}"
220 + if use debug ; then
221 + doexe "${BUILD_DIR}/bin/${PN}_${_PV}-DEBUG"
222 + else
223 + doexe "${BUILD_DIR}/bin/${PN}_${_PV}"
224 + fi
225 + insinto "/opt/${PN}"
226 + doins "${BUILD_DIR}/bin/libRocketControls.so"
227 + doins "${BUILD_DIR}/bin/libRocketControlsLua.so"
228 + doins "${BUILD_DIR}/bin/libRocketCore.so"
229 + doins "${BUILD_DIR}/bin/libRocketCoreLua.so"
230 + doins "${BUILD_DIR}/bin/libRocketDebugger.so"
231 + use discord && doins "${BUILD_DIR}/bin/libdiscord-rpc.so"
232 +}
233 +
234 +pkg_postinst() {
235 + einfo "This package only generates the engine binary."
236 + einfo "The retail Freespace 2 data is required to play the"
237 + einfo "original game and most mods."
238 +}