The attached "version 1" patch is a work-in-progress; I'm looking for
advice and corrections

1) I have (temporarily) disabled the Qt subpackage 
   build, because upstream has switched to using CMake for
   everything, and I do not know enough about either CMake
   or QMake to get it to build. I could use some help here,
   as it won't build under CMake and with QMake it looks for
   a Makefile which doesn't exist.
   
2) I am having an issue with "size mismatch" warnings as both 
   libevent and devel/libevent2 are required by the main and
   gtk subpackages.  

The updated programs:

    transmission-daemon
    transmission-cli
    transmission-gtk 

have had limited testing on amd64.

Thanks in advance for any cluebats!
diff --git a/net/transmission/Makefile b/net/transmission/Makefile
index 3deb9382f4a..ff6ce4c8891 100644
--- a/net/transmission/Makefile
+++ b/net/transmission/Makefile
@@ -1,89 +1,88 @@
 COMMENT-main=  BitTorrent command line and daemon client
 COMMENT-gtk=   BitTorrent client with GTK+ interface
-COMMENT-qt=    BitTorrent client with Qt interface
+#COMMENT-qt=   BitTorrent client with Qt interface
 
 NOT_FOR_ARCHS-gtk= sparc64
-NOT_FOR_ARCHS-qt= sparc64
+#NOT_FOR_ARCHS-qt= sparc64
 
-VER=           3.00
+VER=           4.0.1
 DISTNAME=      transmission-${VER}
 PKGNAME-main=  transmission-${VER}
 PKGNAME-gtk=   transmission-gtk-${VER}
-PKGNAME-qt=    transmission-qt-${VER}
+#PKGNAME-qt=   transmission-qt-${VER}
 CATEGORIES=    net
 HOMEPAGE=      https://transmissionbt.com/
 MAINTAINER=    Josh Grosse <[email protected]>
-REVISION-gtk=  2
-REVISION-main= 2
-REVISION-qt=   2
 
 # GPLv2+
 PERMIT_PACKAGE=        Yes
 
-MASTER_SITES=  
https://github.com/transmission/transmission-releases/raw/master/
+MASTER_SITES=  \
+       https://github.com/transmission/transmission/releases/download/${VER}/
 EXTRACT_SUFX=  .tar.xz
 
-MULTI_PACKAGES=        -main -gtk -qt
+#MULTI_PACKAGES=       -main -gtk -qt
+MULTI_PACKAGES=        -main -gtk
 
-ONLY_FOR_ARCHS-qt=     ${MODGCC4_ARCHS} ${CLANG_ARCHS}
+#ONLY_FOR_ARCHS-qt=    ${MODGCC4_ARCHS} ${CLANG_ARCHS}
 
 COMPILER =     base-clang ports-gcc
 COMPILER_LANGS =       c
 
 
-PSEUDO_FLAVORS=        no_gtk no_qt
+#PSEUDO_FLAVORS=       no_gtk no_qt
+PSEUDO_FLAVORS=        no_gtk
 FLAVOR?=
 
 .include <bsd.port.arch.mk>
 
