From 999111573213f4702e9e832f74e4524d627312bf Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Thu, 19 Mar 2020 18:05:58 +0000 Subject: net-p2p/monero: Version bump Package-Manager: Portage-2.3.89, Repoman-2.3.20 --- net-p2p/monero/Manifest | 1 + .../0.15.0.5-Do-not-install-trezor-dep-libs.patch | 25 +++++ .../files/0.15.0.5-Drop-in-tree-miniupnpc.patch | 57 ++++++++++ .../0.15.0.5-Use-gentoo-dev-libs-randomx.patch | 18 +++ .../files/0.15.0.5-Use-gentoo-versioning.patch | 37 ++++++ ...ceware.org-bugzilla-show_bug.cgi-id-25210.patch | 46 ++++++++ .../0.15.0.5-translations-use-host-compiler.patch | 30 +++++ net-p2p/monero/monero-0.15.0.5.ebuild | 124 +++++++++++++++++++++ 8 files changed, 338 insertions(+) create mode 100644 net-p2p/monero/files/0.15.0.5-Do-not-install-trezor-dep-libs.patch create mode 100644 net-p2p/monero/files/0.15.0.5-Drop-in-tree-miniupnpc.patch create mode 100644 net-p2p/monero/files/0.15.0.5-Use-gentoo-dev-libs-randomx.patch create mode 100644 net-p2p/monero/files/0.15.0.5-Use-gentoo-versioning.patch create mode 100644 net-p2p/monero/files/0.15.0.5-https-sourceware.org-bugzilla-show_bug.cgi-id-25210.patch create mode 100644 net-p2p/monero/files/0.15.0.5-translations-use-host-compiler.patch create mode 100644 net-p2p/monero/monero-0.15.0.5.ebuild (limited to 'net-p2p/monero') diff --git a/net-p2p/monero/Manifest b/net-p2p/monero/Manifest index 832ce138..2c3cb483 100644 --- a/net-p2p/monero/Manifest +++ b/net-p2p/monero/Manifest @@ -1,2 +1,3 @@ DIST monero-0.15.0.1.tar.gz 10389206 BLAKE2B e9011c1c7ee22c3d15a0019a84870cba8a1ed2a8a68be6a8977ddf58ff2e4ea7f62f50eb3687d33d651e95319793696873999a88b2908ee3e78ff263144111b7 SHA512 c2665aec43d4a2fc9edef6794de025f20b69c2a3e4e714558692b6d1b41cfe8c201f26cad3276499172727114b4954ef62f4b56c102ae10e470affc4bb700a66 +DIST monero-0.15.0.5.tar.gz 10396703 BLAKE2B d8bfd9b7f229f91dd2c292ccad028977bdc4c5a7494e1e1c492d576013219be1e579a37eb0c2b4bc466fc1715bdc5299e0c8ec84f9856056b22e9095de9df081 SHA512 3156d1c000a5aea66e7c8503f4d0d424444e609145f4f182b0ba2841685bb4673c711b588066bad87b5e73f498b8c774636e084d20e47989bc1b215c1ca15a27 DIST trezor-common-31a0073c62738827b48d725facd3766879429124.tar.gz 1329234 BLAKE2B 1d02969183c7df068797649e0f4a68887dae3ff673a488ad96a33753a3c3cdfa2f210f5d6f895a8bcc3c2498e6c77a62f890bd6dea795b04d23cda2d7050ad09 SHA512 dbea8e80809046cd620ae4ad90cb4c715c07f614b29735ebd6cc8347d721f130e2f9c01c7f3a311d5f5e2a731c29821402a1fa9e027c710e594a1c6dccd5273e diff --git a/net-p2p/monero/files/0.15.0.5-Do-not-install-trezor-dep-libs.patch b/net-p2p/monero/files/0.15.0.5-Do-not-install-trezor-dep-libs.patch new file mode 100644 index 00000000..d268548c --- /dev/null +++ b/net-p2p/monero/files/0.15.0.5-Do-not-install-trezor-dep-libs.patch @@ -0,0 +1,25 @@ +From fd666a409ceb0b8bf88e2e08255a4486a07bfb0f Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin +Date: Sat, 15 Jun 2019 00:57:09 +0100 +Subject: [PATCH] Do not install trezor dep libs + +--- + src/wallet/CMakeLists.txt | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt +index 3be1a6f6b2bf..8b0008fadf15 100644 +--- a/src/wallet/CMakeLists.txt ++++ b/src/wallet/CMakeLists.txt +@@ -148,11 +148,7 @@ if (BUILD_GUI_DEPS) + install(TARGETS wallet_merged + ARCHIVE DESTINATION ${lib_folder}) + +- install(FILES ${TREZOR_DEP_LIBS} +- DESTINATION ${lib_folder}) + file(WRITE "trezor_link_flags.txt" ${TREZOR_DEP_LINKER}) +- install(FILES "trezor_link_flags.txt" +- DESTINATION ${lib_folder}) + endif() + + add_subdirectory(api) diff --git a/net-p2p/monero/files/0.15.0.5-Drop-in-tree-miniupnpc.patch b/net-p2p/monero/files/0.15.0.5-Drop-in-tree-miniupnpc.patch new file mode 100644 index 00000000..4dccd659 --- /dev/null +++ b/net-p2p/monero/files/0.15.0.5-Drop-in-tree-miniupnpc.patch @@ -0,0 +1,57 @@ +From 557cbfb6f4cdb5c491ac75ff4f5e05c4747d1f79 Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin +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 | 16 +++------------- + src/p2p/net_node.inl | 6 +++--- + 2 files changed, 6 insertions(+), 16 deletions(-) + +diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt +index 71b165f4f166..072a26d19586 100644 +--- a/external/CMakeLists.txt ++++ b/external/CMakeLists.txt +@@ -37,19 +37,9 @@ + + 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_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 316ed1586e56..e33bac5175bd 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 +-#include +-#include ++#include ++#include ++#include + + #undef MONERO_DEFAULT_LOG_CATEGORY + #define MONERO_DEFAULT_LOG_CATEGORY "net.p2p" diff --git a/net-p2p/monero/files/0.15.0.5-Use-gentoo-dev-libs-randomx.patch b/net-p2p/monero/files/0.15.0.5-Use-gentoo-dev-libs-randomx.patch new file mode 100644 index 00000000..9c1b4307 --- /dev/null +++ b/net-p2p/monero/files/0.15.0.5-Use-gentoo-dev-libs-randomx.patch @@ -0,0 +1,18 @@ +From 13af354288a9334877ee4813eff3408a3af1c836 Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin +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 072a26d19586..10189ce3a2fb 100644 +--- a/external/CMakeLists.txt ++++ b/external/CMakeLists.txt +@@ -70,4 +70,3 @@ endif() + + add_subdirectory(db_drivers) + add_subdirectory(easylogging++) +-add_subdirectory(randomx EXCLUDE_FROM_ALL) diff --git a/net-p2p/monero/files/0.15.0.5-Use-gentoo-versioning.patch b/net-p2p/monero/files/0.15.0.5-Use-gentoo-versioning.patch new file mode 100644 index 00000000..18f6ef51 --- /dev/null +++ b/net-p2p/monero/files/0.15.0.5-Use-gentoo-versioning.patch @@ -0,0 +1,37 @@ +From 0afb322b7f23924fcf5469fa6a012fb161f3d048 Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin +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 26c2e2a1d447..d595b8293e1b 100644 +--- a/cmake/Version.cmake ++++ b/cmake/Version.cmake +@@ -31,20 +31,8 @@ function (write_version tag) + configure_file("${CMAKE_SOURCE_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/0.15.0.5-https-sourceware.org-bugzilla-show_bug.cgi-id-25210.patch b/net-p2p/monero/files/0.15.0.5-https-sourceware.org-bugzilla-show_bug.cgi-id-25210.patch new file mode 100644 index 00000000..d3e075ac --- /dev/null +++ b/net-p2p/monero/files/0.15.0.5-https-sourceware.org-bugzilla-show_bug.cgi-id-25210.patch @@ -0,0 +1,46 @@ +From febacda6465ec02768989cd4c49fe7f062867a2f Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin +Date: Sat, 30 Nov 2019 03:25:11 +0000 +Subject: [PATCH] https://sourceware.org/bugzilla/show_bug.cgi?id=25210 + +--- + CMakeLists.txt | 19 ------------------- + 1 file changed, 19 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 03e60cb1a475..cbf7232bd57b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -714,11 +714,6 @@ else() + CHECK_CXX_ACCEPTS_FLAG(-mfloat-abi=softfp CXX_ACCEPTS_MFLOAT_SOFTFP) + endif() + +- if(ARM8) +- CHECK_CXX_ACCEPTS_FLAG(-mfix-cortex-a53-835769 CXX_ACCEPTS_MFIX_CORTEX_A53_835769) +- CHECK_CXX_ACCEPTS_FLAG(-mfix-cortex-a53-843419 CXX_ACCEPTS_MFIX_CORTEX_A53_843419) +- endif() +- + if(ARM6) + message(STATUS "Selecting VFP for ARMv6") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=vfp") +@@ -755,20 +750,6 @@ else() + endif() + endif(ARM7) + +- if(ARM8) +- if(CXX_ACCEPTS_MFIX_CORTEX_A53_835769) +- message(STATUS "Enabling Cortex-A53 workaround 835769") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfix-cortex-a53-835769") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfix-cortex-a53-835769") +- endif() +- +- if(CXX_ACCEPTS_MFIX_CORTEX_A53_843419) +- message(STATUS "Enabling Cortex-A53 workaround 843419") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfix-cortex-a53-843419") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfix-cortex-a53-843419") +- endif() +- endif(ARM8) +- + endif(ARM) + + if(ANDROID AND NOT BUILD_GUI_DEPS STREQUAL "ON" OR IOS) diff --git a/net-p2p/monero/files/0.15.0.5-translations-use-host-compiler.patch b/net-p2p/monero/files/0.15.0.5-translations-use-host-compiler.patch new file mode 100644 index 00000000..4f36ec1f --- /dev/null +++ b/net-p2p/monero/files/0.15.0.5-translations-use-host-compiler.patch @@ -0,0 +1,30 @@ +From 759970067c04bab479f9a923cfa593adfe0c87f2 Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin +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 | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 03ede04837b5..03e60cb1a475 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -451,7 +451,12 @@ 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} ++ -DLRELEASE_PATH=${LRELEASE_PATH} + INSTALL_COMMAND cmake -E echo "") + include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations") + add_subdirectory(external) diff --git a/net-p2p/monero/monero-0.15.0.5.ebuild b/net-p2p/monero/monero-0.15.0.5.ebuild new file mode 100644 index 00000000..2effe7ba --- /dev/null +++ b/net-p2p/monero/monero-0.15.0.5.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{3_6,3_7} ) +CMAKE_MAKEFILE_GENERATOR="emake" +inherit cmake-utils flag-o-matic toolchain-funcs python-single-r1 user systemd + +DESCRIPTION="Secure, private, untraceable cryptocurrency" +HOMEPAGE="https://getmonero.org" + +TREZOR_COMMON_COMMIT="31a0073c62738827b48d725facd3766879429124" + +SRC_URI="https://github.com/monero-project/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz + smartcard? ( https://github.com/trezor/trezor-common/archive/${TREZOR_COMMON_COMMIT}.tar.gz -> trezor-common-${TREZOR_COMMON_COMMIT}.tar.gz )" + +LICENSE="NEWLIB" +SLOT="0/${PV}" +KEYWORDS="~amd64" +CPU_FLAGS="cpu_flags_arm_aes cpu_flags_x86_aes" +IUSE="doc qt5 nls readline smartcard unwind ${CPU_FLAGS}" + +RDEPEND="net-dns/unbound:=[threads] + >=dev-libs/randomx-1.1.6:= + net-libs/miniupnpc:= + dev-libs/openssl:0 + >=dev-libs/boost-1.62:=[icu,threads,nls] + net-libs/zeromq:=[sodium] + net-libs/cppzmq:= + dev-libs/rapidjson:= + net-libs/openpgm:= + readline? ( sys-libs/readline:= ) + unwind? ( sys-libs/libunwind[lzma] ) + smartcard? ( + dev-libs/hidapi:= + virtual/libusb:= + dev-libs/protobuf:= + $(python_gen_cond_dep 'dev-python/protobuf-python:=[${PYTHON_MULTI_USEDEP}]') + )" +DEPEND="${PYTHON_DEPS} + >=dev-util/cmake-2.8.7 + doc? ( + media-gfx/graphviz + app-doc/doxygen:0 + ) + nls? ( dev-qt/qtchooser ) + ${RDEPEND}" +PDEPEND="qt5? ( net-p2p/monero-gui )" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +PATCHES=( + "${FILESDIR}/${PV}-Drop-in-tree-miniupnpc.patch" + "${FILESDIR}/${PV}-Use-gentoo-versioning.patch" + "${FILESDIR}/${PV}-Do-not-install-trezor-dep-libs.patch" + "${FILESDIR}/${PV}-Use-gentoo-dev-libs-randomx.patch" + "${FILESDIR}/${PV}-translations-use-host-compiler.patch" + "${FILESDIR}/${PV}-https-sourceware.org-bugzilla-show_bug.cgi-id-25210.patch" +) + +CMAKE_BUILD_TYPE=Release + +pkg_setup() { + python-single-r1_pkg_setup + + enewgroup monero + enewuser monero -1 -1 /var/lib/monero monero +} + +src_unpack() { + default + + if use smartcard ; then + unpack "trezor-common-${TREZOR_COMMON_COMMIT}.tar.gz" + + rm -r "${S}/external/trezor-common" || die + mv "trezor-common-${TREZOR_COMMON_COMMIT}" "${S}/external/trezor-common" || die + fi +} + +src_prepare() { + cmake-utils_src_prepare + + append-cflags -DUSE_EXTRA_EC_CERT + append-cxxflags -DUSE_EXTRA_EC_CERT + tc-export_build_env BUILD_C{C,XX} +} + +src_configure() { + local mycmakeargs=( + -DBUILD_TAG="$(tc-arch)" + -DPYTHON_EXECUTABLE="${PYTHON}" + -DBUILD_DOCUMENTATION="$(usex doc ON OFF)" + -DBUILD_TESTS=OFF + -DCOVERAGE=OFF + -DUSE_READLINE="$(usex readline ON OFF)" + -DBUILD_GUI_DEPS="$(usex qt5 ON OFF)" + -DINSTALL_VENDORED_LIBUNBOUND=OFF + -DMANUAL_SUBMODULES=ON + ) + + if use cpu_flags_arm_aes || use cpu_flags_x86_aes ; then + mycmakeargs+=( -DNO_AES=OFF ) + else + mycmakeargs+=( -DNO_AES=ON ) + fi + + export DATABASE="lmdb" + export DEVELOPER_LOCAL_TOOLS=0 + export DEVELOPER_LIBUNBOUND_OLD=0 + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + insinto /etc + doins utils/conf/monerod.conf + + newinitd "${FILESDIR}/monerod.initd" monerod + systemd_dounit utils/systemd/monerod.service +} -- cgit v1.2.3