Avoid checking for the nonexistent icudtl.dat and silence the warnings

This commit is contained in:
Kevin Kofler 2016-03-18 04:59:54 +01:00
parent 4596e73fc6
commit 4f844a7b2b
2 changed files with 38 additions and 1 deletions

View File

@ -30,7 +30,7 @@
Summary: Qt5 - QtWebEngine components
Name: qt5-qtwebengine
Version: 5.6.0
Release: 1%{?dist}
Release: 2%{?dist}
# See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details
# See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html
@ -50,6 +50,11 @@ Patch0: qtwebengine-opensource-src-5.6.0-beta-no-format.patch
# some tweaks to linux.pri (system libs, link libpci, run unbundling script,
# do an NSS/BoringSSL "chimera build", see Provides: bundled(boringssl) comment)
Patch1: qtwebengine-opensource-src-5.6.0-rc-linux-pri.patch
# quick hack to avoid checking for the nonexistent icudtl.dat and silence the
# resulting warnings - not upstreamable as is because it removes the fallback
# mechanism for the ICU data directory (which is not used in our builds because
# we use the system ICU, which embeds the data statically) completely
Patch2: qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch
# fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE, needed to detect the
# ARM flags with our %%qmake_qt5 macro, including for the next patch
Patch3: qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch
@ -286,6 +291,7 @@ BuildArch: noarch
%setup -q -n %{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}}
%patch0 -p1 -b .no-format
%patch1 -p1 -b .linux-pri
%patch2 -p1 -b .no-icudtl-dat
%patch3 -p1 -b .fix-extractcflag
%patch4 -p1 -b .no-neon
%patch5 -p1 -b .system-nspr-prtime
@ -415,6 +421,9 @@ popd
%changelog
* Fri Mar 18 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 5.6.0-2
- Avoid checking for the nonexistent icudtl.dat and silence the warnings
* Thu Mar 17 2016 Kevin Kofler <Kevin@tigcc.ticalc.org> - 5.6.0-1
- Update to 5.6.0 (final)
- Drop system-icu54 patch, fixed upstream

View File

@ -0,0 +1,28 @@
diff -ur qtwebengine-opensource-src-5.6.0/src/core/web_engine_library_info.cpp qtwebengine-opensource-src-5.6.0-no-icudtl-dat/src/core/web_engine_library_info.cpp
--- qtwebengine-opensource-src-5.6.0/src/core/web_engine_library_info.cpp 2016-03-03 17:02:28.000000000 +0100
+++ qtwebengine-opensource-src-5.6.0-no-icudtl-dat/src/core/web_engine_library_info.cpp 2016-03-18 03:08:24.385444415 +0100
@@ -207,24 +207,7 @@
#if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD)
return getResourcesPath(frameworkBundle());
#else
- static bool initialized = false;
static QString potentialResourcesPath = QLibraryInfo::location(QLibraryInfo::DataPath) % QLatin1String("/resources");
- if (!initialized) {
- initialized = true;
- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/icudtl.dat"))) {
- qWarning("Qt WebEngine ICU data not found at %s. Trying parent directory...", qPrintable(potentialResourcesPath));
- potentialResourcesPath = QLibraryInfo::location(QLibraryInfo::DataPath);
- }
- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/icudtl.dat"))) {
- qWarning("Qt WebEngine ICU data not found at %s. Trying application directory...", qPrintable(potentialResourcesPath));
- potentialResourcesPath = QCoreApplication::applicationDirPath();
- }
- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/icudtl.dat"))) {
- qWarning("Qt WebEngine ICU data not found at %s. Trying fallback directory... The application MAY NOT work.", qPrintable(potentialResourcesPath));
- potentialResourcesPath = fallbackDir();
- }
- }
-
return potentialResourcesPath;
#endif
}