On Sat, Feb 03, 2024 at 08:18:31AM +0100, Rafael Sadowski wrote:
> Update zeal to 0.7.0. Upstream switched to Qt6 and Qt6Webengine.
> 
> Could someone test it with the current Qt6 version, I'm sitting on a new
> version that needs a little more time.

I removed USE_WXNEEDED=Yes and replaced your five new patches with the
single, identical upstream commit in PATCHFILES;  that took an extra
post-extract to basically get FIX_CRLF_FILES before dispatch, see diff...

/usr/ports/pobj/zeal-0.7.0/zeal-0.7.0/src/app/main.cpp:180:5: error: 'critical' 
is deprecated: Use the overload taking StandardButtons instead. 
[-Werror,-Wdeprecated-declarations]
    QT_REQUIRE_VERSION(argc, argv, QT_VERSION_STR)
    ^
/usr/local/include/X11/qt6/QtWidgets/qmessagebox.h:315:58: note: expanded from 
macro 'QT_REQUIRE_VERSION'
str)).arg(QString::fromLatin1(qVersion())); QMessageBox::critical(0, 
QApplication::tr(\
                                                         ^
/usr/local/include/X11/qt6/QtWidgets/qmessagebox.h:242:5: note: 'critical' has 
been explicitly marked deprecated here
    QT_DEPRECATED_VERSION_X_6_2("Use the overload taking StandardButtons 
instead.")
    ^
/usr/local/include/X11/qt6/QtCore/qtdeprecationmarkers.h:141:44: note: expanded 
from macro 'QT_DEPRECATED_VERSION_X_6_2'
# define QT_DEPRECATED_VERSION_X_6_2(text) QT_DEPRECATED_X(text)
                                           ^
/usr/local/include/X11/qt6/QtCore/qtdeprecationmarkers.h:27:33: note: expanded 
from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/usr/local/include/X11/qt6/QtCore/qcompilerdetection.h:971:36: note: expanded 
from macro 'Q_DECL_DEPRECATED_X'
#  define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]]
                                   ^
1 error generated.


Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/zeal/Makefile,v
diff -u -p -r1.20 Makefile
--- Makefile    21 Sep 2023 09:50:08 -0000      1.20
+++ Makefile    4 Feb 2024 13:11:34 -0000
@@ -1,13 +1,14 @@
-# qt5 webkit
-USE_WXNEEDED = Yes
-
 USE_NOBTCFI =  Yes
 
 COMMENT =      simple offline API documentation browser
 
-V =    0.6.1
-DISTNAME = zeal-${V}
-REVISION = 3
+V =            0.7.0
+DISTNAME =     zeal-${V}
+
+# fix build with Qt6
+SITES.qt =             https://github.com/zealdocs/zeal/commit/
+PATCHFILES.qt =                9630cc94c155d87295e51b41fbab2bd5798f8229.patch
+PATCH_DIST_STRIP =     -p1
 
 CATEGORIES =   devel
 
@@ -18,24 +19,44 @@ MAINTAINER =        Adam Wolk <aw...@openbsd.or
 # GPLv3
 PERMIT_PACKAGE =       Yes
 
-WANTLIB += ${COMPILER_LIBCXX} ICE Qt5Concurrent Qt5Core Qt5Gui
-WANTLIB += Qt5Network Qt5WebKit Qt5WebKitWidgets Qt5Widgets Qt5X11Extras
-WANTLIB += SM X11 Xext archive c m sqlite3 xcb xcb-keysyms
+WANTLIB += ${COMPILER_LIBCXX} GL ICE Qt6Concurrent Qt6Core Qt6Gui
+WANTLIB += Qt6Network Qt6OpenGL Qt6PrintSupport Qt6Qml Qt6QmlModels
+WANTLIB += Qt6Quick Qt6WebChannel Qt6WebEngineCore Qt6WebEngineWidgets
+WANTLIB += Qt6Widgets SM X11 Xext archive c m sqlite3 xcb xcb-keysyms
+WANTLIB += xkbcommon
 
 SITES =                
https://github.com/zealdocs/zeal/releases/download/v${V}/
 
 EXTRACT_SUFX = .tar.xz
 
-MODULES =      devel/kf5
+MODULES =      x11/qt6 devel/cmake
+
+BUILD_DEPENDS =        devel/kf5/extra-cmake-modules
 
-RUN_DEPENDS += devel/desktop-file-utils \
+RUN_DEPENDS =  devel/desktop-file-utils \
                x11/gtk+4,-guic
 
-LIB_DEPENDS += archivers/libarchive \
+LIB_DEPENDS =  archivers/libarchive \
                databases/sqlite3 \
-               x11/qt5/qtwebkit \
-               x11/qt5/qtx11extras
+               x11/qt6/qtdeclarative \
+               x11/qt6/qtwebengine
+
+CONFIGURE_ARGS =       -DZEAL_RELEASE_BUILD=ON
+
+FIX_CRLF_FILES =       src/libs/registry/*.cpp \
+                       src/libs/ui/qxtglobalshortcut/*.cpp \
+                       src/libs/ui/*.cpp
 
 NO_TEST =      Yes
+
+# XXX FIX_CRLF_FILES runs after distpatch, but patch(1) and gpatch(1) won't
+# apply PATCHFILES due to wrong line endings
+post-extract:
+       @cd ${WRKDIST} && perl -i -pe 's/\r$$//' -- \
+           src/libs/registry/docset.cpp \
+           src/libs/registry/docsetmetadata.cpp \
+           src/libs/registry/docsetregistry.cpp \
+           src/libs/ui/docsetsdialog.cpp \
+           src/libs/ui/qxtglobalshortcut/qxtglobalshortcut_x11.cpp
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/zeal/distinfo,v
diff -u -p -r1.7 distinfo
--- distinfo    5 Jan 2019 10:10:32 -0000       1.7
+++ distinfo    4 Feb 2024 12:57:00 -0000
@@ -1,2 +1,4 @@
-SHA256 (zeal-0.6.1.tar.xz) = +7knkjPSuCRbSd4CKK4NBEWEqK50z9UjnBbVCIsfx4s=
-SIZE (zeal-0.6.1.tar.xz) = 671432
+SHA256 (9630cc94c155d87295e51b41fbab2bd5798f8229.patch) = 
5AzvKb1jzWiDHwtLJ0KciN0ySarfALJVnMMmuz2urmE=
+SHA256 (zeal-0.7.0.tar.xz) = Qs7+iydnvZTly3ANpKN9mM+xhp3W8EOxD3cx3zGcr0w=
+SIZE (9630cc94c155d87295e51b41fbab2bd5798f8229.patch) = 4768
+SIZE (zeal-0.7.0.tar.xz) = 784204
Index: patches/patch-src_libs_ui_searchitemdelegate_cpp
===================================================================
RCS file: patches/patch-src_libs_ui_searchitemdelegate_cpp
diff -N patches/patch-src_libs_ui_searchitemdelegate_cpp
--- patches/patch-src_libs_ui_searchitemdelegate_cpp    11 Mar 2022 18:53:39 
-0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-Index: src/libs/ui/searchitemdelegate.cpp
---- src/libs/ui/searchitemdelegate.cpp.orig
-+++ src/libs/ui/searchitemdelegate.cpp
-@@ -27,6 +27,7 @@
- #include <QFontMetrics>
- #include <QHelpEvent>
- #include <QPainter>
-+#include <QPainterPath>
- #include <QToolTip>
- 
- using namespace Zeal::WidgetUi;
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/zeal/pkg/PLIST,v
diff -u -p -r1.5 PLIST
--- pkg/PLIST   11 Mar 2022 18:53:40 -0000      1.5
+++ pkg/PLIST   4 Feb 2024 12:54:32 -0000
@@ -1,5 +1,5 @@
 @bin bin/zeal
-share/applications/org.zealdocs.Zeal.desktop
+share/applications/org.zealdocs.zeal.desktop
 share/icons/hicolor/128x128/apps/zeal.png
 share/icons/hicolor/16x16/apps/zeal.png
 share/icons/hicolor/24x24/apps/zeal.png
@@ -8,4 +8,4 @@ share/icons/hicolor/64x64/apps/zeal.png
 @tag update-desktop-database
 @tag gtk-update-icon-cache %D/share/icons/hicolor
 share/metainfo/
-share/metainfo/org.zealdocs.Zeal.appdata.xml
+share/metainfo/org.zealdocs.zeal.appdata.xml

Reply via email to