Import qbittorrent-4.1.2.

qBittorrent is a bittorrent client programmed in C++ and Qt that
uses libtorrent-rasterbar. It is fast, stable and provides unicode
support as well as many features like remote control through a web
user interface.

ok rsadowski@

From Elias M. Mariani; thanks!
This commit is contained in:
bentley 2018-09-17 09:56:29 +00:00
parent 6b165809d3
commit 3cb1775817
21 changed files with 434 additions and 0 deletions

7
net/qbittorrent/Makefile Normal file
View File

@ -0,0 +1,7 @@
# $OpenBSD: Makefile,v 1.1.1.1 2018/09/17 09:56:29 bentley Exp $
SUBDIR =
SUBDIR += qbittorrent
SUBDIR += qbittorrent-nox
.include <bsd.port.subdir.mk>

View File

@ -0,0 +1,22 @@
# $OpenBSD: Makefile.inc,v 1.1.1.1 2018/09/17 09:56:29 bentley Exp $
VER = 4.1.2
DISTNAME = qbittorrent-${VER}
DIST_SUBDIR = qbittorrent
CATEGORIES ?= net
HOMEPAGE ?= https://www.qbittorrent.org
MAINTAINER ?= Elias M. Mariani <marianielias@gmail.com>
# GPLv2
PERMIT_PACKAGE_CDROM = Yes
MASTER_SITES ?= ${MASTER_SITE_SOURCEFORGE:=qbittorrent/}
MODULES += x11/qt5
USE_GMAKE = Yes
CONFIGURE_STYLE = gnu

View File

@ -0,0 +1,17 @@
# $OpenBSD: Makefile,v 1.1.1.1 2018/09/17 09:56:29 bentley Exp $
COMMENT = BitTorrent client with web interface
PKGNAME = qbittorrent-nox-${VER}
WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Network Qt5Xml boost_system
WANTLIB += boost_system-mt c m torrent-rasterbar z
LIB_DEPENDS += net/libtorrent-rasterbar \
devel/boost
CONFIGURE_ARGS += --disable-gui
pre-install:
${SUBST_CMD} ${WRKSRC}/conf.pri
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (qbittorrent/qbittorrent-4.1.2.tar.gz) = bgRlj/klwJRyk4DFd4xuzbW1MKpVTM/SOTJR6w2WvAo=
SIZE (qbittorrent/qbittorrent-4.1.2.tar.gz) = 7711902

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-conf_pri_in,v 1.1.1.1 2018/09/17 09:56:29 bentley Exp $
Index: conf.pri.in
--- conf.pri.in.orig
+++ conf.pri.in
@@ -1,9 +1,9 @@
# @configure_input@
-PREFIX = @EXPAND_PREFIX@
-BINDIR = @EXPAND_BINDIR@
-DATADIR = @EXPAND_DATADIR@
-MANPREFIX = @EXPAND_MANDIR@
+PREFIX = ${PREFIX}
+BINDIR = ${PREFIX}/bin
+DATADIR = ${PREFIX}/share
+MANPREFIX = ${PREFIX}/man
QMAKE_CXXFLAGS += @QBT_CONF_EXTRA_CFLAGS@

View File

@ -0,0 +1,73 @@
$OpenBSD: patch-configure,v 1.1.1.1 2018/09/17 09:56:29 bentley Exp $
Index: configure
--- configure.orig
+++ configure
@@ -5413,12 +5413,12 @@ if test -n "$zlib_CFLAGS"; then
pkg_cv_zlib_CFLAGS="$zlib_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.5.2\""; } >&5
- ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.5.2") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.3") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_zlib_CFLAGS=`$PKG_CONFIG --cflags "zlib >= 1.2.5.2" 2>/dev/null`
+ pkg_cv_zlib_CFLAGS=`$PKG_CONFIG --cflags "zlib >= 1.2.3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -5430,12 +5430,12 @@ if test -n "$zlib_LIBS"; then
pkg_cv_zlib_LIBS="$zlib_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.5.2\""; } >&5
- ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.5.2") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.3") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_zlib_LIBS=`$PKG_CONFIG --libs "zlib >= 1.2.5.2" 2>/dev/null`
+ pkg_cv_zlib_LIBS=`$PKG_CONFIG --libs "zlib >= 1.2.3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -5456,14 +5456,14 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- zlib_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.2.5.2" 2>&1`
+ zlib_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.2.3" 2>&1`
else
- zlib_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.2.5.2" 2>&1`
+ zlib_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.2.3" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$zlib_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (zlib >= 1.2.5.2) were not met:
+ as_fn_error $? "Package requirements (zlib >= 1.2.3) were not met:
$zlib_PKG_ERRORS
@@ -6492,7 +6492,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
for (key in S) S_is_set[key] = 1
- FS = ""
+ FS = " "
}
{
@@ -7808,7 +7808,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
for (key in S) S_is_set[key] = 1
- FS = ""
+ FS = " "
}
{

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-src_base_filesystemwatcher_cpp,v 1.1.1.1 2018/09/17 09:56:29 bentley Exp $
Index: src/base/filesystemwatcher.cpp
--- src/base/filesystemwatcher.cpp.orig
+++ src/base/filesystemwatcher.cpp
@@ -30,7 +30,7 @@
#include <QtGlobal>
-#if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD)
+#if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD)
#include <cstring>
#include <sys/mount.h>
#include <sys/param.h>

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-src_base_utils_fs_cpp,v 1.1.1.1 2018/09/17 09:56:29 bentley Exp $
Index: src/base/utils/fs.cpp
--- src/base/utils/fs.cpp.orig
+++ src/base/utils/fs.cpp
@@ -44,7 +44,7 @@
#if defined(Q_OS_WIN)
#include <Windows.h>
-#elif defined(Q_OS_MAC) || defined(Q_OS_FREEBSD)
+#elif defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD)
#include <sys/param.h>
#include <sys/mount.h>
#elif defined(Q_OS_HAIKU)
@@ -313,7 +313,7 @@ bool Utils::Fs::isNetworkFileSystem(const QString &pat
if (statfs(file.toLocal8Bit().constData(), &buf) != 0)
return false;
-#ifdef Q_OS_MAC
+#if defined Q_OS_MAC || defined Q_OS_OPENBSD
// XXX: should we make sure HAVE_STRUCT_FSSTAT_F_FSTYPENAME is defined?
return ((strncmp(buf.f_fstypename, "nfs", sizeof(buf.f_fstypename)) == 0)
|| (strncmp(buf.f_fstypename, "cifs", sizeof(buf.f_fstypename)) == 0)

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-src_base_utils_gzip_cpp,v 1.1.1.1 2018/09/17 09:56:29 bentley Exp $
Index: src/base/utils/gzip.cpp
--- src/base/utils/gzip.cpp.orig
+++ src/base/utils/gzip.cpp
@@ -52,7 +52,7 @@ QByteArray Utils::Gzip::compress(const QByteArray &dat
strm.zalloc = Z_NULL;
strm.zfree = Z_NULL;
strm.opaque = Z_NULL;
- strm.next_in = reinterpret_cast<const Bytef *>(data.constData());
+ strm.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(data.constData()));
strm.avail_in = uInt(data.size());
strm.next_out = reinterpret_cast<Bytef *>(tmpBuf.data());
strm.avail_out = BUFSIZE;
@@ -110,7 +110,7 @@ QByteArray Utils::Gzip::decompress(const QByteArray &d
strm.zalloc = Z_NULL;
strm.zfree = Z_NULL;
strm.opaque = Z_NULL;
- strm.next_in = reinterpret_cast<const Bytef *>(data.constData());
+ strm.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(data.constData()));
strm.avail_in = uInt(data.size());
strm.next_out = reinterpret_cast<Bytef *>(tmpBuf.data());
strm.avail_out = BUFSIZE;

View File

@ -0,0 +1,4 @@
qBittorrent is a bittorrent client programmed in C++ and Qt that
uses libtorrent-rasterbar. It is fast, stable and provides unicode
support as well as many features like remote control through a web
user interface.

View File

@ -0,0 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2018/09/17 09:56:29 bentley Exp $
@bin bin/qbittorrent-nox
@man man/man1/qbittorrent-nox.1
share/doc/pkg-readmes/${PKGSTEM}

View File

@ -0,0 +1,15 @@
$OpenBSD: README,v 1.1.1.1 2018/09/17 09:56:29 bentley Exp $
+-------------------------------------------------------------------------------
| Running ${PKGSTEM} on OpenBSD
+-------------------------------------------------------------------------------
To use qbittorrent-nox you should specify the interface and IP
address to bind to in ~/.config/qBittorrent/qBittorrent.conf
e.g. ~/.config/qBittorrent/qBittorrent.conf:
[Preferences]
Connection\Interface=if0
WebUI\Address=127.0.0.1
Change values to the respective interface and IP address.

View File

@ -0,0 +1,20 @@
# $OpenBSD: Makefile,v 1.1.1.1 2018/09/17 09:56:29 bentley Exp $
COMMENT = BitTorrent client with Qt interface
WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Network Qt5Xml boost_system
WANTLIB += boost_system-mt c m torrent-rasterbar z
WANTLIB += GL Qt5DBus Qt5Gui Qt5Svg Qt5Widgets
LIB_DEPENDS += net/libtorrent-rasterbar \
devel/boost \
x11/qt5/qtsvg
RUN_DEPENDS += net/GeoIP \
lang/python/2.7 \
x11/gtk+3,-guic
pre-install:
${SUBST_CMD} ${WRKSRC}/conf.pri
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (qbittorrent/qbittorrent-4.1.2.tar.gz) = bgRlj/klwJRyk4DFd4xuzbW1MKpVTM/SOTJR6w2WvAo=
SIZE (qbittorrent/qbittorrent-4.1.2.tar.gz) = 7711902

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-conf_pri_in,v 1.1.1.1 2018/09/17 09:56:29 bentley Exp $
Index: conf.pri.in
--- conf.pri.in.orig
+++ conf.pri.in
@@ -1,9 +1,9 @@
# @configure_input@
-PREFIX = @EXPAND_PREFIX@
-BINDIR = @EXPAND_BINDIR@
-DATADIR = @EXPAND_DATADIR@
-MANPREFIX = @EXPAND_MANDIR@
+PREFIX = ${PREFIX}
+BINDIR = ${PREFIX}/bin
+DATADIR = ${PREFIX}/share
+MANPREFIX = ${PREFIX}/man
QMAKE_CXXFLAGS += @QBT_CONF_EXTRA_CFLAGS@

View File

@ -0,0 +1,73 @@
$OpenBSD: patch-configure,v 1.1.1.1 2018/09/17 09:56:29 bentley Exp $
Index: configure
--- configure.orig
+++ configure
@@ -5413,12 +5413,12 @@ if test -n "$zlib_CFLAGS"; then
pkg_cv_zlib_CFLAGS="$zlib_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.5.2\""; } >&5
- ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.5.2") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.3") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_zlib_CFLAGS=`$PKG_CONFIG --cflags "zlib >= 1.2.5.2" 2>/dev/null`
+ pkg_cv_zlib_CFLAGS=`$PKG_CONFIG --cflags "zlib >= 1.2.3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -5430,12 +5430,12 @@ if test -n "$zlib_LIBS"; then
pkg_cv_zlib_LIBS="$zlib_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.5.2\""; } >&5
- ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.5.2") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.3") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_zlib_LIBS=`$PKG_CONFIG --libs "zlib >= 1.2.5.2" 2>/dev/null`
+ pkg_cv_zlib_LIBS=`$PKG_CONFIG --libs "zlib >= 1.2.3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -5456,14 +5456,14 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- zlib_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.2.5.2" 2>&1`
+ zlib_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.2.3" 2>&1`
else
- zlib_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.2.5.2" 2>&1`
+ zlib_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.2.3" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$zlib_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (zlib >= 1.2.5.2) were not met:
+ as_fn_error $? "Package requirements (zlib >= 1.2.3) were not met:
$zlib_PKG_ERRORS
@@ -6492,7 +6492,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
for (key in S) S_is_set[key] = 1
- FS = ""
+ FS = " "
}
{
@@ -7808,7 +7808,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
for (key in S) S_is_set[key] = 1
- FS = ""
+ FS = " "
}
{

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-src_base_filesystemwatcher_cpp,v 1.1.1.1 2018/09/17 09:56:29 bentley Exp $
Index: src/base/filesystemwatcher.cpp
--- src/base/filesystemwatcher.cpp.orig
+++ src/base/filesystemwatcher.cpp
@@ -30,7 +30,7 @@
#include <QtGlobal>
-#if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD)
+#if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD)
#include <cstring>
#include <sys/mount.h>
#include <sys/param.h>

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-src_base_utils_fs_cpp,v 1.1.1.1 2018/09/17 09:56:29 bentley Exp $
Index: src/base/utils/fs.cpp
--- src/base/utils/fs.cpp.orig
+++ src/base/utils/fs.cpp
@@ -44,7 +44,7 @@
#if defined(Q_OS_WIN)
#include <Windows.h>
-#elif defined(Q_OS_MAC) || defined(Q_OS_FREEBSD)
+#elif defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD)
#include <sys/param.h>
#include <sys/mount.h>
#elif defined(Q_OS_HAIKU)
@@ -313,7 +313,7 @@ bool Utils::Fs::isNetworkFileSystem(const QString &pat
if (statfs(file.toLocal8Bit().constData(), &buf) != 0)
return false;
-#ifdef Q_OS_MAC
+#if defined Q_OS_MAC || defined Q_OS_OPENBSD
// XXX: should we make sure HAVE_STRUCT_FSSTAT_F_FSTYPENAME is defined?
return ((strncmp(buf.f_fstypename, "nfs", sizeof(buf.f_fstypename)) == 0)
|| (strncmp(buf.f_fstypename, "cifs", sizeof(buf.f_fstypename)) == 0)

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-src_base_utils_gzip_cpp,v 1.1.1.1 2018/09/17 09:56:29 bentley Exp $
Index: src/base/utils/gzip.cpp
--- src/base/utils/gzip.cpp.orig
+++ src/base/utils/gzip.cpp
@@ -52,7 +52,7 @@ QByteArray Utils::Gzip::compress(const QByteArray &dat
strm.zalloc = Z_NULL;
strm.zfree = Z_NULL;
strm.opaque = Z_NULL;
- strm.next_in = reinterpret_cast<const Bytef *>(data.constData());
+ strm.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(data.constData()));
strm.avail_in = uInt(data.size());
strm.next_out = reinterpret_cast<Bytef *>(tmpBuf.data());
strm.avail_out = BUFSIZE;
@@ -110,7 +110,7 @@ QByteArray Utils::Gzip::decompress(const QByteArray &d
strm.zalloc = Z_NULL;
strm.zfree = Z_NULL;
strm.opaque = Z_NULL;
- strm.next_in = reinterpret_cast<const Bytef *>(data.constData());
+ strm.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(data.constData()));
strm.avail_in = uInt(data.size());
strm.next_out = reinterpret_cast<Bytef *>(tmpBuf.data());
strm.avail_out = BUFSIZE;

View File

@ -0,0 +1,4 @@
qBittorrent is a bittorrent client programmed in C++ and Qt that
uses libtorrent-rasterbar. It is fast, stable and provides unicode
support as well as many features like remote control through a web
user interface.

View File

@ -0,0 +1,33 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2018/09/17 09:56:29 bentley Exp $
@bin bin/qbittorrent
@man man/man1/qbittorrent.1
share/appdata/
share/appdata/qbittorrent.appdata.xml
share/icons/hicolor/128x128/apps/qbittorrent.png
share/icons/hicolor/128x128/status/qbittorrent-tray.png
share/icons/hicolor/16x16/apps/qbittorrent.png
share/icons/hicolor/16x16/status/qbittorrent-tray.png
share/icons/hicolor/192x192/apps/qbittorrent.png
share/icons/hicolor/192x192/status/qbittorrent-tray.png
share/icons/hicolor/22x22/apps/qbittorrent.png
share/icons/hicolor/22x22/status/qbittorrent-tray.png
share/icons/hicolor/24x24/apps/qbittorrent.png
share/icons/hicolor/24x24/status/qbittorrent-tray.png
share/icons/hicolor/32x32/apps/qbittorrent.png
share/icons/hicolor/32x32/status/qbittorrent-tray.png
share/icons/hicolor/36x36/apps/qbittorrent.png
share/icons/hicolor/36x36/status/qbittorrent-tray.png
share/icons/hicolor/48x48/apps/qbittorrent.png
share/icons/hicolor/48x48/status/qbittorrent-tray.png
share/icons/hicolor/64x64/apps/qbittorrent.png
share/icons/hicolor/64x64/status/qbittorrent-tray.png
share/icons/hicolor/72x72/apps/qbittorrent.png
share/icons/hicolor/72x72/status/qbittorrent-tray.png
share/icons/hicolor/96x96/apps/qbittorrent.png
share/icons/hicolor/96x96/status/qbittorrent-tray.png
share/icons/hicolor/scalable/status/qbittorrent-tray-dark.svg
share/icons/hicolor/scalable/status/qbittorrent-tray-light.svg
share/icons/hicolor/scalable/status/qbittorrent-tray.svg
share/pixmaps/
share/pixmaps/qbittorrent.png
@tag gtk-update-icon-cache %D/share/icons/hicolor