diff --git a/net-p2p/qbittorrent/Makefile b/net-p2p/qbittorrent/Makefile index 43d20ca3aeec..b92a9c896e9f 100644 --- a/net-p2p/qbittorrent/Makefile +++ b/net-p2p/qbittorrent/Makefile @@ -1,83 +1,84 @@ PORTNAME= qbittorrent DISTVERSION= 4.5.2 CATEGORIES= net-p2p MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} MAINTAINER= yuri@FreeBSD.org COMMENT= Bittorrent client using Qt5 and libtorrent-rasterbar WWW= https://www.qbittorrent.org/ LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING BROKEN_FreeBSD_12_powerpc64= fails to build: ./base/tristatebool.h:44:5: 'constexpr' constructor does not have empty body LIB_DEPENDS= libboost_system.so:devel/boost-libs CXXFLAGS+= -DBOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED # error: "Boost.Stacktrace requires `_Unwind_Backtrace` function. Define `_GNU_SOURCE` macro or `BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED` if _Unwind_Backtrace is available without `_GNU_SOURCE`." FLAVORS= default nox FLAVOR?= ${FLAVORS:[1]} nox_PKGNAMESUFFIX= -nox nox_PLIST= ${MASTERDIR}/pkg-plist-nox USES= compiler:c++14-lang cpe pkgconfig qmake:no_env qt:5 ssl tar:xz GNU_CONFIGURE= yes USE_QT= core network sql xml buildtools:build linguisttools:build qmake:build DESTDIRNAME= INSTALL_ROOT CONFIGURE_ENV+= openssl_CFLAGS="-I${OPENSSLINC}" openssl_LIBS="-L${OPENSSLLIB} -lssl" USE_CXXSTD= c++17 # prevent boost-related SEGV, see bug#264278 .if ${FLAVOR} == default USES+= desktop-file-utils gl USE_QT+= concurrent gui svg widgets USE_GL= gl .endif .if ${FLAVOR} == nox SUFFIX= -nox COMMENT+= (web UI version) CONFIGURE_ARGS= --disable-gui USERS= qbittorrent GROUPS= qbittorrent USE_RC_SUBR= qbittorrent SUB_LIST= USER=${USERS} GROUP=${GROUPS} PLIST_SUB= USER=${USERS} GROUP=${GROUPS} OPTIONS_EXCLUDE= DBUS .endif 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) +LIBTORRENT2_DESC= Version 2.x (experimental) 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 +LIBTORRENT2_EXTRA_PATCHES= ${FILESDIR}/extrapatch-libtorrent-rasterbar2-settings PYTHON_DESC= Install Python to support some plugin functionality PYTHON_USES= python:3.6+,run post-patch-PYTHON-on: @${REINPLACE_CMD} -e 's|"python3"|"${PYTHON_CMD}"|' ${WRKSRC}/src/base/utils/foreignapps.cpp post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qbittorrent${SUFFIX} ${INSTALL_MAN} ${WRKSRC}/doc/qbittorrent${SUFFIX}.1 \ ${STAGEDIR}${MAN1PREFIX}/man/man1/ @${RM} -r ${STAGEDIR}${PREFIX}/share/man .if ${FLAVOR} == nox @${MKDIR} ${STAGEDIR}/var/db/qbittorrent/conf ${STAGEDIR}/var/db/qbittorrent/Downloads .endif .include diff --git a/net-p2p/qbittorrent/files/extrapatch-libtorrent-rasterbar2-settings b/net-p2p/qbittorrent/files/extrapatch-libtorrent-rasterbar2-settings new file mode 100644 index 000000000000..673afe7f73fe --- /dev/null +++ b/net-p2p/qbittorrent/files/extrapatch-libtorrent-rasterbar2-settings @@ -0,0 +1,17 @@ +--- src/base/bittorrent/sessionimpl.cpp.orig 2023-02-27 22:40:57 UTC ++++ src/base/bittorrent/sessionimpl.cpp +@@ -396,12 +396,12 @@ SessionImpl::SessionImpl(QObject *parent) + , m_announceToAllTiers(BITTORRENT_SESSION_KEY(u"AnnounceToAllTiers"_qs), true) + , m_asyncIOThreads(BITTORRENT_SESSION_KEY(u"AsyncIOThreadsCount"_qs), 10) + , m_hashingThreads(BITTORRENT_SESSION_KEY(u"HashingThreadsCount"_qs), 1) +- , m_filePoolSize(BITTORRENT_SESSION_KEY(u"FilePoolSize"_qs), 5000) ++ , m_filePoolSize(BITTORRENT_SESSION_KEY(u"FilePoolSize"_qs), 500) + , m_checkingMemUsage(BITTORRENT_SESSION_KEY(u"CheckingMemUsageSize"_qs), 32) + , m_diskCacheSize(BITTORRENT_SESSION_KEY(u"DiskCacheSize"_qs), -1) + , m_diskCacheTTL(BITTORRENT_SESSION_KEY(u"DiskCacheTTL"_qs), 60) + , m_diskQueueSize(BITTORRENT_SESSION_KEY(u"DiskQueueSize"_qs), (1024 * 1024)) +- , m_diskIOType(BITTORRENT_SESSION_KEY(u"DiskIOType"_qs), DiskIOType::Default) ++ , m_diskIOType(BITTORRENT_SESSION_KEY(u"DiskIOType"_qs), DiskIOType::Posix) + , m_diskIOReadMode(BITTORRENT_SESSION_KEY(u"DiskIOReadMode"_qs), DiskIOReadMode::EnableOSCache) + , m_diskIOWriteMode(BITTORRENT_SESSION_KEY(u"DiskIOWriteMode"_qs), DiskIOWriteMode::EnableOSCache) + #ifdef Q_OS_WIN