app-text/zeal: Import and bump orphaned package

The package is based on the latest one from ::gentoo,
bumped to 0.7.0, moved to qt6 (w/ qt5 support) and
cleaned up.

Thanks-To: Sam James <sam@gentoo.org>
Signed-off-by: Nils Freydank <nils.freydank@posteo.de>
This commit is contained in:
Nils Freydank 2024-03-23 18:45:29 +01:00
parent f37e35af0e
commit b1441618d5
Signed by: nfr
GPG Key ID: 0F1DEAB2D36AD112
5 changed files with 155 additions and 0 deletions

1
app-text/zeal/Manifest Normal file
View File

@ -0,0 +1 @@
DIST zeal-0.7.0.tar.gz 1201193 BLAKE2B a74c5dc96aa3d4e62b4c685023271bdee20460f10e83e7e00dbd4020b8b6ef3011813b1f35ff5a1693ed8bd56b28e19e669deffe01d5e9ef9226f29b219cd455 SHA512 5980d521ee923e9ef009aafdf24c146f63de5a8dccac63078d1125e86f1f36503d9c1ca2dc1b1365be71e67abfc18f43c48c212a52340ecc96aac25db072047e

View File

@ -0,0 +1,30 @@
From d2d95443fcd9f79b70568513412c289219e5afdc Mon Sep 17 00:00:00 2001
From: Nils Freydank <holgersson@posteo.de>
Date: Sat, 23 Mar 2024 19:00:00 +0100
Subject: [PATCH] CMakeLists: Disable -Werror
Gentoo policy is to disable -Werror by default,
see e.g. https://bugs.gentoo.org/926121.
Signed-off-by: Nils Freydank <holgersson@posteo.de>
---
CMakeLists.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a6a31c6..4a9a86f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,7 +60,8 @@ add_custom_target(zeal_version
)
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24.0")
- set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
+ # Upstream is slightly insane.
+ set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
endif()
add_subdirectory(assets)
--
2.44.0

View File

@ -0,0 +1,32 @@
From dfaa23858280861b9a6d4dc869b98293168ff467 Mon Sep 17 00:00:00 2001
From: Nils Freydank <nils.freydank@posteo.de>
Date: Sat, 23 Mar 2024 19:00:00 +0100
Subject: [PATCH] settings: disable checking for updates by default
Do not query the servers for updates by default on every
startup. The user can still enable this via GUI if desired.
This patch is nearly 1:1 the patch by Henning Schild from 2019-05-09.
Signed-off-by: Nils Freydank <holgersson@posteo.de>
---
src/libs/core/settings.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/libs/core/settings.cpp b/src/libs/core/settings.cpp
index 8bcc6e6..bd81153 100644
--- a/src/libs/core/settings.cpp
+++ b/src/libs/core/settings.cpp
@@ -95,7 +95,8 @@ void Settings::load()
// TODO: Put everything in groups
startMinimized = settings->value(QStringLiteral("start_minimized"), false).toBool();
- checkForUpdate = settings->value(QStringLiteral("check_for_update"), true).toBool();
+ // Disabled by default on Gentoo/Linux via custom patch.
+ checkForUpdate = settings->value(QStringLiteral("check_for_update"), false).toBool();
showSystrayIcon = settings->value(QStringLiteral("show_systray_icon"), true).toBool();
minimizeToSystray = settings->value(QStringLiteral("minimize_to_systray"), false).toBool();
--
2.44.0

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>nils.freydank@posteo.de</email>
<name>Nils Freydank</name>
</maintainer>
<upstream>
<remote-id type="github">zealdocs/zeal</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,81 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake xdg-utils
MY_PV="${PV/_rc/-RC}"
COMMIT_ID="90ad776e83f182221cafd329f2e58cf0621ea3f1"
DESCRIPTION="Offline documentation browser inspired by Dash"
HOMEPAGE="
https://zealdocs.org
https://github.com/zealdocs/zeal
"
LICENSE="GPL-3"
if [[ ${PV} == *9999 ]]; then
EGIT_REPO_URI="https://github.com/zealdocs/${PN}.git"
inherit git-r3
else
if [[ ${PV} == *_p* ]]; then
SRC_URI="https://github.com/zealdocs/${PN}/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${COMMIT_ID}"
else
SRC_URI="https://github.com/zealdocs/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/$PN-${MY_PV}/"
fi
fi
KEYWORDS="~amd64 ~x86"
SLOT="0"
IUSE=""
DEPEND="
app-arch/libarchive:=
dev-db/sqlite:3
dev-qt/qtbase:6[concurrent,gui,network,sqlite,widgets]
dev-qt/qtwebengine:6[widgets]
dev-qt/qtwebchannel:6
x11-libs/libX11
x11-libs/libxcb:=
x11-libs/xcb-util-keysyms
"
RDEPEND="${DEPEND}
x11-themes/hicolor-icon-theme
"
BDEPEND="kde-frameworks/extra-cmake-modules:0"
PATCHES=(
"${FILESDIR}/${PN}-0.7.0-settings-disable-checking-for-updates-by-default.patch"
"${FILESDIR}/${PN}-0.7.0-CMakeLists-Disable-Werror.patch"
)
src_configure() {
local mycmakeargs=(
-D QT_DIR=/usr/$(get_libdir)/cmake/Qt6
-D CMAKE_BUILD_TYPE=Release
# Default string is ${PV}-dev when self-compiled, even from releases.
-D ZEAL_VERSION=${PV}-gentoo
)
cmake_src_configure
}
pkg_postinst() {
xdg_icon_cache_update
xdg_desktop_database_update
if [[ -z "${REPLACING_VERSIONS}" ]]; then
elog ""
elog "If you are interested in dash cheat sheets, you will need to add the XML links"
elog "manually from https://zealusercontributions.vercel.app/cheatsheets."
elog "For details see the upstream issue:"
elog "https://github.com/zealdocs/zeal/issues/498#issuecomment-1848423041"
fi
}
pkg_postrm() {
xdg_icon_cache_update
xdg_desktop_database_update
}