-WANTLIB-common=        c crypto curl event_core event_extra m miniupnpc>=2.0 \
-               natpmp pthread ssl z intl
-WANTLIB-main=  ${WANTLIB-common} nghttp2 iconv
-WANTLIB-gtk=   ${WANTLIB-common} X11 Xcomposite Xcursor Xdamage \
-               Xext Xfixes Xi Xinerama Xrandr Xrender \
-               atk-1.0 atk-bridge-2.0 cairo cairo-gobject \
-               expat ffi fontconfig freetype fribidi \
-               gdk-3 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gmodule-2.0 \
-               gobject-2.0 graphite2 gthread-2.0 gtk-3 \
-               harfbuzz pango-1.0 pangoft2-1.0 \
-               pangocairo-1.0 pixman-1 png pcre2-8 xcb \
-               xcb-render xcb-shm epoxy nghttp2 iconv \
-               Xau Xdmcp execinfo jpeg ${COMPILER_LIBCXX}
-WANTLIB-qt=    ${WANTLIB-common} ${MODQT_WANTLIB} \
-               GL Qt5Core Qt5DBus Qt5Gui Qt5Network Qt5Widgets \
-               fontconfig freetype $(COMPILER_LIBCXX)
-
-MODULES+=      textproc/intltool
+WANTLIB-common=                ${COMPILER_LIBCXX} c crypto curl event \
+                       event_core event_extra intl m miniupnpc>=2.0 \
+                       natpmp psl pthread ssl
+WANTLIB-main=          ${WANTLIB-common}
+WANTLIB-gtk=           ${WANTLIB-common} atk-1.0 atkmm-1.6 cairo \
+                       cairo-gobject cairomm-1.0 event gdk-3 \
+                       gdk_pixbuf-2.0 gdkmm-3.0 gio-2.0 giomm-2.4 \
+                       glib-2.0 glibmm-2.4 gobject-2.0 gtk-3 gtkmm-3.0 \
+                       harfbuzz pango-1.0 pangocairo-1.0 pangomm-1.4 sigc-2.0
+#WANTLIB-qt=   ${WANTLIB-common} ${MODQT_WANTLIB} \
+#              GL Qt5Core Qt5DBus Qt5Gui Qt5Network Qt5Widgets \
+#              fontconfig freetype $(COMPILER_LIBCXX)
+
+MODULES+=      textproc/intltool devel/cmake
 
 LIB_DEPENDS-common=devel/gettext,-runtime \
                devel/libevent2 \
                net/curl \
+               net/libpsl \
                net/miniupnp/libnatpmp \
                net/miniupnp/miniupnpc>=1.9
 LIB_DEPENDS-main=${LIB_DEPENDS-common}
 LIB_DEPENDS-gtk=${LIB_DEPENDS-common} \
+               devel/atk2mm \
+               devel/glib2mm \
+               devel/libsigc++-2 \
+               devel/pangomm \
+               graphics/cairomm \
+               x11/gtk3mm \
                x11/gtk+3
 LIB_DEPENDS-qt=        ${LIB_DEPENDS-common} \
                ${MODQT_LIB_DEPENDS}
 
+RUN_DEPENDS-main=x11/gtk+3,-guic
 RUN_DEPENDS-gtk=${PKGNAME-main}:${BUILD_PKGPATH} \
                devel/desktop-file-utils \
                x11/gtk+3,-guic
 RUN_DEPENDS-qt=        ${PKGNAME-main}:${BUILD_PKGPATH} \
                devel/desktop-file-utils
 
-USE_GMAKE=     Yes
-CONFIGURE_STYLE=gnu
-
-CONFIGURE_ARGS=        --disable-shared \
-               --enable-cli \
-               --enable-external-natpmp
-
 # -I$(top_builddir)/third-party is required, but configure fails to
 # set it if we use external miniupnp libs.
 
-CONFIGURE_ENV= CPPFLAGS="-I${WRKSRC}/third-party -I${LOCALBASE}/include" \
-               LDFLAGS="-L${LOCALBASE}/lib"
+CXXFLAGS=-I${WRKSRC}/third-party -I${LOCALBASE}/include
+
+MODCMAKE_LDFLAGS=-L${X11BASE}/lib -L${LOCALBASE}/lib \
+       -levent_core -levent_extra -v
 
 .if ${BUILD_PACKAGES:M-qt}
 MODULES+=              devel/qmake x11/qt5
@@ -96,10 +95,6 @@ SEPARATE_BUILD=              No
 MODQMAKE_INSTALL_ROOT= ${PREFIX}
 .endif
 
