commit:     626a7582c91892c3242dea52f52df684ec63a38e
Author:     Denis Lisov <dennis.lissov <AT> gmail <DOT> com>
AuthorDate: Mon Jul 29 22:40:28 2024 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Wed Jul 31 21:16:53 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=626a7582

app-text/zeal: version bump to 0.7.1 (qt6 only)

Signed-off-by: Denis Lisov <dennis.lissov <AT> gmail.com>
Closes: https://bugs.gentoo.org/927404
Closes: https://bugs.gentoo.org/916451
Closes: https://github.com/gentoo/gentoo/pull/33571
Closes: https://github.com/gentoo/gentoo/pull/37790
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 app-text/zeal/Manifest                             |  1 +
 .../zeal/files/add-missing-qt-components.patch     | 10 ++++
 app-text/zeal/files/disable-werror.patch           | 12 +++++
 app-text/zeal/files/qt6.patch                      | 11 +++++
 app-text/zeal/zeal-0.7.1.ebuild                    | 57 ++++++++++++++++++++++
 5 files changed, 91 insertions(+)

diff --git a/app-text/zeal/Manifest b/app-text/zeal/Manifest
index ff4a3054c4af..0a6f7597ea5a 100644
--- a/app-text/zeal/Manifest
+++ b/app-text/zeal/Manifest
@@ -1 +1,2 @@
 DIST zeal-0.6.1_p20200815.tar.gz 1180048 BLAKE2B 
22a6ee7985516f2204de0603374944c101fa77339a6c83b8a33633fa51e25890f39d672f3d804adb8c41b9ffc2ad7971ce16f90dacb1160f1868ed3f8768aad2
 SHA512 
fa08c88a40f2f75847db4950c2b027262304bb8b63b95d497786fa2c3a90aa0c488fc3ebe494afe70353a2dd93a181bf2d8fa752a7241e572045c6728ea99f2d
+DIST zeal-0.7.1.tar.gz 1195333 BLAKE2B 
56e6d56e152ed94559d15ba4a5dd7972466db75a4d760640b55b532ba3ed325a429e8e03f450efaa3e24f09af68ff5b43463d9b8f21b8a9bd11e23a3841780c4
 SHA512 
bf2b5e2878b349ec4e5e74377a2a74e263d5f20649f152f194375547c5e69b3e6115c9d0f103acad7f087b20456d888a3be9f7ce1aa232206bba7e0ed38d252b

diff --git a/app-text/zeal/files/add-missing-qt-components.patch 
b/app-text/zeal/files/add-missing-qt-components.patch
new file mode 100644
index 000000000000..423bfed0b081
--- /dev/null
+++ b/app-text/zeal/files/add-missing-qt-components.patch
@@ -0,0 +1,10 @@
+Backport of https://github.com/zealdocs/zeal/pull/1644
+Done manually because CMakeLists.txt has CRLF line endings in release tarball.
+--- a/src/app/CMakeLists.txt
++++ b/src/app/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED)
++find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Concurrent WebEngineWidgets 
Widgets REQUIRED)
+ if (Qt${QT_VERSION_MAJOR}Widgets_VERSION VERSION_LESS QT_MINIMUM_VERSION)
+     message(FATAL_ERROR "Qt version >= ${QT_MINIMUM_VERSION} is required.")
+ endif()

diff --git a/app-text/zeal/files/disable-werror.patch 
b/app-text/zeal/files/disable-werror.patch
new file mode 100644
index 000000000000..e1811d3098de
--- /dev/null
+++ b/app-text/zeal/files/disable-werror.patch
@@ -0,0 +1,12 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -59,9 +59,5 @@
+     VERBATIM
+ )
+ 
+-if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24.0")
+-    set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
+-endif()
+-
+ add_subdirectory(assets)
+ add_subdirectory(src)

diff --git a/app-text/zeal/files/qt6.patch b/app-text/zeal/files/qt6.patch
new file mode 100644
index 000000000000..1312d63abb6f
--- /dev/null
+++ b/app-text/zeal/files/qt6.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -22,7 +22,7 @@
+ set(PROJECT_COPYRIGHT "© 2013-2024 Oleg Shparber and other contributors")
+ 
+ # Find available major Qt version. It will be stored in QT_VERSION_MAJOR.
+-find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
++find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
+ if(QT_VERSION_MAJOR EQUAL 6)
+     set(QT_MINIMUM_VERSION 6.2.0)
+ else()

diff --git a/app-text/zeal/zeal-0.7.1.ebuild b/app-text/zeal/zeal-0.7.1.ebuild
new file mode 100644
index 000000000000..517aa25b87d1
--- /dev/null
+++ b/app-text/zeal/zeal-0.7.1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake edos2unix xdg-utils
+
+DESCRIPTION="Offline documentation browser inspired by Dash"
+HOMEPAGE="https://zealdocs.org/";
+SRC_URI="https://github.com/zealdocs/${PN}/releases/download/v${PV}/${P}.tar.gz";
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+       app-arch/libarchive:=
+       dev-db/sqlite:3
+       dev-qt/qtbase:6[concurrent,gui,network,widgets]
+       dev-qt/qtwebchannel:6
+       dev-qt/qtwebengine:6[widgets]
+       x11-libs/libX11
+       x11-libs/libxcb:=
+       x11-libs/xcb-util-keysyms
+"
+RDEPEND="${DEPEND}
+       x11-themes/hicolor-icon-theme
+"
+BDEPEND="kde-frameworks/extra-cmake-modules"
+
+PATCHES=(
+       "${FILESDIR}/disable-werror.patch"
+       "${FILESDIR}/qt6.patch"
+       "${FILESDIR}/add-missing-qt-components.patch"
+)
+
+src_prepare() {
+       edos2unix "${S}/assets/freedesktop/org.zealdocs.zeal.desktop"
+       cmake_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DZEAL_RELEASE_BUILD=ON
+       )
+       cmake_src_configure
+}
+
+pkg_postinst() {
+       xdg_icon_cache_update
+       xdg_desktop_database_update
+}
+
+pkg_postrm() {
+       xdg_icon_cache_update
+       xdg_desktop_database_update
+}

Reply via email to