git: 0f607032e9e5 - main - net-p2p/litecoin: update to 0.21.2

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Tue, 24 May 2022 12:38:41 UTC
The branch main has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0f607032e9e535ab288eab5bfdb350df4ab521db

commit 0f607032e9e535ab288eab5bfdb350df4ab521db
Author:     Christopher Hall <hsw@bitmark.com>
AuthorDate: 2022-05-20 16:48:19 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2022-05-24 12:38:26 +0000

    net-p2p/litecoin: update to 0.21.2
    
    Summary: Update litecoin and associated ports to 0.21.2
    
    Reviewed by: diizzy, arrowd
    
    Differential Revision: https://reviews.freebsd.org/D35210
---
 net-p2p/litecoin-daemon/Makefile                          |  2 --
 net-p2p/litecoin-utils/Makefile                           |  7 ++++---
 net-p2p/litecoin/Makefile                                 | 15 ++++++---------
 net-p2p/litecoin/distinfo                                 |  6 +++---
 .../patch-src_libmw_deps_ghc_include_ghc_filesystem.hpp   | 15 +++++++++++++++
 5 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/net-p2p/litecoin-daemon/Makefile b/net-p2p/litecoin-daemon/Makefile
index bbb5fe81aeec..5fccc38ad8e0 100644
--- a/net-p2p/litecoin-daemon/Makefile
+++ b/net-p2p/litecoin-daemon/Makefile
@@ -7,8 +7,6 @@ COMMENT=	Virtual Peer-to-Peer Currency (Daemon)
 SLAVE_PORT=	yes
 
 OPTIONS_DEFINE=		DEBUG HARDENING TESTS UPNP ZMQ
-# WALLET_BDBMODERN is a choice for WALLET, introduced via OPTIONS_RADIO=WALLET
-# from ${MASTERDIR}/Makefile
 OPTIONS_DEFAULT=	HARDENING UPNP WALLET_BDBMODERN ZMQ
 
 USES+=		cpe
diff --git a/net-p2p/litecoin-utils/Makefile b/net-p2p/litecoin-utils/Makefile
index f06abba68ba8..270eb8fcfb37 100644
--- a/net-p2p/litecoin-utils/Makefile
+++ b/net-p2p/litecoin-utils/Makefile
@@ -5,9 +5,8 @@ PKGNAMESUFFIX=	-utils
 COMMENT=	Virtual Peer-to-Peer Currency (CLI and Utilities)
 SLAVE_PORT=	yes
 
-OPTIONS_DEFINE=		DEBUG HARDENING TESTS
+OPTIONS_DEFINE=		DEBUG HARDENING TESTS ZMQ
 OPTIONS_RADIO=
-OPTIONS_DEFAULT=	HARDENING TESTS
 
 PKGHELP=	${NONEXISTENT}
 
@@ -20,6 +19,8 @@ CONFIGURE_ARGS=	--without-daemon \
 		--disable-wallet
 
 PLIST_FILES=	bin/litecoin-cli bin/litecoin-tx \
-		man/man1/litecoin-cli.1.gz man/man1/litecoin-tx.1.gz
+		man/man1/litecoin-cli.1.gz man/man1/litecoin-tx.1.gz \
+		bin/litecoin-wallet \
+		man/man1/litecoin-wallet.1.gz
 
 .include "${MASTERDIR}/Makefile"
diff --git a/net-p2p/litecoin/Makefile b/net-p2p/litecoin/Makefile
index 32e861fe2c5c..38e11b5c259f 100644
--- a/net-p2p/litecoin/Makefile
+++ b/net-p2p/litecoin/Makefile
@@ -1,7 +1,6 @@
 PORTNAME=	litecoin
-PORTVERSION=	0.18.1
 DISTVERSIONPREFIX=	v
-PORTREVISION=	6
+DISTVERSION=	0.21.2
 CATEGORIES=	net-p2p finance
 
 MAINTAINER=	hsw@bitmark.com
@@ -10,9 +9,10 @@ COMMENT?=	Virtual Peer-to-Peer Currency Client (QT)
 LICENSE=	MIT
 
 LIB_DEPENDS=	libboost_date_time.so:devel/boost-libs \
+		libfmt.so:devel/libfmt \
 		libevent.so:devel/libevent
 
