public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-text/kchmviewer/files/, app-text/kchmviewer/
@ 2016-10-09 16:44 Michael Palimaka
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Palimaka @ 2016-10-09 16:44 UTC (permalink / raw
  To: gentoo-commits

commit:     bc4214b01b5728521b0e0357e5284b696ab7eb4e
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  9 16:44:26 2016 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Sun Oct  9 16:44:46 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc4214b0

app-text/kchmviewer: version bump

Package-Manager: portage-2.3.1

 app-text/kchmviewer/Manifest                       |  1 +
 .../files/kchmviewer-7.7-force-qtwebkit.patch      | 26 +++++++++
 .../files/kchmviewer-7.7-underlinking.patch        | 11 ++++
 app-text/kchmviewer/kchmviewer-7.7.ebuild          | 65 ++++++++++++++++++++++
 4 files changed, 103 insertions(+)

diff --git a/app-text/kchmviewer/Manifest b/app-text/kchmviewer/Manifest
index 821d5af..89dab6a 100644
--- a/app-text/kchmviewer/Manifest
+++ b/app-text/kchmviewer/Manifest
@@ -1 +1,2 @@
 DIST kchmviewer-7.5.tar.gz 342487 SHA256 c81f8fb7ac1fe8a5284e03b0d91def61cbd5638f2276c5de8046251755352e53 SHA512 4e867766d60788f11cddc7373b82f7930fb9e5efbef4231fbb386ed2651297d9ab2f893770142c6445c18bf0df3ad2b47b8a0428bb3baa37465d9091e2e15f9a WHIRLPOOL a12e2c63b0cb3aa03d60f463da7d98500fa7021335d721fc26aeec53bee0d2d4af2ce5e6495e2d4b6a0bb5b25734b9a46f255482f0e065d3e26afbeb09bf3c67
+DIST kchmviewer-7.7.tar.gz 345952 SHA256 27cbac45c786b1718550a87e6f86010e161302b426c6396ff2a3091b913b17dd SHA512 e217db388f99142114e4de6735916d46c9d89f144390b58dffd739ed7246048c23af75c2eb9effba3e942a21564f9205265155a93a21d6343bea83a26fd99070 WHIRLPOOL 94230893add520861605edc09979f98774cc553f95b30364860afb130e5a77cbafa487fa5623d7d063bbec350a3b5d845ecd54072556128fc9c7a7d1d24dfa46

diff --git a/app-text/kchmviewer/files/kchmviewer-7.7-force-qtwebkit.patch b/app-text/kchmviewer/files/kchmviewer-7.7-force-qtwebkit.patch
new file mode 100644
index 00000000..897c62a
--- /dev/null
+++ b/app-text/kchmviewer/files/kchmviewer-7.7-force-qtwebkit.patch
@@ -0,0 +1,26 @@
+Gentoo still ships QtWebKit in 5.6 and later, so don't try and fail to use QtWebEngine.
+
+--- a/src/src.pro
++++ b/src/src.pro
+@@ -113,21 +113,11 @@
+ }
+ 
+ greaterThan(QT_MAJOR_VERSION, 4) {
+-    # Qt 5
+-    greaterThan(QT_MINOR_VERSION, 5) {
+-        # Qt 5.6+
+-        error("You use Qt5.6+ - QWebEngine is not yet suitable for kchmviewer and is not supported")
+-        QT += webengine webenginewidgets
+-        DEFINES += USE_WEBENGINE
+-        SOURCES += viewwindow_webengine.cpp dataprovider_qwebengine.cpp
+-        HEADERS += dataprovider_qwebengine.h viewwindow_webengine.h
+-    } else {
+         # Qt 5.0-5.5
+         QT += webkit webkitwidgets
+         DEFINES += USE_WEBKIT
+         SOURCES += viewwindow_webkit.cpp dataprovider_qwebkit.cpp
+         HEADERS += dataprovider_qwebkit.h viewwindow_webkit.h
+-    }
+ } else {
+     message("Qt4 is not supported anymore, please do not report any errors")
+     QT += webkit webkitwidgets

diff --git a/app-text/kchmviewer/files/kchmviewer-7.7-underlinking.patch b/app-text/kchmviewer/files/kchmviewer-7.7-underlinking.patch
new file mode 100644
index 00000000..75bfed8
--- /dev/null
+++ b/app-text/kchmviewer/files/kchmviewer-7.7-underlinking.patch
@@ -0,0 +1,11 @@
+--- a/src/src.pro
++++ b/src/src.pro
+@@ -108,7 +108,7 @@
+     HEADERS += dbus_interface.h
+     SOURCES += dbus_interface.cpp
+     CONFIG += dbus
+-    LIBS += ../lib/libebook/libebook.a
++    LIBS += ../lib/libebook/libebook.a -lchm -lzip
+     POST_TARGETDEPS += ../lib/libebook/libebook.a
+ }
+ 

