Use QtWebEngine upstream system re2 support (new in 5.9.2)

* Sat Oct 14 2017 Kevin Kofler <Kevin@tigcc.ticalc.org> - 5.9.2-2
- Do not call the Chromium unbundling script on re2, QtWebEngine now
  auto-detects and uses the system re2 out of the box
- Drop system-re2 patch (patching the no longer used unbundle/re2.gn), the
  QtWebEngine re2/BUILD.gn is already correct
This commit is contained in:
Kevin Kofler 2017-10-14 22:53:08 +02:00
parent b729fd5578
commit b81e4c0ba7
3 changed files with 11 additions and 33 deletions

View File

@ -56,7 +56,7 @@
Summary: Qt5 - QtWebEngine components
Name: qt5-qtwebengine
Version: 5.9.2
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
@ -73,7 +73,7 @@ Source2: clean_ffmpeg.sh
Source3: get_free_ffmpeg_source_files.py
# macros
Source10: macros.qt5-qtwebengine
# some tweaks to linux.pri (system libs, link libpci, run unbundling script)
# some tweaks to linux.pri (system yasm, link libpci, run unbundling script)
Patch0: qtwebengine-opensource-src-5.9.2-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
@ -113,8 +113,6 @@ Patch11: qtwebengine-opensource-src-5.9.0-skia-neon.patch
Patch12: qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch
# Force verbose output from the GN bootstrap process
Patch21: qtwebengine-opensource-src-5.9.0-gn-bootstrap-verbose.patch
# Fix src/3rdparty/chromium/build/linux/unbundle/re2.gn
Patch22: qtwebengine-opensource-src-5.9.0-system-re2.patch
%if 0%{?fedora} && 0%{?fedora} < 25
# work around missing qt5_qtwebengine_arches macro on F24
@ -567,10 +565,16 @@ done
%changelog
* Sat Oct 14 2017 Kevin Kofler <Kevin@tigcc.ticalc.org> - 5.9.2-2
- Do not call the Chromium unbundling script on re2, QtWebEngine now
auto-detects and uses the system re2 out of the box
- Drop system-re2 patch (patching the no longer used unbundle/re2.gn), the
QtWebEngine re2/BUILD.gn is already correct
* Tue Oct 10 2017 Rex Dieter <rdieter@fedoraproject.org> - 5.9.2-1
- 5.9.2
- Rebase linux-pri patch
- Drop qt57 and qtbug-61521 patches (fixed upstream)
- Drop qt57 and qtbug-61521 patches, fixed upstream
* Mon Oct 09 2017 Rex Dieter <rdieter@fedoraproject.org> - 5.9.1-5
- rebuild (qt5)

View File

@ -1,24 +0,0 @@
diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/linux/unbundle/re2.gn qtwebengine-opensource-src-5.9.0-system-re2/src/3rdparty/chromium/build/linux/unbundle/re2.gn
--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/build/linux/unbundle/re2.gn 2017-05-18 16:51:44.000000000 +0200
+++ qtwebengine-opensource-src-5.9.0-system-re2/src/3rdparty/chromium/build/linux/unbundle/re2.gn 2017-06-10 23:22:13.065385884 +0200
@@ -5,13 +5,14 @@
import("//build/shim_headers.gni")
shim_headers("re2_shim") {
- root_path = "src"
+ root_path = "src/re2"
+ prefix = "re2/"
headers = [
- "re2/filtered_re2.h",
- "re2/re2.h",
- "re2/set.h",
- "re2/stringpiece.h",
- "re2/variadic_function.h",
+ "filtered_re2.h",
+ "re2.h",
+ "set.h",
+ "stringpiece.h",
+ "variadic_function.h",
]
}

View File

@ -1,12 +1,10 @@
diff -up qtwebengine-opensource-src-5.9.2/src/core/config/linux.pri.linux-pri qtwebengine-opensource-src-5.9.2/src/core/config/linux.pri
--- qtwebengine-opensource-src-5.9.2/src/core/config/linux.pri.linux-pri 2017-10-09 15:08:43.206663093 -0500
+++ qtwebengine-opensource-src-5.9.2/src/core/config/linux.pri 2017-10-09 15:09:52.248208321 -0500
@@ -153,3 +153,21 @@ host_build {
@@ -153,3 +153,19 @@ host_build {
use?(system_re2): gn_args += use_system_re2=true
#use?(system_protobuf): gn_args += use_system_protobuf=true
}
+# some more system packages, that are not checked for for some reason
+gn_args += use_system_re2=true
+
+# yasm is only used on x86, and passing use_system_yasm makes the build fail on
+# other architectures (e.g., ARM), so make it conditional on the architecture
@ -20,6 +18,6 @@ diff -up qtwebengine-opensource-src-5.9.2/src/core/config/linux.pri.linux-pri qt
+# run the unbundling script Chromium provides
+CHROMIUM_SRC_DIR = "$$QTWEBENGINE_ROOT/$$getChromiumSrcDir()"
+R_G_F_PY = "$$CHROMIUM_SRC_DIR/build/linux/unbundle/replace_gn_files.py"
+R_G_F_PY_ARGS = "--system-libraries re2 yasm"
+R_G_F_PY_ARGS = "--system-libraries yasm"
+log("Running python $$R_G_F_PY $$R_G_F_PY_ARGS$${EOL}")
+!system("python $$R_G_F_PY $$R_G_F_PY_ARGS"): error("-- unbundling failed")