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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4ED27158041 for ; Wed, 28 Feb 2024 11:04:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 92D49E2B70; Wed, 28 Feb 2024 11:04:12 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7B1B6E2B70 for ; Wed, 28 Feb 2024 11:04:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BF6DE335C34 for ; Wed, 28 Feb 2024 11:04:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5F1E914DF for ; Wed, 28 Feb 2024 11:04:10 +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: <1709117975.6f6e24cb601a42692074c68bc18783124cd165f9.asturm@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: kde-apps/parley/, kde-apps/parley/files/ X-VCS-Repository: proj/kde X-VCS-Files: kde-apps/parley/files/parley-24.02.0-webengine-optional.patch kde-apps/parley/parley-24.02.0.ebuild X-VCS-Directories: kde-apps/parley/ kde-apps/parley/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 6f6e24cb601a42692074c68bc18783124cd165f9 X-VCS-Branch: master Date: Wed, 28 Feb 2024 11:04:10 +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: 76159bc8-9113-487c-ad8f-eef0c80ab72e X-Archives-Hash: e64ca231ac2cd5756f6d3135efd19d4e commit: 6f6e24cb601a42692074c68bc18783124cd165f9 Author: Andreas Sturmlechner gentoo org> AuthorDate: Wed Feb 28 10:59:35 2024 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Wed Feb 28 10:59:35 2024 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=6f6e24cb kde-apps/parley: Backport BUILD_BROWSERINTEGRATION to 24.02.0 Amends c74734898455ecd487a219d0d3719f8b723889a6 See also: https://invent.kde.org/education/parley/-/merge_requests/34 Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/parley-24.02.0-webengine-optional.patch | 161 +++++++++++++++++++++ kde-apps/parley/parley-24.02.0.ebuild | 2 + 2 files changed, 163 insertions(+) diff --git a/kde-apps/parley/files/parley-24.02.0-webengine-optional.patch b/kde-apps/parley/files/parley-24.02.0-webengine-optional.patch new file mode 100644 index 0000000000..d5a839a905 --- /dev/null +++ b/kde-apps/parley/files/parley-24.02.0-webengine-optional.patch @@ -0,0 +1,161 @@ +From e45b4a51f7fd17d3ecc0cc73a014280646f810c8 Mon Sep 17 00:00:00 2001 +From: Andreas Cord-Landwehr +Date: Sun, 18 Feb 2024 09:37:10 +0100 +Subject: [PATCH] Provide option to disable browser integration + +The web browser integration is only used for a small feature in the +editor part and pulls in a very big dependency via webengine that +sometimes is not wanted. + +(cherry picked from commit 8b66372fec610b1d7470e6b2dda80fce4fc6c530) +--- + CMakeLists.txt | 6 +++++- + src/CMakeLists.txt | 22 ++++++++++++++++++---- + src/browserintegration.h.in | 4 ++++ + src/editor/editor.cpp | 5 +++++ + 4 files changed, 32 insertions(+), 5 deletions(-) + create mode 100644 src/browserintegration.h.in + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a2624488..db8c5a1d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -30,13 +30,17 @@ add_definitions(-DQT_NO_URL_CAST_FROM_STRING) + add_definitions(-DQT_NO_FOREACH) + add_definitions(-DKNEWSTUFFWIDGETS_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055A00) + ++option(BUILD_BROWSERINTEGRATION "Build integration for accessing the Internet (requires QtWebengine)" ON) ++ + find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED + Core + Svg + Concurrent + Multimedia +- WebEngineWidgets + ) ++if (BUILD_BROWSERINTEGRATION) ++ find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED WebEngineWidgets) ++endif() + + find_package(KF${QT_MAJOR_VERSION} ${KF_MIN_VERSION} MODULE REQUIRED COMPONENTS + DocTools #to produce the docbook +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index bf1e66ad..bac3ce7b 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -4,6 +4,8 @@ add_subdirectory( settings ) + # This library is used both by parley itself and the unit tests. + add_library(parley_LIB STATIC) + ++configure_file(browserintegration.h.in browserintegration.h @ONLY) ++ + target_sources(parley_LIB PRIVATE + collection/collection.cpp + collection/collection.h +@@ -43,8 +45,6 @@ target_sources(parley_LIB PRIVATE + dashboard/gradereferencewidget.h + editor/audiowidget.cpp + editor/audiowidget.h +- editor/browserwidget.cpp +- editor/browserwidget.h + editor/comparisonwidget.cpp + editor/comparisonwidget.h + editor/conjugationwidget.cpp +@@ -194,6 +194,12 @@ target_sources(parley_LIB PRIVATE + utils.cpp + utils.h + ) ++if (BUILD_BROWSERINTEGRATION) ++ target_sources(parley_LIB PRIVATE ++ editor/browserwidget.cpp ++ editor/browserwidget.h ++ ) ++endif() + + ki18n_wrap_ui(parley_LIB + collection/entryfilterdialog.ui +@@ -204,7 +210,6 @@ ki18n_wrap_ui(parley_LIB + editor/imagechooserwidget.ui + editor/audiowidget.ui + editor/synonymwidget.ui +- editor/browserwidget.ui + editor/summarywordwidget.ui + editor/latexwidget.ui + practice/practicesummarywidget.ui +@@ -228,6 +233,11 @@ ki18n_wrap_ui(parley_LIB + statistics/statisticsmainwindow.ui + dashboard/dashboard.ui + ) ++if (BUILD_BROWSERINTEGRATION) ++ ki18n_wrap_ui(parley_LIB ++ editor/browserwidget.ui ++ ) ++endif() + + kconfig_add_kcfg_files(parley_LIB + settings/prefs.kcfgc +@@ -298,8 +308,12 @@ target_link_libraries(parley_LIB + Qt${QT_MAJOR_VERSION}::Widgets + Qt${QT_MAJOR_VERSION}::Concurrent + Qt${QT_MAJOR_VERSION}::Multimedia +- Qt${QT_MAJOR_VERSION}::WebEngineWidgets + ) ++if (BUILD_BROWSERINTEGRATION) ++ target_link_libraries(parley_LIB ++ Qt${QT_MAJOR_VERSION}::WebEngineWidgets ++ ) ++endif() + + add_executable(parley + main.cpp +diff --git a/src/browserintegration.h.in b/src/browserintegration.h.in +new file mode 100644 +index 00000000..2b350055 +--- /dev/null ++++ b/src/browserintegration.h.in +@@ -0,0 +1,4 @@ ++// SPDX-License-Identifier: MIT ++// SPDX-FileCopyrightText: Andreas Cord-Landwehr ++ ++#cmakedefine BUILD_BROWSERINTEGRATION +diff --git a/src/editor/editor.cpp b/src/editor/editor.cpp +index 65d3146b..8a087c48 100644 +--- a/src/editor/editor.cpp ++++ b/src/editor/editor.cpp +@@ -7,6 +7,7 @@ + */ + + #include "editor.h" ++#include "browserintegration.h" + + #include + +@@ -24,7 +25,9 @@ + #include "wordtypeview.h" + + #include "audiowidget.h" ++#ifdef BUILD_BROWSERINTEGRATION + #include "browserwidget.h" ++#endif + #include "comparisonwidget.h" + #include "imagechooserwidget.h" + #include "inflectionwidget.h" +@@ -321,6 +324,7 @@ void EditorWindow::initDockWidgets() + m_mainWindow->tabifyDockWidget(imageDock, audioDock); + + // browser ++#ifdef BUILD_BROWSERINTEGRATION + QDockWidget *browserDock = new QDockWidget(i18n("Internet"), this); + browserDock->setObjectName(QStringLiteral("BrowserDock")); + BrowserWidget *htmlPart = new BrowserWidget(browserDock); +@@ -334,6 +338,7 @@ void EditorWindow::initDockWidgets() + browserDock->setVisible(false); + connect(m_vocabularyView, &VocabularyView::translationChanged, htmlPart, &BrowserWidget::setTranslation); + m_mainWindow->tabifyDockWidget(summaryDock, browserDock); ++#endif + + // LaTeX + QDockWidget *latexDock = new QDockWidget(i18n("LaTeX"), this); +-- +2.44.0 + diff --git a/kde-apps/parley/parley-24.02.0.ebuild b/kde-apps/parley/parley-24.02.0.ebuild index ab9cf76467..6f9537ebe1 100644 --- a/kde-apps/parley/parley-24.02.0.ebuild +++ b/kde-apps/parley/parley-24.02.0.ebuild @@ -46,6 +46,8 @@ RDEPEND="${DEPEND} >=kde-apps/kdeedu-data-${PVCUT}:* " +PATCHES=( "${FILESDIR}/${P}-webengine-optional.patch" ) + src_prepare() { ecm_src_prepare cmake_comment_add_subdirectory plugins