From 7218e1b46bceac05841e90472501742d905fb3fc Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 12 Mar 2021 21:55:15 +0000 Subject: gentoo resync : 12.03.2021 --- dev-qt/qtwebengine/Manifest | 3 +- ...-5.15.2_p20210224-fix-crash-w-app-locales.patch | 135 +++++++++++++++++++++ .../qtwebengine-5.15.2_p20210224.ebuild | 6 +- 3 files changed, 141 insertions(+), 3 deletions(-) create mode 100644 dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-fix-crash-w-app-locales.patch (limited to 'dev-qt/qtwebengine') diff --git a/dev-qt/qtwebengine/Manifest b/dev-qt/qtwebengine/Manifest index 6d6da2ebf865..c3defc28a0c5 100644 --- a/dev-qt/qtwebengine/Manifest +++ b/dev-qt/qtwebengine/Manifest @@ -3,9 +3,10 @@ AUX qtwebengine-5.15.2-icu-68-v8-runtime-fix.patch 6264 BLAKE2B 18a5bc35ddf7fc12 AUX qtwebengine-5.15.2-icu-68.patch 15373 BLAKE2B 3b7ef4b096f8a593e711c74c64a0a770c0a2bd0fc3af0a2bc4b28fd9999358b06affce062ececf0b0c6f5092a4f6cb243ecc3decd00eb3f69292ad6393bf1bca SHA512 159c1553702b505a1e59ff18b3ac0340c7e0534a98b45ef2a70ab645d10bbb569c47bccb9d5a58d0f413b86abf29f9706af0ff5800029617a0575d6a759edbc3 AUX qtwebengine-5.15.2_p20210224-chromium-87-v8-icu68.patch 7361 BLAKE2B 0a5ab9077982df3afea7d156e0dbaf11384d7b9ab6ea70ef4dc0b82f1690e455144318734cb50b7bf2349a95b99325e67bbfcbdf5c88f55f3ecc65c7e593c468 SHA512 585dab11bf6cf811b657831292d5b6b90dd01d9e4c1fa4b6a446d0eb66f436c46a6fcd4851e9c6b6b0bda8a41cbea57fe74ca5ecca4e40cb35f85d7c2f5265e7 AUX qtwebengine-5.15.2_p20210224-disable-git.patch 501 BLAKE2B a295e5061830da6bfaf0c0ae6db832c86f797fa2426ec29e244133e862c0998a03373c11a2a31944bc09e0a20bf30c0a0a91eb06b1f8a9fdcdd9762f5ba7c542 SHA512 b795328058be945e7a323ea50f01cd5c11b130bc1204c8274fec920e04cce1643d8f9313e975f451dbb7dfecd6214f9ff9ea0aec87ad29237b6e9bb1b4114c5f +AUX qtwebengine-5.15.2_p20210224-fix-crash-w-app-locales.patch 5278 BLAKE2B 3dce18cb5af9f0b0209e1a37c8ad149882feee324d5c061ab2523f8cc6d17f6adbbdac9a54210764fd3bc244b06d2061deb62edd5048b6f3ef927326c8018b8e SHA512 d0350befaa76ca83742fec69c0f6efd6b601a5775963b39f1d69602515bd2a4aeb4447239d0ee2658d281cf9e9098f8e52cf582ce51e95c7a300fbc418f46466 DIST qtwebengine-5.15.2-ppc64.tar.xz 43868 BLAKE2B 97a2db64c688cc3ce178a6f00c29d3408221302c992bf0df31edd5c11f7cd978b92d9222201644991fca4fc0824b19d994a71c472732dbbdda3729bdd04a67f3 SHA512 835e7da4670cd823a1674052d64971bfd98d54edb6c5df8e9d09aa8103d496a4c16f0eb9d47c46db466e1c640e3326d4e43b284161129d648bfe693a902ec9cc DIST qtwebengine-5.15.2_p20210224.tar.xz 320052028 BLAKE2B a1ebaae7cf114041576f4920de1e484bea70c715a470e83e7c47bd8ff95480fc4e408bba173990480732bd464a9eb07d304f4afdb90d943c0a8cbe1e8299df84 SHA512 939292511703f3a6d758d38f1c860ffacd003be65761b19f23e8817bf1121cb9e6351216f737126d8defb1c97ca877e1c6f352e7cfee8e9289274d0793348b51 DIST qtwebengine-everywhere-src-5.15.2.tar.xz 280142544 BLAKE2B cf84a07292e69b5746d6575d65295b5bf4e054d448361f26e63cbe20ddd0773f60893e656d74b3b8c191e2829e09398a65896c8d96d3a7ef210ac1f21cd90e63 SHA512 de64c30819f5e2f8620c853ff22b2f9717641477aef4432a552a72d1d67ed62ed61572afee6de3f2c9f32dee28f4f786ffd63fc465aa42c0ae1e87ea28341756 EBUILD qtwebengine-5.15.2.ebuild 5272 BLAKE2B c5ffd7075103bb6daaeaee53e7abe77a4ff1d941c1705db68c1da2df4fbd659d0afa00f9a63376d9b29a2df180263470a90d73c05d39e472f6d327e1689808d7 SHA512 15d27511929ad0877a047c02491913a33de9d80ef4ee5e1cd92f33259b853c4e8cc360dacfca7ce980f64e3a3f1685371334331f6dbb62bd2d19b64399148b15 -EBUILD qtwebengine-5.15.2_p20210224.ebuild 5793 BLAKE2B f59aec351b41008545ea6e8b54f878020474965bb872fc4b13d780d38f2485d47c5698a5e3d1a92b59bc5232a74c410daba35983fdb3716f1a39410a92582f2e SHA512 996f864b9ee05c35f5988a677731ebaf2e8892ac7a6d0aa559daf93f534c76cea5763439c83b6bcfe772629dc7fcc4985b28d4c35888fe33da94df4480baf74b +EBUILD qtwebengine-5.15.2_p20210224.ebuild 5907 BLAKE2B 950687e17a007172a9248295e8468d728a7047cc89acf405e65da39b4be274b085239c86a89635baf497968ae93034acd2b8c6b0ab2ce0eab19fc22c2d51d351 SHA512 b96bbc6fd9c3c5529a6d9d99a97ab09d02794ee3a1e2dc8c21d5c08c3fe4d7c588ce527483d251ca878bb0c6a1230bdb00a5b12434b2ef09e528f3dc136d7d8f MISC metadata.xml 1269 BLAKE2B f95392929bcecbce9334108e3446d631e2a91d1aceb0fa6347496d2d0eeaff8cff55e08b7c3bb39fb8b51667988a6cc2b8e500143f2ebe0d78e6985a6f7af3c1 SHA512 7949854cf55f26750ded6787ce295762af7fd16600f8b251b25e1c9dd4d643338ed4c3b2a8a3405a2c427ed8b5a9ad13a8566a640161768d4dbf6db7e54811a3 diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-fix-crash-w-app-locales.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-fix-crash-w-app-locales.patch new file mode 100644 index 000000000000..3a372381ebd8 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-fix-crash-w-app-locales.patch @@ -0,0 +1,135 @@ +From 199ea00a9eea13315a652c62778738629185b059 Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Wed, 10 Mar 2021 17:14:27 +0100 +Subject: Fix normalization of app locales +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Use the internal Chromium routine to get the app locale Chromium +expects. + +Fixes: QTBUG-91715 +Change-Id: I5042eb066cb6879ad69628959912f2841867b4e8 +Reviewed-by: Michael BrĂ¼ning +--- + src/core/content_browser_client_qt.cpp | 7 ++++++- + src/core/content_browser_client_qt.h | 2 ++ + src/core/web_engine_library_info.cpp | 18 ++++++++-------- + .../widgets/qwebengineview/tst_qwebengineview.cpp | 24 ++++++++++++++++++++++ + 4 files changed, 40 insertions(+), 11 deletions(-) + +diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp +index e13ecd8d1..c2c78ff8b 100644 +--- a/src/core/content_browser_client_qt.cpp ++++ b/src/core/content_browser_client_qt.cpp +@@ -471,7 +471,12 @@ std::unique_ptr ContentBrowserClientQt::CreateClientCertSt + + std::string ContentBrowserClientQt::GetApplicationLocale() + { +- return WebEngineLibraryInfo::getApplicationLocale(); ++ std::string bcp47Name = QLocale().bcp47Name().toStdString(); ++ if (m_cachedQtLocale != bcp47Name) { ++ m_cachedQtLocale = bcp47Name; ++ m_appLocale = WebEngineLibraryInfo::getApplicationLocale(); ++ } ++ return m_appLocale; + } + + std::string ContentBrowserClientQt::GetAcceptLangs(content::BrowserContext *context) +diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h +index 7c8aa3ac9..1ccd2926d 100644 +--- a/src/core/content_browser_client_qt.h ++++ b/src/core/content_browser_client_qt.h +@@ -269,6 +269,8 @@ public: + + private: + scoped_refptr m_shareGroupQtQuick; ++ std::string m_appLocale; ++ std::string m_cachedQtLocale; + }; + + } // namespace QtWebEngineCore +diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp +index 2ad5b7565..09a4141b0 100644 +--- a/src/core/web_engine_library_info.cpp ++++ b/src/core/web_engine_library_info.cpp +@@ -46,6 +46,7 @@ + #include "components/spellcheck/spellcheck_buildflags.h" + #include "content/public/common/content_paths.h" + #include "sandbox/policy/switches.h" ++#include "ui/base/l10n/l10n_util.h" + #include "ui/base/ui_base_paths.h" + #include "ui/base/ui_base_switches.h" + +@@ -353,18 +354,15 @@ base::string16 WebEngineLibraryInfo::getApplicationName() + std::string WebEngineLibraryInfo::getApplicationLocale() + { + base::CommandLine *parsedCommandLine = base::CommandLine::ForCurrentProcess(); +- if (!parsedCommandLine->HasSwitch(switches::kLang)) { ++ if (parsedCommandLine->HasSwitch(switches::kLang)) { ++ return parsedCommandLine->GetSwitchValueASCII(switches::kLang); ++ } else { + const QString &locale = QLocale().bcp47Name(); +- +- // QLocale::bcp47Name returns "en" for American English locale. Chromium requires the "US" suffix +- // to clarify the dialect and ignores the shorter version. +- if (locale == "en") +- return "en-US"; +- +- return locale.toStdString(); ++ std::string resolvedLocale; ++ if (l10n_util::CheckAndResolveLocale(locale.toStdString(), &resolvedLocale)) ++ return resolvedLocale; + } +- +- return parsedCommandLine->GetSwitchValueASCII(switches::kLang); ++ return "en-US"; + } + + #if defined(OS_WIN) +diff --git a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp +index 021986381..bf2c28ae6 100644 +--- a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp ++++ b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp +@@ -123,6 +123,7 @@ private Q_SLOTS: + void doNotBreakLayout(); + + void changeLocale(); ++ void mixLangLocale(); + void inputMethodsTextFormat_data(); + void inputMethodsTextFormat(); + void keyboardEvents(); +@@ -1210,6 +1211,29 @@ void tst_QWebEngineView::changeLocale() + QCOMPARE(errorLines.first().toUtf8(), QByteArrayLiteral("Die Website ist nicht erreichbar")); + } + ++void tst_QWebEngineView::mixLangLocale() ++{ ++ for (QString locale : { "en_DK", "de_CH", "eu_ES" }) { ++ QLocale::setDefault(locale); ++ QWebEngineView view; ++ QSignalSpy loadSpy(&view, &QWebEngineView::loadFinished); ++ ++ bool terminated = false; ++ auto sc = connect(view.page(), &QWebEnginePage::renderProcessTerminated, [&] () { terminated = true; }); ++ ++ view.load(QUrl("qrc:///resources/dummy.html")); ++ QTRY_VERIFY(terminated || loadSpy.count() == 1); ++ ++ QVERIFY2(!terminated, ++ qPrintable(QString("Locale [%1] terminated: %2, loaded: %3").arg(locale).arg(terminated).arg(loadSpy.count()))); ++ QVERIFY(loadSpy.first().first().toBool()); ++ ++ QString content = toPlainTextSync(view.page()); ++ QVERIFY2(!content.isEmpty() && content.contains("test content"), qPrintable(content)); ++ } ++ QLocale::setDefault(QLocale("en")); ++} ++ + void tst_QWebEngineView::inputMethodsTextFormat_data() + { + QTest::addColumn("string"); +-- +cgit v1.2.1 + diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.2_p20210224.ebuild b/dev-qt/qtwebengine/qtwebengine-5.15.2_p20210224.ebuild index 5271d30d4ae7..ac7c856f3db0 100644 --- a/dev-qt/qtwebengine/qtwebengine-5.15.2_p20210224.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-5.15.2_p20210224.ebuild @@ -10,10 +10,11 @@ inherit multiprocessing python-any-r1 qt5-build DESCRIPTION="Library for rendering dynamic web content in Qt5 C++ and QML applications" if [[ ${QT5_BUILD_TYPE} == release ]]; then - KEYWORDS="~amd64 ~arm ~arm64 ~x86" + KEYWORDS="amd64 ~arm arm64 x86" if [[ ${PV} == ${QTVER}_p* ]]; then SRC_URI="https://dev.gentoo.org/~asturm/distfiles/${P}.tar.xz" S="${WORKDIR}/${P}" + QT5_BUILD_DIR="${S}_build" fi fi @@ -89,7 +90,8 @@ DEPEND="${RDEPEND} PATCHES=( "${FILESDIR}/${PN}-5.15.0-disable-fatal-warnings.patch" # bug 695446 - "${FILESDIR}/${P}-chromium-87-v8-icu68.patch" # bug 757606 + "${FILESDIR}/${P}-fix-crash-w-app-locales.patch" # bug 773919, QTBUG-91715 + "${FILESDIR}/${P}-chromium-87-v8-icu68.patch" # downstream, bug 757606 "${FILESDIR}/${P}-disable-git.patch" # downstream snapshot fix ) -- cgit v1.2.3