summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-12-30 00:25:10 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2018-12-30 00:52:37 +0100
commit18930bc543d1582937aab1b70294d7721595ea66 (patch)
treea199b32f66211e8f65477c90f11a558834bc35df /sci-geosciences
parentsci-geosciences/merkaartor: Fix desktop file for Wayland (diff)
downloadgentoo-18930bc543d1582937aab1b70294d7721595ea66.tar.gz
gentoo-18930bc543d1582937aab1b70294d7721595ea66.tar.bz2
gentoo-18930bc543d1582937aab1b70294d7721595ea66.zip
sci-geosciences/merkaartor: Patch for USE webengine; drop Qt5WebKit
Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'sci-geosciences')
-rw-r--r--sci-geosciences/merkaartor/files/merkaartor-0.18.3-webengine1.patch186
-rw-r--r--sci-geosciences/merkaartor/files/merkaartor-0.18.3-webengine2.patch35
-rw-r--r--sci-geosciences/merkaartor/files/merkaartor-0.18.3-webengine3.patch135
-rw-r--r--sci-geosciences/merkaartor/merkaartor-0.18.3-r4.ebuild6
4 files changed, 360 insertions, 2 deletions
diff --git a/sci-geosciences/merkaartor/files/merkaartor-0.18.3-webengine1.patch b/sci-geosciences/merkaartor/files/merkaartor-0.18.3-webengine1.patch
new file mode 100644
index 00000000000..5f4f605ce5b
--- /dev/null
+++ b/sci-geosciences/merkaartor/files/merkaartor-0.18.3-webengine1.patch
@@ -0,0 +1,186 @@
+From df515ecf4e6ce1a249af299840e82126c68fcf91 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ladislav=20L=C3=A1ska?= <krakonos@krakonos.org>
+Date: Mon, 26 Sep 2016 13:02:57 +0200
+Subject: [PATCH] Updated QWeb to QWebView.
+
+---
+ src/Layers/LicenseDisplayDialog.ui | 6 +++---
+ src/QMapControl/browserimagemanager.cpp | 20 +++++++++-----------
+ src/QMapControl/browserimagemanager.h | 17 ++++++-----------
+ src/src.pro | 2 +-
+ 4 files changed, 19 insertions(+), 26 deletions(-)
+
+diff --git a/src/Layers/LicenseDisplayDialog.ui b/src/Layers/LicenseDisplayDialog.ui
+index 103816c6..3dabd130 100755
+--- a/src/Layers/LicenseDisplayDialog.ui
++++ b/src/Layers/LicenseDisplayDialog.ui
+@@ -15,7 +15,7 @@
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+- <widget class="QWebView" name="webView">
++ <widget class="QWebEngineView" name="webView">
+ <property name="url">
+ <url>
+ <string>about:blank</string>
+@@ -41,9 +41,9 @@
+ </widget>
+ <customwidgets>
+ <customwidget>
+- <class>QWebView</class>
++ <class>QWebEngineView</class>
+ <extends>QWidget</extends>
+- <header>QtWebKit/QWebView</header>
++ <header>QWebEngineView</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+diff --git a/src/QMapControl/browserimagemanager.cpp b/src/QMapControl/browserimagemanager.cpp
+index 468cf2b6..4021d40f 100644
+--- a/src/QMapControl/browserimagemanager.cpp
++++ b/src/QMapControl/browserimagemanager.cpp
+@@ -47,9 +47,8 @@ void BrowserWebPage::javaScriptConsoleMessage ( const QString & message, int lin
+ //printf("%s\n", s);
+ }
+
+-void BrowserWebPage::javaScriptAlert ( QWebFrame * frame, const QString & msg )
++void BrowserWebPage::javaScriptAlert ( const QString & msg )
+ {
+- Q_UNUSED(frame)
+ //QMessageBox::information(NULL, tr("Javascript alert"), msg);
+
+ if (msg.startsWith("Coord")) {
+@@ -105,8 +104,10 @@ void BrowserWebPage::javaScriptAlert ( QWebFrame * frame, const QString & msg )
+
+ void BrowserWebPage::launchRequest ( const QUrl & url )
+ {
++ qDebug() << "Warning: you are using BrowserWebPage to render background imagery. "<<
++ "This code is not tested and may not work as expected. If you experience issues, please let us know.";
+ sw = sh = 0;
+- mainFrame()->load(url);
++ load(url);
+ }
+
+ BrowserImageManager* BrowserImageManager::m_BrowserImageManagerInstance = 0;
+@@ -138,8 +139,6 @@ BrowserImageManager::BrowserImageManager(QObject* parent)
+ }
+
+ page = new BrowserWebPage();
+- page->setNetworkAccessManager(m_networkManager);
+- page->setViewportSize(QSize(1024, 1024));
+
+ connect(page, SIGNAL(loadFinished(bool)), this, SLOT(pageLoadFinished(bool)));
+
+@@ -220,7 +219,6 @@ void BrowserImageManager::launchRequest()
+
+ QUrl u = QUrl( R.url);
+
+- page->networkAccessManager()->setProxy(M_PREFS->getProxy(u));
+ page->launchRequest(u);
+ requestActive = true;
+ #ifndef BROWSERIMAGEMANAGER_IS_THREADED
+@@ -246,7 +244,7 @@ void BrowserImageManager::pageLoadFinished(bool ok)
+ qDebug() << "BrowserImageManager::pageLoadFinished: " << " Hash: " << R.hash;
+ QPixmap pt(page->sw, page->sh);
+ QPainter P(&pt);
+- page->mainFrame()->render(&P, QRegion(0,0,page->sw,page->sh));
++ page->view()->render(&P, QPoint(), QRegion(0,0,page->sw,page->sh));
+ P.end();
+
+ // if (page->sw != BROWSER_TILE_SIZE || page->sh != BROWSER_TILE_SIZE) {
+@@ -319,7 +317,7 @@ void BrowserImageManager::loadingQueueEmpty()
+ void BrowserImageManager::abortLoading()
+ {
+ //qDebug() << "BrowserImageManager::abortLoading";
+- page->triggerAction(QWebPage::Stop);
++ page->triggerAction(QWebEnginePage::Stop);
+ if (!loadingRequests.isEmpty()) {
+ LoadingRequest R = loadingRequests.dequeue();
+ loadingRequests.clear();
+@@ -331,7 +329,7 @@ void BrowserImageManager::abortLoading()
+ #ifdef BROWSERIMAGEMANAGER_IS_THREADED
+ void BrowserImageManager::run()
+ {
+- page = new BrowserWebPage();
++ page = new BrowserWebEnginePage();
+ page->setViewportSize(QSize(1024, 1024));
+
+ QTimer theTimer;
+@@ -354,7 +352,7 @@ void BrowserImageManager::checkRequests()
+ } else {
+ if ((requestDuration++) > 100) {
+ requestDuration = 0;
+- page->triggerAction(QWebPage::Stop);
++ page->triggerAction(QWebEnginePage::Stop);
+ qDebug() << "BrowserImageManager Timeout";
+ }
+ }
+@@ -365,7 +363,7 @@ void BrowserImageManager::checkRequests()
+ void BrowserImageManager::timeout()
+ {
+ qDebug() << "BrowserImageManager::timeout";
+- page->triggerAction(QWebPage::Stop);
++ page->triggerAction(QWebEnginePage::Stop);
+ pageLoadFinished(false);
+ }
+ #endif // BROWSERIMAGEMANAGER_IS_THREADED
+diff --git a/src/QMapControl/browserimagemanager.h b/src/QMapControl/browserimagemanager.h
+index 10f8a477..ca846e31 100644
+--- a/src/QMapControl/browserimagemanager.h
++++ b/src/QMapControl/browserimagemanager.h
+@@ -24,14 +24,10 @@
+ #include <QPixmap>
+
+ #include <QtNetwork/QtNetwork>
+-#include <QWebFrame>
+-#include "qwebhistory.h"
+-#include "qwebhistoryinterface.h"
+-#include "qwebkitglobal.h"
+-#include "qwebpage.h"
+-#include "qwebpluginfactory.h"
+-#include "qwebsettings.h"
+-#include "qwebview.h"
++#include <QWebEnginePage>
++#include <QWebEngineHistory>
++#include <QWebEngineSettings>
++#include <QWebEngineView>
+
+ #include <QThread>
+
+@@ -41,13 +37,13 @@
+ @author Chris Browet <cbro@semperpax.com>
+ */
+
+-class BrowserWebPage : public QWebPage
++class BrowserWebPage : public QWebEnginePage
+ {
+ friend class BrowserImageManager;
+
+ protected:
+ virtual void javaScriptConsoleMessage ( const QString & message, int lineNumber, const QString & sourceID );
+- virtual void javaScriptAlert ( QWebFrame * frame, const QString & msg ) ;
++ virtual void javaScriptAlert ( const QString & msg ) ;
+ void launchRequest ( const QUrl & url );
+
+ private:
+@@ -116,7 +112,6 @@ class BrowserImageManager : public QObject, public IImageManager
+ static BrowserImageManager* m_BrowserImageManagerInstance;
+
+ BrowserWebPage* page;
+- QWebFrame *frame;
+ QNetworkAccessManager* qnam;
+
+ signals:
+diff --git a/src/src.pro b/src/src.pro
+index eb93b263..137d7e14 100644
+--- a/src/src.pro
++++ b/src/src.pro
+@@ -34,7 +34,7 @@ TEMPLATE = app
+
+ CONFIG += rtti stl exceptions
+ #CONFIG -= exceptions
+-QT += svg network xml core gui webkitwidgets concurrent printsupport
++QT += svg network xml core gui webenginewidgets concurrent printsupport
+ win32-msvc* {
+ LIBS += -lzlib
+ } else {
diff --git a/sci-geosciences/merkaartor/files/merkaartor-0.18.3-webengine2.patch b/sci-geosciences/merkaartor/files/merkaartor-0.18.3-webengine2.patch
new file mode 100644
index 00000000000..48c4af7b9c5
--- /dev/null
+++ b/sci-geosciences/merkaartor/files/merkaartor-0.18.3-webengine2.patch
@@ -0,0 +1,35 @@
+From 20edcc7e85413e60ff180bd9f20e5428e5729222 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ladislav=20L=C3=A1ska?= <krakonos@krakonos.org>
+Date: Mon, 26 Sep 2016 13:11:33 +0200
+Subject: [PATCH] Replaced missing QT += webkit, updated linux package list.
+
+---
+ ci/travis-linux-install.sh | 3 +--
+ src/QMapControl.pri | 2 +-
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/ci/travis-linux-install.sh b/ci/travis-linux-install.sh
+index 79975d27..4e83c9bb 100755
+--- a/ci/travis-linux-install.sh
++++ b/ci/travis-linux-install.sh
+@@ -8,6 +8,5 @@ sudo apt-add-repository -y ppa:ubuntu-sdk-team/ppa
+ sudo apt-get update -qq
+ sudo apt-cache search qt
+ sudo apt-get -qq install gdb libgdal-dev libproj-dev
+-sudo apt-get -qq install libqt4-xml libqt4-network libqt4-gui libqt4-svg libqt4-webkit libqt4-dev qt4-qmake
+-sudo apt-get -qq install libqt5xml5* libqt5network5* libqt5gui5* libqt5svg5* libqt5webkit5* libqt5quick5* qtdeclarative5-dev qttools5-dev qtbase5-dev qt5-qmake qtchooser
++sudo apt-get -qq install libqt5xml5* libqt5network5* libqt5gui5* libqt5svg5* libqt5webengine5{,-dev} libqt5quick5* qtdeclarative5-dev qttools5-dev qtbase5-dev qt5-qmake qtchooser
+ qtchooser -list-versions
+diff --git a/src/QMapControl.pri b/src/QMapControl.pri
+index bbfc09b5..92769565 100644
+--- a/src/QMapControl.pri
++++ b/src/QMapControl.pri
+@@ -26,7 +26,7 @@ QT += network
+ DEFINES += USE_WEBKIT
+ SOURCES += browserimagemanager.cpp
+ HEADERS += browserimagemanager.h
+- QT += webkit
++ QT += webenginewidgets
+ contains(THREADED_BROWSERIMAGEMANAGER,1): DEFINES += BROWSERIMAGEMANAGER_IS_THREADED
+ }
+ }
diff --git a/sci-geosciences/merkaartor/files/merkaartor-0.18.3-webengine3.patch b/sci-geosciences/merkaartor/files/merkaartor-0.18.3-webengine3.patch
new file mode 100644
index 00000000000..97d76a18764
--- /dev/null
+++ b/sci-geosciences/merkaartor/files/merkaartor-0.18.3-webengine3.patch
@@ -0,0 +1,135 @@
+From 3019f1d2c76a0ae0c51e70d34bc25a49cb030845 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ladislav=20L=C3=A1ska?= <krakonos@krakonos.org>
+Date: Wed, 28 Sep 2016 21:41:02 +0200
+Subject: [PATCH] Removed webengine from LicenseDisplayDialog and renamed
+ conditional.
+
+This removes the QWebEngine dependency for most build configurations.
+None of the code actually uses it, but there are some plugins that do.
+I expect they are all obsolete, but will keep it in until they are
+replaced/deemed not working.
+---
+ COMPILE.md | 2 +-
+ src/Layers/ImageMapLayer.cpp | 2 +-
+ src/Layers/LicenseDisplayDialog.ui | 29 +++++++++++++++--------------
+ src/QMapControl.pri | 14 ++++++--------
+ src/src.pro | 2 +-
+ 5 files changed, 24 insertions(+), 25 deletions(-)
+
+diff --git a/COMPILE.md b/COMPILE.md
+index 9324019d..108a2eee 100644
+--- a/COMPILE.md
++++ b/COMPILE.md
+@@ -151,7 +151,7 @@ There are some parameters you can pass to qmake to customize build:
+ | TRANSDIR_MERKAARTOR=<path> | where will the Merkaartor translations be installed |
+ | TRANSDIR_SYSTEM=<path> | where your global Qt translation directory is |
+ | NODEBUG=1 | release target |
+-| NOUSEWEBKIT | disable use of WebKit (Yahoo adapter) |
++| USEWEBENGINE=1 | enable use of WebEngine (required for some external plugins) |
+ | SYSTEM_QTSA | use system copy of qtsingleapplication instead of internal |
+
+
+diff --git a/src/Layers/ImageMapLayer.cpp b/src/Layers/ImageMapLayer.cpp
+index 31966b09..b46199b9 100644
+--- a/src/Layers/ImageMapLayer.cpp
++++ b/src/Layers/ImageMapLayer.cpp
+@@ -263,7 +263,7 @@ void ImageMapLayer::setMapAdapter(const QUuid& theAdapterUid, const QString& ser
+ QDialog dlg;
+ ui.setupUi(&dlg);
+ dlg.setWindowTitle(tr("Licensing Terms: %1").arg(name()));
+- ui.webView->load(u);
++ ui.urlLabel->setText(QString("<a href='%1'>%2</a>").arg(u.toString()).arg(u.toString()));
+
+ bool OK = false;
+ while (!OK) {
+diff --git a/src/Layers/LicenseDisplayDialog.ui b/src/Layers/LicenseDisplayDialog.ui
+index 3dabd130..dd748e41 100755
+--- a/src/Layers/LicenseDisplayDialog.ui
++++ b/src/Layers/LicenseDisplayDialog.ui
+@@ -6,8 +6,8 @@
+ <rect>
+ <x>0</x>
+ <y>0</y>
+- <width>650</width>
+- <height>400</height>
++ <width>786</width>
++ <height>171</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+@@ -15,11 +15,19 @@
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+- <widget class="QWebEngineView" name="webView">
+- <property name="url">
+- <url>
+- <string>about:blank</string>
+- </url>
++ <widget class="QLabel" name="label">
++ <property name="text">
++ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The content selected is shared under a non-standard license agreement. The full text is available on the following URL. It is your reponsibility to read, understand and agree to the license.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
++ </property>
++ <property name="wordWrap">
++ <bool>true</bool>
++ </property>
++ </widget>
++ </item>
++ <item>
++ <widget class="QLabel" name="urlLabel">
++ <property name="text">
++ <string>TextLabel</string>
+ </property>
+ </widget>
+ </item>
+@@ -39,13 +47,6 @@
+ </item>
+ </layout>
+ </widget>
+- <customwidgets>
+- <customwidget>
+- <class>QWebEngineView</class>
+- <extends>QWidget</extends>
+- <header>QWebEngineView</header>
+- </customwidget>
+- </customwidgets>
+ <resources/>
+ <connections>
+ <connection>
+diff --git a/src/QMapControl.pri b/src/QMapControl.pri
+index 92769565..3491c8b1 100644
+--- a/src/QMapControl.pri
++++ b/src/QMapControl.pri
+@@ -21,13 +21,11 @@ SOURCES += \
+
+ QT += network
+
+-!contains(NOUSEWEBKIT,1) {
+- greaterThan(QT_VER_MAJ, 3) : greaterThan(QT_VER_MIN, 3) {
+- DEFINES += USE_WEBKIT
+- SOURCES += browserimagemanager.cpp
+- HEADERS += browserimagemanager.h
+- QT += webenginewidgets
+- contains(THREADED_BROWSERIMAGEMANAGER,1): DEFINES += BROWSERIMAGEMANAGER_IS_THREADED
+- }
++contains(USEWEBENGINE,1) {
++ DEFINES += USE_WEBKIT
++ SOURCES += browserimagemanager.cpp
++ HEADERS += browserimagemanager.h
++ QT += webenginewidgets
++ contains(THREADED_BROWSERIMAGEMANAGER,1): DEFINES += BROWSERIMAGEMANAGER_IS_THREADED
+ }
+
+diff --git a/src/src.pro b/src/src.pro
+index 137d7e14..81a65f34 100644
+--- a/src/src.pro
++++ b/src/src.pro
+@@ -34,7 +34,7 @@ TEMPLATE = app
+
+ CONFIG += rtti stl exceptions
+ #CONFIG -= exceptions
+-QT += svg network xml core gui webenginewidgets concurrent printsupport
++QT += svg network xml core gui concurrent printsupport
+ win32-msvc* {
+ LIBS += -lzlib
+ } else {
diff --git a/sci-geosciences/merkaartor/merkaartor-0.18.3-r4.ebuild b/sci-geosciences/merkaartor/merkaartor-0.18.3-r4.ebuild
index c4f7ac66d49..ef8f4c26acf 100644
--- a/sci-geosciences/merkaartor/merkaartor-0.18.3-r4.ebuild
+++ b/sci-geosciences/merkaartor/merkaartor-0.18.3-r4.ebuild
@@ -14,7 +14,7 @@ SRC_URI="https://github.com/openstreetmap/${PN}/archive/${PV}.tar.gz -> ${P}.tar
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="debug exif gps libproxy"
+IUSE="debug exif gps libproxy webengine"
RDEPEND="
dev-qt/qtconcurrent:5
@@ -23,7 +23,6 @@ RDEPEND="
dev-qt/qtprintsupport:5
dev-qt/qtsingleapplication[X,qt5(+)]
dev-qt/qtsvg:5
- dev-qt/qtwebkit:5
dev-qt/qtwidgets:5
dev-qt/qtxml:5
sci-libs/gdal
@@ -32,6 +31,7 @@ RDEPEND="
exif? ( media-gfx/exiv2:= )
gps? ( >=sci-geosciences/gpsd-3.17-r2 )
libproxy? ( net-libs/libproxy )
+ webengine? ( dev-qt/qtwebengine:5 )
"
DEPEND="${RDEPEND}
dev-qt/linguist-tools:5
@@ -40,6 +40,7 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}"/${P}-sharedir-pluginsdir.patch # bug 621826
"${FILESDIR}"/${P}-desktopfile.patch
+ "${FILESDIR}"/${P}-webengine{1,2,3}.patch
)
DOCS=( AUTHORS CHANGELOG )
@@ -78,6 +79,7 @@ src_configure() {
GEOIMAGE=$(usex exif 1 0) \
GPSDLIB=$(usex gps 1 0) \
LIBPROXY=$(usex libproxy 1 0) \
+ USEWEBENGINE=$(usex webengine 1 0) \
ZBAR=0 \
Merkaartor.pro
}