From: Rafael Sadowski Subject: UPDATE: devel/zeal To: ports , Adam Wolk Date: Sat, 3 Feb 2024 08:18:31 +0100 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. Rafael diff --git a/devel/zeal/Makefile b/devel/zeal/Makefile index 36a037b3450..ecec1699d30 100644 --- a/devel/zeal/Makefile +++ b/devel/zeal/Makefile @@ -5,9 +5,8 @@ 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} CATEGORIES = devel @@ -18,23 +17,33 @@ MAINTAINER = Adam Wolk # 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 -RUN_DEPENDS += devel/desktop-file-utils \ +BUILD_DEPENDS = devel/kf5/extra-cmake-modules + +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 diff --git a/devel/zeal/distinfo b/devel/zeal/distinfo index e6156f719a1..ad8c71cdb40 100644 --- a/devel/zeal/distinfo +++ b/devel/zeal/distinfo @@ -1,2 +1,2 @@ -SHA256 (zeal-0.6.1.tar.xz) = +7knkjPSuCRbSd4CKK4NBEWEqK50z9UjnBbVCIsfx4s= -SIZE (zeal-0.6.1.tar.xz) = 671432 +SHA256 (zeal-0.7.0.tar.xz) = Qs7+iydnvZTly3ANpKN9mM+xhp3W8EOxD3cx3zGcr0w= +SIZE (zeal-0.7.0.tar.xz) = 784204 diff --git a/devel/zeal/patches/patch-src_libs_registry_docset_cpp b/devel/zeal/patches/patch-src_libs_registry_docset_cpp new file mode 100644 index 00000000000..a46f1d34a14 --- /dev/null +++ b/devel/zeal/patches/patch-src_libs_registry_docset_cpp @@ -0,0 +1,27 @@ +refactor: replace deprecated qAsConst with std::as_const() (#1565) + +Reference: https://github.com/qt/qtbase/blob/v6.6.0/src/corelib/global/qttypetraits.h#L32 + +https://github.com/zealdocs/zeal/commit/9630cc94c155d87295e51b41fbab2bd5798f8229 + +Index: src/libs/registry/docset.cpp +--- src/libs/registry/docset.cpp.orig ++++ src/libs/registry/docset.cpp +@@ -458,7 +458,7 @@ void Docset::loadSymbols(const QString &symbolType) co + // with it.first and it.second respectively pointing to the start and the end + // of the range of nodes having symbolType as key. It effectively represents a + // contiguous view over the nodes with a specified key. +- for (auto it = qAsConst(m_symbolStrings).equal_range(symbolType); it.first != it.second; ++it.first) { ++ for (auto it = std::as_const(m_symbolStrings).equal_range(symbolType); it.first != it.second; ++it.first) { + loadSymbols(symbolType, it.first.value()); + } + } +@@ -519,7 +519,7 @@ void Docset::createIndex() + } + + // Drop old indexes +- for (const QString &oldIndexName : qAsConst(oldIndexes)) { ++ for (const QString &oldIndexName : std::as_const(oldIndexes)) { + m_db->execute(indexDropQuery.arg(oldIndexName)); + } + diff --git a/devel/zeal/patches/patch-src_libs_registry_docsetmetadata_cpp b/devel/zeal/patches/patch-src_libs_registry_docsetmetadata_cpp new file mode 100644 index 00000000000..e58acc404e3 --- /dev/null +++ b/devel/zeal/patches/patch-src_libs_registry_docsetmetadata_cpp @@ -0,0 +1,18 @@ +refactor: replace deprecated qAsConst with std::as_const() (#1565) + +Reference: https://github.com/qt/qtbase/blob/v6.6.0/src/corelib/global/qttypetraits.h#L32 + +https://github.com/zealdocs/zeal/commit/9630cc94c155d87295e51b41fbab2bd5798f8229 + +Index: src/libs/registry/docsetmetadata.cpp +--- src/libs/registry/docsetmetadata.cpp.orig ++++ src/libs/registry/docsetmetadata.cpp +@@ -97,7 +97,7 @@ void DocsetMetadata::save(const QString &path, const Q + + if (!m_urls.isEmpty()) { + QJsonArray urls; +- for (const QUrl &url : qAsConst(m_urls)) { ++ for (const QUrl &url : std::as_const(m_urls)) { + urls.append(url.toString()); + } + diff --git a/devel/zeal/patches/patch-src_libs_registry_docsetregistry_cpp b/devel/zeal/patches/patch-src_libs_registry_docsetregistry_cpp new file mode 100644 index 00000000000..54d70719dc4 --- /dev/null +++ b/devel/zeal/patches/patch-src_libs_registry_docsetregistry_cpp @@ -0,0 +1,36 @@ +refactor: replace deprecated qAsConst with std::as_const() (#1565) + +Reference: https://github.com/qt/qtbase/blob/v6.6.0/src/corelib/global/qttypetraits.h#L32 + +https://github.com/zealdocs/zeal/commit/9630cc94c155d87295e51b41fbab2bd5798f8229 + +Index: src/libs/registry/docsetregistry.cpp +--- src/libs/registry/docsetregistry.cpp.orig ++++ src/libs/registry/docsetregistry.cpp +@@ -101,7 +101,7 @@ void DocsetRegistry::setFuzzySearchEnabled(bool enable + + m_isFuzzySearchEnabled = enabled; + +- for (Docset *docset : qAsConst(m_docsets)) { ++ for (Docset *docset : std::as_const(m_docsets)) { + docset->setFuzzySearchEnabled(enabled); + } + } +@@ -193,7 +193,7 @@ Docset *DocsetRegistry::docset(int index) const + + Docset *DocsetRegistry::docsetForUrl(const QUrl &url) + { +- for (Docset *docset : qAsConst(m_docsets)) { ++ for (Docset *docset : std::as_const(m_docsets)) { + if (docset->baseUrl().isParentOf(url)) + return docset; + } +@@ -226,7 +226,7 @@ void DocsetRegistry::_runQuery(const QString &query) + + const SearchQuery searchQuery = SearchQuery::fromString(query); + if (searchQuery.hasKeywords()) { +- for (Docset *docset : qAsConst(m_docsets)) { ++ for (Docset *docset : std::as_const(m_docsets)) { + if (searchQuery.hasKeywords(docset->keywords())) + enabledDocsets << docset; + } diff --git a/devel/zeal/patches/patch-src_libs_ui_docsetsdialog_cpp b/devel/zeal/patches/patch-src_libs_ui_docsetsdialog_cpp new file mode 100644 index 00000000000..01b5aceefda --- /dev/null +++ b/devel/zeal/patches/patch-src_libs_ui_docsetsdialog_cpp @@ -0,0 +1,18 @@ +refactor: replace deprecated qAsConst with std::as_const() (#1565) + +Reference: https://github.com/qt/qtbase/blob/v6.6.0/src/corelib/global/qttypetraits.h#L32 + +https://github.com/zealdocs/zeal/commit/9630cc94c155d87295e51b41fbab2bd5798f8229 + +Index: src/libs/ui/docsetsdialog.cpp +--- src/libs/ui/docsetsdialog.cpp.orig ++++ src/libs/ui/docsetsdialog.cpp +@@ -687,7 +687,7 @@ QNetworkReply *DocsetsDialog::download(const QUrl &url + + void DocsetsDialog::cancelDownloads() + { +- for (QNetworkReply *reply : qAsConst(m_replies)) { ++ for (QNetworkReply *reply : std::as_const(m_replies)) { + // Hide progress bar + QListWidgetItem *listItem + = ui->availableDocsetList->item(reply->property(ListItemIndexProperty).toInt()); diff --git a/devel/zeal/patches/patch-src_libs_ui_qxtglobalshortcut_qxtglobalshortcut_x11_cpp b/devel/zeal/patches/patch-src_libs_ui_qxtglobalshortcut_qxtglobalshortcut_x11_cpp new file mode 100644 index 00000000000..4116c29dff5 --- /dev/null +++ b/devel/zeal/patches/patch-src_libs_ui_qxtglobalshortcut_qxtglobalshortcut_x11_cpp @@ -0,0 +1,18 @@ +refactor: replace deprecated qAsConst with std::as_const() (#1565) + +Reference: https://github.com/qt/qtbase/blob/v6.6.0/src/corelib/global/qttypetraits.h#L32 + +https://github.com/zealdocs/zeal/commit/9630cc94c155d87295e51b41fbab2bd5798f8229 + +Index: src/libs/ui/qxtglobalshortcut/qxtglobalshortcut_x11.cpp +--- src/libs/ui/qxtglobalshortcut/qxtglobalshortcut_x11.cpp.orig ++++ src/libs/ui/qxtglobalshortcut/qxtglobalshortcut_x11.cpp +@@ -152,7 +152,7 @@ bool QxtGlobalShortcutPrivate::registerShortcut(quint3 + } + + bool failed = false; +- for (xcb_void_cookie_t cookie : qAsConst(xcbCookies)) { ++ for (xcb_void_cookie_t cookie : std::as_const(xcbCookies)) { + QScopedPointer error(xcb_request_check(xcbConnection, cookie)); + failed = !error.isNull(); + } diff --git a/devel/zeal/patches/patch-src_libs_ui_searchitemdelegate_cpp b/devel/zeal/patches/patch-src_libs_ui_searchitemdelegate_cpp deleted file mode 100644 index a0785910062..00000000000 --- a/devel/zeal/patches/patch-src_libs_ui_searchitemdelegate_cpp +++ /dev/null @@ -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 - #include - #include -+#include - #include - - using namespace Zeal::WidgetUi; diff --git a/devel/zeal/pkg/PLIST b/devel/zeal/pkg/PLIST index 8d69ee2a971..1890dd030df 100644 --- a/devel/zeal/pkg/PLIST +++ b/devel/zeal/pkg/PLIST @@ -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