From 5a24f2599da1505f1f7169496c1cc09ed9902f5e Mon Sep 17 00:00:00 2001 From: crueter Date: Tue, 26 Aug 2025 22:06:36 -0400 Subject: [PATCH] kjasnfsdn Signed-off-by: crueter --- .patch/discord-rpc/0001-cmake-version.patch | 10 +++++ .patch/discord-rpc/0002-no-clang-format.patch | 40 +++++++++++++++++++ .patch/discord-rpc/0003-fix-cpp17.patch | 31 ++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 .patch/discord-rpc/0001-cmake-version.patch create mode 100644 .patch/discord-rpc/0002-no-clang-format.patch create mode 100644 .patch/discord-rpc/0003-fix-cpp17.patch diff --git a/.patch/discord-rpc/0001-cmake-version.patch b/.patch/discord-rpc/0001-cmake-version.patch new file mode 100644 index 0000000000..6a1609fadf --- /dev/null +++ b/.patch/discord-rpc/0001-cmake-version.patch @@ -0,0 +1,10 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5dad9e9..760a1b2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 3.2.0) ++cmake_minimum_required (VERSION 3.10) + project (DiscordRPC) + + include(GNUInstallDirs) diff --git a/.patch/discord-rpc/0002-no-clang-format.patch b/.patch/discord-rpc/0002-no-clang-format.patch new file mode 100644 index 0000000000..4b1e37c29f --- /dev/null +++ b/.patch/discord-rpc/0002-no-clang-format.patch @@ -0,0 +1,40 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 760a1b2..540d643 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,20 +12,6 @@ file(GLOB_RECURSE ALL_SOURCE_FILES + src/*.cpp src/*.h src/*.c + ) + +-# Set CLANG_FORMAT_SUFFIX if you are using custom clang-format, e.g. clang-format-5.0 +-find_program(CLANG_FORMAT_CMD clang-format${CLANG_FORMAT_SUFFIX}) +- +-if (CLANG_FORMAT_CMD) +- add_custom_target( +- clangformat +- COMMAND ${CLANG_FORMAT_CMD} +- -i -style=file -fallback-style=none +- ${ALL_SOURCE_FILES} +- DEPENDS +- ${ALL_SOURCE_FILES} +- ) +-endif(CLANG_FORMAT_CMD) +- + # thirdparty stuff + execute_process( + COMMAND mkdir ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 290d761..cd2cc92 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -120,10 +120,6 @@ if (${BUILD_SHARED_LIBS}) + target_compile_definitions(discord-rpc PRIVATE -DDISCORD_BUILDING_SDK) + endif(${BUILD_SHARED_LIBS}) + +-if (CLANG_FORMAT_CMD) +- add_dependencies(discord-rpc clangformat) +-endif(CLANG_FORMAT_CMD) +- + # install + + install( diff --git a/.patch/discord-rpc/0003-fix-cpp17.patch b/.patch/discord-rpc/0003-fix-cpp17.patch new file mode 100644 index 0000000000..35b725d307 --- /dev/null +++ b/.patch/discord-rpc/0003-fix-cpp17.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 540d643..5d12f3d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,12 +17,14 @@ execute_process( + COMMAND mkdir ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty + ERROR_QUIET + ) ++# new commit that fixes c++17 ++set(RAPIDJSON_SHA 3b2441b87f99ab65f37b141a7b548ebadb607b96) + +-find_file(RAPIDJSONTEST NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH) ++find_file(RAPIDJSONTEST NAMES rapidjson rapidjson-${RAPIDJSON_SHA} PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH) + if (NOT RAPIDJSONTEST) + message("no rapidjson, download") +- set(RJ_TAR_FILE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/v1.1.0.tar.gz) +- file(DOWNLOAD https://github.com/miloyip/rapidjson/archive/v1.1.0.tar.gz ${RJ_TAR_FILE}) ++ set(RJ_TAR_FILE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/${RAPIDJSON_SHA}.tar.gz) ++ file(DOWNLOAD https://github.com/miloyip/rapidjson/archive/${RAPIDJSON_SHA}.tar.gz ${RJ_TAR_FILE}) + execute_process( + COMMAND ${CMAKE_COMMAND} -E tar xzf ${RJ_TAR_FILE} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty +@@ -30,7 +32,7 @@ if (NOT RAPIDJSONTEST) + file(REMOVE ${RJ_TAR_FILE}) + endif(NOT RAPIDJSONTEST) + +-find_file(RAPIDJSON NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH) ++find_file(RAPIDJSON NAMES rapidjson rapidjson-${RAPIDJSON_SHA} PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH) + + add_library(rapidjson STATIC IMPORTED ${RAPIDJSON}) +