aboutsummaryrefslogtreecommitdiffstats
path: root/testing/monero/system-miniupnpc.patch
diff options
context:
space:
mode:
authorAndy Postnikov <apostnikov@gmail.com>2018-10-19 14:35:48 +0300
committerAndy Postnikov <apostnikov@gmail.com>2018-10-20 20:15:19 +0300
commit348491d105df0f8dfc19b40f4cabd5120d453139 (patch)
treef6437971fdc3677eb98f7ea64d6546d5809ab36a /testing/monero/system-miniupnpc.patch
parent0b51cdda2778ca9fef1c3fe08bde9271179f2cdb (diff)
downloadaports-348491d105df0f8dfc19b40f4cabd5120d453139.tar.bz2
aports-348491d105df0f8dfc19b40f4cabd5120d453139.tar.xz
testing/monero: upgrade to 0.13.0.2
Diffstat (limited to 'testing/monero/system-miniupnpc.patch')
-rw-r--r--testing/monero/system-miniupnpc.patch90
1 files changed, 46 insertions, 44 deletions
diff --git a/testing/monero/system-miniupnpc.patch b/testing/monero/system-miniupnpc.patch
index 5cc25a570e..3742ce525c 100644
--- a/testing/monero/system-miniupnpc.patch
+++ b/testing/monero/system-miniupnpc.patch
@@ -15,11 +15,36 @@
# Final setup for libunbound
include_directories(${UNBOUND_INCLUDE})
link_directories(${UNBOUND_LIBRARY_DIRS})
-diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
-index 1fc4d64c..b4f712ee 100644
---- a/external/CMakeLists.txt
-+++ b/external/CMakeLists.txt
-@@ -34,21 +34,42 @@
+diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
+index 9b21705e..76340a22 100644
+--- a/src/p2p/net_node.inl
++++ b/src/p2p/net_node.inl
+@@ -49,9 +49,16 @@
+ #include "storages/levin_abstract_invoke2.h"
+ #include "cryptonote_core/cryptonote_core.h"
+
+-#include <miniupnp/miniupnpc/miniupnpc.h>
+-#include <miniupnp/miniupnpc/upnpcommands.h>
+-#include <miniupnp/miniupnpc/upnperrors.h>
++// We have to look for miniupnpc headers in different places, dependent on if its compiled or external
++#ifdef UPNP_STATIC
++ #include <miniupnp/miniupnpc/miniupnpc.h>
++ #include <miniupnp/miniupnpc/upnpcommands.h>
++ #include <miniupnp/miniupnpc/upnperrors.h>
++#else
++ #include "miniupnpc.h"
++ #include "upnpcommands.h"
++ #include "upnperrors.h"
++#endif
+
+ #undef MONERO_DEFAULT_LOG_CATEGORY
+ #define MONERO_DEFAULT_LOG_CATEGORY "net.p2p"
+--
+2.17.0
+
+--- a/external/CMakeLists.txt 2018-10-10 13:13:55.759414180 +0200
++++ b/external/CMakeLists.txt 2018-10-10 13:19:33.363411827 +0200
+@@ -34,22 +34,46 @@
# We always compile if we are building statically to reduce static dependency issues...
# ...except for FreeBSD, because FreeBSD is a special case that doesn't play well with
# others.
@@ -28,18 +53,25 @@ index 1fc4d64c..b4f712ee 100644
+endif()
-find_package(Miniupnpc REQUIRED)
+-
+-message(STATUS "Using in-tree miniupnpc")
+-add_subdirectory(miniupnp/miniupnpc)
+-set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
+-if(MSVC)
+- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267")
+-elseif(NOT MSVC)
+- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-unused-result -Wno-unused-value")
+# If we have the correct shared version and we're not building static, use it
+if(STATIC OR IOS)
+ set(USE_SHARED_MINIUPNPC false)
+elseif(MINIUPNP_FOUND AND MINIUPNPC_VERSION_1_7_OR_HIGHER)
+ set(USE_SHARED_MINIUPNPC true)
-+endif()
-
--message(STATUS "Using in-tree miniupnpc")
+ endif()
++
++
+if(USE_SHARED_MINIUPNPC)
+ message(STATUS "Using shared miniupnpc found at ${MINIUPNP_INCLUDE_DIR}")
-
--add_subdirectory(miniupnp/miniupnpc)
++
+ set(UPNP_STATIC false PARENT_SCOPE)
+ set(UPNP_INCLUDE ${MINIUPNP_INCLUDE_DIR} PARENT_SCOPE)
+ set(UPNP_LIBRARIES ${MINIUPNP_LIBRARY} PARENT_SCOPE)
@@ -49,13 +81,6 @@ index 1fc4d64c..b4f712ee 100644
+ else()
+ message(STATUS "Using miniupnpc from local source tree (/external/miniupnp/miniupnpc)")
+ endif()
-
--set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
--if(MSVC)
-- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267")
--elseif(NOT MSVC)
-- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-unused-result -Wno-unused-value")
--endif()
+ add_subdirectory(miniupnp/miniupnpc)
+
+ set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
@@ -64,6 +89,10 @@ index 1fc4d64c..b4f712ee 100644
+ elseif(NOT MSVC)
+ set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-unused-result -Wno-unused-value")
+ endif()
++
+ 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 true PARENT_SCOPE)
@@ -72,30 +101,3 @@ index 1fc4d64c..b4f712ee 100644
find_package(Unbound)
-diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
-index 9b21705e..76340a22 100644
---- a/src/p2p/net_node.inl
-+++ b/src/p2p/net_node.inl
-@@ -49,9 +49,16 @@
- #include "storages/levin_abstract_invoke2.h"
- #include "cryptonote_core/cryptonote_core.h"
-
--#include <miniupnp/miniupnpc/miniupnpc.h>
--#include <miniupnp/miniupnpc/upnpcommands.h>
--#include <miniupnp/miniupnpc/upnperrors.h>
-+// We have to look for miniupnpc headers in different places, dependent on if its compiled or external
-+#ifdef UPNP_STATIC
-+ #include <miniupnp/miniupnpc/miniupnpc.h>
-+ #include <miniupnp/miniupnpc/upnpcommands.h>
-+ #include <miniupnp/miniupnpc/upnperrors.h>
-+#else
-+ #include "miniupnpc.h"
-+ #include "upnpcommands.h"
-+ #include "upnperrors.h"
-+#endif
-
- #undef MONERO_DEFAULT_LOG_CATEGORY
- #define MONERO_DEFAULT_LOG_CATEGORY "net.p2p"
---
-2.17.0
-