summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-p2p/monero/Manifest2
-rw-r--r--net-p2p/monero/files/monero-0.18.0.0-Drop-in-tree-miniupnpc.patch60
-rw-r--r--net-p2p/monero/files/monero-0.18.0.0-Use-gentoo-dev-libs-randomx.patch18
-rw-r--r--net-p2p/monero/files/monero-0.18.0.0-Use-gentoo-versioning.patch37
-rw-r--r--net-p2p/monero/files/monero-0.18.0.0-translations-use-host-compiler.patch43
-rw-r--r--net-p2p/monero/files/monero-gui-0.18.0.0-cmake-use-gentoo-versioning.patch33
-rw-r--r--net-p2p/monero/monero-0.18.0.0.ebuild227
7 files changed, 420 insertions, 0 deletions
diff --git a/net-p2p/monero/Manifest b/net-p2p/monero/Manifest
index 904d1814..b6e49dc8 100644
--- a/net-p2p/monero/Manifest
+++ b/net-p2p/monero/Manifest
@@ -1,5 +1,7 @@
DIST monero-0.17.3.2.tar.gz 10685156 BLAKE2B f313ec0e5e224797448a43ad46d4e990174eec6cdceec6dc9a25d62f014a775172e103d05a33558404bd84a8443ba6ada0c27f81a3a83fe630d16cbad97602f5 SHA512 2d34e0525b2ca1d7bddb8ea51776b49fec4fb866a1c1239c347460ed3369af2f430be32da45666f16c369cebef099f285971c0e806d75d60354f195c5f93891d
+DIST monero-0.18.0.0.tar.gz 11595071 BLAKE2B b0bb74f4b4190adfcdfa7afb21e9feb060a712ba53d8e458c3a6ac756d7d2bede4111f4f5dd3518d52d8adf87a1b0e08cd13b7b17bef42dced7eb7750264b96c SHA512 75a09957fb89082636e3b95effa1a4a2e502b94a89006c8ece13dca609584c906b4decc00a3f10ccb6cf00144b2a41101bf2390f25fe687a9e7f2dc09393bcf9
DIST monero-gui-0.17.3.2.tar.gz 5764033 BLAKE2B 0095398508d12290c7b43722d45f2b7ab14410083b0c3d470a8406a6b85cade7da782c553190f4492e9921df5e2d0b71bba3805a9ada7fa21cc6c8a58f4d1150 SHA512 84ce3ff1bb56e13e2c39fb1d495c7d047a253ea119b3ea3d84090478da8b7be0bf32d1694991289e8e2e85536bbf11b2441865beb3848fbaed2a347bbe73ac0f
+DIST monero-gui-0.18.0.0.tar.gz 5879775 BLAKE2B 4592736ccb654d8bce01dbe31877cb4624acbf3b7359ec8d328f386400956a4a9a544f1275ee4f643c24961895fd2ae00ca788f94a244ebfcbad13e34ee195c0 SHA512 15a96eb74f9cf766cf374a8d680bae8c8b9c7507434439cc3104d801630043db149071f5072c23fabfc9b9ba29f09217bf00ba2c63cdf72587dba43dca91d0f4
DIST quirc-516d91a94d880ca1006fc1d57f318bdff8411f0d.tar.gz 42163 BLAKE2B 36f07063c376c51397958321e317c9f3a8718f192a16ade546add1b652a7252abeecebcb7c850b50b85c3b59b941456c4225a80aa301cdab5eb42c04e4725698 SHA512 30eb2905e03fd070ec160ad78bfba2ed973fe24fe63ab810bdb7bcec9e52da5ef042efbb50cce19fcfae13ffa531bcfb20421325e4a868856690d696f8e89eee
DIST supercop-633500ad8c8759995049ccd022107d1fa8a1bbc9.tar.gz 346604 BLAKE2B 10e48076acb2e5de5acb2efee61b2fac40fdfec3bc4037a94199d56ee2446466126e1b9dade56ee69598f4bd3c64b45d86d0810f24f461f6e09fb84c87e1ef93 SHA512 06cca8d1def31aa11bf5aa42d861c4a027786f7cc494fa3ab53a2bc4bd9d1f55b2389020ba5fd1816ed277b6e4320ad8edbb3117dcf4981fc7fba655c4bbe648
DIST trezor-common-028c9b2e95d83b4164748a12cfdc181f0dd11920.tar.gz 926880 BLAKE2B e2937f9e17fdf33e047084eec73bd4b75bb5e2a1ccb3ce03c9d731ddf2b93200f895de565c16913a0bb022e3662faa38777828912dc257124ea4196b23cc501c SHA512 d0fdc74dbcde444c852bf000123bc795d86a07993b79b18cc5cfb1535348059f3b7b5a4865892321c7ddc8a98be8f04e6cfbe224e7daae3aa292f40642afa609
diff --git a/net-p2p/monero/files/monero-0.18.0.0-Drop-in-tree-miniupnpc.patch b/net-p2p/monero/files/monero-0.18.0.0-Drop-in-tree-miniupnpc.patch
new file mode 100644
index 00000000..4959cf9c
--- /dev/null
+++ b/net-p2p/monero/files/monero-0.18.0.0-Drop-in-tree-miniupnpc.patch
@@ -0,0 +1,60 @@
+From dc3a18789e8c8ef6252bd94546bf8cd6184a56eb Mon Sep 17 00:00:00 2001
+From: Bertrand Jacquin <bertrand@jacquin.bzh>
+Date: Sun, 17 Jun 2018 22:34:11 +0100
+Subject: [PATCH] Drop in-tree miniupnpc
+
+Since 6b8539803184 ("Build: update CMake and p2p for in-tree
+miniupnp"), a hard dependency is made on miniupnpc which is a git
+submodule not part of the archive available upstream.
+---
+ external/CMakeLists.txt | 19 +++----------------
+ src/p2p/net_node.inl | 6 +++---
+ 2 files changed, 6 insertions(+), 19 deletions(-)
+
+diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
+index 5b7f69a56843..fc40455064f4 100644
+--- a/external/CMakeLists.txt
++++ b/external/CMakeLists.txt
+@@ -36,22 +36,9 @@
+ # others.
+
+ find_package(Miniupnpc REQUIRED)
+-
+-message(STATUS "Using in-tree miniupnpc")
+-set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE)
+-add_subdirectory(miniupnp/miniupnpc)
+-set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
+-set_property(TARGET libminiupnpc-static PROPERTY POSITION_INDEPENDENT_CODE ON)
+-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_STATIC false PARENT_SCOPE)
++set(UPNP_INCLUDE ${MINIUPNP_INCLUDE_DIR} PARENT_SCOPE)
++set(UPNP_LIBRARIES ${MINIUPNP_LIBRARY} PARENT_SCOPE)
+
+ find_package(Unbound)
+
+diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
+index f33ce977de07..3d0c05a19da2 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/files/monero-0.18.0.0-Use-gentoo-dev-libs-randomx.patch b/net-p2p/monero/files/monero-0.18.0.0-Use-gentoo-dev-libs-randomx.patch
new file mode 100644
index 00000000..178e83ff
--- /dev/null
+++ b/net-p2p/monero/files/monero-0.18.0.0-Use-gentoo-dev-libs-randomx.patch
@@ -0,0 +1,18 @@
+From a007bfe93c3e71a166206abd30a91dc3637983c8 Mon Sep 17 00:00:00 2001
+From: Bertrand Jacquin <bertrand@jacquin.bzh>
+Date: Wed, 6 Nov 2019 01:23:52 +0000
+Subject: [PATCH] Use gentoo dev-libs/randomx
+
+---
+ external/CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
+index fc40455064f4..5536debe8e2b 100644
+--- a/external/CMakeLists.txt
++++ b/external/CMakeLists.txt
+@@ -56,4 +56,3 @@ endif()
+ add_subdirectory(db_drivers)
+ add_subdirectory(easylogging++)
+ add_subdirectory(qrcodegen)
+-add_subdirectory(randomx EXCLUDE_FROM_ALL)
diff --git a/net-p2p/monero/files/monero-0.18.0.0-Use-gentoo-versioning.patch b/net-p2p/monero/files/monero-0.18.0.0-Use-gentoo-versioning.patch
new file mode 100644
index 00000000..c2c563e1
--- /dev/null
+++ b/net-p2p/monero/files/monero-0.18.0.0-Use-gentoo-versioning.patch
@@ -0,0 +1,37 @@
+From 9e2da6c420843a4928b0fb42a41bafcfb4b95ee3 Mon Sep 17 00:00:00 2001
+From: Bertrand Jacquin <bertrand@jacquin.bzh>
+Date: Sat, 15 Jun 2019 00:15:54 +0100
+Subject: [PATCH] Use gentoo versioning
+
+---
+ cmake/Version.cmake | 18 +++---------------
+ 1 file changed, 3 insertions(+), 15 deletions(-)
+
+diff --git a/cmake/Version.cmake b/cmake/Version.cmake
+index e9ed9fba159b..5df4bc1ab7f3 100644
+--- a/cmake/Version.cmake
++++ b/cmake/Version.cmake
+@@ -31,20 +31,8 @@ function (write_version tag)
+ configure_file("${CMAKE_CURRENT_LIST_DIR}/../src/version.cpp.in" "${CMAKE_BINARY_DIR}/version.cpp")
+ endfunction ()
+
+-find_package(Git QUIET)
+-if ("$Format:$" STREQUAL "")
+- # We're in a tarball; use hard-coded variables.
+- set(VERSION_IS_RELEASE "true")
+- write_version("release")
+-elseif (GIT_FOUND OR Git_FOUND)
+- message(STATUS "Found Git: ${GIT_EXECUTABLE}")
+- include(GitVersion)
+- get_version_tag_from_git("${GIT_EXECUTABLE}")
+- write_version("${VERSIONTAG}")
+-else()
+- message(STATUS "WARNING: Git was not found!")
+- set(VERSION_IS_RELEASE "false")
+- write_version("unknown")
+-endif ()
++set(VERSION_IS_RELEASE "true")
++write_version("release")
++
+ add_custom_target(genversion ALL
+ DEPENDS "${CMAKE_BINARY_DIR}/version.cpp")
diff --git a/net-p2p/monero/files/monero-0.18.0.0-translations-use-host-compiler.patch b/net-p2p/monero/files/monero-0.18.0.0-translations-use-host-compiler.patch
new file mode 100644
index 00000000..e51bef2f
--- /dev/null
+++ b/net-p2p/monero/files/monero-0.18.0.0-translations-use-host-compiler.patch
@@ -0,0 +1,43 @@
+From c927623016a946cddf6ba4e255cc9208929fa117 Mon Sep 17 00:00:00 2001
+From: Bertrand Jacquin <bertrand@jacquin.bzh>
+Date: Sat, 30 Nov 2019 02:09:14 +0000
+Subject: [PATCH] translations: use host compiler
+
+Do not pass target compiler and compiler flags as
+generate_translations_header need to be created using host compiler and
+compiler flags
+---
+ CMakeLists.txt | 4 +++-
+ translations/CMakeLists.txt | 4 ++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b05c087cf898..ef980115c9e1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -671,7 +671,9 @@ ExternalProject_Add(generate_translations_header
+ SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/translations"
+ BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/translations"
+ STAMP_DIR ${LRELEASE_PATH}
+- CMAKE_ARGS -DLRELEASE_PATH=${LRELEASE_PATH}
++ CMAKE_ARGS
++ -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_BINARY_DIR}/translations.cmake
++ -DLRELEASE_PATH=${LRELEASE_PATH}
+ INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "")
+ include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations")
+ add_subdirectory(external)
+diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt
+index 3b43360f84c8..35fcae544a42 100644
+--- a/translations/CMakeLists.txt
++++ b/translations/CMakeLists.txt
+@@ -30,6 +30,10 @@ cmake_minimum_required(VERSION 3.5)
+
+ project(translations)
+
++# Ensure LDFLAGS for target are not propagated here since target are
++# meant for host
++UNSET(ENV{LDFLAGS})
++
+ # when crosscompiling import the executable targets from a file
+ IF(CMAKE_CROSSCOMPILING)
+ message(WARNING "CrossCompiling")
diff --git a/net-p2p/monero/files/monero-gui-0.18.0.0-cmake-use-gentoo-versioning.patch b/net-p2p/monero/files/monero-gui-0.18.0.0-cmake-use-gentoo-versioning.patch
new file mode 100644
index 00000000..1d05fdb6
--- /dev/null
+++ b/net-p2p/monero/files/monero-gui-0.18.0.0-cmake-use-gentoo-versioning.patch
@@ -0,0 +1,33 @@
+From 3a0d595e530779c37431743b73566a7f6b2543e9 Mon Sep 17 00:00:00 2001
+From: Bertrand Jacquin <bertrand@jacquin.bzh>
+Date: Sun, 18 Oct 2020 15:43:33 +0100
+Subject: [PATCH] cmake: use gentoo versioning
+
+---
+ cmake/VersionGui.cmake | 14 ++------------
+ 1 file changed, 2 insertions(+), 12 deletions(-)
+
+diff --git a/cmake/VersionGui.cmake b/cmake/VersionGui.cmake
+index e225bf2bb3c0..1f8574e8d1e8 100644
+--- a/cmake/VersionGui.cmake
++++ b/cmake/VersionGui.cmake
+@@ -31,17 +31,7 @@ function (write_static_version_header tag)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/version.js.in" "${CMAKE_CURRENT_SOURCE_DIR}/version.js")
+ endfunction ()
+
+-find_package(Git QUIET)
+-if ("$Format:$" STREQUAL "")
+- # We're in a tarball; use hard-coded variables.
+- write_static_version_header("release")
+-elseif (GIT_FOUND OR Git_FOUND)
+- message(STATUS "Found Git: ${GIT_EXECUTABLE}")
+- get_version_tag_from_git("${GIT_EXECUTABLE}")
+- write_static_version_header(${VERSIONTAG})
+-else()
+- message(STATUS "WARNING: Git was not found!")
+- write_static_version_header("unknown")
+-endif ()
++write_static_version_header("release")
++
+ add_custom_target(genversiongui ALL
+ DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/version.js")
diff --git a/net-p2p/monero/monero-0.18.0.0.ebuild b/net-p2p/monero/monero-0.18.0.0.ebuild
new file mode 100644
index 00000000..0244244c
--- /dev/null
+++ b/net-p2p/monero/monero-0.18.0.0.ebuild
@@ -0,0 +1,227 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python{3_8,3_9,3_10} )
+CMAKE_MAKEFILE_GENERATOR="emake"
+inherit cmake flag-o-matic toolchain-funcs python-any-r1 systemd qmake-utils
+
+DESCRIPTION="Secure, private, untraceable cryptocurrency"
+HOMEPAGE="https://getmonero.org"
+
+EGIT_COMMIT_EXTERNAL_TREZOR_COMMON="028c9b2e95d83b4164748a12cfdc181f0dd11920"
+EGIT_COMMIT_EXTERNAL_SUPERCOP="633500ad8c8759995049ccd022107d1fa8a1bbc9"
+EGIT_COMMIT_EXTERNAL_QUIRC="516d91a94d880ca1006fc1d57f318bdff8411f0d"
+SRC_URI="https://github.com/monero-project/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/trezor/trezor-common/archive/${EGIT_COMMIT_EXTERNAL_TREZOR_COMMON}.tar.gz -> trezor-common-${EGIT_COMMIT_EXTERNAL_TREZOR_COMMON}.tar.gz
+ https://github.com/monero-project/supercop/archive/${EGIT_COMMIT_EXTERNAL_SUPERCOP}.tar.gz -> supercop-${EGIT_COMMIT_EXTERNAL_SUPERCOP}.tar.gz
+ qt5? (
+ https://github.com/monero-project/${PN}-gui/archive/refs/tags/v${PV}.tar.gz -> ${PN}-gui-${PV}.tar.gz
+ https://github.com/dlbeer/quirc/archive/${EGIT_COMMIT_EXTERNAL_QUIRC}.tar.gz -> quirc-${EGIT_COMMIT_EXTERNAL_QUIRC}.tar.gz
+ )"
+
+LICENSE="NEWLIB"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm64"
+CPU_FLAGS="cpu_flags_arm_aes cpu_flags_x86_aes"
+IUSE="doc qt5 nls readline smartcard ${CPU_FLAGS}"
+
+RDEPEND="net-dns/unbound:=[threads]
+ >=dev-libs/randomx-1.1.9:=
+ net-libs/miniupnpc:=
+ dev-libs/openssl:0
+ >=dev-libs/boost-1.62:=[icu,nls]
+ >=net-libs/zeromq-4.3:=[sodium]
+ dev-libs/rapidjson:=
+ readline? ( sys-libs/readline:= )
+ smartcard? (
+ >=dev-libs/hidapi-0.11.0:=
+ virtual/libusb:=
+ virtual/libudev:=
+ dev-libs/protobuf:=
+ )
+ qt5? (
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtdeclarative:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtsvg:5
+ dev-qt/qtxmlpatterns:5[qml]
+ dev-qt/qtwidgets:5
+ dev-qt/qtmultimedia:5
+ dev-qt/qtquickcontrols:5
+ dev-qt/qtquickcontrols2:5
+ dev-qt/qtgraphicaleffects:5
+ dev-libs/libgcrypt:=
+ media-fonts/fontawesome[ttf]
+ )
+ acct-user/monero
+ acct-group/monero"
+DEPEND="${RDEPEND}
+ nls? ( dev-qt/linguist-tools )"
+BDEPEND="${PYTHON_DEPS}
+ doc? (
+ media-gfx/graphviz
+ app-doc/doxygen:0
+ )
+ qt5? ( dev-qt/linguist-tools:5 )
+ smartcard? ( $(python_gen_any_dep 'dev-python/protobuf-python[${PYTHON_USEDEP}]') )"
+
+PATCHES_MONERO=(
+ "${FILESDIR}/monero-${PV}-Drop-in-tree-miniupnpc.patch"
+ "${FILESDIR}/monero-${PV}-Use-gentoo-versioning.patch"
+ "${FILESDIR}/monero-${PV}-Use-gentoo-dev-libs-randomx.patch"
+ "${FILESDIR}/monero-${PV}-translations-use-host-compiler.patch"
+)
+
+PATCHES_MONERO_GUI=(
+ "${FILESDIR}/monero-gui-${PV}-cmake-use-gentoo-versioning.patch"
+)
+
+CMAKE_BUILD_TYPE=Release
+
+src_unpack() {
+ default
+
+ rm -rf "${S}/external/trezor-common" || die
+ ln -snf "${WORKDIR}/trezor-common-${EGIT_COMMIT_EXTERNAL_TREZOR_COMMON}" "${S}/external/trezor-common" || die
+
+ rm -rf "${S}/external/supercop" || die
+ ln -snf "${WORKDIR}/supercop-${EGIT_COMMIT_EXTERNAL_SUPERCOP}" "${S}/external/supercop" || die
+
+ if use qt5 ; then
+ rm -rf "${WORKDIR}/monero-gui-${PV}/monero" || die
+ ln -snf "${WORKDIR}/monero-${PV}" "${WORKDIR}/monero-gui-${PV}/monero" || die
+
+ rm -rf "${WORKDIR}/monero-gui-${PV}/external/quirc" || die
+ ln -snf "${WORKDIR}/quirc-${EGIT_COMMIT_EXTERNAL_QUIRC}" "${WORKDIR}/monero-gui-${PV}/external/quirc" || die
+ fi
+}
+
+src_prepare() {
+ export AR=$(tc-getAR)
+ export CC=$(tc-getCC)
+ export CXX=$(tc-getCXX)
+ tc-export_build_env BUILD_C{C,XX}
+
+ # Needed for lrelease
+ export PATH="${PATH}:$(qt5_get_bindir)" || die
+
+ append-cflags -DUSE_EXTRA_EC_CERT
+ append-cxxflags -DUSE_EXTRA_EC_CERT
+
+ CMAKE_USE_DIR="${WORKDIR}/monero-${PV}"
+ BUILD_DIR="${WORKDIR}/monero-${PV}_build"
+ pushd "${CMAKE_USE_DIR}" > /dev/null || die
+ S="${CMAKE_USE_DIR}" PATCHES="${PATCHES_MONERO[@]}" cmake_src_prepare
+ popd > /dev/null || die
+
+ if use qt5 ; then
+ CMAKE_USE_DIR="${WORKDIR}/monero-gui-${PV}"
+ BUILD_DIR="${WORKDIR}/monero-gui-${PV}_build"
+ pushd "${CMAKE_USE_DIR}" > /dev/null || die
+ S="${CMAKE_USE_DIR}" PATCHES="${PATCHES_MONERO_GUI[@]}" cmake_src_prepare
+ popd > /dev/null || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs
+ local cmakeargs_monero=(
+ -Wno-dev
+ -DBUILD_TAG="$(tc-arch)"
+ -DUSE_CCACHE=OFF
+ -DPYTHON_EXECUTABLE="${PYTHON}"
+ -DBUILD_DOCUMENTATION="$(usex doc ON OFF)"
+ -DBUILD_TESTS=OFF
+ -DUSE_READLINE="$(usex readline ON OFF)"
+ -DBUILD_GUI_DEPS="$(usex qt5 ON OFF)"
+ -DBUILD_SHARED_LIBS=OFF
+ -DMANUAL_SUBMODULES=ON
+ )
+
+ if use cpu_flags_arm_aes || use cpu_flags_x86_aes ; then
+ cmakeargs_monero+=( -DNO_AES=OFF )
+ else
+ cmakeargs_monero+=( -DNO_AES=ON )
+ fi
+
+ if use elibc_musl ; then
+ cmakeargs_monero+=(
+ # https://github.com/monero-project/monero/issues/2030
+ -DSTACK_TRACE=OFF
+ )
+ fi
+
+ local cmakeargs_monerogui=(
+ "${cmakeargs_monero[@]}"
+ -DUSE_DEVICE_TREZOR="$(usex smartcard ON OFF)"
+ -DWITH_DESKTOP_ENTRY=ON
+ -DWITH_SCANNER=ON
+ -DWITH_UPDATER=OFF
+ -DDEV_MODE=OFF
+ )
+
+ export DATABASE="lmdb"
+ export DEVELOPER_LOCAL_TOOLS=0
+ export DEVELOPER_LIBUNBOUND_OLD=0
+
+ cat > "${WORKDIR}/monero-${PV}_build/translations.cmake" <<- _EOF_ || die
+ SET (CMAKE_C_COMPILER "${BUILD_CC}")
+ SET (CMAKE_C_FLAGS "${BUILD_CFLAGS}")
+ SET (CMAKE_CXX_COMPILER "${BUILD_CXX}")
+ SET (CMAKE_CXX_FLAGS "${BUILD_CXXFLAGS}")
+ SET (CMAKE_EXE_LINKER_FLAGS "${BUILD_LDFLAGS}")
+ SET (CMAKE_MODULE_LINKER_FLAGS "${BUILD_LDFLAGS}")
+ SET (CMAKE_SHARED_LINKER_FLAGS "${BUILD_LDFLAGS}")
+_EOF_
+
+ CMAKE_USE_DIR="${WORKDIR}/monero-${PV}"
+ BUILD_DIR="${WORKDIR}/monero-${PV}_build"
+ mycmakeargs=( ${cmakeargs_monero[@]} )
+ cmake_src_configure
+
+ if use qt5 ; then
+ mkdir -p "${WORKDIR}/monero-gui-${PV}_build/monero" || die
+ cp "${WORKDIR}/monero-${PV}_build/translations.cmake" "${WORKDIR}/monero-gui-${PV}_build/monero/translations.cmake" || die
+
+ CMAKE_USE_DIR="${WORKDIR}/monero-gui-${PV}"
+ BUILD_DIR="${WORKDIR}/monero-gui-${PV}_build"
+ mycmakeargs=( ${cmakeargs_monerogui[@]} )
+ cmake_src_configure
+ fi
+}
+
+src_compile() {
+ CMAKE_USE_DIR="${WORKDIR}/monero-${PV}"
+ BUILD_DIR="${WORKDIR}/monero-${PV}_build"
+ cmake_src_compile
+
+ if use qt5 ; then
+ CMAKE_USE_DIR="${WORKDIR}/monero-gui-${PV}"
+ BUILD_DIR="${WORKDIR}/monero-gui-${PV}_build"
+ cmake_src_compile
+ fi
+}
+
+src_install() {
+ CMAKE_USE_DIR="${WORKDIR}/monero-${PV}"
+ BUILD_DIR="${WORKDIR}/monero-${PV}_build"
+ cmake_src_install
+
+ if use qt5 ; then
+ CMAKE_USE_DIR="${WORKDIR}/monero-gui-${PV}"
+ BUILD_DIR="${WORKDIR}/monero-gui-${PV}_build"
+ cmake_src_install
+ fi
+
+ rm -rf "${ED}/usr/include" || die
+ rm -rf "${ED}/usr/lib" || die
+
+ insinto /etc
+ doins utils/conf/monerod.conf
+
+ newinitd "${FILESDIR}/monerod.initd" monerod
+ systemd_dounit utils/systemd/monerod.service
+}