-.if !${BUILD_PACKAGES:M-gtk}
-CONFIGURE_ARGS+=--without-gtk
-.endif
-
 FIX_CRLF_FILES=        third-party/libutp/*.h third-party/libutp/*.cpp
 
 .if ${BUILD_PACKAGES:M-qt}
@@ -115,5 +110,4 @@ post-install:
        ${INSTALL_DATA} ${WRKSRC}/qt/icons/transmission.png \
            ${PREFIX}/share/pixmaps/transmission-qt.png
 .endif
-
 .include <bsd.port.mk>
diff --git a/net/transmission/distinfo b/net/transmission/distinfo
index e0345f61f7f..b2ca5834404 100644
--- a/net/transmission/distinfo
+++ b/net/transmission/distinfo
@@ -1,2 +1,2 @@
-SHA256 (transmission-3.00.tar.xz) = 
kURlL+dC9/fdZldxbjeNpgt1Gq7ai++DRLPu/E2yVfI=
-SIZE (transmission-3.00.tar.xz) = 3329220
+SHA256 (transmission-4.0.1.tar.xz) = 
j8Wu8jY4yYNAb2o+6ZGDaeTNyE4yKL0vs9Ad1Vza2QA=
+SIZE (transmission-4.0.1.tar.xz) = 10434832
diff --git a/net/transmission/patches/patch-CMakeLists_txt 
b/net/transmission/patches/patch-CMakeLists_txt
new file mode 100644
index 00000000000..191d6dd9e14
--- /dev/null
+++ b/net/transmission/patches/patch-CMakeLists_txt
@@ -0,0 +1,12 @@
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -49,7 +49,7 @@ tr_auto_option(ENABLE_MAC "Build Mac client" AUTO)
+ tr_auto_option(REBUILD_WEB "Rebuild the web client's generated assets. 
Requires Node.js and network access." OFF)
+ option(INSTALL_WEB "Install the web client's generated assets." ON)
+ option(ENABLE_UTILS "Build utils (create, edit, show)" ON)
+-option(ENABLE_CLI "Build command-line client" OFF)
++option(ENABLE_CLI "Build command-line client" ON)
+ option(ENABLE_TESTS "Build unit tests" ON)
+ option(ENABLE_UTP "Build ??TP support" ON)
+ option(ENABLE_WERROR "Treat warnings as errors" OFF)
diff --git a/net/transmission/patches/patch-gtk_DetailsDialog_cc 
b/net/transmission/patches/patch-gtk_DetailsDialog_cc
new file mode 100644
index 00000000000..7ab930f156d
--- /dev/null
+++ b/net/transmission/patches/patch-gtk_DetailsDialog_cc
@@ -0,0 +1,14 @@
+Index: gtk/DetailsDialog.cc
+--- gtk/DetailsDialog.cc.orig
++++ gtk/DetailsDialog.cc
+@@ -3,6 +3,10 @@
+ // or any future license endorsed by Mnemosyne LLC.
+ // License text can be found in the licenses/ folder.
+ 
++#ifdef __OpenBSD__
++#include <sys/socket.h>
++#endif
++
+ #include "DetailsDialog.h"
+ 
+ #include "Actions.h"
diff --git a/net/transmission/patches/patch-qt_qtr_pro 
b/net/transmission/patches/patch-qt_qtr_pro
deleted file mode 100644
index b14e1b909bc..00000000000
--- a/net/transmission/patches/patch-qt_qtr_pro
+++ /dev/null
@@ -1,23 +0,0 @@
-Ensure -lintl is linked to appease lld.
-
-Index: qt/qtr.pro
---- qt/qtr.pro.orig
-+++ qt/qtr.pro
-@@ -8,7 +8,7 @@ target.path = /bin
- INSTALLS += target
- 
- unix: INSTALLS += man
--man.path = /share/man/man1/
-+man.path = /man/man1/
- man.files = transmission-qt.1
- 
- CONFIG += qt thread link_pkgconfig c++1z warn_on
-@@ -35,7 +35,7 @@ LIBS += $${DHT_LIBS}
- LIBS += $${LIBB64_LIBS}
- LIBS += $${LIBUPNP_LIBS}
- LIBS += $${LIBNATPMP_LIBS}
--unix: LIBS += -L$${EVENT_TOP}/lib -lz -lrt
-+unix: LIBS += -L$${EVENT_TOP}/lib -lz -levent_core -levent_extra -lintl
- win32:LIBS += -levent-2.0 -lws2_32 -lintl
- win32:LIBS += -lidn -liconv -lwldap32 -liphlpapi
- 
diff --git a/net/transmission/patches/patch-third-party_libutp_utypes_h 
b/net/transmission/patches/patch-third-party_libutp_utypes_h
deleted file mode 100644
index c14863fecc3..00000000000
--- a/net/transmission/patches/patch-third-party_libutp_utypes_h
+++ /dev/null
@@ -1,17 +0,0 @@
-tr-utp.c:66: error: conflicting types for 'UTP_Write'
-(https://trac.transmissionbt.com/ticket/4528)
-
---- third-party/libutp/utypes.h.orig   Wed Aug 29 14:11:31 2012
-+++ third-party/libutp/utypes.h        Wed Aug 29 14:12:28 2012
-@@ -36,7 +36,11 @@ typedef const char * cstr;
- typedef char * str;
- 
- #ifndef __cplusplus
-+#ifdef HAVE_STDBOOL_H
-+#include <stdbool.h>
-+#else
- typedef uint8 bool;
-+#endif
- #endif
- 
- #endif //__UTYPES_H__
diff --git a/net/transmission/pkg/PLIST-gtk b/net/transmission/pkg/PLIST-gtk
index 276f17fc393..3b32bec2996 100644
--- a/net/transmission/pkg/PLIST-gtk
+++ b/net/transmission/pkg/PLIST-gtk
@@ -1,8 +1,6 @@
 @pkgpath net/transmission,-gui
 @bin bin/transmission-gtk
 @man man/man1/transmission-gtk.1
-share/appdata/
-share/appdata/transmission-gtk.appdata.xml
 share/applications/transmission-gtk.desktop
 share/icons/hicolor/scalable/apps/transmission-devel.svg
 share/icons/hicolor/scalable/apps/transmission.svg
@@ -14,9 +12,6 @@ share/locale/az/LC_MESSAGES/transmission-gtk.mo
 share/locale/be/LC_MESSAGES/transmission-gtk.mo
 share/locale/bg/LC_MESSAGES/transmission-gtk.mo
 share/locale/bn/LC_MESSAGES/transmission-gtk.mo
-share/locale/bo/
-share/locale/bo/LC_MESSAGES/
-share/locale/bo/LC_MESSAGES/transmission-gtk.mo
 share/locale/br/LC_MESSAGES/transmission-gtk.mo
 share/locale/bs/LC_MESSAGES/transmission-gtk.mo
 share/locale/ca/LC_MESSAGES/transmission-gtk.mo
@@ -82,16 +77,16 @@ share/locale/ms/LC_MESSAGES/transmission-gtk.mo
 share/locale/mt/
 share/locale/mt/LC_MESSAGES/
 share/locale/mt/LC_MESSAGES/transmission-gtk.mo
-share/locale/my/LC_MESSAGES/transmission-gtk.mo
 share/locale/nb/LC_MESSAGES/transmission-gtk.mo
-share/locale/nds/LC_MESSAGES/transmission-gtk.mo
 share/locale/nl/LC_MESSAGES/transmission-gtk.mo
 share/locale/nn/LC_MESSAGES/transmission-gtk.mo
 share/locale/oc/LC_MESSAGES/transmission-gtk.mo
-share/locale/pa/LC_MESSAGES/transmission-gtk.mo
 share/locale/pl/LC_MESSAGES/transmission-gtk.mo
 share/locale/pt/LC_MESSAGES/transmission-gtk.mo
 share/locale/pt_BR/LC_MESSAGES/transmission-gtk.mo
+share/locale/pt_PT/
+share/locale/pt_PT/LC_MESSAGES/
+share/locale/pt_PT/LC_MESSAGES/transmission-gtk.mo
 share/locale/ro/LC_MESSAGES/transmission-gtk.mo
 share/locale/ru/LC_MESSAGES/transmission-gtk.mo
 share/locale/si/LC_MESSAGES/transmission-gtk.mo
@@ -100,13 +95,9 @@ share/locale/sl/LC_MESSAGES/transmission-gtk.mo
 share/locale/sq/LC_MESSAGES/transmission-gtk.mo
 share/locale/sr/LC_MESSAGES/transmission-gtk.mo
 share/locale/sv/LC_MESSAGES/transmission-gtk.mo
-share/locale/sw/
-share/locale/sw/LC_MESSAGES/
-share/locale/sw/LC_MESSAGES/transmission-gtk.mo
 share/locale/ta/LC_MESSAGES/transmission-gtk.mo
 share/locale/te/LC_MESSAGES/transmission-gtk.mo
 share/locale/th/LC_MESSAGES/transmission-gtk.mo
-share/locale/tl/LC_MESSAGES/transmission-gtk.mo
 share/locale/tr/LC_MESSAGES/transmission-gtk.mo
 share/locale/ug/LC_MESSAGES/transmission-gtk.mo
 share/locale/uk/LC_MESSAGES/transmission-gtk.mo
@@ -116,7 +107,5 @@ share/locale/vi/LC_MESSAGES/transmission-gtk.mo
 share/locale/zh_CN/LC_MESSAGES/transmission-gtk.mo
 share/locale/zh_HK/LC_MESSAGES/transmission-gtk.mo
 share/locale/zh_TW/LC_MESSAGES/transmission-gtk.mo
-share/pixmaps/
-share/pixmaps/transmission.png
 @tag gtk-update-icon-cache %D/share/icons/hicolor
 @tag update-desktop-database
diff --git a/net/transmission/pkg/PLIST-main b/net/transmission/pkg/PLIST-main
index 622eb4cdf94..f4db14e38bf 100644
--- a/net/transmission/pkg/PLIST-main
+++ b/net/transmission/pkg/PLIST-main
@@ -22,81 +22,52 @@
 @man man/man1/transmission-remote.1
 @man man/man1/transmission-show.1
 @comment share/applications/
+share/doc/transmission/
+share/doc/transmission/AUTHORS
+share/doc/transmission/COPYING
+share/doc/transmission/README.md
+share/doc/transmission/news/
+share/doc/transmission/news/news-2.42-and-older.md
+share/doc/transmission/news/news-2.50.md
+share/doc/transmission/news/news-2.51.md
+share/doc/transmission/news/news-2.52.md
+share/doc/transmission/news/news-2.60.md
+share/doc/transmission/news/news-2.61.md
+share/doc/transmission/news/news-2.70.md
+share/doc/transmission/news/news-2.71.md
+share/doc/transmission/news/news-2.72.md
+share/doc/transmission/news/news-2.73.md
+share/doc/transmission/news/news-2.74.md
+share/doc/transmission/news/news-2.75.md
+share/doc/transmission/news/news-2.76.md
+share/doc/transmission/news/news-2.77.md
+share/doc/transmission/news/news-2.80.md
+share/doc/transmission/news/news-2.81.md
+share/doc/transmission/news/news-2.82.md
+share/doc/transmission/news/news-2.83.md
+share/doc/transmission/news/news-2.84.md
+share/doc/transmission/news/news-2.90.md
+share/doc/transmission/news/news-2.91.md
+share/doc/transmission/news/news-2.92.md
+share/doc/transmission/news/news-2.93.md
+share/doc/transmission/news/news-2.94.md
+share/doc/transmission/news/news-3.00.md
+share/doc/transmission/news/news-4.0.0-beta-1.md
+share/doc/transmission/news/news-4.0.0-beta-2.md
+share/doc/transmission/news/news-4.0.0-beta-3.md
+share/doc/transmission/news/news-4.0.0.md
+share/doc/transmission/news/news-4.0.1.md
+share/doc/transmission/rpc-spec.md
+share/doc/transmission/send-email-when-torrent-done.sh
+share/metainfo/
+share/metainfo/transmission-gtk.metainfo.xml
 share/transmission/
-share/transmission/web/
-share/transmission/web/LICENSE
-share/transmission/web/images/
-share/transmission/web/images/favicon.ico
-share/transmission/web/images/favicon.png
-share/transmission/web/images/webclip-icon.png
-share/transmission/web/index.html
-share/transmission/web/javascript/
-share/transmission/web/javascript/common.js
-share/transmission/web/javascript/dialog.js
-share/transmission/web/javascript/file-row.js
-share/transmission/web/javascript/formatter.js
-share/transmission/web/javascript/inspector.js
-share/transmission/web/javascript/jquery/
-share/transmission/web/javascript/jquery/jquery-migrate.min.js
-share/transmission/web/javascript/jquery/jquery-ui.min.js
-share/transmission/web/javascript/jquery/jquery.min.js
-share/transmission/web/javascript/jquery/jquery.transmenu.min.js
-share/transmission/web/javascript/jquery/jquery.ui-contextmenu.min.js
-share/transmission/web/javascript/jquery/json2.min.js
-share/transmission/web/javascript/main.js
-share/transmission/web/javascript/notifications.js
-share/transmission/web/javascript/polyfill.js
-share/transmission/web/javascript/prefs-dialog.js
-share/transmission/web/javascript/remote.js
-share/transmission/web/javascript/torrent-row.js
-share/transmission/web/javascript/torrent.js
-share/transmission/web/javascript/transmission.js
-share/transmission/web/style/
-share/transmission/web/style/jqueryui/
-share/transmission/web/style/jqueryui/images/
-share/transmission/web/style/jqueryui/images/ui-bg_flat_0_aaaaaa_40x100.png
-share/transmission/web/style/jqueryui/images/ui-bg_flat_75_ffffff_40x100.png
-share/transmission/web/style/jqueryui/images/ui-bg_glass_55_fbf9ee_1x400.png
-share/transmission/web/style/jqueryui/images/ui-bg_glass_65_ffffff_1x400.png
-share/transmission/web/style/jqueryui/images/ui-bg_glass_75_dadada_1x400.png
-share/transmission/web/style/jqueryui/images/ui-bg_glass_75_e6e6e6_1x400.png
-share/transmission/web/style/jqueryui/images/ui-bg_glass_95_fef1ec_1x400.png
-share/transmission/web/style/jqueryui/images/ui-bg_highlight-soft_75_cccccc_1x100.png
-share/transmission/web/style/jqueryui/images/ui-icons_222222_256x240.png
-share/transmission/web/style/jqueryui/images/ui-icons_2e83ff_256x240.png
-share/transmission/web/style/jqueryui/images/ui-icons_454545_256x240.png
-share/transmission/web/style/jqueryui/images/ui-icons_888888_256x240.png
-share/transmission/web/style/jqueryui/images/ui-icons_cd0a0a_256x240.png
-share/transmission/web/style/jqueryui/jquery-ui.min.css
-share/transmission/web/style/transmission/
-share/transmission/web/style/transmission/common.css
-share/transmission/web/style/transmission/images/
-share/transmission/web/style/transmission/images/arrow-down.png
-share/transmission/web/style/transmission/images/arrow-up.png
-share/transmission/web/style/transmission/images/blue-turtle.png
-share/transmission/web/style/transmission/images/buttons/
-share/transmission/web/style/transmission/images/buttons/torrent_buttons.png
-share/transmission/web/style/transmission/images/compact.png
-share/transmission/web/style/transmission/images/file-priority-high.png
-share/transmission/web/style/transmission/images/file-priority-low.png
-share/transmission/web/style/transmission/images/file-priority-normal.png
-share/transmission/web/style/transmission/images/filter_bar.png
-share/transmission/web/style/transmission/images/filter_icon.png
-share/transmission/web/style/transmission/images/inspector-files.png
-share/transmission/web/style/transmission/images/inspector-info.png
-share/transmission/web/style/transmission/images/inspector-peers.png
-share/transmission/web/style/transmission/images/inspector-trackers.png
-share/transmission/web/style/transmission/images/lock_icon.png
-share/transmission/web/style/transmission/images/logo.png
-share/transmission/web/style/transmission/images/progress.png
-share/transmission/web/style/transmission/images/settings.png
-share/transmission/web/style/transmission/images/toolbar-close.png
-share/transmission/web/style/transmission/images/toolbar-folder.png
-share/transmission/web/style/transmission/images/toolbar-info.png
-share/transmission/web/style/transmission/images/toolbar-pause-all.png
-share/transmission/web/style/transmission/images/toolbar-pause.png
-share/transmission/web/style/transmission/images/toolbar-start-all.png
-share/transmission/web/style/transmission/images/toolbar-start.png
-share/transmission/web/style/transmission/images/turtle.png
-share/transmission/web/style/transmission/images/wrench.png
-share/transmission/web/style/transmission/mobile.css
+share/transmission/public_html/
+share/transmission/public_html/images/
+share/transmission/public_html/images/favicon.ico
+share/transmission/public_html/images/favicon.png
+share/transmission/public_html/images/webclip-icon.png
+share/transmission/public_html/index.html
+share/transmission/public_html/transmission-app.js
+share/transmission/public_html/transmission-app.js.LICENSE.txt
+share/transmission/public_html/transmission-app.js.map

Reply via email to