diff --git a/README.md b/README.md deleted file mode 100644 index 08108c9..0000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# qt5-qtwebengine - -#### 介绍 -{**以下是码云平台说明,您可以替换此简介** -码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec new file mode 100644 index 0000000..0ec84a6 --- /dev/null +++ b/qt5-qtwebengine.spec @@ -0,0 +1,230 @@ +%define _binaries_in_noarch_packages_terminate_build 0 +%global _hardened_build 1 +%global __provides_exclude ^lib.*plugin\\.so.*|libv8\\.so$ +%global __requires_exclude ^libv8\\.so$ +%global __provides_exclude_from ^%{_qt5_plugindir}/.*\\.so$ + +Name: qt5-qtwebengine +Version: 5.11.1 +Release: 5 +Summary: Qt5 - QtWebEngine components +License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) +URL: http://www.qt.io +Source0: qtwebengine-everywhere-src-%{version}-clean.tar.xz +# some tweaks to linux.pri (system yasm, link libpci, run unbundling script) +# From: https://github.com/rpmfusion/qt5-qtwebengine-freeworld/blob/master/qtwebengine-everywhere-src-5.10.0-linux-pri.patch +Patch0000: qtwebengine-everywhere-src-5.10.0-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 +# From: https://github.com/rpmfusion/qt5-qtwebengine-freeworld/blob/master/qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch +Patch0001: qtwebengine-everywhere-src-5.11.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 +# From: https://gitlab.com/unity-mageia/qtwebengine5/-/blob/master/qtwebengine-opensource-src-5.9.0-fix-extractcflag.patch +Patch0002: qtwebengine-opensource-src-5.9.0-fix-extractcflag.patch +# fix missing ARM -mfpu setting +# From: https://gitlab.com/unity-mageia/qtwebengine5/-/blob/master/qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch +Patch0003: qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch +# remove Android dependencies from openmax_dl ARM NEON detection (detect.c) +# From: https://gitlab.com/unity-mageia/qtwebengine5/-/blob/master/qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch +Patch0004: qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch +# webrtc: enable the CPU feature detection for ARM Linux also for Chromium +# From: https://gitlab.com/unity-mageia/qtwebengine5/-/blob/master/qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch +Patch0005: qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch +# Force verbose output from the GN bootstrap process +# From: https://gitlab.com/unity-mageia/qtwebengine5/-/blob/master/qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch +Patch0006: qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch +# Fix FTBFS with GCC 8 on i686: GCC8 has changed the alignof operator to return +# the minimal alignment required by the target ABI instead of the preferred +# alignment. This means int64_t is now 4 on i686 (instead of 8). Use __alignof__ +# to get the value we expect (and chromium checks for). Patch by spot. +# From: https://gitlab.com/unity-mageia/qtwebengine5/-/blob/master/qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch +Patch0009: qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch +BuildRequires: qt5-qtbase-devel qt5-qtbase-private-devel qt5-qtdeclarative-devel qt5-qtxmlpatterns-devel +BuildRequires: qt5-qtlocation-devel qt5-qtsensors-devel qt5-qtwebchannel-devel qt5-qttools-static +BuildRequires: qt5-qtquickcontrols2-devel ninja-build cmake bison flex git-core gperf libicu-devel +BuildRequires: libjpeg-devel re2-devel snappy-devel pkgconfig(expat) pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(fontconfig) pkgconfig(freetype2) pkgconfig(gl) pkgconfig(egl) pkgconfig(libpng) +BuildRequires: pkgconfig(libudev) pkgconfig(libwebp) >= 0.6.0 pkgconfig(harfbuzz) pkgconfig(libdrm) +BuildRequires: pkgconfig(opus) pkgconfig(libevent) pkgconfig(zlib) pkgconfig(minizip) pkgconfig(x11) +BuildRequires: pkgconfig(xi) pkgconfig(xcursor) pkgconfig(xext) pkgconfig(xfixes) pkgconfig(xrender) +BuildRequires: pkgconfig(xdamage) pkgconfig(xcomposite) pkgconfig(xtst) pkgconfig(xrandr) pkgconfig(xscrnsaver) +BuildRequires: pkgconfig(libcap) pkgconfig(libpulse) pkgconfig(alsa) pkgconfig(libpci) pkgconfig(dbus-1) +BuildRequires: pkgconfig(nss) pkgconfig(lcms2) perl-interpreter python pkgconfig(glib-2.0) +Provides: bundled(chromium) = 61.0.3163.140 bundled(angle) = 2422 bundled(boringssl) bundled(brotli) +Provides: bundled(ffmpeg) = 3.3 bundled(hunspell) = 1.6.0 bundled(iccjpeg) bundled(khronos_headers) +Provides: bundled(leveldb) = 1.20 bundled(libjingle) bundled(libsrtp) = 2.1.0 bundled(libvpx) = 1.6.1 +Provides: bundled(libxml2) = 2.9.4 bundled(libxslt) = 1.1.29 bundled(libXNVCtrl) = 302.17 +Provides: bundled(libyuv) = 1658 bundled(modp_b64) bundled(openmax_dl) = 1.0.2 bundled(ots) +Provides: bundled(protobuf) = 3.0.0-0.1.beta3 bundled(qcms) = 4 bundled(sfntly) bundled(skia) +Provides: bundled(SMHasher) = 0-0.1.svn147 bundled(sqlite) = 3.20 bundled(usrsctp) bundled(webrtc) = 90 +Provides: bundled(dmg_fp) bundled(dynamic_annotations) = 4384 bundled(superfasthash) = 0 bundled(symbolize) +Provides: bundled(valgrind.h) bundled(xdg-mime) bundled(xdg-user-dirs) = 0.10 bundled(nsURLParsers) +Provides: bundled(mozilla_security_manager) = 1.9.2 bundled(mojo) bundled(v8) = 6.1.534.44 bundled(fdlibm) = 5.3 +%ifarch x86_64 +BuildRequires: yasm +Provides: bundled(x86inc) +%endif +%{?_qt5:Requires: %{_qt5} = %{_qt5_version}} +%{?_qt5_version:Requires: qt5-qtbase = %{_qt5_version}} + +%description +Qt5 - QtWebEngine components. + +%package devel +Summary: Development files for qt5-qtwebengine +Requires: qt5-qtwebengine = %{version}-%{release} qt5-qtbase-devel qt5-qtdeclarative-devel + +%description devel +Qt5 - QtWebEngine components. + +%package help +Summary: Help documentation for qt5-qtwebengine +BuildRequires: qt5-qdoc qt5-qhelpgenerator qt5-qtbase-doc qt5-qtxmlpatterns-doc qt5-qtdeclarative-doc +Requires: qt5-qtbase-doc qt5-qtxmlpatterns-doc qt5-qtdeclarative-doc +Provides: qt5-qtwebengine-doc = %{version}-%{release} qt5-qtwebengine-examples = %{version}-%{release} +Obsoletes: qt5-qtwebengine-doc < %{version}-%{release} qt5-qtwebengine-examples < %{version}-%{release} +BuildArch: noarch + +%description help +Qt5 - QtWebEngine components. + +%prep +%autosetup -n qtwebengine-everywhere-src-%{version}%{?prerelease:-%{prerelease}} -p1 +sed -i -e 's!gpu//!gpu/!g' src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc +sed -i -e 's!audio_processing//!audio_processing/!g' src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft.cc \ + src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_sse2.cc +sed -i -e 's!\./!!g' src/3rdparty/chromium/third_party/angle/src/compiler/preprocessor/Tokenizer.cpp \ + src/3rdparty/chromium/third_party/angle/src/compiler/translator/glslang_lex.cpp +sed -i -e '/toolprefix = /d' -e 's/\${toolprefix}//g' src/3rdparty/chromium/build/toolchain/linux/BUILD.gn +cp -bv /usr/include/re2/*.h src/3rdparty/chromium/third_party/re2/src/re2/ +cd src/3rdparty +python chromium/tools/licenses.py --file-template ../../tools/about_credits.tmpl \ + --entry-template ../../tools/about_credits_entry.tmpl credits >../webengine/doc/src/qtwebengine-3rdparty.qdoc +cd - +cp -p src/3rdparty/chromium/LICENSE LICENSE.Chromium + +%build +export STRIP=strip +export NINJAFLAGS="%{__ninja_common_opts}" +export NINJA_PATH=%{__ninja} +%{qmake_qt5} CONFIG+="force_debug_info" QMAKE_EXTRA_ARGS+="-system-webengine-icu" . +%make_build +%make_build docs + +%install +make install INSTALL_ROOT=%{buildroot} +make install_docs INSTALL_ROOT=%{buildroot} +echo -e "%_qt5_qtwebengine @@NAME@@\n%_qt5_qtwebengine_epoch @@EPOCH@@\n%_qt5_qtwebengine_version @@VERSION@@\n%_qt5_qtwebengine_evr @@EVR@@" > macros.qt5-qtwebengine +install -p -m644 -D macros.qt5-qtwebengine %{buildroot}%(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)/macros.qt5-qtwebengine +rm -f macros.qt5-qtwebengine +sed -i -e "s|@@NAME@@|qt5-qtwebengine|g" -e "s|@@EPOCH@@|%{?epoch}%{!?epoch:0}|g" -e "s|@@VERSION@@|%{version}|g" \ + -e "s|@@EVR@@|%{?epoch:%{epoch:}}%{version}-%{release}|g" %{buildroot}%(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || \ + d=%{_sysconfdir}/rpm; echo $d)/macros.qt5-qtwebengine +install -d %{buildroot}%{_bindir} +cd %{buildroot}%{_qt5_bindir} +for i in * ; do ln -v ${i} %{buildroot}%{_bindir}/${i}; done +cd - +cd %{buildroot}%{_qt5_libdir} +for prl_file in libQt5*.prl ; do + sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" ${prl_file} + if [ -f "$(basename ${prl_file} .prl).so" ]; then + rm -fv "$(basename ${prl_file} .prl).la"; sed -i -e "/^QMAKE_PRL_LIBS/d" ${prl_file} + fi +done +cd - +install -d %{buildroot}%{_qt5_datadir}/qtwebengine_dictionaries +%global lesser_version $(echo -e "%{version}\\n%{_qt5_version}" | sort -V | head -1) +sed -i -e "s|%{version} \${_Qt5WebEngine|%{lesser_version} \${_Qt5WebEngine|" %{buildroot}%{_qt5_libdir}/cmake/Qt5WebEngine*/Qt5WebEngine*Config.cmake + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%filetriggerin -- %{_datadir}/myspell +while read filename ; do + case "$filename" in + *.dic) + bdicname=%{_qt5_datadir}/qtwebengine_dictionaries/`basename -s .dic "$filename"`.bdic + %{_qt5_bindir}/qwebengine_convert_dict "$filename" "$bdicname" &> /dev/null || : + ;; + esac +done + +%files +%doc LICENSE.* src/webengine/doc/src/qtwebengine-3rdparty.qdoc +%{_bindir}/qwebengine_convert_dict +%{_qt5_bindir}/qwebengine_convert_dict +%{_qt5_libdir}/{libQt5*.so.*,qt5/qml/*,qt5/libexec/QtWebEngineProcess} +%{_qt5_plugindir}/designer/libqwebengineview.so +%{_qt5_datadir}/resources/ +%dir %{_qt5_datadir}/qtwebengine_dictionaries +%dir %{_qt5_translationdir}/qtwebengine_locales +%lang(am) %{_qt5_translationdir}/qtwebengine_locales/am.pak +%lang(ar) %{_qt5_translationdir}/qtwebengine_locales/ar.pak +%lang(bg) %{_qt5_translationdir}/qtwebengine_locales/bg.pak +%lang(bn) %{_qt5_translationdir}/qtwebengine_locales/bn.pak +%lang(ca) %{_qt5_translationdir}/qtwebengine_locales/ca.pak +%lang(cs) %{_qt5_translationdir}/qtwebengine_locales/cs.pak +%lang(da) %{_qt5_translationdir}/qtwebengine_locales/da.pak +%lang(de) %{_qt5_translationdir}/qtwebengine_locales/de.pak +%lang(el) %{_qt5_translationdir}/qtwebengine_locales/el.pak +%lang(en) %{_qt5_translationdir}/qtwebengine_locales/en-GB.pak +%lang(en) %{_qt5_translationdir}/qtwebengine_locales/en-US.pak +%lang(es) %{_qt5_translationdir}/qtwebengine_locales/es-419.pak +%lang(es) %{_qt5_translationdir}/qtwebengine_locales/es.pak +%lang(et) %{_qt5_translationdir}/qtwebengine_locales/et.pak +%lang(fa) %{_qt5_translationdir}/qtwebengine_locales/fa.pak +%lang(fi) %{_qt5_translationdir}/qtwebengine_locales/fi.pak +%lang(fil) %{_qt5_translationdir}/qtwebengine_locales/fil.pak +%lang(fr) %{_qt5_translationdir}/qtwebengine_locales/fr.pak +%lang(gu) %{_qt5_translationdir}/qtwebengine_locales/gu.pak +%lang(he) %{_qt5_translationdir}/qtwebengine_locales/he.pak +%lang(hi) %{_qt5_translationdir}/qtwebengine_locales/hi.pak +%lang(hr) %{_qt5_translationdir}/qtwebengine_locales/hr.pak +%lang(hu) %{_qt5_translationdir}/qtwebengine_locales/hu.pak +%lang(id) %{_qt5_translationdir}/qtwebengine_locales/id.pak +%lang(it) %{_qt5_translationdir}/qtwebengine_locales/it.pak +%lang(ja) %{_qt5_translationdir}/qtwebengine_locales/ja.pak +%lang(kn) %{_qt5_translationdir}/qtwebengine_locales/kn.pak +%lang(ko) %{_qt5_translationdir}/qtwebengine_locales/ko.pak +%lang(lt) %{_qt5_translationdir}/qtwebengine_locales/lt.pak +%lang(lv) %{_qt5_translationdir}/qtwebengine_locales/lv.pak +%lang(ml) %{_qt5_translationdir}/qtwebengine_locales/ml.pak +%lang(mr) %{_qt5_translationdir}/qtwebengine_locales/mr.pak +%lang(ms) %{_qt5_translationdir}/qtwebengine_locales/ms.pak +%lang(nb) %{_qt5_translationdir}/qtwebengine_locales/nb.pak +%lang(nl) %{_qt5_translationdir}/qtwebengine_locales/nl.pak +%lang(pl) %{_qt5_translationdir}/qtwebengine_locales/pl.pak +%lang(pt_BR) %{_qt5_translationdir}/qtwebengine_locales/pt-BR.pak +%lang(pt_PT) %{_qt5_translationdir}/qtwebengine_locales/pt-PT.pak +%lang(ro) %{_qt5_translationdir}/qtwebengine_locales/ro.pak +%lang(ru) %{_qt5_translationdir}/qtwebengine_locales/ru.pak +%lang(sk) %{_qt5_translationdir}/qtwebengine_locales/sk.pak +%lang(sl) %{_qt5_translationdir}/qtwebengine_locales/sl.pak +%lang(sr) %{_qt5_translationdir}/qtwebengine_locales/sr.pak +%lang(sv) %{_qt5_translationdir}/qtwebengine_locales/sv.pak +%lang(sw) %{_qt5_translationdir}/qtwebengine_locales/sw.pak +%lang(ta) %{_qt5_translationdir}/qtwebengine_locales/ta.pak +%lang(te) %{_qt5_translationdir}/qtwebengine_locales/te.pak +%lang(th) %{_qt5_translationdir}/qtwebengine_locales/th.pak +%lang(tr) %{_qt5_translationdir}/qtwebengine_locales/tr.pak +%lang(uk) %{_qt5_translationdir}/qtwebengine_locales/uk.pak +%lang(vi) %{_qt5_translationdir}/qtwebengine_locales/vi.pak +%lang(zh_CN) %{_qt5_translationdir}/qtwebengine_locales/zh-CN.pak +%lang(zh_TW) %{_qt5_translationdir}/qtwebengine_locales/zh-TW.pak + +%files devel +%(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)/macros.qt5-qtwebengine +%{_qt5_headerdir}/Qt*/ +%{_qt5_libdir}/{libQt5*.so,libQt5*.prl,cmake/Qt5*/,pkgconfig/Qt5*.pc} +%{_qt5_archdatadir}/mkspecs/modules/*.pri + +%files help +%{_qt5_docdir}/* +%{_qt5_examplesdir}/ + +%changelog +* Fri Mar 6 2020 Ling Yang - 5.11.1-5 +- Package Init diff --git a/qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch b/qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch new file mode 100644 index 0000000..cac2e56 --- /dev/null +++ b/qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch @@ -0,0 +1,12 @@ +diff -ur qtwebengine-everywhere-src-5.10.0/src/buildtools/gn.pro qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose/src/buildtools/gn.pro +--- qtwebengine-everywhere-src-5.10.0/src/buildtools/gn.pro 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose/src/buildtools/gn.pro 2017-12-25 18:51:46.953799125 +0100 +@@ -25,7 +25,7 @@ + gn_args = $$replace(gn_args, "use_incremental_linking=true ", "") + } + +- gn_configure = $$system_quote($$gn_bootstrap) --shadow --gn-gen-args=$$gn_args $$ninja_path ++ gn_configure = $$system_quote($$gn_bootstrap) --verbose --shadow --gn-gen-args=$$gn_args $$ninja_path + !system("cd $$system_quote($$system_path($$dirname(out))) && $$pythonPathForSystem() $$gn_configure") { + error("GN build error!") + } diff --git a/qtwebengine-everywhere-src-5.10.0-linux-pri.patch b/qtwebengine-everywhere-src-5.10.0-linux-pri.patch new file mode 100644 index 0000000..162f63e --- /dev/null +++ b/qtwebengine-everywhere-src-5.10.0-linux-pri.patch @@ -0,0 +1,23 @@ +diff -ur qtwebengine-everywhere-src-5.10.0/src/core/config/linux.pri qtwebengine-everywhere-src-5.10.0-linux-pri/src/core/config/linux.pri +--- qtwebengine-everywhere-src-5.10.0/src/core/config/linux.pri 2017-11-29 09:42:29.000000000 +0100 ++++ qtwebengine-everywhere-src-5.10.0-linux-pri/src/core/config/linux.pri 2017-12-25 12:07:40.262411459 +0100 +@@ -157,3 +157,19 @@ + #qtConfig(webengine-system-jsoncpp): gn_args += use_system_jsoncpp=true + #qtConfig(webengine-system-libsrtp: gn_args += use_system_libsrtp=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 ++contains(QT_ARCH, "x86_64")|contains(QT_ARCH, "i386") { ++ gn_args += use_system_yasm=true ++} ++ ++# link libpci instead of dlopening it, our Qt packaging depends on it anyway ++gn_args += linux_link_libpci=true ++ ++# 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 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") diff --git a/qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch b/qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch new file mode 100644 index 0000000..ff007b7 --- /dev/null +++ b/qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch @@ -0,0 +1,18 @@ +diff -up qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/mojo/public/c/system/macros.h.gcc8-alignof qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/mojo/public/c/system/macros.h +--- qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/mojo/public/c/system/macros.h.gcc8-alignof 2018-05-15 14:58:46.448912634 -0400 ++++ qtwebengine-everywhere-src-5.10.1/src/3rdparty/chromium/mojo/public/c/system/macros.h 2018-05-15 14:58:52.041784613 -0400 +@@ -18,7 +18,13 @@ + #endif + + // Like the C++11 |alignof| operator. +-#if __cplusplus >= 201103L ++#if defined(__GNUC__) && __GNUC__ >= 8 ++// GCC 8 has changed the alignof operator to return the minimal alignment ++// required by the target ABI, instead of the preferred alignment. ++// This means that on 32-bit x86, it will return 4 instead of 8. ++// Use __alignof__ instead to avoid this. ++#define MOJO_ALIGNOF(type) __alignof__(type) ++#elif __cplusplus >= 201103L + #define MOJO_ALIGNOF(type) alignof(type) + #elif defined(__GNUC__) + #define MOJO_ALIGNOF(type) __alignof__(type) diff --git a/qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch b/qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch new file mode 100644 index 0000000..59da86e --- /dev/null +++ b/qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch @@ -0,0 +1,32 @@ +diff -up qtwebengine-everywhere-src-5.11.0/src/core/web_engine_library_info.cpp.no-icudtl-dat qtwebengine-everywhere-src-5.11.0/src/core/web_engine_library_info.cpp +--- qtwebengine-everywhere-src-5.11.0/src/core/web_engine_library_info.cpp.no-icudtl-dat 2018-06-14 09:23:48.931195271 -0500 ++++ qtwebengine-everywhere-src-5.11.0/src/core/web_engine_library_info.cpp 2018-06-14 09:27:26.248014325 -0500 +@@ -258,28 +258,12 @@ QString dictionariesPath() + + QString icuDataPath() + { +- static bool initialized = false; + static QString potentialResourcesPath = + #if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD) + getResourcesPath(frameworkBundle()); + #else + QLibraryInfo::location(QLibraryInfo::DataPath) % QLatin1String("/resources"); + #endif +- 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; + } diff --git a/qtwebengine-everywhere-src-5.11.1-clean.tar.xz b/qtwebengine-everywhere-src-5.11.1-clean.tar.xz new file mode 100644 index 0000000..9969aaf Binary files /dev/null and b/qtwebengine-everywhere-src-5.11.1-clean.tar.xz differ diff --git a/qtwebengine-opensource-src-5.9.0-fix-extractcflag.patch b/qtwebengine-opensource-src-5.9.0-fix-extractcflag.patch new file mode 100644 index 0000000..4fcd592 --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-fix-extractcflag.patch @@ -0,0 +1,12 @@ +diff -ur qtwebengine-opensource-src-5.9.0/mkspecs/features/functions.prf qtwebengine-opensource-src-5.9.0-fix-extractcflag/mkspecs/features/functions.prf +--- qtwebengine-opensource-src-5.9.0/mkspecs/features/functions.prf 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-fix-extractcflag/mkspecs/features/functions.prf 2017-06-08 00:36:16.303520106 +0200 +@@ -302,7 +302,7 @@ + } + + defineReplace(extractCFlag) { +- CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS ++ CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS $$QMAKE_CFLAGS_RELEASE + OPTION = $$find(CFLAGS, $$1) + OPTION = $$split(OPTION, =) + return ($$member(OPTION, 1)) diff --git a/qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch b/qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch new file mode 100644 index 0000000..fd11fae --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch @@ -0,0 +1,92 @@ +diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn qtwebengine-opensource-src-5.9.0-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn 2017-06-10 02:41:10.317340598 +0200 +@@ -196,9 +196,6 @@ + ] + if (arm_optionally_use_neon) { + # Run-time NEON detection. +- deps = [ "//third_party/android_tools:cpu_features" ] +- # To get the __android_log_print routine +- libs = [ "log" ] + # Detection routine + sources += [ "sp/src/arm/detect.c" ] + } +diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c qtwebengine-opensource-src-5.9.0-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-openmax-dl-neon/src/3rdparty/chromium/third_party/openmax_dl/dl/sp/src/arm/detect.c 2017-06-10 02:38:30.593809570 +0200 +@@ -9,13 +9,57 @@ + * + */ + +-#include +- +-#include "android/log.h" + #include "dl/sp/api/omxSP.h" + ++// For ArmCpuCaps() ++#include ++#include ++ ++// based on libvpx arm_cpudetect.c ++static int ArmCpuCaps(const char* cpuinfo_name) { ++ char cpuinfo_line[512]; ++ FILE* f = fopen(cpuinfo_name, "r"); ++ if (!f) { ++ // Assume Neon if /proc/cpuinfo is unavailable. ++ // This will occur for Chrome sandbox for Pepper or Render process. ++ return 1; ++ } ++ while (fgets(cpuinfo_line, sizeof(cpuinfo_line) - 1, f)) { ++ if (memcmp(cpuinfo_line, "Features", 8) == 0) { ++ char* p = strstr(cpuinfo_line, " neon"); ++ if (p && (p[5] == ' ' || p[5] == '\n')) { ++ fclose(f); ++ return 1; ++ } ++ // aarch64 uses asimd for Neon. ++ p = strstr(cpuinfo_line, " asimd"); ++ if (p && (p[6] == ' ' || p[6] == '\n')) { ++ fclose(f); ++ return 1; ++ } ++ } ++ } ++ fclose(f); ++ return 0; ++} ++ + int omxSP_HasArmNeon() { +- return (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; ++#if defined(__arm__) || defined(__aarch64__) ++// gcc -mfpu=neon defines __ARM_NEON__ ++// __ARM_NEON__ generates code that requires Neon. NaCL also requires Neon. ++// For Linux, /proc/cpuinfo can be tested but without that assume Neon. ++#if defined(__ARM_NEON__) || defined(__native_client__) || !defined(__linux__) ++ return 1; ++// For aarch64(arm64), /proc/cpuinfo's feature is not complete, e.g. no neon ++// flag in it. ++// So for aarch64, neon enabling is hard coded here. ++#elif defined(__aarch64__) ++ return 1; ++#else ++ // Linux arm parse text file for neon detect. ++ return ArmCpuCaps("/proc/cpuinfo"); ++#endif ++#endif // __arm__ + } + + static void SetFFTRoutines() { +@@ -24,13 +68,9 @@ + * forward and inverse FFTs + */ + if (omxSP_HasArmNeon()) { +- __android_log_print(ANDROID_LOG_INFO, "OpenMAX DL FFT", +- "Using NEON FFT"); + omxSP_FFTFwd_RToCCS_F32 = omxSP_FFTFwd_RToCCS_F32_Sfs; + omxSP_FFTInv_CCSToR_F32 = omxSP_FFTInv_CCSToR_F32_Sfs; + } else { +- __android_log_print(ANDROID_LOG_INFO, "OpenMAX DL FFT", +- "Using non-NEON FFT"); + omxSP_FFTFwd_RToCCS_F32 = omxSP_FFTFwd_RToCCS_F32_Sfs_vfp; + omxSP_FFTInv_CCSToR_F32 = omxSP_FFTInv_CCSToR_F32_Sfs_vfp; + } diff --git a/qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch b/qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch new file mode 100644 index 0000000..a21802a --- /dev/null +++ b/qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch @@ -0,0 +1,14 @@ +diff -ur qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn qtwebengine-opensource-src-5.9.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn +--- qtwebengine-opensource-src-5.9.0/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2017-05-18 16:51:44.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-webrtc-neon-detect/src/3rdparty/chromium/third_party/webrtc/system_wrappers/BUILD.gn 2017-06-10 13:20:14.959007488 +0200 +@@ -93,9 +93,7 @@ + if (is_linux) { + defines += [ "WEBRTC_THREAD_RR" ] + +- if (!build_with_chromium) { +- deps += [ ":cpu_features_linux" ] +- } ++ deps += [ ":cpu_features_linux" ] + + libs += [ "rt" ] + } diff --git a/qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch b/qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch new file mode 100644 index 0000000..a475199 --- /dev/null +++ b/qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch @@ -0,0 +1,11 @@ +diff -ur qtwebengine-opensource-src-5.9.0/src/core/config/linux.pri qtwebengine-opensource-src-5.9.0-arm-fpu-fix/src/core/config/linux.pri +--- qtwebengine-opensource-src-5.9.0/src/core/config/linux.pri 2017-05-19 06:22:04.000000000 +0200 ++++ qtwebengine-opensource-src-5.9.0-arm-fpu-fix/src/core/config/linux.pri 2017-06-13 14:51:26.986633933 +0200 +@@ -64,6 +64,7 @@ + gn_args += arm_use_neon=true + } else { + MFPU = $$extractCFlag("-mfpu=.*") ++ !isEmpty(MFPU): gn_args += arm_fpu=\"$$MFPU\" + !isEmpty(MFPU):contains(MFPU, ".*neon.*") { + gn_args += arm_use_neon=true + } else {