diff options
Diffstat (limited to 'pkgs/applications/blockchains/monero-cli/use-system-libraries.patch')
-rw-r--r-- | pkgs/applications/blockchains/monero-cli/use-system-libraries.patch | 42 |
1 files changed, 14 insertions, 28 deletions
diff --git a/pkgs/applications/blockchains/monero-cli/use-system-libraries.patch b/pkgs/applications/blockchains/monero-cli/use-system-libraries.patch index 5d3e3561d5548..f8629d47553c6 100644 --- a/pkgs/applications/blockchains/monero-cli/use-system-libraries.patch +++ b/pkgs/applications/blockchains/monero-cli/use-system-libraries.patch @@ -1,14 +1,14 @@ diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt -index 5b7f69a56..5536debe8 100644 +index f8b834ac17...520e148428 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt -@@ -36,22 +36,9 @@ - # others. +@@ -39,23 +39,12 @@ + add_compile_options(-D_GNU_SOURCE) + endif() - find_package(Miniupnpc REQUIRED) -- -message(STATUS "Using in-tree miniupnpc") -set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE) +-set(UPNPC_BUILD_TESTS FALSE CACHE BOOL "Disable miniupnp internal tests." FORCE) -add_subdirectory(miniupnp/miniupnpc) -set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external") -set_property(TARGET libminiupnpc-static PROPERTY POSITION_INDEPENDENT_CODE ON) @@ -20,33 +20,19 @@ index 5b7f69a56..5536debe8 100644 -if(CMAKE_SYSTEM_NAME MATCHES "NetBSD") - set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -D_NETBSD_SOURCE") -endif() -- --set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE) -+set(UPNP_STATIC false PARENT_SCOPE) -+set(UPNP_INCLUDE ${MINIUPNP_INCLUDE_DIR} PARENT_SCOPE) -+set(UPNP_LIBRARIES ${MINIUPNP_LIBRARY} PARENT_SCOPE) ++include(FindPkgConfig) ++pkg_check_modules(MINIUPNPC REQUIRED IMPORTED_TARGET GLOBAL miniupnpc) ++get_target_property(MINIUPNPC_INCLUDE_DIR PkgConfig::MINIUPNPC INTERFACE_INCLUDE_DIRECTORIES) ++set_target_properties(PkgConfig::MINIUPNPC PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${MINIUPNPC_INCLUDE_DIR}/miniupnpc") ++set(UPNP_LIBRARIES PkgConfig::MINIUPNPC PARENT_SCOPE) +-set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE) +- find_package(Unbound) -@@ -69,4 +56,3 @@ endif() + if(NOT UNBOUND_INCLUDE_DIR) +@@ -72,4 +61,3 @@ add_subdirectory(db_drivers) add_subdirectory(easylogging++) add_subdirectory(qrcodegen) -add_subdirectory(randomx EXCLUDE_FROM_ALL) -diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl -index d4b39869c..13071d898 100644 ---- a/src/p2p/net_node.inl -+++ b/src/p2p/net_node.inl -@@ -61,9 +61,9 @@ - #include "cryptonote_core/cryptonote_core.h" - #include "net/parse.h" - --#include <miniupnp/miniupnpc/miniupnpc.h> --#include <miniupnp/miniupnpc/upnpcommands.h> --#include <miniupnp/miniupnpc/upnperrors.h> -+#include <miniupnpc/miniupnpc.h> -+#include <miniupnpc/upnpcommands.h> -+#include <miniupnpc/upnperrors.h> - - #undef MONERO_DEFAULT_LOG_CATEGORY - #define MONERO_DEFAULT_LOG_CATEGORY "net.p2p" |