git: 63be7e26cdb3 - main - net-p2p/qbittorrent: Add options to choose libtorrent version

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Thu, 28 Jul 2022 06:16:25 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=63be7e26cdb3e8b19264c13f0b1b7c83f29f6a6a

commit 63be7e26cdb3e8b19264c13f0b1b7c83f29f6a6a
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-07-28 06:11:50 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-07-28 06:11:50 +0000

    net-p2p/qbittorrent: Add options to choose libtorrent version
    
    Version 1.x is stable, and version 2.x is experimental.
---
 net-p2p/qbittorrent/Makefile | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/net-p2p/qbittorrent/Makefile b/net-p2p/qbittorrent/Makefile
index 14c288e85122..9a4a1ef7dd0a 100644
--- a/net-p2p/qbittorrent/Makefile
+++ b/net-p2p/qbittorrent/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	qbittorrent
 DISTVERSION=	4.4.3.1
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	net-p2p
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
 
@@ -46,13 +46,24 @@ PLIST_SUB=		USER=${USERS} GROUP=${GROUPS}
 OPTIONS_EXCLUDE=	DBUS
 .endif
 
-OPTIONS_DEFINE=		DBUS PYTHON DEBUG
-OPTIONS_DEFAULT=	DBUS
+OPTIONS_DEFINE=			DBUS PYTHON DEBUG
+OPTIONS_RADIO=			LIBTORRENT
+OPTIONS_RADIO_LIBTORRENT=	LIBTORRENT1 LIBTORRENT2
+OPTIONS_DEFAULT=		DBUS LIBTORRENT1
+
+LIBTORRENT_DESC=	libtorrent version number to use
+LIBTORRENT1_DESC=	Version 1.x (default)
+LIBTORRENT2_DESC=	Version 2.x (unstable, has memory issues)
 
 DEBUG_CONFIGURE_ENABLE=	debug
 DBUS_CONFIGURE_ENABLE=	qt-dbus
 DBUS_USE=		qt=dbus
 
+LIBTORRENT1_BUILD_DEPENDS=	libtorrent-rasterbar>0:net-p2p/libtorrent-rasterbar
+LIBTORRENT1_RUN_DEPENDS=	libtorrent-rasterbar>0:net-p2p/libtorrent-rasterbar
+LIBTORRENT2_BUILD_DEPENDS=	libtorrent-rasterbar2>0:net-p2p/libtorrent-rasterbar2
+LIBTORRENT2_RUN_DEPENDS=	libtorrent-rasterbar2>0:net-p2p/libtorrent-rasterbar2
+
 PYTHON_DESC=		Install Python to support some plugin functionality
 PYTHON_USES=		python:3.6+,run