diff --git a/packages/monero/CMakeLists.txt.patch b/packages/monero/CMakeLists.txt.patch new file mode 100644 index 0000000000..f39140c438 --- /dev/null +++ b/packages/monero/CMakeLists.txt.patch @@ -0,0 +1,20 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -244,7 +244,7 @@ + file(REMOVE_RECURSE "${TEST_PROJECT}") + endforeach() + endfunction() +-if (NOT (CMAKE_SYSTEM_NAME MATCHES "kOpenBSD.*|OpenBSD.*") AND NOT OSSFUZZ) ++if (NOT (CMAKE_SYSTEM_NAME MATCHES "Android|kOpenBSD.*|OpenBSD.*") AND NOT OSSFUZZ) + forbid_undefined_symbols() + endif() + +@@ -993,7 +993,7 @@ + endif(ARM) + + # random crash on startup when asan is on if pie is enabled +- if(NOT SANITIZE AND ANDROID AND NOT BUILD_GUI_DEPS STREQUAL "ON" OR IOS) ++ if(NOT SANITIZE AND FALSE AND NOT BUILD_GUI_DEPS STREQUAL "ON" OR IOS) + #From Android 5: "only position independent executables (PIE) are supported" + message(STATUS "Enabling PIE executable") + set(PIC_FLAG "") diff --git a/packages/monero/build.sh b/packages/monero/build.sh index 63d7103150..0fbd06efe8 100644 --- a/packages/monero/build.sh +++ b/packages/monero/build.sh @@ -2,21 +2,18 @@ TERMUX_PKG_HOMEPAGE=https://getmonero.org/ TERMUX_PKG_DESCRIPTION="A private, secure, untraceable, decentralised digital currency" TERMUX_PKG_LICENSE="BSD 3-Clause" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION=0.17.3.0 -TERMUX_PKG_REVISION=5 +TERMUX_PKG_VERSION=0.18.1.2 TERMUX_PKG_SRCURL=https://github.com/monero-project/monero.git -TERMUX_PKG_DEPENDS="boost, libprotobuf, libzmq, openssl, readline, unbound" +TERMUX_PKG_DEPENDS="boost, libc++, libprotobuf, libsodium, libzmq, miniupnpc, openssl, readline, unbound" TERMUX_PKG_BUILD_DEPENDS="boost-headers" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-DReadline_ROOT_DIR=$TERMUX_PREFIX +" termux_step_pre_configure() { termux_setup_protobuf - _NEED_DUMMY_LIBRT_A= - _LIBRT_A=$TERMUX_PREFIX/lib/librt.a - if [ ! -e $_LIBRT_A ]; then - _NEED_DUMMY_LIBRT_A=true - echo '!' > $_LIBRT_A - fi + LDFLAGS+=" -lminiupnpc" } termux_step_post_configure() { @@ -27,9 +24,3 @@ termux_step_post_configure() { -o $bin/generate_translations_header_for_build export PATH=$bin:$PATH } - -termux_step_post_make_install() { - if [ $_NEED_DUMMY_LIBRT_A ]; then - rm -f $_LIBRT_A - fi -} diff --git a/packages/monero/external-CMakeLists.txt.patch b/packages/monero/external-CMakeLists.txt.patch new file mode 100644 index 0000000000..a382404064 --- /dev/null +++ b/packages/monero/external-CMakeLists.txt.patch @@ -0,0 +1,20 @@ +--- a/external/CMakeLists.txt ++++ b/external/CMakeLists.txt +@@ -37,6 +37,9 @@ + + find_package(Miniupnpc REQUIRED) + ++if(MINIUPNPC_FOUND) ++ include_directories(${MINIUPNP_INCLUDE_DIR}) ++else() + message(STATUS "Using in-tree miniupnpc") + set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE) + add_subdirectory(miniupnp/miniupnpc) +@@ -52,6 +55,7 @@ + endif() + + set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE) ++endif() + + find_package(Unbound) + diff --git a/packages/monero/ignore-execinfo.patch b/packages/monero/ignore-execinfo.patch deleted file mode 100644 index 7585d18039..0000000000 --- a/packages/monero/ignore-execinfo.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- ./cmake/FindBacktrace.cmake.orig 2022-09-02 08:47:14.092006586 +0200 -+++ ./cmake/FindBacktrace.cmake 2022-09-02 08:47:32.510108150 +0200 -@@ -69,15 +69,9 @@ - endif() - set(Backtrace_LIBRARY "" CACHE FILEPATH "Library providing backtrace(3), empty for default set of libraries") - else() -- # Check for external library, for non-glibc systems -- if(Backtrace_INCLUDE_DIR) -- # OpenBSD has libbacktrace renamed to libexecinfo -- find_library(Backtrace_LIBRARY "execinfo") -- elseif() # respect user wishes -- set(_Backtrace_HEADER_TRY "backtrace.h") -- find_path(Backtrace_INCLUDE_DIR ${_Backtrace_HEADER_TRY}) -- find_library(Backtrace_LIBRARY "backtrace") -- endif() -+ set(_Backtrace_HEADER_TRY "backtrace.h") -+ find_path(Backtrace_INCLUDE_DIR ${_Backtrace_HEADER_TRY}) -+ find_library(Backtrace_LIBRARY "backtrace") - - # Prepend list with library path as it's more common practice - set(_Backtrace_STD_ARGS Backtrace_LIBRARY ${_Backtrace_STD_ARGS}) diff --git a/packages/monero/translations-CMakeLists.txt.patch b/packages/monero/translations-CMakeLists.txt.patch index 9304c731fe..05dc2fd68a 100644 --- a/packages/monero/translations-CMakeLists.txt.patch +++ b/packages/monero/translations-CMakeLists.txt.patch @@ -4,7 +4,7 @@ add_custom_command(TARGET generate_translations_header POST_BUILD -- COMMAND ./generate_translations_header ${qm_files} +- COMMAND $ ${qm_files} + COMMAND generate_translations_header_for_build ${qm_files} WORKING_DIRECTORY "${CMAKE_CURRENT_BIN_DIR}" COMMENT "Generating embedded translations header")