Gentoo Archives: gentoo-commits

From: Ronny Gutbrod <gentoo@××××××××.de>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: games-engines/fs2_open/files/, games-engines/fs2_open/
Date: Tue, 29 Mar 2022 00:23:04
Message-Id: 1648411007.2f15e3e0fb583d7bc8668ebafde53da0d0b9dd91.tastytea@gentoo
1 commit: 2f15e3e0fb583d7bc8668ebafde53da0d0b9dd91
2 Author: Jonas Frei <freijon <AT> pm <DOT> me>
3 AuthorDate: Sun Mar 27 19:56:47 2022 +0000
4 Commit: Ronny Gutbrod <gentoo <AT> tastytea <DOT> de>
5 CommitDate: Sun Mar 27 19:56:47 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2f15e3e0
7
8 games-engines/fs2_open: Added 'discord' 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 .../files/fs2_open-21.4.1-disable-discord.patch | 55 ++++++++++++++++++++++
14 .../files/fs2_open-21.4.1-dont-build-lz4.patch | 4 +-
15 .../fs2_open-21.4.1-dont-override-ldflags.patch | 4 +-
16 .../fs2_open-21.4.1-make-arch-independent.patch | 4 +-
17 .../files/fs2_open-21.4.1-version-fix.patch | 4 +-
18 games-engines/fs2_open/fs2_open-21.4.1-r2.ebuild | 9 +++-
19 games-engines/fs2_open/metadata.xml | 3 ++
20 7 files changed, 74 insertions(+), 9 deletions(-)
21
22 diff --git a/games-engines/fs2_open/files/fs2_open-21.4.1-disable-discord.patch b/games-engines/fs2_open/files/fs2_open-21.4.1-disable-discord.patch
23 new file mode 100644
24 index 000000000..95c186bf1
25 --- /dev/null
26 +++ b/games-engines/fs2_open/files/fs2_open-21.4.1-disable-discord.patch
27 @@ -0,0 +1,55 @@
28 +--- fs2_open/code/CMakeLists.txt 2022-03-27 21:03:27.290788070 +0200
29 ++++ fs2_open/code/CMakeLists.txt 2022-03-27 21:06:50.271782416 +0200
30 +@@ -41,8 +41,6 @@
31 +
32 + target_link_libraries(code PUBLIC md5)
33 +
34 +-target_link_libraries(code PUBLIC discord-rpc)
35 +-
36 + target_link_libraries(code PUBLIC libRocket)
37 +
38 + target_link_libraries(code PUBLIC pcp)
39 +--- fs2_open/code/source_groups.cmake 2021-11-01 18:00:53.000000000 +0100
40 ++++ fs2_open/code/source_groups.cmake 2022-03-27 21:35:47.595734025 +0200
41 +@@ -705,11 +705,6 @@
42 + libs/antlr/ErrorListener.h
43 + )
44 +
45 +-add_file_folder("Libs\\\\Discord"
46 +- libs/discord/discord.cpp
47 +- libs/discord/discord.h
48 +-)
49 +-
50 + if (FSO_BUILD_WITH_FFMPEG)
51 + add_file_folder("Libs\\\\FFmpeg"
52 + libs/ffmpeg/FFmpeg.cpp
53 +--- fs2_open/lib/CMakeLists.txt 2022-03-27 21:03:27.287788070 +0200
54 ++++ fs2_open/lib/CMakeLists.txt 2022-03-27 21:07:12.849781787 +0200
55 +@@ -33,8 +33,6 @@
56 + include(FFmpeg.cmake)
57 + endif()
58 +
59 +-add_subdirectory(discord)
60 +-
61 + include(libRocket.cmake)
62 +
63 + add_subdirectory(libpcp)
64 +--- fs2_open/freespace2/freespace.cpp 2021-11-01 18:00:53.000000000 +0100
65 ++++ fs2_open/freespace2/freespace.cpp 2022-03-27 21:07:50.111780749 +0200
66 +@@ -83,7 +83,6 @@
67 + #include "jumpnode/jumpnode.h"
68 + #include "lab/labv2.h"
69 + #include "lab/wmcgui.h" //So that GUI_System can be initialized
70 +-#include "libs/discord/discord.h"
71 + #include "libs/ffmpeg/FFmpeg.h"
72 + #include "lighting/lighting.h"
73 + #include "localization/localize.h"
74 +@@ -1940,8 +1939,6 @@
75 + libs::ffmpeg::initialize();
76 + #endif
77 +
78 +- libs::discord::init();
79 +-
80 + nprintf(("General", "Ships.tbl is : %s\n", Game_ships_tbl_valid ? "VALID" : "INVALID!!!!"));
81 + nprintf(("General", "Weapons.tbl is : %s\n", Game_weapons_tbl_valid ? "VALID" : "INVALID!!!!"));
82 +
83
84 diff --git a/games-engines/fs2_open/files/fs2_open-21.4.1-dont-build-lz4.patch b/games-engines/fs2_open/files/fs2_open-21.4.1-dont-build-lz4.patch
85 index bfae2ea39..45ad91307 100644
86 --- a/games-engines/fs2_open/files/fs2_open-21.4.1-dont-build-lz4.patch
87 +++ b/games-engines/fs2_open/files/fs2_open-21.4.1-dont-build-lz4.patch
88 @@ -1,5 +1,5 @@
89 ---- fs2_open-21.4.1/lib/CMakeLists.txt 2021-11-01 18:00:53.000000000 +0100
90 -+++ fs2_open-21.4.1/lib/CMakeLists.txt 2022-03-26 11:34:48.746075280 +0100
91 +--- fs2_open/lib/CMakeLists.txt 2021-11-01 18:00:53.000000000 +0100
92 ++++ fs2_open/lib/CMakeLists.txt 2022-03-26 11:34:48.746075280 +0100
93 @@ -50,5 +50,3 @@
94 add_subdirectory(mdns)
95
96
97 diff --git a/games-engines/fs2_open/files/fs2_open-21.4.1-dont-override-ldflags.patch b/games-engines/fs2_open/files/fs2_open-21.4.1-dont-override-ldflags.patch
98 index c75458ded..7a45e1fda 100644
99 --- a/games-engines/fs2_open/files/fs2_open-21.4.1-dont-override-ldflags.patch
100 +++ b/games-engines/fs2_open/files/fs2_open-21.4.1-dont-override-ldflags.patch
101 @@ -1,5 +1,5 @@
102 ---- fs2_open-21.4.1/cmake/toolchain-gcc.cmake 2021-11-01 18:00:53.000000000 +0100
103 -+++ fs2_open-21.4.1/cmake/toolchain-gcc.cmake 2022-03-27 17:52:26.738107292 +0200
104 +--- fs2_open/cmake/toolchain-gcc.cmake 2021-11-01 18:00:53.000000000 +0100
105 ++++ fs2_open/cmake/toolchain-gcc.cmake 2022-03-27 17:52:26.738107292 +0200
106 @@ -27,6 +27,11 @@
107 set(COMPILER_FLAGS "")
108 set(LINKER_FLAGS "")
109
110 diff --git a/games-engines/fs2_open/files/fs2_open-21.4.1-make-arch-independent.patch b/games-engines/fs2_open/files/fs2_open-21.4.1-make-arch-independent.patch
111 index e03b59bb3..c2f5d7f36 100644
112 --- a/games-engines/fs2_open/files/fs2_open-21.4.1-make-arch-independent.patch
113 +++ b/games-engines/fs2_open/files/fs2_open-21.4.1-make-arch-independent.patch
114 @@ -1,5 +1,5 @@
115 ---- fs2_open-21.4.1/cmake/version.cmake 2021-05-22 20:20:18.448441242 +0200
116 -+++ fs2_open-21.4.1/cmake/version.cmake 2021-05-22 20:21:05.493447003 +0200
117 +--- fs2_open/cmake/version.cmake 2021-05-22 20:20:18.448441242 +0200
118 ++++ fs2_open/cmake/version.cmake 2021-05-22 20:21:05.493447003 +0200
119 @@ -35,11 +35,6 @@
120 SET(FSO_BINARY_SUFFIX "${FSO_VERSION_MAJOR}_${FSO_VERSION_MINOR}_${FSO_VERSION_BUILD}_${FSO_VERSION_REVISION_STR}")
121 ENDIF()
122
123 diff --git a/games-engines/fs2_open/files/fs2_open-21.4.1-version-fix.patch b/games-engines/fs2_open/files/fs2_open-21.4.1-version-fix.patch
124 index f3812dc8e..a9c2c845f 100644
125 --- a/games-engines/fs2_open/files/fs2_open-21.4.1-version-fix.patch
126 +++ b/games-engines/fs2_open/files/fs2_open-21.4.1-version-fix.patch
127 @@ -1,5 +1,5 @@
128 ---- fs2_open-21.4.1/version_override.cmake 2022-03-25 22:22:13.424199518 +0100
129 -+++ fs2_open-21.4.1/version_override.cmake 2022-03-25 22:22:30.378200320 +0100
130 +--- fs2_open/version_override.cmake
131 ++++ fs2_open/version_override.cmake
132 @@ -1,5 +1,5 @@
133 set(FSO_VERSION_MAJOR 21)
134 set(FSO_VERSION_MINOR 4)
135
136 diff --git a/games-engines/fs2_open/fs2_open-21.4.1-r2.ebuild b/games-engines/fs2_open/fs2_open-21.4.1-r2.ebuild
137 index 2d1b5f674..d8305b305 100644
138 --- a/games-engines/fs2_open/fs2_open-21.4.1-r2.ebuild
139 +++ b/games-engines/fs2_open/fs2_open-21.4.1-r2.ebuild
140 @@ -24,6 +24,7 @@ SRC_URI="
141 LICENSE="Unlicense MIT Boost-1.0"
142 SLOT="0"
143 KEYWORDS="~amd64"
144 +IUSE="discord"
145
146 DEPEND="
147 app-arch/lz4
148 @@ -59,6 +60,12 @@ src_unpack() {
149 mv cmake-modules-${HASH_CMAKE_MODULES}/* "${S}/cmake/external/rpavlik-cmake-modules/" || die
150 }
151
152 +src_prepare() {
153 + use discord || eapply "${FILESDIR}/${P}-disable-discord.patch"
154 + eapply_user
155 + cmake_src_prepare
156 +}
157 +
158 src_install() {
159 exeinto "/opt/${PN}"
160 doexe "${BUILD_DIR}/bin/${PN}_${_PV}"
161 @@ -68,7 +75,7 @@ src_install() {
162 doins "${BUILD_DIR}/bin/libRocketCore.so"
163 doins "${BUILD_DIR}/bin/libRocketCoreLua.so"
164 doins "${BUILD_DIR}/bin/libRocketDebugger.so"
165 - doins "${BUILD_DIR}/bin/libdiscord-rpc.so"
166 + use discord && doins "${BUILD_DIR}/bin/libdiscord-rpc.so"
167 }
168
169 pkg_postinst() {
170
171 diff --git a/games-engines/fs2_open/metadata.xml b/games-engines/fs2_open/metadata.xml
172 index 2e56a6035..b1d632ca1 100644
173 --- a/games-engines/fs2_open/metadata.xml
174 +++ b/games-engines/fs2_open/metadata.xml
175 @@ -15,4 +15,7 @@
176 <remote-id type="github">scp-fs2open/fs2open.github.com</remote-id>
177 <bugs-to>https://github.com/scp-fs2open/fs2open.github.com/issues</bugs-to>
178 </upstream>
179 + <use>
180 + <flag name="discord">Enable Discord RPC support</flag>
181 + </use>
182 </pkgmetadata>