From 69efa924e27eecae4e295b9d5adde97837d826e6 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Sat, 6 Sep 2025 15:01:48 -0700 Subject: [PATCH] apply patch to libnatpmp repo so we can compile on macOS with CMake --- cmake/miniupnpc.cmake | 2 ++ ext/cmake-patches/libnatpmp.patch | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 ext/cmake-patches/libnatpmp.patch diff --git a/cmake/miniupnpc.cmake b/cmake/miniupnpc.cmake index c743721ff..44565a58a 100644 --- a/cmake/miniupnpc.cmake +++ b/cmake/miniupnpc.cmake @@ -22,6 +22,8 @@ FetchContent_Declare( GIT_REPOSITORY https://github.com/miniupnp/libnatpmp.git GIT_TAG master GIT_SHALLOW ON + PATCH_COMMAND git apply ${CMAKE_SOURCE_DIR}/ext/cmake-patches/libnatpmp.patch + UPDATE_DISCONNECTED TRUE ) FetchContent_MakeAvailable(libnatpmp) diff --git a/ext/cmake-patches/libnatpmp.patch b/ext/cmake-patches/libnatpmp.patch new file mode 100644 index 000000000..5b1495707 --- /dev/null +++ b/ext/cmake-patches/libnatpmp.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 16af4aa..1eb89f7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,6 @@ + cmake_minimum_required(VERSION 3.5) + +-file(STRINGS VERSION PVER) ++set(PVER "20120821") + + project(natpmp + LANGUAGES C +diff --git a/VERSION b/VERSION +deleted file mode 100644 +index 2ed7994..0000000 +--- a/VERSION ++++ /dev/null +@@ -1 +0,0 @@ +-20120821