From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 80762139360 for ; Tue, 3 Aug 2021 14:38:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AD46DE099F; Tue, 3 Aug 2021 14:38:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7FB3CE099F for ; Tue, 3 Aug 2021 14:38:45 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3C3BB342E1D for ; Tue, 3 Aug 2021 14:38:44 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C18EA7A7 for ; Tue, 3 Aug 2021 14:38:42 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1628001439.13809b3b69e4124527001c959612bf5de18a56c3.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/kchmviewer/files/, app-text/kchmviewer/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-text/kchmviewer/Manifest app-text/kchmviewer/files/kchmviewer-8.0-custom-url-scheme-registration.patch app-text/kchmviewer/files/kchmviewer-8.0-underlinking.patch app-text/kchmviewer/kchmviewer-8.0.ebuild app-text/kchmviewer/metadata.xml X-VCS-Directories: app-text/kchmviewer/files/ app-text/kchmviewer/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 13809b3b69e4124527001c959612bf5de18a56c3 X-VCS-Branch: master Date: Tue, 3 Aug 2021 14:38:42 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7e15e031-e470-46ea-9c03-75018ce66a0f X-Archives-Hash: d68c4d41972212d1b0fce7f999a0aa71 commit: 13809b3b69e4124527001c959612bf5de18a56c3 Author: Andreas Sturmlechner gentoo org> AuthorDate: Tue Aug 3 14:32:46 2021 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Tue Aug 3 14:37:19 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13809b3b app-text/kchmviewer: Re-introduce package at version 8.0 Reported-by: Michael gmail.com> Closes: https://bugs.gentoo.org/806214 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner gentoo.org> app-text/kchmviewer/Manifest | 1 + ...viewer-8.0-custom-url-scheme-registration.patch | 59 ++++++++++++++++++++++ .../files/kchmviewer-8.0-underlinking.patch | 30 +++++++++++ app-text/kchmviewer/kchmviewer-8.0.ebuild | 46 +++++++++++++++++ app-text/kchmviewer/metadata.xml | 11 ++++ 5 files changed, 147 insertions(+) diff --git a/app-text/kchmviewer/Manifest b/app-text/kchmviewer/Manifest new file mode 100644 index 00000000000..c3c46af89a3 --- /dev/null +++ b/app-text/kchmviewer/Manifest @@ -0,0 +1 @@ +DIST kchmviewer-8.0.tar.gz 311899 BLAKE2B f317dcc17fa88f30a4a1867b59b16bdc78457b46f4f3d3b78bd5d9d50745bf2d2329df170568c7814a02814a77b319bbd1d9f8edc3c1da0071a6ce64965b26bf SHA512 28ae8ee8a6f4a9be2e8a9666f6326906e04f34ad80a363697fc7e5bfbc745e6671884add3f57b6a1264f2056428cb0a31504da9c69a0bede0c3b485a08e75048 diff --git a/app-text/kchmviewer/files/kchmviewer-8.0-custom-url-scheme-registration.patch b/app-text/kchmviewer/files/kchmviewer-8.0-custom-url-scheme-registration.patch new file mode 100644 index 00000000000..144d673b2b1 --- /dev/null +++ b/app-text/kchmviewer/files/kchmviewer-8.0-custom-url-scheme-registration.patch @@ -0,0 +1,59 @@ +From 9ac73e7ad15de08aab6b1198115be2eb44da7afe Mon Sep 17 00:00:00 2001 +From: George Yunaev +Date: Fri, 21 May 2021 15:57:21 -0700 +Subject: [PATCH] Custom URL scheme registration needs to be applied once per + https://doc.qt.io/qt-5/qwebengineurlschemehandler.html + +--- + src/viewwindow_webengine.cpp | 20 +++++++++++++------- + src/viewwindow_webengine.h | 3 --- + 2 files changed, 13 insertions(+), 10 deletions(-) + +diff --git a/src/viewwindow_webengine.cpp b/src/viewwindow_webengine.cpp +index 631d84d..34f3396 100644 +--- a/src/viewwindow_webengine.cpp ++++ b/src/viewwindow_webengine.cpp +@@ -63,16 +63,22 @@ ViewWindow::ViewWindow( QWidget * parent ) + m_contextMenuLink = 0; + m_storedScrollbarPosition = -1; // see header + +- // Use our network emulation layer. I don't know if we transfer the ownership when we install it, +- // so we create one per page. May be unnecessary. +- m_provider = new DataProvider_QWebEngine( this ); +- +- page()->profile()->installUrlSchemeHandler( EBook_CHM::urlScheme(), m_provider ); +- page()->profile()->installUrlSchemeHandler( EBook_EPUB::urlScheme(), m_provider ); +- + // All links are going through us + //page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks ); + ++ // This needs to be done only once ++ static bool providerInstalled = false; ++ ++ if ( !providerInstalled ) ++ { ++ // Use our network emulation layer. We do not transfer the ownership when we install it. See https://doc.qt.io/qt-5/qwebengineurlschemehandler.html ++ DataProvider_QWebEngine * provider = new DataProvider_QWebEngine( 0 ); ++ ++ QWebEngineProfile::defaultProfile()->installUrlSchemeHandler( EBook_CHM::urlScheme(), provider ); ++ QWebEngineProfile::defaultProfile()->installUrlSchemeHandler( EBook_EPUB::urlScheme(), provider ); ++ providerInstalled = true; ++ } ++ + connect( this, SIGNAL( loadFinished(bool)), this, SLOT( onLoadFinished(bool)) ); + + // Search results highlighter +diff --git a/src/viewwindow_webengine.h b/src/viewwindow_webengine.h +index 0adea31..3e96690 100644 +--- a/src/viewwindow_webengine.h ++++ b/src/viewwindow_webengine.h +@@ -128,9 +128,6 @@ class ViewWindow : public QWebEngineView + // It is set to -1 if no scrollbar position has been set and the page is not loaded yet + // It is set to 0 if no scrollbar position has been set and the page is loaded already + int m_storedScrollbarPosition; +- +- // Data provider +- DataProvider_QWebEngine * m_provider; + }; + + #endif // VIEWWINDOW_WEBENGINE_H diff --git a/app-text/kchmviewer/files/kchmviewer-8.0-underlinking.patch b/app-text/kchmviewer/files/kchmviewer-8.0-underlinking.patch new file mode 100644 index 00000000000..b4ed3b500c8 --- /dev/null +++ b/app-text/kchmviewer/files/kchmviewer-8.0-underlinking.patch @@ -0,0 +1,30 @@ +From e3b09edbbae17ad19661a7514afe5a9d84ca0ffa Mon Sep 17 00:00:00 2001 +From: George Yunaev +Date: Sun, 23 May 2021 15:03:06 -0700 +Subject: [PATCH] Adding support for old single-pass gcc linker which requires + a specific order of libraries. Thanks to @u-235 for reporting and patch. + +--- + src/src.pro | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/src.pro b/src/src.pro +index e75d6a9..14c31a1 100644 +--- a/src/src.pro ++++ b/src/src.pro +@@ -40,7 +40,6 @@ SOURCES += config.cpp \ + textencodings.cpp \ + treeitem_toc.cpp \ + treeitem_index.cpp +-LIBS += -lchm -lzip + TARGET = ../bin/kchmviewer + CONFIG += threads \ + warn_on \ +@@ -106,6 +105,7 @@ unix:!macx: { + LIBS += ../lib/libebook/libebook.a + POST_TARGETDEPS += ../lib/libebook/libebook.a + } ++LIBS += -lchm -lzip + + greaterThan(QT_MAJOR_VERSION, 4) { + # Qt 5 diff --git a/app-text/kchmviewer/kchmviewer-8.0.ebuild b/app-text/kchmviewer/kchmviewer-8.0.ebuild new file mode 100644 index 00000000000..f4e5199ee3c --- /dev/null +++ b/app-text/kchmviewer/kchmviewer-8.0.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit desktop qmake-utils xdg + +DESCRIPTION="Feature rich chm file viewer, based on Qt" +HOMEPAGE="https://www.ulduzsoft.com/kchmviewer/" +SRC_URI="https://github.com/gyunaev/${PN}/archive/refs/tags/RELEASE_${PV/./_}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/kchmviewer-RELEASE_8_0" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=" + dev-libs/chmlib + dev-libs/libzip:= + dev-qt/qtcore:5 + dev-qt/qtdbus:5 + dev-qt/qtgui:5 + dev-qt/qtnetwork:5 + dev-qt/qtprintsupport:5 + dev-qt/qtwebengine:5[widgets] + dev-qt/qtwidgets:5 + dev-qt/qtxml:5 +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${P}-underlinking.patch" + "${FILESDIR}/${P}-custom-url-scheme-registration.patch" +) + +src_configure() { + eqmake5 +} + +src_install() { + dodoc ChangeLog DBUS-bindings FAQ README + doicon packages/kchmviewer.png + dobin bin/kchmviewer + domenu packages/kchmviewer.desktop +} diff --git a/app-text/kchmviewer/metadata.xml b/app-text/kchmviewer/metadata.xml new file mode 100644 index 00000000000..18d8646795d --- /dev/null +++ b/app-text/kchmviewer/metadata.xml @@ -0,0 +1,11 @@ + + + + + kde@gentoo.org + Gentoo KDE Project + + + gyunaev/kchmviewer + +