On Thu, Mar 09, 2023 at 06:02:31PM -0500, Josh Grosse wrote:
> 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.
Mixing autoconf/cmake/qmake is a bad idea, better use cmake for everything.
transmission's cmake code "supports" Qt 5 and 6, but USE_QT_VERSION=5 fails
to find "Qt" whereas USE_QT_VERSION=6 properly finds "Qt6".
By default, 6 is tried first, so just use that.
> 2) I am having an issue with "size mismatch" warnings as both
> libevent and devel/libevent2 are required by the main and
> gtk subpackages.
transmission's cmake code finds and prints libevent2's 2.1.12, but ends up
always using base libevent.so.* which I have not been able to fix.
Looks like transmission wants to link against a single -levent like base,
but ports only has libevent_* libraries.
Perhaps this fixes itselt when devel/libevent2 switches to cmake and
provides .cmake files or consumers, maybe this needs more fixing.
For now, I'd just build the bundled copy as you already found out.
>
> 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
...
> -ONLY_FOR_ARCHS-qt= ${MODGCC4_ARCHS} ${CLANG_ARCHS}
> +#ONLY_FOR_ARCHS-qt= ${MODGCC4_ARCHS} ${CLANG_ARCHS}
>
> COMPILER = base-clang ports-gcc
> COMPILER_LANGS = c
The whole project switched to modern C++ and deps, so *_ARCHS-* bits seem
obsolete now.
Here is a diff using cmake, qt6 and gtk4 as per upstream defaults.
Above mentioned cmake issues should be mentioned upstream.
The one new local patch is trivial, free PR for anyone taking their time.
Both gtk and qt run fine on amd64 for me.
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/transmission/Makefile,v
retrieving revision 1.140
diff -u -p -r1.140 Makefile
--- Makefile 8 Nov 2022 11:17:02 -0000 1.140
+++ Makefile 10 Mar 2023 15:04:52 -0000
@@ -2,10 +2,7 @@ COMMENT-main= BitTorrent command line an
COMMENT-gtk= BitTorrent client with GTK+ interface
COMMENT-qt= BitTorrent client with Qt interface
-NOT_FOR_ARCHS-gtk= 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}
@@ -13,22 +10,17 @@ PKGNAME-qt= transmission-qt-${VER}
CATEGORIES= net
HOMEPAGE= https://transmissionbt.com/
MAINTAINER= Josh Grosse <josh@jggimi.net>
-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
-ONLY_FOR_ARCHS-qt= ${MODGCC4_ARCHS} ${CLANG_ARCHS}
-
+# gnu++17
COMPILER = base-clang ports-gcc
-COMPILER_LANGS = c
PSEUDO_FLAVORS= no_gtk no_qt
@@ -36,84 +28,60 @@ 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)
+WANTLIB-common = ${COMPILER_LIBCXX} c crypto curl m miniupnpc natpmp psl ssl
+
+WANTLIB-main = ${WANTLIB-common}
+
+WANTLIB-gtk += ${WANTLIB-common} cairo cairo-gobject cairomm-1.16 gdk_pixbuf-2.0
+WANTLIB-gtk += gio-2.0 giomm-2.68 glib-2.0 glibmm-2.68 gobject-2.0 graphene-1.0
+WANTLIB-gtk += gtk-4 gtkmm-4.0 harfbuzz intl pango-1.0 pangocairo-1.0
+WANTLIB-gtk += pangomm-2.48 sigc-3.0
-MODULES+= textproc/intltool
+WANTLIB-qt += GL Qt6Core Qt6DBus Qt6Gui Qt6Network Qt6Svg Qt6Widgets
+
+MODULES = devel/cmake \
+ textproc/intltool
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} \
- x11/gtk+3
+ x11/gtkmm40 \
+ x11/gtk+4
LIB_DEPENDS-qt= ${LIB_DEPENDS-common} \
- ${MODQT_LIB_DEPENDS}
+ ${MODQT_LIB_DEPENDS} \
+ x11/qt6/qtsvg
RUN_DEPENDS-gtk=${PKGNAME-main}:${BUILD_PKGPATH} \
devel/desktop-file-utils \
- x11/gtk+3,-guic
+ x11/gtk+4,-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_ARGS = -DENABLE_CLI=ON \
+ -DENABLE_TESTS=OFF
-CONFIGURE_ENV= CPPFLAGS="-I${WRKSRC}/third-party -I${LOCALBASE}/include" \
- LDFLAGS="-L${LOCALBASE}/lib"
-
-.if ${BUILD_PACKAGES:M-qt}
-MODULES+= devel/qmake x11/qt5
-COMPILER_LANGS += c++
-# avoid setting LINK=
-MODQT5_USE_CXX11= No
-MODQMAKE_PROJECTS= qt/qtr.pro
-CONFIGURE_STYLE+= qmake
-SEPARATE_BUILD= No
-MODQMAKE_INSTALL_ROOT= ${PREFIX}
-.endif
-
-.if !${BUILD_PACKAGES:M-gtk}
-CONFIGURE_ARGS+=--without-gtk
+# XXX sees ports libevent2 but picks base libevent expecting a single .so.*
+# use the bundle until upstream cmake code gets fixed
+CONFIGURE_ARGS += -DUSE_SYSTEM_EVENT2=OFF
+
+.if ${BUILD_PACKAGES:M-gtk}
+CONFIGURE_ARGS += -DENABLE_GTK=ON \
+ -DUSE_GTK_VERSION=4
+.else
+CONFIGURE_ARGS += -DENABLE_GTK=OFF
.endif
-FIX_CRLF_FILES= third-party/libutp/*.h third-party/libutp/*.cpp
-
.if ${BUILD_PACKAGES:M-qt}
-post-build:
- ${MODQMAKE_build}
-
-post-install:
- ${MODQMAKE_install}
- ${INSTALL_DATA_DIR} ${PREFIX}/share/applications
- ${INSTALL_DATA} ${WRKSRC}/qt/transmission-qt.desktop \
- ${PREFIX}/share/applications/
- ${INSTALL_DATA_DIR} ${PREFIX}/share/pixmaps
- ${INSTALL_DATA} ${WRKSRC}/qt/icons/transmission.png \
- ${PREFIX}/share/pixmaps/transmission-qt.png
+MODULES += x11/qt6
+# XXX =6 finds "Qt6", =5 fails to find "Qt", but Qt6 is preferred, anyway
+CONFIGURE_ARGS += -DENABLE_QT=ON \
+ -DUSE_QT_VERSION=6
+.else
+CONFIGURE_ARGS += -DENABLE_QT=OFF
.endif
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/transmission/distinfo,v
retrieving revision 1.53
diff -u -p -r1.53 distinfo
--- distinfo 2 Jul 2020 03:41:06 -0000 1.53
+++ distinfo 24 Feb 2023 01:17:16 -0000
@@ -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
Index: patches/patch-gtk_DetailsDialog_cc
===================================================================
RCS file: patches/patch-gtk_DetailsDialog_cc
diff -N patches/patch-gtk_DetailsDialog_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-gtk_DetailsDialog_cc 10 Mar 2023 15:04:48 -0000
@@ -0,0 +1,13 @@
+Unbreak build with missing include
+
+Index: gtk/DetailsDialog.cc
+--- gtk/DetailsDialog.cc.orig
++++ gtk/DetailsDialog.cc
+@@ -67,6 +67,7 @@
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+ #else
++#include <sys/socket.h> // AF_INET
+ #include <arpa/inet.h>
+
No comments:
Post a Comment