10.03.2023 19:57, Josh Grosse пишет:
> On Fri, Mar 10, 2023 at 03:09:42PM +0000, Klemens Nanni wrote:
> [snip]
>> 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.
>
> Thank you for your diff!
>
> 1. I needed to add a BUILD_DEPENDS for x11/qt6/qttools to complete the
> qt configure step; it wasn't pre-installed on my build system when I began.
Yeah, I did not go over all the little details.
> 2. transmission-gtk now produces a locale warning here. I'm not sure how
> to correct it as I'm one of those en_US.UTF-8 users who never pays any
> attention to locale -- until something like this happens and then I just
> stare at the screen with a slack-jawed gaze.
>
> ** (transmission-gtk:32822): WARNING **: 14:20:24.974: Can't make the global C++ locale equal to the C locale.
> collate_byname<char>::collate_byname failed to construct for C/en_US.UTF-8/C/C/C/C
> C locale = C/en_US.UTF-8/C/C/C/C
I don't see that, it starts from console without any warning and
different locales yield different languages... so works for me.
>
> I have some additional minor changes to your Makefile:
>
> * the BDEP noted above
> * 2 lines of WANTLIB-qt per port-lib-depends-check
Oops, I just missed WANTLIB-common for -qt.
> * RDEP adds and deletes according to portcheck(1)
> * MASTER_SITES over 2 lines to fit within 80 chars, per portcheck().
As you like, I think we have many >80chars ports due to MASTER_SITES.
> diff --git a/net/transmission/Makefile b/net/transmission/Makefile
> index ae7a342a6b4..6c384373071 100644
> --- a/net/transmission/Makefile
> +++ b/net/transmission/Makefile
> @@ -14,7 +14,8 @@ MAINTAINER= Josh Grosse <josh@jggimi.net>
> # GPLv2+
> PERMIT_PACKAGE= Yes
>
> -MASTER_SITES= https://github.com/transmission/transmission/releases/download/${VER}/
> +MASTER_SITES= \
> + https://github.com/transmission/transmission/releases/download/${VER}/
> EXTRACT_SUFX= .tar.xz
>
> MULTI_PACKAGES= -main -gtk -qt
> @@ -22,7 +23,6 @@ MULTI_PACKAGES= -main -gtk -qt
> # gnu++17
> COMPILER = base-clang ports-gcc
>
> -
> PSEUDO_FLAVORS= no_gtk no_qt
> FLAVOR?=
>
> @@ -38,12 +38,13 @@ WANTLIB-gtk += gtk-4 gtkmm-4.0 harfbuzz intl pango-1.0 pangocairo-1.0
> WANTLIB-gtk += pangomm-2.48 sigc-3.0
>
> WANTLIB-qt += GL Qt6Core Qt6DBus Qt6Gui Qt6Network Qt6Svg Qt6Widgets
> +WANTLIB-qt += ${COMPILER_LIBCXX} c crypto curl m miniupnpc natpmp
> +WANTLIB-qt += psl ssl
Looks like you inlined WANTLIB-common and this diff applies neither to
-current nor on top of my diff.
>
> MODULES = devel/cmake \
> textproc/intltool
>
> -LIB_DEPENDS-common=devel/gettext,-runtime \
> - net/curl \
> +LIB_DEPENDS-common=net/curl \
> net/libpsl \
> net/miniupnp/libnatpmp \
> net/miniupnp/miniupnpc>=1.9
> @@ -57,6 +58,7 @@ LIB_DEPENDS-qt= ${LIB_DEPENDS-common} \
>
> RUN_DEPENDS-gtk=${PKGNAME-main}:${BUILD_PKGPATH} \
> devel/desktop-file-utils \
> + x11/gtk+3,-guic \
> x11/gtk+4,-guic
I *think* we only need one of those, but I could be wrong and won't dig
into that now.
> RUN_DEPENDS-qt= ${PKGNAME-main}:${BUILD_PKGPATH} \
> devel/desktop-file-utils
> @@ -80,6 +82,7 @@ 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
> +BUILD_DEPENDS+= x11/qt6/qttools
> .else
> CONFIGURE_ARGS += -DENABLE_QT=OFF
> .endif
New diff with your findings manually amended.
Just helping out, I am not using transmission myself, so others should
test and decide if this update should make it into release.
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 20:33:06 -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,62 @@ 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
-
-LIB_DEPENDS-common=devel/gettext,-runtime \
- devel/libevent2 \
- net/curl \
+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
+
+WANTLIB-qt += ${WANTLIB-common} GL Qt6Core Qt6DBus Qt6Gui Qt6Network Qt6Svg
+WANTLIB-qt += Qt6Widgets
+
+MODULES = devel/cmake \
+ textproc/intltool
+
+LIB_DEPENDS-common=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+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
+CONFIGURE_ARGS = -DENABLE_CLI=ON \
+ -DENABLE_TESTS=OFF
-# -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"
-
-.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}
+# 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
-.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}
-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
+BUILD_DEPENDS += x11/qt6/qttools
+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