diff --git a/app-text/kchmviewer/kchmviewer-7.7.ebuild b/app-text/kchmviewer/kchmviewer-7.7.ebuild
new file mode 100644
index 00000000..cdcd179
--- /dev/null
+++ b/app-text/kchmviewer/kchmviewer-7.7.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit fdo-mime qmake-utils
+
+DESCRIPTION="Feature rich chm file viewer, based on Qt"
+HOMEPAGE="http://www.kchmviewer.net/"
+SRC_URI="mirror://sourceforge/kchmviewer/${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+	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/qtwebkit:5
+	dev-qt/qtwidgets:5
+	dev-qt/qtxml:5
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/${P}-force-qtwebkit.patch"
+	"${FILESDIR}/${P}-underlinking.patch"
+)
+
+src_prepare() {
+	# bug #579430
+	sed -i \
+		-e "s:zip:zip;:g" \
+		packages/kchmviewer.desktop || die "Failed to fix desktop file"
+
+	default
+}
+
+src_configure() {
+	eqmake5
+}
+
+src_install() {
+	dodoc ChangeLog DBUS-bindings FAQ README
+	doicon packages/kchmviewer.png
+
+	dobin bin/kchmviewer
+	domenu packages/kchmviewer.desktop
+
+}
+
+pkg_postinst() {
+	fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+	fdo-mime_desktop_database_update
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/kchmviewer/files/, app-text/kchmviewer/
@ 2021-08-03 14:38 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2021-08-03 14:38 UTC (permalink / raw
  To: gentoo-commits

commit:     13809b3b69e4124527001c959612bf5de18a56c3
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  3 14:32:46 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> 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 <voron1 <AT> gmail.com>
Closes: https://bugs.gentoo.org/806214
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> 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 <gyunaev@ulduzsoft.com>
+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 <gyunaev@ulduzsoft.com>
+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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>kde@gentoo.org</email>
+		<name>Gentoo KDE Project</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">gyunaev/kchmviewer</remote-id>
+	</upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/kchmviewer/files/, app-text/kchmviewer/
@ 2021-08-04  6:06 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2021-08-04  6:06 UTC (permalink / raw
  To: gentoo-commits

commit:     2ebc4fb1e7d27618d54ff670eb102aba77860109
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  4 06:05:14 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Aug  4 06:05:14 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ebc4fb1

app-text/kchmviewer: Fix wrong upstream deps

Upstream commit a4a3984465cb635822953350c571950ae726b539

Closes: https://bugs.gentoo.org/806316
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/kchmviewer-8.0-no-qtwebkit.patch         | 28 ++++++++++++++++++++++
 app-text/kchmviewer/kchmviewer-8.0.ebuild          |  1 +
 2 files changed, 29 insertions(+)

diff --git a/app-text/kchmviewer/files/kchmviewer-8.0-no-qtwebkit.patch b/app-text/kchmviewer/files/kchmviewer-8.0-no-qtwebkit.patch
new file mode 100644
index 00000000000..18360c89782
--- /dev/null
+++ b/app-text/kchmviewer/files/kchmviewer-8.0-no-qtwebkit.patch
@@ -0,0 +1,28 @@
+From a4a3984465cb635822953350c571950ae726b539 Mon Sep 17 00:00:00 2001
+From: George Yunaev <gyunaev@ulduzsoft.com>
+Date: Sun, 23 May 2021 15:01:24 -0700
+Subject: [PATCH] Only add Webkit stuff to QT if we're compiling under 5.6.
+ Thanks to @u-235 for reporting.
+
+---
+ src/src.pro | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/src/src.pro b/src/src.pro
+index f502259..e75d6a9 100644
+--- a/src/src.pro
++++ b/src/src.pro
+@@ -60,12 +60,7 @@ FORMS += tab_bookmarks.ui \
+     toolbareditor.ui
+ RESOURCES += resources/images.qrc
+ 
+-QT += webkit \
+-	xml \
+-    network \
+-    widgets \
+-    webkitwidgets \
+-    printsupport
++QT += xml network widgets printsupport
+ 
+ linux-g++*:{
+     LIBS += -lX11

diff --git a/app-text/kchmviewer/kchmviewer-8.0.ebuild b/app-text/kchmviewer/kchmviewer-8.0.ebuild
index f4e5199ee3c..18bf404abb9 100644
--- a/app-text/kchmviewer/kchmviewer-8.0.ebuild
+++ b/app-text/kchmviewer/kchmviewer-8.0.ebuild
@@ -32,6 +32,7 @@ RDEPEND="${DEPEND}"
 PATCHES=(
 	"${FILESDIR}/${P}-underlinking.patch"
 	"${FILESDIR}/${P}-custom-url-scheme-registration.patch"
+	"${FILESDIR}/${P}-no-qtwebkit.patch"
 )
 
 src_configure() {


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-04  6:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-03 14:38 [gentoo-commits] repo/gentoo:master commit in: app-text/kchmviewer/files/, app-text/kchmviewer/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2021-08-04  6:06 Andreas Sturmlechner
2016-10-09 16:44 Michael Palimaka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox