Gentoo Archives: gentoo-commits

From: Theo Anderson <telans@××××××.de>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: net-p2p/monero/files/, net-p2p/monero/
Date: Tue, 29 Dec 2020 10:41:48
Message-Id: 1609238124.7240540fcbd9e5fabb9d985264b9335540569251.telans@gentoo
1 commit: 7240540fcbd9e5fabb9d985264b9335540569251
2 Author: Theo Anderson <telans <AT> posteo <DOT> de>
3 AuthorDate: Tue Dec 29 10:34:46 2020 +0000
4 Commit: Theo Anderson <telans <AT> posteo <DOT> de>
5 CommitDate: Tue Dec 29 10:35:24 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=7240540f
7
8 net-p2p/monero: use dev-libs/supercop instead of bundled
9
10 Package-Manager: Portage-3.0.12, Repoman-3.0.2
11 Signed-off-by: Theo Anderson <telans <AT> posteo.de>
12
13 net-p2p/monero/Manifest | 1 -
14 .../monero-0.17.1.7-unbundle-dependencies.patch | 112 +++++++++++++++++++++
15 net-p2p/monero/monero-0.17.1.7.ebuild | 34 ++-----
16 3 files changed, 120 insertions(+), 27 deletions(-)
17
18 diff --git a/net-p2p/monero/Manifest b/net-p2p/monero/Manifest
19 index b4707575..28600df9 100644
20 --- a/net-p2p/monero/Manifest
21 +++ b/net-p2p/monero/Manifest
22 @@ -1,2 +1 @@
23 DIST monero-0.17.1.7.tar.gz 10598750 BLAKE2B 03a80f3c38bc1b643d8d9ddba4ee1de59e0f4c6d66cfc5dcb700d19659a5cb66add4fcf1320c1ed2b7dfa15fdfe9548eb758e67661832f9da7bd0e173b5a0ae1 SHA512 b049a738eb5752a620fc19dfafd5e2996d3f33d89737774264a5ef69b7fcfcd9fe852b89e35187486f48fdc8bb73c2010a1917d1ed7fcb4f1f87b18a6bb4c2d5
24 -DIST monero-supercop-0.17.1.7.tar.gz 346604 BLAKE2B 10e48076acb2e5de5acb2efee61b2fac40fdfec3bc4037a94199d56ee2446466126e1b9dade56ee69598f4bd3c64b45d86d0810f24f461f6e09fb84c87e1ef93 SHA512 06cca8d1def31aa11bf5aa42d861c4a027786f7cc494fa3ab53a2bc4bd9d1f55b2389020ba5fd1816ed277b6e4320ad8edbb3117dcf4981fc7fba655c4bbe648
25
26 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
27 new file mode 100644
28 index 00000000..ea7f8049
29 --- /dev/null
30 +++ b/net-p2p/monero/files/monero-0.17.1.7-unbundle-dependencies.patch
31 @@ -0,0 +1,112 @@
32 +diff --git a/CMakeLists.txt b/CMakeLists.txt
33 +index 41f82e26c..3eb2b2e78 100644
34 +--- a/CMakeLists.txt
35 ++++ b/CMakeLists.txt
36 +@@ -312,7 +312,7 @@ endif()
37 + # elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*")
38 + # set(BSDI TRUE)
39 +
40 +-include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external external/supercop/include)
41 ++include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external )
42 +
43 + if(APPLE)
44 + include_directories(SYSTEM /usr/include/malloc)
45 +@@ -995,7 +995,6 @@ if(SODIUM_LIBRARY)
46 + set(ZMQ_LIB "${ZMQ_LIB};${SODIUM_LIBRARY}")
47 + endif()
48 +
49 +-include(external/supercop/functions.cmake) # place after setting flags and before src directory inclusion
50 + add_subdirectory(contrib)
51 + add_subdirectory(src)
52 +
53 +diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
54 +index a8916a7d0..05ab35c82 100644
55 +--- a/external/CMakeLists.txt
56 ++++ b/external/CMakeLists.txt
57 +@@ -37,19 +37,7 @@
58 +
59 + find_package(Miniupnpc REQUIRED)
60 +
61 +-message(STATUS "Using in-tree miniupnpc")
62 +-add_subdirectory(miniupnp/miniupnpc)
63 +-set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
64 +-if(MSVC)
65 +- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267")
66 +-elseif(NOT MSVC)
67 +- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-unused-result -Wno-unused-value")
68 +-endif()
69 +-if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
70 +- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -D_NETBSD_SOURCE")
71 +-endif()
72 +-
73 +-set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE)
74 ++set(UPNP_LIBRARIES "miniupnpc" PARENT_SCOPE)
75 +
76 + find_package(Unbound)
77 +
78 +@@ -81,4 +69,3 @@ endif()
79 + add_subdirectory(db_drivers)
80 + add_subdirectory(easylogging++)
81 + add_subdirectory(qrcodegen)
82 +-add_subdirectory(randomx EXCLUDE_FROM_ALL)
83 +diff --git a/src/crypto/CMakeLists.txt b/src/crypto/CMakeLists.txt
84 +index 3b33fe90a..ba354a0e8 100644
85 +--- a/src/crypto/CMakeLists.txt
86 ++++ b/src/crypto/CMakeLists.txt
87 +@@ -55,6 +55,7 @@ list(APPEND crypto_sources CryptonightR_template.S)
88 + endif()
89 +
90 + include_directories(${RANDOMX_INCLUDE})
91 ++include_directories(SYSTEM /usr/include/monero)
92 +
93 + set(crypto_headers)
94 +
95 +@@ -116,6 +117,3 @@ endif()
96 +
97 + # cheat because cmake and ccache hate each other
98 + set_property(SOURCE CryptonightR_template.S PROPERTY LANGUAGE C)
99 +-
100 +-# Must be done last, because it references libraries in this directory
101 +-add_subdirectory(wallet)
102 +diff --git a/src/crypto/wallet/crypto.h b/src/crypto/wallet/crypto.h
103 +index a4c5d5a07..5c6b96cd8 100644
104 +--- a/src/crypto/wallet/crypto.h
105 ++++ b/src/crypto/wallet/crypto.h
106 +@@ -29,7 +29,6 @@
107 + #pragma once
108 +
109 + #include <cstddef>
110 +-#include "crypto/wallet/ops.h"
111 +
112 + namespace crypto {
113 + namespace wallet {
114 +diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt
115 +index ff2afba4b..26b0f4523 100644
116 +--- a/src/device/CMakeLists.txt
117 ++++ b/src/device/CMakeLists.txt
118 +@@ -72,7 +72,7 @@ target_link_libraries(device
119 + ${HIDAPI_LIBRARIES}
120 + cncrypto
121 + ringct_basic
122 +- wallet-crypto
123 ++ monero-crypto
124 + ${OPENSSL_CRYPTO_LIBRARIES}
125 + ${Boost_SERIALIZATION_LIBRARY}
126 + PRIVATE
127 +diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
128 +index 65db2615c..3ace310f6 100644
129 +--- a/src/p2p/net_node.inl
130 ++++ b/src/p2p/net_node.inl
131 +@@ -60,9 +60,9 @@
132 + #include "cryptonote_core/cryptonote_core.h"
133 + #include "net/parse.h"
134 +
135 +-#include <miniupnp/miniupnpc/miniupnpc.h>
136 +-#include <miniupnp/miniupnpc/upnpcommands.h>
137 +-#include <miniupnp/miniupnpc/upnperrors.h>
138 ++#include <miniupnpc/miniupnpc.h>
139 ++#include <miniupnpc/upnpcommands.h>
140 ++#include <miniupnpc/upnperrors.h>
141 +
142 + #undef MONERO_DEFAULT_LOG_CATEGORY
143 + #define MONERO_DEFAULT_LOG_CATEGORY "net.p2p"
144
145 diff --git a/net-p2p/monero/monero-0.17.1.7.ebuild b/net-p2p/monero/monero-0.17.1.7.ebuild
146 index a790abc7..5cfdcb4d 100644
147 --- a/net-p2p/monero/monero-0.17.1.7.ebuild
148 +++ b/net-p2p/monero/monero-0.17.1.7.ebuild
149 @@ -5,21 +5,16 @@ EAPI=7
150
151 inherit cmake systemd
152
153 -MY_RANDOMX_REV="5ce5f4906c1eb166be980f6d83cc80f4112ffc2a"
154 -MY_SUPERCOP_REV="633500ad8c8759995049ccd022107d1fa8a1bbc9"
155 -
156 DESCRIPTION="The secure, private, untraceable cryptocurrency"
157 HOMEPAGE="https://github.com/monero-project/monero"
158 -SRC_URI="
159 - https://github.com/monero-project/monero/archive/v${PV}.tar.gz -> ${P}.tar.gz
160 - https://github.com/monero-project/supercop/archive/${MY_SUPERCOP_REV}.tar.gz -> ${PN}-supercop-${PV}.tar.gz
161 -"
162 +SRC_URI="https://github.com/monero-project/monero/archive/v${PV}.tar.gz -> ${P}.tar.gz"
163
164 LICENSE="BSD MIT"
165 SLOT="0"
166 -KEYWORDS="~amd64 ~arm ~arm64 ~x86"
167 +KEYWORDS="~amd64 ~arm64 ~x86"
168 IUSE="+daemon libressl readline +tools +wallet-cli +wallet-rpc"
169 REQUIRED_USE="|| ( daemon tools wallet-cli wallet-rpc )"
170 +RESTRICT="test"
171
172 DEPEND="
173 acct-group/monero
174 @@ -28,6 +23,7 @@ DEPEND="
175 dev-libs/libsodium:=
176 dev-libs/randomx
177 dev-libs/rapidjson
178 + dev-libs/supercop
179 net-dns/unbound:=[threads]
180 net-libs/czmq:=
181 net-libs/miniupnpc
182 @@ -38,24 +34,10 @@ DEPEND="
183 RDEPEND="${DEPEND}"
184 BDEPEND="virtual/pkgconfig"
185
186 -PATCHES=("${FILESDIR}/${P}-linkjobs.patch")
187 -
188 -src_unpack() {
189 - unpack ${A}
190 - rmdir "${S}"/external/supercop || die
191 - mv "${WORKDIR}"/supercop-${MY_SUPERCOP_REV} "${S}"/external/supercop || die
192 -}
193 -
194 -src_prepare() {
195 - cmake_src_prepare
196 -
197 - sed -i 's:miniupnp/::' src/p2p/net_node.inl || die
198 - sed -e 's/UPNP_LIBRARIES "libminiupnpc-static/UPNP_LIBRARIES "miniupnpc'/ \
199 - -e '/libminiupnpc-static/d' \
200 - -e '/\/miniupnpc/d' \
201 - -e '/randomx/d' \
202 - -i external/CMakeLists.txt || die
203 -}
204 +PATCHES=(
205 + "${FILESDIR}/${P}-linkjobs.patch"
206 + "${FILESDIR}/${P}-unbundle-dependencies.patch"
207 +)
208
209 src_configure() {
210 local mycmakeargs=(