COMMENT =	secure, private, untraceable cryptocurrency

V =		0.18.3.4
DISTNAME =	monero-source-v${V}
PKGNAME =	monero-${V}
CATEGORIES =	net

HOMEPAGE =	https://getmonero.org/

MAINTAINER =	Lucas Gabriel Vuotto <lucas@sexy.is>

SITES =		https://downloads.getmonero.org/cli/source/
EXTRACT_SUFX =	.tar.bz2

# BSD3, MIT
PERMIT_PACKAGE =	Yes

WANTLIB += ${COMPILER_LIBCXX} boost_chrono-mt boost_date_time-mt
WANTLIB += boost_filesystem-mt boost_locale-mt boost_program_options-mt
WANTLIB += boost_regex-mt boost_serialization-mt boost_system-mt
WANTLIB += boost_thread-mt c crypto ereadline execinfo hidapi-libusb
WANTLIB += m sodium ssl unbound zmq

# C++14
COMPILER =	base-clang ports-gcc

MODULES =	devel/cmake

BUILD_DEPENDS =	devel/protobuf \
		net/miniupnp/miniupnpc

# Uses a bundled lmdb.
LIB_DEPENDS =	comms/libhidapi \
		devel/boost \
		devel/readline \
		net/libunbound \
		net/zeromq

CONFIGURE_ARGS =	-DBUILD_DOCUMENTATION=OFF \
			-DMANUAL_SUBMODULES=ON \
			-DUSE_DEVICE_TREZOR=OFF

# Required by RandomX JIT: implements a VM and does indirect jumps into its
# bytecode.
USE_NOEXECONLY =	Yes
USE_NOBTCFI =		Yes

.include <bsd.port.mk>
