summaryrefslogtreecommitdiff
path: root/net-p2p/monero/files
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2024-04-09 20:41:33 +0100
committerBertrand Jacquin <bertrand@jacquin.bzh>2024-04-09 22:09:11 +0100
commita9d6e2dddd7b532b75d97a25c9f3804fc64176b7 (patch)
tree9293d120e0c20581ead7fb1ab1c19b8881c024d5 /net-p2p/monero/files
parentnet-p2p/monero: move USE_DEVICE_TREZOR to common options (diff)
downloadportage-a9d6e2dddd7b532b75d97a25c9f3804fc64176b7.tar.xz
net-p2p/monero: add 9999
Diffstat (limited to 'net-p2p/monero/files')
-rw-r--r--net-p2p/monero/files/monero-9999-Drop-in-tree-miniupnpc.patch60
-rw-r--r--net-p2p/monero/files/monero-9999-Use-gentoo-dev-libs-randomx.patch18
-rw-r--r--net-p2p/monero/files/monero-9999-build-remove-mcpu-march-mtune.patch61
-rw-r--r--net-p2p/monero/files/monero-9999-translations-use-host-compiler.patch43
4 files changed, 182 insertions, 0 deletions
diff --git a/net-p2p/monero/files/monero-9999-Drop-in-tree-miniupnpc.patch b/net-p2p/monero/files/monero-9999-Drop-in-tree-miniupnpc.patch
new file mode 100644
index 00000000..23c13dcf
--- /dev/null
+++ b/net-p2p/monero/files/monero-9999-Drop-in-tree-miniupnpc.patch
@@ -0,0 +1,60 @@
+From 016ecdb58767bc1f44dcc3a00d79b44a739672eb 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 8deadc7ba63d..85db7880bd05 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 815c1b354ef2..40205f50ca8b 100644
+--- a/src/p2p/net_node.inl
++++ b/src/p2p/net_node.inl
+@@ -58,9 +58,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-9999-Use-gentoo-dev-libs-randomx.patch b/net-p2p/monero/files/monero-9999-Use-gentoo-dev-libs-randomx.patch
new file mode 100644
index 00000000..a30def3a
--- /dev/null
+++ b/net-p2p/monero/files/monero-9999-Use-gentoo-dev-libs-randomx.patch
@@ -0,0 +1,18 @@
+From ceb7f16d984c555cdeadda818516d2359857f8a5 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 85db7880bd05..802fd6fd2525 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-9999-build-remove-mcpu-march-mtune.patch b/net-p2p/monero/files/monero-9999-build-remove-mcpu-march-mtune.patch
new file mode 100644
index 00000000..7c299d1d
--- /dev/null
+++ b/net-p2p/monero/files/monero-9999-build-remove-mcpu-march-mtune.patch
@@ -0,0 +1,61 @@
+From 67d346887218546c8d3c232136329be3f9a112dd Mon Sep 17 00:00:00 2001
+From: Bertrand Jacquin <bertrand@jacquin.bzh>
+Date: Tue, 9 Apr 2024 21:47:47 +0100
+Subject: [PATCH] build: remove mcpu/march/mtune
+
+cc1plus: warning: switch '-mcpu=neoverse-n1+crc+crypto+ssbs' conflicts with '-march=armv8-a+crypto' switch
+---
+ CMakeLists.txt | 33 +--------------------------------
+ 1 file changed, 1 insertion(+), 32 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6de0b2a647f1..cc9c9bdc621f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -717,32 +717,6 @@ if(MSVC)
+ else()
+ include(TestCXXAcceptsFlag)
+ message(STATUS "Building on ${CMAKE_SYSTEM_PROCESSOR} for ${ARCH}")
+- if(ARCH STREQUAL "default")
+- set(ARCH_FLAG "")
+- elseif(PPC64LE)
+- set(ARCH_FLAG "-mcpu=power8")
+- elseif(PPC64)
+- set(ARCH_FLAG "-mcpu=970")
+- elseif(PPC)
+- set(ARCH_FLAG "-mcpu=7400")
+- elseif(IOS AND ARCH STREQUAL "arm64")
+- message(STATUS "IOS: Changing arch from arm64 to armv8")
+- set(ARCH_FLAG "-march=armv8")
+- else()
+- set(ARCH_FLAG "-march=${ARCH}")
+- if(ARCH STREQUAL "native")
+- check_c_compiler_flag(-march=native CC_SUPPORTS_MARCH_NATIVE)
+- if (NOT CC_SUPPORTS_MARCH_NATIVE)
+- check_c_compiler_flag(-mtune=native CC_SUPPORTS_MTUNE_NATIVE)
+- if (CC_SUPPORTS_MTUNE_NATIVE)
+- set(ARCH_FLAG "-mtune=${ARCH}")
+- else()
+- set(ARCH_FLAG "")
+- endif()
+- endif()
+- endif()
+- endif()
+-
+ option(NO_AES "Explicitly disable AES support" ${NO_AES})
+
+ if(NO_AES)
+@@ -765,12 +739,7 @@ else()
+ message(STATUS "AES support not available on ARMv7")
+ elseif(ARM8)
+ CHECK_CXX_ACCEPTS_FLAG("-march=${ARCH}+crypto" ARCH_PLUS_CRYPTO)
+- if(ARCH_PLUS_CRYPTO)
+- message(STATUS "Crypto extensions enabled for ARMv8")
+- set(ARCH_FLAG "-march=${ARCH}+crypto")
+- else()
+- message(STATUS "Crypto extensions unavailable on your ARMv8 device")
+- endif()
++ message(STATUS "${ARCH_PLUS_CRYPTO}")
+ else()
+ message(STATUS "AES support disabled")
+ endif()
diff --git a/net-p2p/monero/files/monero-9999-translations-use-host-compiler.patch b/net-p2p/monero/files/monero-9999-translations-use-host-compiler.patch
new file mode 100644
index 00000000..3d6fbb7a
--- /dev/null
+++ b/net-p2p/monero/files/monero-9999-translations-use-host-compiler.patch
@@ -0,0 +1,43 @@
+From 11dff579c6a9e580c18dcee930b2c448a92857bc 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 6ffdaeb55edd..6de0b2a647f1 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 8abebf67310d..e7518d1279ea 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")