commit: 59986c797a9aa291f6bd5cb9371ddc4188597f59 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Thu Nov 5 14:14:32 2020 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Thu Nov 5 14:14:32 2020 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=59986c79
kde-apps/umbrello: Fix paths for Gentoo KDE_INSTALL_DOCBUNDLEDIR Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> .../umbrello-20.08.3-gentoo-docbundledir.patch | 41 +++++++ .../files/umbrello-20.08.3-no-qtwebkit.patch | 126 ++++++++++----------- kde-apps/umbrello/umbrello-9999.ebuild | 5 +- 3 files changed, 105 insertions(+), 67 deletions(-) diff --git a/kde-apps/umbrello/files/umbrello-20.08.3-gentoo-docbundledir.patch b/kde-apps/umbrello/files/umbrello-20.08.3-gentoo-docbundledir.patch new file mode 100644 index 0000000000..e3915379be --- /dev/null +++ b/kde-apps/umbrello/files/umbrello-20.08.3-gentoo-docbundledir.patch @@ -0,0 +1,41 @@ +From 29186bb3c1c3e4de89d77340db966c660789cdab Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <[email protected]> +Date: Thu, 5 Nov 2020 14:39:51 +0100 +Subject: [PATCH] Fix hardcoded docbook install paths for Gentoo + +Gentoo sets KDE_INSTALL_DOCBUNDLEDIR="${EPREFIX}/usr/share/help". + +Signed-off-by: Andreas Sturmlechner <[email protected]> +--- + umbrello/umlappprivate.cpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/umbrello/umlappprivate.cpp b/umbrello/umlappprivate.cpp +index d8bae2cfe..8c1c58a02 100644 +--- a/umbrello/umlappprivate.cpp ++++ b/umbrello/umlappprivate.cpp +@@ -36,17 +36,17 @@ QString UMLAppPrivate::findWelcomeFile() + + // from custom install + foreach(const QString &lang, langList) { +- dirList.append(QCoreApplication::applicationDirPath() + QString(QLatin1String("/../share/doc/HTML/%1/umbrello/apphelp")).arg(lang)); ++ dirList.append(QCoreApplication::applicationDirPath() + QString(QLatin1String("/../share/help/%1/umbrello/apphelp")).arg(lang)); + } +- dirList.append(QCoreApplication::applicationDirPath() + QLatin1String("/../share/doc/HTML/en/umbrello/apphelp")); ++ dirList.append(QCoreApplication::applicationDirPath() + QLatin1String("/../share/help/en/umbrello/apphelp")); + + QStringList locations = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation); + // from real installation + foreach(const QString &location, locations) { + foreach(const QString &lang, langList) { +- dirList.append(QString(QLatin1String("%1/doc/HTML/%2/umbrello/apphelp")).arg(location).arg(lang)); ++ dirList.append(QString(QLatin1String("%1/help/%2/umbrello/apphelp")).arg(location).arg(lang)); + } +- dirList.append(QString(QLatin1String("%1/doc/HTML/en/umbrello/apphelp")).arg(location)); ++ dirList.append(QString(QLatin1String("%1/help/en/umbrello/apphelp")).arg(location)); + } + #else + KLocale *local = KGlobal::locale(); +-- +2.29.2 + diff --git a/kde-apps/umbrello/files/umbrello-20.08.3-no-qtwebkit.patch b/kde-apps/umbrello/files/umbrello-20.08.3-no-qtwebkit.patch index 8f1a63675d..bf41c2d409 100644 --- a/kde-apps/umbrello/files/umbrello-20.08.3-no-qtwebkit.patch +++ b/kde-apps/umbrello/files/umbrello-20.08.3-no-qtwebkit.patch @@ -1,55 +1,43 @@ -From 0500feddb6ff02cd42624b0d3018c5292481b031 Mon Sep 17 00:00:00 2001 +From eb753a7eb0f49c6ac5b349f81387ca4b4c64342b Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner <[email protected]> Date: Mon, 12 Oct 2020 11:46:24 +0200 -Subject: [PATCH] Disable defunct WelcomePage to get rid of QtWebKit +Subject: [PATCH] Make QtWebKit usage in WelcomePage optional, with + QTextBrowser fallback + +Thanks-to: Ralf Habacker <[email protected]> for QTextBrowser fallback code. Signed-off-by: Andreas Sturmlechner <[email protected]> --- - CMakeLists.txt | 1 - - cmake/modules/ECMKDE4Macros.cmake | 2 +- - umbrello/CMakeLists.txt | 2 -- - umbrello/uml.cpp | 2 +- - umbrello/umlappprivate.h | 5 ++++- - 5 files changed, 6 insertions(+), 6 deletions(-) + CMakeLists.txt | 7 ++++++- + umbrello/CMakeLists.txt | 4 +++- + umbrello/umlappprivate.h | 13 +++++++++++++ + 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index d2d897683..ac70ffe4e 100644 +index 398415f09..7144f0990 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -89,7 +89,6 @@ find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS +@@ -95,9 +95,14 @@ find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Test Widgets Xml - WebKitWidgets ) ++find_package(Qt5WebKitWidgets ${QT_MIN_VERSION}) ++if(Qt5WebKitWidgets_FOUND) ++ add_definitions(-DWEBKIT_WELCOMEPAGE) ++ set(WEBKIT_WELCOMEPAGE 1) ++endif() ++ # search packages used by KDE -diff --git a/cmake/modules/ECMKDE4Macros.cmake b/cmake/modules/ECMKDE4Macros.cmake -index 3de472295..28eb1c180 100644 ---- a/cmake/modules/ECMKDE4Macros.cmake -+++ b/cmake/modules/ECMKDE4Macros.cmake -@@ -106,7 +106,7 @@ macro(find_package package) - #message("-- ${ARGV} --") - if("${package}" MATCHES "^(Qt5)") - #message("-- replaced by finding Qt4 --") -- _find_package(Qt4 4.4.3 REQUIRED QtCore QtGui QtXml QtTest QtWebKit) -+ _find_package(Qt4 4.4.3 REQUIRED QtCore QtGui QtXml QtTest) - elseif("${package}" MATCHES "^(KF5)$") - #message("-- replaced by finding KDE4 --") - _find_package(KDE4 REQUIRED) + find_package(KF5 REQUIRED COMPONENTS + Archive diff --git a/umbrello/CMakeLists.txt b/umbrello/CMakeLists.txt -index 264b25fde..22480642d 100644 +index 264b25fde..f3286ae46 100644 --- a/umbrello/CMakeLists.txt +++ b/umbrello/CMakeLists.txt -@@ -525,7 +525,6 @@ if(NOT BUILD_KF5) - Qt4::QtCore - Qt4::QtGui - Qt4::QtXml -- Qt4::QtWebKit - ${LIBXML2_LIBRARIES} - ${LIBXSLT_LIBRARIES} - ${KDE4_KTEXTEDITOR_LIBS} -@@ -549,7 +548,6 @@ else() +@@ -549,7 +551,6 @@ else() Qt5::Xml Qt5::PrintSupport Qt5::Svg @@ -57,49 +45,55 @@ index 264b25fde..22480642d 100644 KF5::Archive KF5::Completion KF5::CoreAddons -diff --git a/umbrello/uml.cpp b/umbrello/uml.cpp -index 1e0be0c5a..98ce70aef 100644 ---- a/umbrello/uml.cpp -+++ b/umbrello/uml.cpp -@@ -996,7 +996,7 @@ void UMLApp::initView() - m_d->createObjectsWindow(); - #endif - m_d->createStereotypesWindow(); -- m_d->createWelcomeWindow(); -+// m_d->createWelcomeWindow(); - - m_debugDock = new QDockWidget(i18n("&Debug"), this); - m_debugDock->setObjectName(QLatin1String("DebugDock")); +@@ -565,6 +566,9 @@ else() + ${LIBXML2_LIBRARIES} + codeimport + ) ++ if(WEBKIT_WELCOMEPAGE) ++ target_link_libraries(libumbrello Qt5::WebKitWidgets) ++ endif() + ecm_add_app_icon(umbrello_SRCS + ICONS + ${CMAKE_CURRENT_SOURCE_DIR}/pics/global/16-apps-umbrello.png diff --git a/umbrello/umlappprivate.h b/umbrello/umlappprivate.h -index a85de1f22..b9d50a5c1 100644 +index a85de1f22..a7212cc8d 100644 --- a/umbrello/umlappprivate.h +++ b/umbrello/umlappprivate.h -@@ -42,7 +42,7 @@ +@@ -42,7 +42,11 @@ #include <QFileInfo> #include <QListWidget> #include <QObject> --#include <QWebView> -+// #include <QWebView> ++#ifdef WEBKIT_WELCOMEPAGE + #include <QWebView> ++#else ++#include <QTextBrowser> ++#endif class QWidget; -@@ -151,6 +151,8 @@ public slots: - - void createWelcomeWindow() - { -+ return; -+/* - QString file = findWelcomeFile(); - if (file.isEmpty()) - return; -@@ -171,6 +173,7 @@ public slots: +@@ -160,6 +164,7 @@ public slots: + // qDebug() << html; + welcomeWindow = new QDockWidget(i18n("Welcome"), parent); + welcomeWindow->setObjectName(QLatin1String("WelcomeDock")); ++#ifdef WEBKIT_WELCOMEPAGE + QWebView *view = new QWebView; + view->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); + view->setContextMenuPolicy(Qt::NoContextMenu); +@@ -167,6 +172,14 @@ public slots: + view->setHtml(html); + view->show(); + welcomeWindow->setWidget(view); ++#else ++ QTextBrowser *tb = new QTextBrowser(dynamic_cast<QWidget*>(this)); ++ tb->setOpenExternalLinks(true); ++ tb->setOpenLinks(false); ++ tb->setHtml(html); ++ connect(tb, SIGNAL(anchorClicked(const QUrl)), this, SLOT(slotWelcomeWindowLinkClicked(const QUrl))); ++ welcomeWindow->setWidget(tb); ++#endif + parent->addDockWidget(Qt::RightDockWidgetArea, welcomeWindow); viewWelcomeWindow = parent->actionCollection()->add<KToggleAction>(QLatin1String("view_show_welcome")); - connect(viewWelcomeWindow, SIGNAL(triggered(bool)), welcomeWindow, SLOT(setVisible(bool))); -+*/ - } - - void slotWelcomeWindowLinkClicked(const QUrl &url) -- -2.28.0 +2.29.2 diff --git a/kde-apps/umbrello/umbrello-9999.ebuild b/kde-apps/umbrello/umbrello-9999.ebuild index f525d40125..1a532daeed 100644 --- a/kde-apps/umbrello/umbrello-9999.ebuild +++ b/kde-apps/umbrello/umbrello-9999.ebuild @@ -51,7 +51,10 @@ RDEPEND=" " DEPEND="${RDEPEND}" -PATCHES=( "${FILESDIR}"/${PN}-20.08.3-no-qtwebkit.patch ) +PATCHES=( + "${FILESDIR}"/${PN}-20.08.3-no-qtwebkit.patch + "${FILESDIR}"/${PN}-20.08.3-gentoo-docbundledir.patch # fix hardcoded path +) src_configure() { local mycmakeargs=(