-USES=		autoreconf compiler:c++11-lib cpe gmake libtool pkgconfig qt:5 shebangfix ssl
+USES=		autoreconf compiler:c++11-lib cpe gmake libtool localbase pkgconfig qt:5 shebangfix ssl
 
 USE_GITHUB=	yes
 GNU_CONFIGURE=	yes
@@ -39,7 +39,7 @@ OPTIONS_SUB=		yes
 HARDENING_DESC=	Attempt to harden binaries (PIE for ASLR, NX Stack)
 QRCODES_DESC=	Display QR Codes
 TESTS_DESC=	Build test binary and unit tests
-WALLET_BDBMODERN_DESC=	Wallet using modern BDB 5.x or 6.x
+WALLET_BDBMODERN_DESC=	Wallet using modern BDB 18.x
 ZMQ_DESC=	Block and transaction broadcasting with ZeroMQ
 
 DBUS_CONFIGURE_WITH=	dbus
@@ -58,15 +58,12 @@ TESTS_PLIST_FILES+=	bin/bench_litecoin
 
 UPNP_CONFIGURE_WITH=	miniupnpc
 UPNP_LIB_DEPENDS=	libminiupnpc.so:net/miniupnpc
-UPNP_CPPFLAGS=		-I${LOCALBASE}/include
-UPNP_LIBS=		-L${LOCALBASE}/lib
 
 QRCODES_CONFIGURE_WITH=	qrencode
 QRCODES_LIB_DEPENDS=	libqrencode.so:graphics/libqrencode
 
 ZMQ_CONFIGURE_ENABLE=	zmq
-ZMQ_BUILD_DEPENDS=	libzmq4>0:net/libzmq4
-ZMQ_RUN_DEPENDS=	libzmq4>0:net/libzmq4
+ZMQ_LIB_DEPENDS=	libzmq.so:net/libzmq4
 
 GH_ACCOUNT=	litecoin-project
 
@@ -87,7 +84,7 @@ PLIST_FILES?=	bin/litecoin-qt man/man1/litecoin-qt.1.gz \
 
 .if ${PORT_OPTIONS:MWALLET_BDBMODERN}
 CONFIGURE_ARGS+=	--enable-wallet --with-incompatible-bdb
-USES+=			bdb:5+
+USES+=			bdb:18
 .else
 CONFIGURE_ARGS+=	--disable-wallet
 .endif
diff --git a/net-p2p/litecoin/distinfo b/net-p2p/litecoin/distinfo
index f94c4afd554a..fbac1e8a5589 100644
--- a/net-p2p/litecoin/distinfo
+++ b/net-p2p/litecoin/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1591956417
-SHA256 (litecoin-project-litecoin-v0.18.1_GH0.tar.gz) = 2d67cba11adc5890b9698ccddeb68dd3c2ff6af19bf3ed0f1c719348b914042f
-SIZE (litecoin-project-litecoin-v0.18.1_GH0.tar.gz) = 5122629
+TIMESTAMP = 1652410387
+SHA256 (litecoin-project-litecoin-v0.21.2_GH0.tar.gz) = 255263d27e409628ddaf7165f8d8363cefbd683bde613c3e7623a27f9733ada2
+SIZE (litecoin-project-litecoin-v0.21.2_GH0.tar.gz) = 6512998
diff --git a/net-p2p/litecoin/files/patch-src_libmw_deps_ghc_include_ghc_filesystem.hpp b/net-p2p/litecoin/files/patch-src_libmw_deps_ghc_include_ghc_filesystem.hpp
new file mode 100644
index 000000000000..89fcb9405a45
--- /dev/null
+++ b/net-p2p/litecoin/files/patch-src_libmw_deps_ghc_include_ghc_filesystem.hpp
@@ -0,0 +1,15 @@
+--- src/libmw/deps/ghc/include/ghc/filesystem.hpp.orig	2022-05-14 10:57:56.053289000 +0000
++++ src/libmw/deps/ghc/include/ghc/filesystem.hpp	2022-05-14 10:58:38.778321000 +0000
+@@ -50,6 +50,12 @@
+ 
+ #if defined(__APPLE__) && defined(__MACH__)
+ #define GHC_OS_MACOS
++#elif defined(__FreeBSD__)
++// use FreeBSD int strerror_r() instead of GNU char *strerror_r()
++#define _POSIX_C_SOURCE 200112L
++#if defined(__clang__) && defined(_GNU_SOURCE)
++#undef _GNU_SOURCE
++#endif
+ #elif defined(__linux__)
+ #define GHC_OS_LINUX
+ #elif defined(_WIN64)