diff options
author | Jonas Frei <freijon@pm.me> | 2022-03-27 21:56:47 +0200 |
---|---|---|
committer | Jonas Frei <freijon@pm.me> | 2022-03-27 21:56:47 +0200 |
commit | 2f15e3e0fb583d7bc8668ebafde53da0d0b9dd91 (patch) | |
tree | cdbbfa6f7a25a94e842359eea76afb815d4db21a | |
parent | games-engines/fs2_open: Added patch to fix linker QA issue (diff) | |
download | guru-2f15e3e0fb583d7bc8668ebafde53da0d0b9dd91.tar.gz guru-2f15e3e0fb583d7bc8668ebafde53da0d0b9dd91.tar.bz2 guru-2f15e3e0fb583d7bc8668ebafde53da0d0b9dd91.zip |
games-engines/fs2_open: Added 'discord' USE flag
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Jonas Frei <freijon@pm.me>
7 files changed, 74 insertions, 9 deletions
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 new file mode 100644 index 000000000..95c186bf1 --- /dev/null +++ b/games-engines/fs2_open/files/fs2_open-21.4.1-disable-discord.patch @@ -0,0 +1,55 @@ +--- fs2_open/code/CMakeLists.txt 2022-03-27 21:03:27.290788070 +0200 ++++ fs2_open/code/CMakeLists.txt 2022-03-27 21:06:50.271782416 +0200 +@@ -41,8 +41,6 @@ + + target_link_libraries(code PUBLIC md5) + +-target_link_libraries(code PUBLIC discord-rpc) +- + target_link_libraries(code PUBLIC libRocket) + + target_link_libraries(code PUBLIC pcp) +--- fs2_open/code/source_groups.cmake 2021-11-01 18:00:53.000000000 +0100 ++++ fs2_open/code/source_groups.cmake 2022-03-27 21:35:47.595734025 +0200 +@@ -705,11 +705,6 @@ + libs/antlr/ErrorListener.h + ) + +-add_file_folder("Libs\\\\Discord" +- libs/discord/discord.cpp +- libs/discord/discord.h +-) +- + if (FSO_BUILD_WITH_FFMPEG) + add_file_folder("Libs\\\\FFmpeg" + libs/ffmpeg/FFmpeg.cpp +--- fs2_open/lib/CMakeLists.txt 2022-03-27 21:03:27.287788070 +0200 ++++ fs2_open/lib/CMakeLists.txt 2022-03-27 21:07:12.849781787 +0200 +@@ -33,8 +33,6 @@ + include(FFmpeg.cmake) + endif() + +-add_subdirectory(discord) +- + include(libRocket.cmake) + + add_subdirectory(libpcp) +--- fs2_open/freespace2/freespace.cpp 2021-11-01 18:00:53.000000000 +0100 ++++ fs2_open/freespace2/freespace.cpp 2022-03-27 21:07:50.111780749 +0200 +@@ -83,7 +83,6 @@ + #include "jumpnode/jumpnode.h" + #include "lab/labv2.h" + #include "lab/wmcgui.h" //So that GUI_System can be initialized +-#include "libs/discord/discord.h" + #include "libs/ffmpeg/FFmpeg.h" + #include "lighting/lighting.h" + #include "localization/localize.h" +@@ -1940,8 +1939,6 @@ + libs::ffmpeg::initialize(); + #endif + +- libs::discord::init(); +- + nprintf(("General", "Ships.tbl is : %s\n", Game_ships_tbl_valid ? "VALID" : "INVALID!!!!")); + nprintf(("General", "Weapons.tbl is : %s\n", Game_weapons_tbl_valid ? "VALID" : "INVALID!!!!")); + 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 index bfae2ea39..45ad91307 100644 --- 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 @@ -1,5 +1,5 @@ ---- fs2_open-21.4.1/lib/CMakeLists.txt 2021-11-01 18:00:53.000000000 +0100 -+++ fs2_open-21.4.1/lib/CMakeLists.txt 2022-03-26 11:34:48.746075280 +0100 +--- fs2_open/lib/CMakeLists.txt 2021-11-01 18:00:53.000000000 +0100 ++++ fs2_open/lib/CMakeLists.txt 2022-03-26 11:34:48.746075280 +0100 @@ -50,5 +50,3 @@ add_subdirectory(mdns) 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 index c75458ded..7a45e1fda 100644 --- 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 @@ -1,5 +1,5 @@ ---- fs2_open-21.4.1/cmake/toolchain-gcc.cmake 2021-11-01 18:00:53.000000000 +0100 -+++ fs2_open-21.4.1/cmake/toolchain-gcc.cmake 2022-03-27 17:52:26.738107292 +0200 +--- fs2_open/cmake/toolchain-gcc.cmake 2021-11-01 18:00:53.000000000 +0100 ++++ fs2_open/cmake/toolchain-gcc.cmake 2022-03-27 17:52:26.738107292 +0200 @@ -27,6 +27,11 @@ set(COMPILER_FLAGS "") set(LINKER_FLAGS "") 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 index e03b59bb3..c2f5d7f36 100644 --- 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 @@ -1,5 +1,5 @@ ---- fs2_open-21.4.1/cmake/version.cmake 2021-05-22 20:20:18.448441242 +0200 -+++ fs2_open-21.4.1/cmake/version.cmake 2021-05-22 20:21:05.493447003 +0200 +--- fs2_open/cmake/version.cmake 2021-05-22 20:20:18.448441242 +0200 ++++ fs2_open/cmake/version.cmake 2021-05-22 20:21:05.493447003 +0200 @@ -35,11 +35,6 @@ SET(FSO_BINARY_SUFFIX "${FSO_VERSION_MAJOR}_${FSO_VERSION_MINOR}_${FSO_VERSION_BUILD}_${FSO_VERSION_REVISION_STR}") ENDIF() 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 index f3812dc8e..a9c2c845f 100644 --- 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 @@ -1,5 +1,5 @@ ---- fs2_open-21.4.1/version_override.cmake 2022-03-25 22:22:13.424199518 +0100 -+++ fs2_open-21.4.1/version_override.cmake 2022-03-25 22:22:30.378200320 +0100 +--- fs2_open/version_override.cmake ++++ fs2_open/version_override.cmake @@ -1,5 +1,5 @@ set(FSO_VERSION_MAJOR 21) set(FSO_VERSION_MINOR 4) 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 index 2d1b5f674..d8305b305 100644 --- a/games-engines/fs2_open/fs2_open-21.4.1-r2.ebuild +++ b/games-engines/fs2_open/fs2_open-21.4.1-r2.ebuild @@ -24,6 +24,7 @@ SRC_URI=" LICENSE="Unlicense MIT Boost-1.0" SLOT="0" KEYWORDS="~amd64" +IUSE="discord" DEPEND=" app-arch/lz4 @@ -59,6 +60,12 @@ src_unpack() { mv cmake-modules-${HASH_CMAKE_MODULES}/* "${S}/cmake/external/rpavlik-cmake-modules/" || die } +src_prepare() { + use discord || eapply "${FILESDIR}/${P}-disable-discord.patch" + eapply_user + cmake_src_prepare +} + src_install() { exeinto "/opt/${PN}" doexe "${BUILD_DIR}/bin/${PN}_${_PV}" @@ -68,7 +75,7 @@ src_install() { doins "${BUILD_DIR}/bin/libRocketCore.so" doins "${BUILD_DIR}/bin/libRocketCoreLua.so" doins "${BUILD_DIR}/bin/libRocketDebugger.so" - doins "${BUILD_DIR}/bin/libdiscord-rpc.so" + use discord && doins "${BUILD_DIR}/bin/libdiscord-rpc.so" } pkg_postinst() { diff --git a/games-engines/fs2_open/metadata.xml b/games-engines/fs2_open/metadata.xml index 2e56a6035..b1d632ca1 100644 --- a/games-engines/fs2_open/metadata.xml +++ b/games-engines/fs2_open/metadata.xml @@ -15,4 +15,7 @@ <remote-id type="github">scp-fs2open/fs2open.github.com</remote-id> <bugs-to>https://github.com/scp-fs2open/fs2open.github.com/issues</bugs-to> </upstream> + <use> + <flag name="discord">Enable Discord RPC support</flag> + </use> </pkgmetadata> |