gnu: monero: Update to 0.14.1.0.
* gnu/packages/finance.scm (monero): Update to 0.14.1.0. * gnu/packages/patches/monero-use-system-miniupnpc.patch: Update file. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
84ce2a9499
commit
fc54da1d02
|
@ -11,6 +11,7 @@
|
||||||
;;; Copyright © 2018 Adriano Peluso <catonano@gmail.com>
|
;;; Copyright © 2018 Adriano Peluso <catonano@gmail.com>
|
||||||
;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
||||||
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
|
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
|
||||||
|
;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -39,6 +40,7 @@
|
||||||
#:use-module (gnu packages base)
|
#:use-module (gnu packages base)
|
||||||
#:use-module (gnu packages boost)
|
#:use-module (gnu packages boost)
|
||||||
#:use-module (gnu packages check)
|
#:use-module (gnu packages check)
|
||||||
|
#:use-module (gnu packages compression)
|
||||||
#:use-module (gnu packages crypto)
|
#:use-module (gnu packages crypto)
|
||||||
#:use-module (gnu packages databases)
|
#:use-module (gnu packages databases)
|
||||||
#:use-module (gnu packages documentation)
|
#:use-module (gnu packages documentation)
|
||||||
|
@ -68,6 +70,7 @@
|
||||||
#:use-module (gnu packages textutils)
|
#:use-module (gnu packages textutils)
|
||||||
#:use-module (gnu packages tls)
|
#:use-module (gnu packages tls)
|
||||||
#:use-module (gnu packages upnp)
|
#:use-module (gnu packages upnp)
|
||||||
|
#:use-module (gnu packages version-control)
|
||||||
#:use-module (gnu packages web)
|
#:use-module (gnu packages web)
|
||||||
#:use-module (gnu packages xml)
|
#:use-module (gnu packages xml)
|
||||||
#:use-module (gnu packages gnuzilla))
|
#:use-module (gnu packages gnuzilla))
|
||||||
|
@ -428,49 +431,59 @@ other machines/servers. Electroncash does not download the Bitcoin Cash blockch
|
||||||
|
|
||||||
(define-public monero
|
(define-public monero
|
||||||
;; This package bundles easylogging++ and lmdb.
|
;; This package bundles easylogging++ and lmdb.
|
||||||
;; The bundled easylogging++ is modified, and the changes will not be upstreamed.
|
;; The bundled easylogging++ is modified, and the changes will not be
|
||||||
|
;; upstreamed.
|
||||||
;; The devs deem the lmdb driver too critical a consenus component, to use
|
;; The devs deem the lmdb driver too critical a consenus component, to use
|
||||||
;; the system's dynamically linked library.
|
;; the system's dynamically linked library.
|
||||||
(package
|
(package
|
||||||
(name "monero")
|
(name "monero")
|
||||||
(version "0.12.3.0")
|
(version "0.14.1.0")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
(url "https://github.com/monero-project/monero")
|
(url "https://github.com/monero-project/monero.git")
|
||||||
(commit (string-append "v" version))))
|
(commit (string-append "v" version))
|
||||||
|
(recursive? #t)))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(patches (search-patches "monero-use-system-miniupnpc.patch"))
|
(patches (search-patches "monero-use-system-miniupnpc.patch"))
|
||||||
|
(modules '((guix build utils)))
|
||||||
|
(snippet
|
||||||
|
'(begin
|
||||||
|
;; Delete bundled dependencies.
|
||||||
|
(for-each
|
||||||
|
delete-file-recursively
|
||||||
|
'("external/miniupnp" "external/rapidjson"
|
||||||
|
"external/unbound"))
|
||||||
|
#t))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"14db9kgjm2ha93c2x5fjdw01xaqshn756qr3x2cnzyyjh7caz5qd"))))
|
"1asa197fad81jfv12qgaa7y7pdr1r1pda96m9pvivkh4v30cx0nh"))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("doxygen" ,doxygen)
|
`(("doxygen" ,doxygen)
|
||||||
("googletest" ,googletest)
|
("git" ,git)
|
||||||
("graphviz" ,graphviz)
|
("graphviz" ,graphviz)
|
||||||
("pkg-config" ,pkg-config)))
|
("pkg-config" ,pkg-config)
|
||||||
|
("qttools" ,qttools)))
|
||||||
(inputs
|
(inputs
|
||||||
`(("bind" ,isc-bind)
|
`(("boost" ,boost)
|
||||||
("boost" ,boost)
|
|
||||||
("zeromq" ,zeromq)
|
|
||||||
("cppzmq" ,cppzmq)
|
("cppzmq" ,cppzmq)
|
||||||
("expat" ,expat)
|
("expat" ,expat)
|
||||||
("libsodium" ,libsodium)
|
("hidapi" ,hidapi)
|
||||||
("libunwind" ,libunwind)
|
("libunwind" ,libunwind)
|
||||||
("lmdb" ,lmdb)
|
("libsodium" ,libsodium)
|
||||||
("miniupnpc" ,monero-miniupnpc)
|
("miniupnpc" ,miniupnpc)
|
||||||
("openssl" ,openssl)
|
("openssl" ,openssl)
|
||||||
("rapidjson" ,rapidjson)
|
("rapidjson" ,rapidjson)
|
||||||
("unbound" ,unbound)))
|
("readline" ,readline)
|
||||||
|
("unbound" ,unbound)
|
||||||
|
("xz" ,xz)
|
||||||
|
("zeromq" ,zeromq)))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:out-of-source? #t
|
`(#:out-of-source? #t
|
||||||
#:build-type "release"
|
#:configure-flags '("-DARCH=default"
|
||||||
#:configure-flags '("-DBUILD_TESTS=ON"
|
"-DBUILD_TESTS=ON"
|
||||||
,@(if (string=? "aarch64-linux" (%current-system))
|
|
||||||
'("-DARCH=armv8-a")
|
|
||||||
'())
|
|
||||||
"-DBUILD_GUI_DEPS=ON")
|
"-DBUILD_GUI_DEPS=ON")
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
|
@ -479,24 +492,18 @@ other machines/servers. Electroncash does not download the Bitcoin Cash blockch
|
||||||
(lambda _
|
(lambda _
|
||||||
(setenv "HOME" (getcwd))
|
(setenv "HOME" (getcwd))
|
||||||
#t))
|
#t))
|
||||||
(add-after 'set-home 'fix-wallet-path-for-unit-tests
|
(add-after 'set-home 'change-log-path
|
||||||
(lambda _
|
|
||||||
(substitute* "tests/unit_tests/serialization.cpp"
|
|
||||||
(("\\.\\./\\.\\./\\.\\./\\.\\./") "../../"))
|
|
||||||
#t))
|
|
||||||
(add-after 'fix-wallet-path-for-unit-tests 'change-log-path
|
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "contrib/epee/src/mlog.cpp"
|
(substitute* "contrib/epee/src/mlog.cpp"
|
||||||
(("epee::string_tools::get_current_module_folder\\(\\)")
|
(("epee::string_tools::get_current_module_folder\\(\\)")
|
||||||
"\".bitmonero\""))
|
"\".bitmonero\"")
|
||||||
(substitute* "contrib/epee/src/mlog.cpp"
|
(("return \\(")
|
||||||
(("return \\(") "return ((std::string(getenv(\"HOME\"))) / "))
|
"return ((std::string(getenv(\"HOME\"))) / "))
|
||||||
#t))
|
#t))
|
||||||
|
;; Only try tests that don't need access to network or system
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda _
|
(lambda _
|
||||||
(invoke "make" "ARGS=-E 'unit_tests|libwallet_api_tests'"
|
(invoke "make" "ARGS=-R 'hash|core_tests'" "test")))
|
||||||
"test")))
|
|
||||||
;; The excluded unit tests need network access
|
|
||||||
(add-after 'check 'unit-tests
|
(add-after 'check 'unit-tests
|
||||||
(lambda _
|
(lambda _
|
||||||
(let ((excluded-unit-tests
|
(let ((excluded-unit-tests
|
||||||
|
@ -506,22 +513,22 @@ other machines/servers. Electroncash does not download the Bitcoin Cash blockch
|
||||||
"DNSResolver.IPv4Success"
|
"DNSResolver.IPv4Success"
|
||||||
"DNSResolver.DNSSECSuccess"
|
"DNSResolver.DNSSECSuccess"
|
||||||
"DNSResolver.DNSSECFailure"
|
"DNSResolver.DNSSECFailure"
|
||||||
"DNSResolver.GetTXTRecord")
|
"DNSResolver.GetTXTRecord"
|
||||||
|
;; TODO: Find why portability_wallet test fails
|
||||||
|
;; Maybe the Boost version used to create the test
|
||||||
|
;; wallet and the current Boost version are not
|
||||||
|
;; completely compatible?
|
||||||
|
"Serialization.portability_wallet"
|
||||||
|
"is_hdd.linux_os_root")
|
||||||
":")))
|
":")))
|
||||||
(invoke "tests/unit_tests/unit_tests"
|
(invoke "tests/unit_tests/unit_tests"
|
||||||
(string-append "--gtest_filter=-"
|
(string-append "--gtest_filter=-"
|
||||||
excluded-unit-tests)))))
|
excluded-unit-tests))))))))
|
||||||
(add-after 'install 'install-blockchain-import-export
|
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
|
||||||
(bin (string-append out "/bin")))
|
|
||||||
(install-file "bin/monero-blockchain-import" bin)
|
|
||||||
(install-file "bin/monero-blockchain-export" bin)))))))
|
|
||||||
(home-page "https://getmonero.org/")
|
(home-page "https://getmonero.org/")
|
||||||
(synopsis "Command-line interface to the Monero currency")
|
(synopsis "Command-line interface to the Monero currency")
|
||||||
(description
|
(description
|
||||||
"Monero is a secure, private, untraceable currency. This package provides the
|
"Monero is a secure, private, untraceable currency. This package provides
|
||||||
Monero command line client and daemon.")
|
the Monero command line client and daemon.")
|
||||||
(license license:bsd-3)))
|
(license license:bsd-3)))
|
||||||
|
|
||||||
(define-public monero-gui
|
(define-public monero-gui
|
||||||
|
|
|
@ -1,111 +1,42 @@
|
||||||
This reverts commit 1e20d705e7c64d2b17c031f345057d1e8850fafa, so that it's possible to use our own
|
|
||||||
miniupnpc, instead of a git submodule.
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 8 ++++++++
|
|
||||||
external/CMakeLists.txt | 41 +++++++++++++++++++++++++++++++----------
|
|
||||||
src/p2p/net_node.inl | 13 ++++++++++---
|
|
||||||
3 files changed, 49 insertions(+), 13 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 3b93988e..ef948885 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -430,6 +430,14 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations")
|
|
||||||
|
|
||||||
add_subdirectory(external)
|
|
||||||
|
|
||||||
+# Final setup for miniupnpc
|
|
||||||
+if(UPNP_STATIC OR IOS)
|
|
||||||
+ add_definitions("-DUPNP_STATIC")
|
|
||||||
+else()
|
|
||||||
+ add_definitions("-DUPNP_DYNAMIC")
|
|
||||||
+ include_directories(${UPNP_INCLUDE})
|
|
||||||
+endif()
|
|
||||||
+
|
|
||||||
# Final setup for libunbound
|
|
||||||
include_directories(${UNBOUND_INCLUDE})
|
|
||||||
link_directories(${UNBOUND_LIBRARY_DIRS})
|
|
||||||
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
|
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
|
||||||
index 1fc4d64c..b4f712ee 100644
|
index 7553f87e..8e865c6c 100644
|
||||||
--- a/external/CMakeLists.txt
|
--- a/external/CMakeLists.txt
|
||||||
+++ b/external/CMakeLists.txt
|
+++ b/external/CMakeLists.txt
|
||||||
@@ -34,21 +34,42 @@
|
@@ -37,19 +37,7 @@
|
||||||
# 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.
|
|
||||||
+if(NOT IOS)
|
|
||||||
+ find_package(Miniupnpc QUIET)
|
|
||||||
+endif()
|
|
||||||
|
|
||||||
-find_package(Miniupnpc REQUIRED)
|
find_package(Miniupnpc REQUIRED)
|
||||||
+# 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")
|
-message(STATUS "Using in-tree miniupnpc")
|
||||||
+if(USE_SHARED_MINIUPNPC)
|
|
||||||
+ message(STATUS "Using shared miniupnpc found at ${MINIUPNP_INCLUDE_DIR}")
|
|
||||||
|
|
||||||
-add_subdirectory(miniupnp/miniupnpc)
|
-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)
|
|
||||||
+else()
|
|
||||||
+ if(STATIC)
|
|
||||||
+ message(STATUS "Using miniupnpc from local source tree for static build")
|
|
||||||
+ else()
|
|
||||||
+ message(STATUS "Using miniupnpc from local source tree (/external/miniupnp/miniupnpc)")
|
|
||||||
+ endif()
|
|
||||||
|
|
||||||
-set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
|
-set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
|
||||||
-if(MSVC)
|
-if(MSVC)
|
||||||
- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267")
|
- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267")
|
||||||
-elseif(NOT MSVC)
|
-elseif(NOT MSVC)
|
||||||
- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-unused-result -Wno-unused-value")
|
- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-unused-result -Wno-unused-value")
|
||||||
-endif()
|
-endif()
|
||||||
+ add_subdirectory(miniupnp/miniupnpc)
|
-if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
|
||||||
+
|
- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -D_NETBSD_SOURCE")
|
||||||
+ set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
|
-endif()
|
||||||
+ 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()
|
|
||||||
|
|
||||||
-set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE)
|
-set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE)
|
||||||
+ set(UPNP_STATIC true PARENT_SCOPE)
|
+set(UPNP_LIBRARIES "miniupnpc" PARENT_SCOPE)
|
||||||
+ set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE)
|
|
||||||
+endif()
|
|
||||||
|
|
||||||
find_package(Unbound)
|
find_package(Unbound)
|
||||||
|
|
||||||
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
|
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
|
||||||
index 9b21705e..76340a22 100644
|
index 74924e4f..3554dd0d 100644
|
||||||
--- a/src/p2p/net_node.inl
|
--- a/src/p2p/net_node.inl
|
||||||
+++ b/src/p2p/net_node.inl
|
+++ b/src/p2p/net_node.inl
|
||||||
@@ -49,9 +49,16 @@
|
@@ -49,9 +49,9 @@
|
||||||
#include "storages/levin_abstract_invoke2.h"
|
#include "storages/levin_abstract_invoke2.h"
|
||||||
#include "cryptonote_core/cryptonote_core.h"
|
#include "cryptonote_core/cryptonote_core.h"
|
||||||
|
|
||||||
-#include <miniupnp/miniupnpc/miniupnpc.h>
|
-#include <miniupnp/miniupnpc/miniupnpc.h>
|
||||||
-#include <miniupnp/miniupnpc/upnpcommands.h>
|
-#include <miniupnp/miniupnpc/upnpcommands.h>
|
||||||
-#include <miniupnp/miniupnpc/upnperrors.h>
|
-#include <miniupnp/miniupnpc/upnperrors.h>
|
||||||
+// We have to look for miniupnpc headers in different places, dependent on if its compiled or external
|
+#include <miniupnpc/miniupnpc.h>
|
||||||
+#ifdef UPNP_STATIC
|
+#include <miniupnpc/upnpcommands.h>
|
||||||
+ #include <miniupnp/miniupnpc/miniupnpc.h>
|
+#include <miniupnpc/upnperrors.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
|
#undef MONERO_DEFAULT_LOG_CATEGORY
|
||||||
#define MONERO_DEFAULT_LOG_CATEGORY "net.p2p"
|
#define MONERO_DEFAULT_LOG_CATEGORY "net.p2p"
|
||||||
--
|
|
||||||
2.16.2
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue