Here is a diff to update net/qbittorrent to 4.2.1, released on December
17, 2019.

* Uses the proposed update to net/libtorrent-rasterbar 1.2.3 that moves
  to python 3 and proposed fix for devel/boost python 3 bindings.
* python 2 is an optional dependency used at runtime for this port for
  some runtime search plugin stuff among other things. I left it as is.
* Builds translations
* Regen WANTLIB

Changelog:
https://github.com/qbittorrent/qBittorrent/blob/118af03534e5ded6d3c8323b5dbeeff57b177193/Changelog

configure throws some harmless errors:
RCC: Error in 'webui/www/translations/webui_translations.qrc': Cannot
find file 'webui_ar.qm' ...
RCC: Warning: No resources in
'webui/www/translations/webui_translations.qrc'.
RCC: Error in 'lang/lang.qrc': Cannot find file 'qbittorrent_ar.qm'
RCC: Warning: No resources in 'lang/lang.qrc'.

Two recent commits move translations to build time instead of being
included in the distfile. I found that in ${WRKBUILD/src/Makefile
`compiler_lrelease_make_all' is a target for the webui
translations. `compiler_uic_make_all' is a target for some generated
header files that cause a compilation error when they are missing.

https://github.com/qbittorrent/qBittorrent/commit/7b3eed323b92a21c14482793b6770d25518cddc9#diff-035d63400fcda92814248b3d89e83ebc
https://github.com/qbittorrent/qBittorrent/commit/26a4703398a22d9d044e6abdbd83031c86c5faf5#diff-1c89376030ed57c2e46fca12775775b8

https://doc.qt.io/qt-5/rcc.html
https://doc.qt.io/qt-5/linguist-manager.html
https://doc.qt.io/qt-5/moc.html

It segfaults upon quitting, but I have not investigated why. I tested
qbittorrent-nox by connecting to the local web server per the
instructions. I also tested qbittorrent and its translations.

Feedback and tests are welcome.

Index: Makefile.inc
===================================================================
RCS file: /cvs/ports/net/qbittorrent/Makefile.inc,v
retrieving revision 1.6
diff -u -p -r1.6 Makefile.inc
--- Makefile.inc        12 Jul 2019 20:48:47 -0000      1.6
+++ Makefile.inc        19 Jan 2020 23:21:03 -0000
@@ -1,6 +1,6 @@
 # $OpenBSD: Makefile.inc,v 1.6 2019/07/12 20:48:47 sthen Exp $
 
-VER =          4.1.5
+VER =          4.2.1
 DISTNAME =     qbittorrent-${VER}
 
 DIST_SUBDIR =  qbittorrent
Index: qbittorrent/Makefile
===================================================================
RCS file: /cvs/ports/net/qbittorrent/qbittorrent/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- qbittorrent/Makefile        7 Nov 2019 17:40:36 -0000       1.7
+++ qbittorrent/Makefile        19 Jan 2020 23:21:03 -0000
@@ -1,10 +1,9 @@
 # $OpenBSD: Makefile,v 1.7 2019/11/07 17:40:36 fcambus Exp $
 
 COMMENT =              BitTorrent client with Qt interface
-REVISION =             2
 
 WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Network Qt5Xml boost_system
-WANTLIB += boost_system-mt c m torrent-rasterbar z
+WANTLIB += boost_system-mt c crypto m ssl torrent-rasterbar z
 WANTLIB += GL Qt5DBus Qt5Gui Qt5Svg Qt5Widgets
 
 LIB_DEPENDS +=         net/libtorrent-rasterbar \
@@ -14,6 +13,11 @@ LIB_DEPENDS +=               net/libtorrent-rasterbar
 RUN_DEPENDS +=         lang/python/2.7 \
                        x11/gtk+3,-guic \
                        devel/desktop-file-utils
+
+# compile translations
+pre-build:
+       @cd ${WRKBUILD}/src && make compiler_lrelease_make_all
+       @cd ${WRKBUILD}/src && make compiler_uic_make_all
 
 pre-install:
        ${SUBST_CMD} ${WRKSRC}/conf.pri
Index: qbittorrent/distinfo
===================================================================
RCS file: /cvs/ports/net/qbittorrent/qbittorrent/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- qbittorrent/distinfo        4 Jan 2019 22:20:49 -0000       1.4
+++ qbittorrent/distinfo        19 Jan 2020 23:21:03 -0000
@@ -1,2 +1,2 @@
-SHA256 (qbittorrent/qbittorrent-4.1.5.tar.gz) = 
SrEkunYL1T3XYP/O8CHjWUKIkjYH6BZAkwPAmNNzD6w=
-SIZE (qbittorrent/qbittorrent-4.1.5.tar.gz) = 7739271
+SHA256 (qbittorrent/qbittorrent-4.2.1.tar.gz) = 
/9wg388BBqlBroQiHkXuL5F36xjuxsD8ULJhVvC6MSY=
+SIZE (qbittorrent/qbittorrent-4.2.1.tar.gz) = 7843513
Index: qbittorrent/patches/patch-configure
===================================================================
RCS file: /cvs/ports/net/qbittorrent/qbittorrent/patches/patch-configure,v
retrieving revision 1.2
diff -u -p -r1.2 patch-configure
--- qbittorrent/patches/patch-configure 4 Jan 2019 22:20:49 -0000       1.2
+++ qbittorrent/patches/patch-configure 19 Jan 2020 23:21:03 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-configure,v 1.2 2019/01/
 Index: configure
 --- configure.orig
 +++ configure
-@@ -5405,12 +5405,12 @@ if test -n "$zlib_CFLAGS"; then
+@@ -5478,12 +5478,12 @@ if test -n "$zlib_CFLAGS"; then
      pkg_cv_zlib_CFLAGS="$zlib_CFLAGS"
   elif test -n "$PKG_CONFIG"; then
      if test -n "$PKG_CONFIG" && \
@@ -19,7 +19,7 @@ Index: configure
                      test "x$?" != "x0" && pkg_failed=yes
  else
    pkg_failed=yes
-@@ -5422,12 +5422,12 @@ if test -n "$zlib_LIBS"; then
+@@ -5495,12 +5495,12 @@ if test -n "$zlib_LIBS"; then
      pkg_cv_zlib_LIBS="$zlib_LIBS"
   elif test -n "$PKG_CONFIG"; then
      if test -n "$PKG_CONFIG" && \
@@ -35,7 +35,7 @@ Index: configure
                      test "x$?" != "x0" && pkg_failed=yes
  else
    pkg_failed=yes
-@@ -5448,14 +5448,14 @@ else
+@@ -5521,14 +5521,14 @@ else
          _pkg_short_errors_supported=no
  fi
          if test $_pkg_short_errors_supported = yes; then
Index: qbittorrent/pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/qbittorrent/qbittorrent/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- qbittorrent/pkg/PLIST       28 Sep 2018 13:25:04 -0000      1.2
+++ qbittorrent/pkg/PLIST       19 Jan 2020 23:21:03 -0000
@@ -1,9 +1,7 @@
 @comment $OpenBSD: PLIST,v 1.2 2018/09/28 13:25:04 rsadowski Exp $
 @bin bin/qbittorrent
 @man man/man1/qbittorrent.1
-share/appdata/
-share/appdata/qbittorrent.appdata.xml
-share/applications/qbittorrent.desktop
+share/applications/org.qbittorrent.qBittorrent.desktop
 share/icons/hicolor/128x128/apps/qbittorrent.png
 share/icons/hicolor/128x128/status/qbittorrent-tray.png
 share/icons/hicolor/16x16/apps/qbittorrent.png
@@ -29,7 +27,9 @@ share/icons/hicolor/96x96/status/qbittor
 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
+share/metainfo/
+share/metainfo/org.qbittorrent.qBittorrent.appdata.xml
 @tag gtk-update-icon-cache %D/share/icons/hicolor
 @tag update-desktop-database
+share/pixmaps/
+share/pixmaps/qbittorrent.png
Index: qbittorrent-nox/Makefile
===================================================================
RCS file: /cvs/ports/net/qbittorrent/qbittorrent-nox/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- qbittorrent-nox/Makefile    5 May 2019 15:44:13 -0000       1.5
+++ qbittorrent-nox/Makefile    19 Jan 2020 23:21:03 -0000
@@ -2,15 +2,18 @@
 
 COMMENT =              BitTorrent client with web interface
 PKGNAME =              qbittorrent-nox-${VER}
-REVISION =             1
 
 WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Network Qt5Xml boost_system
-WANTLIB += boost_system-mt c m torrent-rasterbar z
+WANTLIB += boost_system-mt c crypto m ssl torrent-rasterbar z
 
 LIB_DEPENDS +=         net/libtorrent-rasterbar \
                        devel/boost
 
 CONFIGURE_ARGS +=      --disable-gui
+
+# compile translations
+pre-build:
+       @cd ${WRKBUILD}/src && make compiler_lrelease_make_all
 
 pre-install:
        ${SUBST_CMD} ${WRKSRC}/conf.pri
Index: qbittorrent-nox/distinfo
===================================================================
RCS file: /cvs/ports/net/qbittorrent/qbittorrent-nox/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- qbittorrent-nox/distinfo    4 Jan 2019 22:20:49 -0000       1.4
+++ qbittorrent-nox/distinfo    19 Jan 2020 23:21:03 -0000
@@ -1,2 +1,2 @@
-SHA256 (qbittorrent/qbittorrent-4.1.5.tar.gz) = 
SrEkunYL1T3XYP/O8CHjWUKIkjYH6BZAkwPAmNNzD6w=
-SIZE (qbittorrent/qbittorrent-4.1.5.tar.gz) = 7739271
+SHA256 (qbittorrent/qbittorrent-4.2.1.tar.gz) = 
/9wg388BBqlBroQiHkXuL5F36xjuxsD8ULJhVvC6MSY=
+SIZE (qbittorrent/qbittorrent-4.2.1.tar.gz) = 7843513
Index: qbittorrent-nox/patches/patch-configure
===================================================================
RCS file: /cvs/ports/net/qbittorrent/qbittorrent-nox/patches/patch-configure,v
retrieving revision 1.2
diff -u -p -r1.2 patch-configure
--- qbittorrent-nox/patches/patch-configure     4 Jan 2019 22:20:49 -0000       
1.2
+++ qbittorrent-nox/patches/patch-configure     19 Jan 2020 23:21:03 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-configure,v 1.2 2019/01/
 Index: configure
 --- configure.orig
 +++ configure
-@@ -5405,12 +5405,12 @@ if test -n "$zlib_CFLAGS"; then
+@@ -5478,12 +5478,12 @@ if test -n "$zlib_CFLAGS"; then
      pkg_cv_zlib_CFLAGS="$zlib_CFLAGS"
   elif test -n "$PKG_CONFIG"; then
      if test -n "$PKG_CONFIG" && \
@@ -19,7 +19,7 @@ Index: configure
                      test "x$?" != "x0" && pkg_failed=yes
  else
    pkg_failed=yes
-@@ -5422,12 +5422,12 @@ if test -n "$zlib_LIBS"; then
+@@ -5495,12 +5495,12 @@ if test -n "$zlib_LIBS"; then
      pkg_cv_zlib_LIBS="$zlib_LIBS"
   elif test -n "$PKG_CONFIG"; then
      if test -n "$PKG_CONFIG" && \
@@ -35,7 +35,7 @@ Index: configure
                      test "x$?" != "x0" && pkg_failed=yes
  else
    pkg_failed=yes
-@@ -5448,14 +5448,14 @@ else
+@@ -5521,14 +5521,14 @@ else
          _pkg_short_errors_supported=no
  fi
          if test $_pkg_short_errors_supported = yes; then

Reply via email to