diff --git a/net-p2p/monero-cli/Makefile b/net-p2p/monero-cli/Makefile index 57272b24678e..c6d46e9eee41 100644 --- a/net-p2p/monero-cli/Makefile +++ b/net-p2p/monero-cli/Makefile @@ -2,9 +2,12 @@ # $FreeBSD$ PORTNAME= monero-cli -PORTVERSION= 0.12.0.0 +# To build from an arbitrary git commit comment the following two lines +PORTVERSION= 0.12.2.0 DISTVERSIONPREFIX= v -PORTREVISION= 2 +# and uncomment the following two lines +#PORTVERSION= 0 +#PKGNAMESUFFIX= -git-HEAD CATEGORIES= net-p2p finance MAINTAINER= vd@FreeBSD.org @@ -27,20 +30,46 @@ LIB_DEPENDS= \ libunbound.so:dns/unbound \ libunwind.so:devel/libunwind \ libzmq.so:net/libzmq4 -BUILD_DEPENDS= ${LOCALBASE}/include/zmq.hpp:net/cppzmq +BUILD_DEPENDS= ${LOCALBASE}/include/rapidjson/document.h:devel/rapidjson \ + ${LOCALBASE}/include/zmq.hpp:net/cppzmq USES= cmake compiler:c++11-lib pkgconfig readline ssl USE_GITHUB= yes GH_ACCOUNT= monero-project GH_PROJECT= monero +.if defined(PKGNAMESUFFIX) +GH_TAGNAME= ${PKGNAMESUFFIX:C/-git-//} +.endif CFLAGS+= -D_WANT_SEMUN -LLD_UNSAFE= yes OPTIONS_DEFINE= DOXYGEN DOXYGEN_BUILD_DEPENDS= dot:graphics/graphviz \ doxygen:devel/doxygen DOXYGEN_CMAKE_BOOL= BUILD_DOCUMENTATION +.include + +# On FreeBSD 12.x the default ld(1) is LLVM's ld which needs an explicit -m option +# when linking without any input .o on the command line, like: +# /usr/bin/ld -melf_amd64 -r -b binary -o blocksdat.o blocks.dat +.if ${OSVERSION} >= 1200000 +ONLY_FOR_ARCHS= aarch64 amd64 i386 powerpc powerpc64 + +.if ${ARCH} == aarch64 +LD_EMULATION= aarch64elf +.elif ${ARCH} == amd64 +LD_EMULATION= elf_amd64 +.elif ${ARCH} == i386 +LD_EMULATION= elf_i386 +.elif ${ARCH} == powerpc +LD_EMULATION= elf32ppc +.elif ${ARCH} == powerpc64 +LD_EMULATION= elf64ppc +.endif + +CMAKE_ARGS+= -DLD_RAW_FLAGS:STRING=-m${LD_EMULATION} +.endif + USE_RC_SUBR= monerod USERS= monero @@ -56,4 +85,4 @@ PLIST_FILES= \ bin/monero-wallet-rpc \ bin/monerod -.include +.include diff --git a/net-p2p/monero-cli/distinfo b/net-p2p/monero-cli/distinfo index dbe06a56c65d..a9db99288382 100644 --- a/net-p2p/monero-cli/distinfo +++ b/net-p2p/monero-cli/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1521964559 -SHA256 (monero-project-monero-v0.12.0.0_GH0.tar.gz) = 5e8303900a39e296c4ebaa41d957ab9ee04e915704e1049f82a9cbd4eedc8ffb -SIZE (monero-project-monero-v0.12.0.0_GH0.tar.gz) = 8608168 +TIMESTAMP = 1528367811 +SHA256 (monero-project-monero-v0.12.2.0_GH0.tar.gz) = 804b4200d9673fee2a1e77251848082f9423e49f4d08e350efc476ae8b6a6dd9 +SIZE (monero-project-monero-v0.12.2.0_GH0.tar.gz) = 8431190 diff --git a/net-p2p/monero-cli/files/patch-boost-1.67 b/net-p2p/monero-cli/files/patch-boost-1.67 deleted file mode 100644 index e8bc3975feb5..000000000000 --- a/net-p2p/monero-cli/files/patch-boost-1.67 +++ /dev/null @@ -1,27 +0,0 @@ -https://github.com/monero-project/monero/pull/3667 - ---- contrib/epee/include/net/abstract_tcp_server2.inl.orig 2018-03-24 15:56:14 UTC -+++ contrib/epee/include/net/abstract_tcp_server2.inl -@@ -41,7 +41,7 @@ - #include - #include - #include // TODO --#include // TODO -+#include // TODO - #include "misc_language.h" - #include "pragma_comp_defs.h" - ---- contrib/epee/include/syncobj.h.orig 2018-03-24 15:56:14 UTC -+++ contrib/epee/include/syncobj.h -@@ -31,10 +31,10 @@ - #define __WINH_OBJ_H__ - - #include -+#include - #include - #include - #include --#include - - namespace epee - { diff --git a/net-p2p/monero-cli/files/patch-cmake_Version.cmake b/net-p2p/monero-cli/files/patch-cmake_Version.cmake index 41340fea7aea..b2c7b81faa61 100644 --- a/net-p2p/monero-cli/files/patch-cmake_Version.cmake +++ b/net-p2p/monero-cli/files/patch-cmake_Version.cmake @@ -1,11 +1,6 @@ ---- cmake/Version.cmake.orig 2018-03-26 15:12:24 UTC -+++ cmake/Version.cmake -@@ -28,11 +28,11 @@ - - function (write_static_version_header hash) - set(VERSIONTAG "${hash}") -- configure_file("src/version.cpp.in" "version.cpp") -+ configure_file("${CMAKE_BINARY_DIR}/src/version.cpp.in" "${CMAKE_BINARY_DIR}/version.cpp") +--- cmake/Version.cmake.orig 2018-06-01 14:10:23.694883000 UTC ++++ cmake/Version.cmake 2018-06-01 14:10:35.450366000 UTC +@@ -32,7 +32,7 @@ endfunction () find_package(Git QUIET) diff --git a/net-p2p/monero-cli/files/patch-external_CMakeLists.txt b/net-p2p/monero-cli/files/patch-external_CMakeLists.txt new file mode 100644 index 000000000000..83aa0da61d1c --- /dev/null +++ b/net-p2p/monero-cli/files/patch-external_CMakeLists.txt @@ -0,0 +1,42 @@ +--- external/CMakeLists.txt.orig 2018-05-23 21:21:59.000000000 UTC ++++ external/CMakeLists.txt 2018-06-01 17:48:47.449100000 UTC +@@ -31,24 +31,27 @@ + + # This is broken up into two parts: first we check for miniupnp, compile it if we can't + # find it, and thereafter we check for libunbound, and compile it if we can't find it. +-# We always compile if we are building statically to reduce static dependency issues... +-# ...except for FreeBSD, because FreeBSD is a special case that doesn't play well with +-# others. + + find_package(Miniupnpc REQUIRED) + +-message(STATUS "Using in-tree miniupnpc") ++if(NOT MINIUPNPC_FOUND OR STATIC) ++ message(STATUS "Using in-tree miniupnpc") + +-add_subdirectory(miniupnp/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() ++ 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() + +-set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE) ++ set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE) ++else() ++ message(STATUS "Found miniupnpc shared library (${MINIUPNP_LIBRARY})") ++ set(UPNP_LIBRARIES ${MINIUPNP_LIBRARY} PARENT_SCOPE) ++ set(UPNP_INCLUDE_DIR ${MINIUPNP_INCLUDE_DIR} PARENT_SCOPE) ++endif() + + find_package(Unbound) + diff --git a/net-p2p/monero-cli/files/patch-src_cryptonote__core_cryptonote__core.cpp b/net-p2p/monero-cli/files/patch-src_cryptonote__core_cryptonote__core.cpp deleted file mode 100644 index fe8b9be66803..000000000000 --- a/net-p2p/monero-cli/files/patch-src_cryptonote__core_cryptonote__core.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/cryptonote_core/cryptonote_core.cpp.orig 2018-04-12 18:30:36 UTC -+++ src/cryptonote_core/cryptonote_core.cpp -@@ -81,7 +81,7 @@ namespace cryptonote - , "Specify data directory" - , tools::get_default_data_dir() - , {{ &arg_testnet_on, &arg_stagenet_on }} -- , [](std::array testnet_stagenet, bool defaulted, std::string val) { -+ , [](std::array testnet_stagenet, bool defaulted, std::string val) -> std::string { - if (testnet_stagenet[0]) - return (boost::filesystem::path(val) / "testnet").string(); - else if (testnet_stagenet[1]) diff --git a/net-p2p/monero-cli/files/patch-src_daemon_command__line__args.h b/net-p2p/monero-cli/files/patch-src_daemon_command__line__args.h deleted file mode 100644 index a8ebeba2750c..000000000000 --- a/net-p2p/monero-cli/files/patch-src_daemon_command__line__args.h +++ /dev/null @@ -1,20 +0,0 @@ ---- src/daemon/command_line_args.h.orig 2018-04-12 18:39:37 UTC -+++ src/daemon/command_line_args.h -@@ -42,7 +42,7 @@ namespace daemon_args - , "Specify configuration file" - , (daemonizer::get_default_data_dir() / std::string(CRYPTONOTE_NAME ".conf")).string() - , {{ &cryptonote::arg_testnet_on, &cryptonote::arg_stagenet_on }} -- , [](std::array testnet_stagenet, bool defaulted, std::string val) { -+ , [](std::array testnet_stagenet, bool defaulted, std::string val) -> std::string { - if (testnet_stagenet[0] && defaulted) - return (daemonizer::get_default_data_dir() / "testnet" / - std::string(CRYPTONOTE_NAME ".conf")).string(); -@@ -57,7 +57,7 @@ namespace daemon_args - , "Specify log file" - , (daemonizer::get_default_data_dir() / std::string(CRYPTONOTE_NAME ".log")).string() - , {{ &cryptonote::arg_testnet_on, &cryptonote::arg_stagenet_on }} -- , [](std::array testnet_stagenet, bool defaulted, std::string val) { -+ , [](std::array testnet_stagenet, bool defaulted, std::string val) -> std::string { - if (testnet_stagenet[0] && defaulted) - return (daemonizer::get_default_data_dir() / "testnet" / - std::string(CRYPTONOTE_NAME ".log")).string(); diff --git a/net-p2p/monero-cli/files/patch-src_p2p_net__node.inl b/net-p2p/monero-cli/files/patch-src_p2p_net__node.inl new file mode 100644 index 000000000000..5b41c099fdb3 --- /dev/null +++ b/net-p2p/monero-cli/files/patch-src_p2p_net__node.inl @@ -0,0 +1,15 @@ +--- src/p2p/net_node.inl.orig 2018-06-06 19:28:51.925128000 UTC ++++ src/p2p/net_node.inl 2018-06-06 19:29:06.877331000 UTC +@@ -49,9 +49,9 @@ + #include "storages/levin_abstract_invoke2.h" + #include "cryptonote_core/cryptonote_core.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-cli/files/patch-src_wallet_wallet2.cpp b/net-p2p/monero-cli/files/patch-src_wallet_wallet2.cpp deleted file mode 100644 index 046b37edfbd1..000000000000 --- a/net-p2p/monero-cli/files/patch-src_wallet_wallet2.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/wallet/wallet2.cpp.orig 2018-03-24 15:56:14 UTC -+++ src/wallet/wallet2.cpp -@@ -145,7 +145,7 @@ struct options { - "shared-ringdb-dir", tools::wallet2::tr("Set shared ring database path"), - get_default_ringdb_path(), - testnet, -- [](bool testnet, bool defaulted, std::string val) { -+ [](bool testnet, bool defaulted, std::string val) -> std::string { - if (testnet) - return (boost::filesystem::path(val) / "testnet").string(); - return val;