aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Anderson <telans@posteo.de>2020-12-29 23:34:46 +1300
committerTheo Anderson <telans@posteo.de>2020-12-29 23:35:24 +1300
commit7240540fcbd9e5fabb9d985264b9335540569251 (patch)
treea7a8715b0578bffa136a67e5e9252defe34fc3c6 /net-p2p
parentdev-libs/supercop: new package snapshot 20200827 (diff)
downloadguru-7240540fcbd9e5fabb9d985264b9335540569251.tar.gz
guru-7240540fcbd9e5fabb9d985264b9335540569251.tar.bz2
guru-7240540fcbd9e5fabb9d985264b9335540569251.zip
net-p2p/monero: use dev-libs/supercop instead of bundled
Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Theo Anderson <telans@posteo.de>
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/monero/Manifest1
-rw-r--r--net-p2p/monero/files/monero-0.17.1.7-unbundle-dependencies.patch112
-rw-r--r--net-p2p/monero/monero-0.17.1.7.ebuild34
3 files changed, 120 insertions, 27 deletions
diff --git a/net-p2p/monero/Manifest b/net-p2p/monero/Manifest
index b47075752..28600df91 100644
--- a/net-p2p/monero/Manifest
+++ b/net-p2p/monero/Manifest
@@ -1,2 +1 @@
DIST monero-0.17.1.7.tar.gz 10598750 BLAKE2B 03a80f3c38bc1b643d8d9ddba4ee1de59e0f4c6d66cfc5dcb700d19659a5cb66add4fcf1320c1ed2b7dfa15fdfe9548eb758e67661832f9da7bd0e173b5a0ae1 SHA512 b049a738eb5752a620fc19dfafd5e2996d3f33d89737774264a5ef69b7fcfcd9fe852b89e35187486f48fdc8bb73c2010a1917d1ed7fcb4f1f87b18a6bb4c2d5
-DIST monero-supercop-0.17.1.7.tar.gz 346604 BLAKE2B 10e48076acb2e5de5acb2efee61b2fac40fdfec3bc4037a94199d56ee2446466126e1b9dade56ee69598f4bd3c64b45d86d0810f24f461f6e09fb84c87e1ef93 SHA512 06cca8d1def31aa11bf5aa42d861c4a027786f7cc494fa3ab53a2bc4bd9d1f55b2389020ba5fd1816ed277b6e4320ad8edbb3117dcf4981fc7fba655c4bbe648
diff --git a/net-p2p/monero/files/monero-0.17.1.7-unbundle-dependencies.patch b/net-p2p/monero/files/monero-0.17.1.7-unbundle-dependencies.patch
new file mode 100644
index 000000000..ea7f80499
--- /dev/null
+++ b/net-p2p/monero/files/monero-0.17.1.7-unbundle-dependencies.patch
@@ -0,0 +1,112 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 41f82e26c..3eb2b2e78 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -312,7 +312,7 @@ endif()
+ # elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*")
+ # set(BSDI TRUE)
+
+-include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external external/supercop/include)
++include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external )
+
+ if(APPLE)
+ include_directories(SYSTEM /usr/include/malloc)
+@@ -995,7 +995,6 @@ if(SODIUM_LIBRARY)
+ set(ZMQ_LIB "${ZMQ_LIB};${SODIUM_LIBRARY}")
+ endif()
+
+-include(external/supercop/functions.cmake) # place after setting flags and before src directory inclusion
+ add_subdirectory(contrib)
+ add_subdirectory(src)
+
+diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
+index a8916a7d0..05ab35c82 100644
+--- a/external/CMakeLists.txt
++++ b/external/CMakeLists.txt
+@@ -37,19 +37,7 @@
+
+ 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")
+-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_LIBRARIES "miniupnpc" PARENT_SCOPE)
+
+ find_package(Unbound)
+
+@@ -81,4 +69,3 @@ endif()
+ add_subdirectory(db_drivers)
+ add_subdirectory(easylogging++)
+ add_subdirectory(qrcodegen)
+-add_subdirectory(randomx EXCLUDE_FROM_ALL)
+diff --git a/src/crypto/CMakeLists.txt b/src/crypto/CMakeLists.txt
+index 3b33fe90a..ba354a0e8 100644
+--- a/src/crypto/CMakeLists.txt
++++ b/src/crypto/CMakeLists.txt
+@@ -55,6 +55,7 @@ list(APPEND crypto_sources CryptonightR_template.S)
+ endif()
+
+ include_directories(${RANDOMX_INCLUDE})
++include_directories(SYSTEM /usr/include/monero)
+
+ set(crypto_headers)
+
+@@ -116,6 +117,3 @@ endif()
+
+ # cheat because cmake and ccache hate each other
+ set_property(SOURCE CryptonightR_template.S PROPERTY LANGUAGE C)
+-
+-# Must be done last, because it references libraries in this directory
+-add_subdirectory(wallet)
+diff --git a/src/crypto/wallet/crypto.h b/src/crypto/wallet/crypto.h
+index a4c5d5a07..5c6b96cd8 100644
+--- a/src/crypto/wallet/crypto.h
++++ b/src/crypto/wallet/crypto.h
+@@ -29,7 +29,6 @@
+ #pragma once
+
+ #include <cstddef>
+-#include "crypto/wallet/ops.h"
+
+ namespace crypto {
+ namespace wallet {
+diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt
+index ff2afba4b..26b0f4523 100644
+--- a/src/device/CMakeLists.txt
++++ b/src/device/CMakeLists.txt
+@@ -72,7 +72,7 @@ target_link_libraries(device
+ ${HIDAPI_LIBRARIES}
+ cncrypto
+ ringct_basic
+- wallet-crypto
++ monero-crypto
+ ${OPENSSL_CRYPTO_LIBRARIES}
+ ${Boost_SERIALIZATION_LIBRARY}
+ PRIVATE
+diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
+index 65db2615c..3ace310f6 100644
+--- a/src/p2p/net_node.inl
++++ b/src/p2p/net_node.inl
+@@ -60,9 +60,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"
diff --git a/net-p2p/monero/monero-0.17.1.7.ebuild b/net-p2p/monero/monero-0.17.1.7.ebuild
index a790abc71..5cfdcb4d4 100644
--- a/net-p2p/monero/monero-0.17.1.7.ebuild
+++ b/net-p2p/monero/monero-0.17.1.7.ebuild
@@ -5,21 +5,16 @@ EAPI=7
inherit cmake systemd
-MY_RANDOMX_REV="5ce5f4906c1eb166be980f6d83cc80f4112ffc2a"
-MY_SUPERCOP_REV="633500ad8c8759995049ccd022107d1fa8a1bbc9"
-
DESCRIPTION="The secure, private, untraceable cryptocurrency"
HOMEPAGE="https://github.com/monero-project/monero"
-SRC_URI="
- https://github.com/monero-project/monero/archive/v${PV}.tar.gz -> ${P}.tar.gz
- https://github.com/monero-project/supercop/archive/${MY_SUPERCOP_REV}.tar.gz -> ${PN}-supercop-${PV}.tar.gz
-"
+SRC_URI="https://github.com/monero-project/monero/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD MIT"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="+daemon libressl readline +tools +wallet-cli +wallet-rpc"
REQUIRED_USE="|| ( daemon tools wallet-cli wallet-rpc )"
+RESTRICT="test"
DEPEND="
acct-group/monero
@@ -28,6 +23,7 @@ DEPEND="
dev-libs/libsodium:=
dev-libs/randomx
dev-libs/rapidjson
+ dev-libs/supercop
net-dns/unbound:=[threads]
net-libs/czmq:=
net-libs/miniupnpc
@@ -38,24 +34,10 @@ DEPEND="
RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"
-PATCHES=("${FILESDIR}/${P}-linkjobs.patch")
-
-src_unpack() {
- unpack ${A}
- rmdir "${S}"/external/supercop || die
- mv "${WORKDIR}"/supercop-${MY_SUPERCOP_REV} "${S}"/external/supercop || die
-}
-
-src_prepare() {
- cmake_src_prepare
-
- sed -i 's:miniupnp/::' src/p2p/net_node.inl || die
- sed -e 's/UPNP_LIBRARIES "libminiupnpc-static/UPNP_LIBRARIES "miniupnpc'/ \
- -e '/libminiupnpc-static/d' \
- -e '/\/miniupnpc/d' \
- -e '/randomx/d' \
- -i external/CMakeLists.txt || die
-}
+PATCHES=(
+ "${FILESDIR}/${P}-linkjobs.patch"
+ "${FILESDIR}/${P}-unbundle-dependencies.patch"
+)
src_configure() {
local mycmakeargs=(