games-emulation/rmg: fix compatibility with cmake4

This fixes the cmake version in the vendored copy of rapidjson in the
vendored discord-rpc. Additionally unused directories with
CMakeLists.txt are removed to prevent false positives.

Closes: https://github.com/gentoo/gentoo/pull/42869
Closes: https://bugs.gentoo.org/959468
Upstream-PR: https://github.com/Rosalie241/RMG/pull/382
Upstream-Commit: 1c6210f964
Signed-off-by: orbea <orbea@riseup.net>
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
This commit is contained in:
orbea
2025-07-04 11:55:49 -07:00
committed by Michael Orlitzky
parent fab1c95ea5
commit baf12a3222
3 changed files with 41 additions and 6 deletions

View File

@@ -0,0 +1,24 @@
https://github.com/Rosalie241/RMG/pull/382
https://github.com/Rosalie241/RMG/commit/1c6210f9646229c81f6cfbf99e59516a20e4b623
From 9c7e7c36d65f190ebeca1536559fe17d61bb8246 Mon Sep 17 00:00:00 2001
From: orbea <orbea@riseup.net>
Date: Fri, 4 Jul 2025 11:37:06 -0700
Subject: [PATCH] 3rdParty: change minimum cmake version in discord-rpc's
rapidjson
Gentoo-Issue: https://bugs.gentoo.org/959468
---
Source/3rdParty/discord-rpc/thirdparty/rapidjson/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/3rdParty/discord-rpc/thirdparty/rapidjson/CMakeLists.txt b/Source/3rdParty/discord-rpc/thirdparty/rapidjson/CMakeLists.txt
index ceda71b1b..844eafe76 100644
--- a/Source/3rdParty/discord-rpc/thirdparty/rapidjson/CMakeLists.txt
+++ b/Source/3rdParty/discord-rpc/thirdparty/rapidjson/CMakeLists.txt
@@ -1,4 +1,4 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+cmake_minimum_required(VERSION 3.10)
if(POLICY CMP0025)
# detect Apple's Clang
cmake_policy(SET CMP0025 NEW)

View File

@@ -78,6 +78,11 @@ BDEPEND="
rust-plugin? ( ${RUST_DEPEND} )
"
PATCHES=(
# https://bugs.gentoo.org/959468
"${FILESDIR}"/${P}-discord-rapidjson-cmake4.patch
)
pkg_setup() {
QA_FLAGS_IGNORED="/usr/$(get_libdir)/RMG/Plugin/Input/libmupen64plus_input_gca.so"
use rust-plugin && rust_pkg_setup
@@ -100,10 +105,11 @@ src_unpack() {
}
src_prepare() {
cmake_src_prepare
# Don't install unused 3rdParty code
# Remove unused 3rdParty code - https://bugs.gentoo.org/959468
rm -r "${S}"/Source/3rdParty/discord-rpc/thirdparty/rapidjson/example || die
rm -r "${S}"/Source/3rdParty/fmt || die
rm -r "${S}"/Source/3rdParty/imgui/examples || die
rm -r "${S}"/Source/3rdParty/mupen64plus-rsp-parallel/win32 || die
# Don't install XMAME licensed code
if ! use angrylion-plugin; then
@@ -115,6 +121,8 @@ src_prepare() {
# Enable verbose make(1) output
sed -e 's/CC=/V=1 CC=/' -i "${S}"/Source/3rdParty/CMakeLists.txt || die
cmake_src_prepare
}
src_configure() {

View File

@@ -100,10 +100,11 @@ src_unpack() {
}
src_prepare() {
cmake_src_prepare
# Don't install unused 3rdParty code
# Remove unused 3rdParty code - https://bugs.gentoo.org/959468
rm -r "${S}"/Source/3rdParty/discord-rpc/thirdparty/rapidjson/example || die
rm -r "${S}"/Source/3rdParty/fmt || die
rm -r "${S}"/Source/3rdParty/imgui/examples || die
rm -r "${S}"/Source/3rdParty/mupen64plus-rsp-parallel/win32 || die
# Don't install XMAME licensed code
if ! use angrylion-plugin; then
@@ -115,6 +116,8 @@ src_prepare() {
# Enable verbose make(1) output
sed -e 's/CC=/V=1 CC=/' -i "${S}"/Source/3rdParty/CMakeLists.txt || die
cmake_src_prepare
}
src_configure() {