summaryrefslogtreecommitdiff
path: root/net-p2p/monero
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2021-06-06 03:13:15 +0100
committerBertrand Jacquin <bertrand@jacquin.bzh>2021-06-06 18:21:02 +0100
commitefe7725b73187863ea9ae38ed0546924346f25d0 (patch)
tree084574d71b95b6f027e764cf6fff4005d3ac25b4 /net-p2p/monero
parentwww-client/arcanist: drop python 3.7 (diff)
downloadportage-efe7725b73187863ea9ae38ed0546924346f25d0.tar.xz
net-p2p/monero: add support for musl libc
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Diffstat (limited to 'net-p2p/monero')
-rw-r--r--net-p2p/monero/files/monero-0.17.2.0-translations-use-host-compiler.patch31
-rw-r--r--net-p2p/monero/monero-0.17.2.0.ebuild26
2 files changed, 44 insertions, 13 deletions
diff --git a/net-p2p/monero/files/monero-0.17.2.0-translations-use-host-compiler.patch b/net-p2p/monero/files/monero-0.17.2.0-translations-use-host-compiler.patch
index ac9d7da8..be4364df 100644
--- a/net-p2p/monero/files/monero-0.17.2.0-translations-use-host-compiler.patch
+++ b/net-p2p/monero/files/monero-0.17.2.0-translations-use-host-compiler.patch
@@ -1,4 +1,4 @@
-From ea1400129fa76ea66acc48e2a2f3ca1acb64711e Mon Sep 17 00:00:00 2001
+From 52f77ae211afe9e02717d1c47369d83cebe4ace3 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
@@ -7,24 +7,37 @@ Do not pass target compiler and compiler flags as
generate_translations_header need to be created using host compiler and
compiler flags
---
- CMakeLists.txt | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
+ CMakeLists.txt | 4 +++-
+ translations/CMakeLists.txt | 4 ++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 41f82e26c2ec..63c6f2d4f5fa 100644
+index 0c8d8dffb826..2889fd7f922f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -468,7 +468,12 @@ ExternalProject_Add(generate_translations_header
+@@ -467,7 +467,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_C_COMPILER=$ENV{BUILD_CC}
-+ -DCMAKE_CXX_COMPILER=$ENV{BUILD_CXX}
-+ -DCMAKE_C_FLAGS=$ENV{BUILD_CFLAGS}
-+ -DCMAKE_CXX_FLAGS=$ENV{BUILD_CXXFLAGS}
++ -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_BINARY_DIR}/translations.cmake
+ -DLRELEASE_PATH=${LRELEASE_PATH}
INSTALL_COMMAND cmake -E echo "")
include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations")
add_subdirectory(external)
+diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt
+index 0081746f2b9c..5309d84d742f 100644
+--- a/translations/CMakeLists.txt
++++ b/translations/CMakeLists.txt
+@@ -28,6 +28,10 @@
+
+ cmake_minimum_required(VERSION 2.8.7)
+
++# Ensure LDFLAGS for target are not propaged here since target are
++# meant for host
++UNSET(ENV{LDFLAGS})
++
+ project(translations)
+
+ # when crosscompiling import the executable targets from a file
diff --git a/net-p2p/monero/monero-0.17.2.0.ebuild b/net-p2p/monero/monero-0.17.2.0.ebuild
index 6ca344ab..45989b25 100644
--- a/net-p2p/monero/monero-0.17.2.0.ebuild
+++ b/net-p2p/monero/monero-0.17.2.0.ebuild
@@ -35,7 +35,6 @@ RDEPEND="net-dns/unbound:=[threads]
virtual/libusb:=
virtual/libudev:=
dev-libs/protobuf:=
- $(python_gen_any_dep 'dev-python/protobuf-python[${PYTHON_USEDEP}]')
)
qt5? (
dev-qt/qtconcurrent:5
@@ -56,14 +55,15 @@ RDEPEND="net-dns/unbound:=[threads]
)
acct-user/monero
acct-group/monero"
-DEPEND="${PYTHON_DEPS}
+DEPEND="${RDEPEND}
+ nls? ( dev-qt/qtchooser )"
+BDEPEND="${PYTHON_DEPS}
doc? (
media-gfx/graphviz
app-doc/doxygen:0
)
- nls? ( dev-qt/qtchooser )
qt5? ( dev-qt/linguist-tools:5 )
- ${RDEPEND}"
+ smartcard? ( $(python_gen_any_dep 'dev-python/protobuf-python[${PYTHON_USEDEP}]') )"
PATCHES_MONERO=(
"${FILESDIR}/monero-${PV}-Drop-in-tree-miniupnpc.patch"
@@ -140,6 +140,11 @@ src_configure() {
cmakeargs_monero+=( -DNO_AES=ON )
fi
+ if use elibc_musl ; then
+ # https://github.com/monero-project/monero/issues/2030
+ cmakeargs_monero+=( -DSTACK_TRACE=OFF )
+ fi
+
local cmakeargs_monerogui=(
"${cmakeargs_monero[@]}"
-DUSE_DEVICE_TREZOR="$(usex smartcard ON OFF)"
@@ -152,12 +157,25 @@ src_configure() {
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[@]} )