commit a99d631cebfe62aa8fd9a2212e5a1fea9b3a0f47
Author: Akarshan Biswas <akarshan.biswas(a)gmail.com>
Date: Tue Dec 11 01:29:23 2018 -0500
Update to 71.0.3578.80
Add a patch to fix libva version mismatch error
Re bundle re2 as it's ancient on Fedora
Enable experimental support for wayland-ozone in the spec file (WIP; disabled by
default)
Bring patch definitions closer to %prep so to find and apply patches easier.
.gitignore | 1 +
ccompiler.patch | 170 +++++++++++++++++++++++++++++++++++++++++++
chromium-71-gcc-fix.patch | 57 +++++++++++++++
chromium-gcc8-r588316.patch | 98 -------------------------
chromium-gcc8-r588547.patch | 30 --------
chromium-gcc8-r589614.patch | 37 ----------
chromium-gn-r607596.patch | 19 +++--
chromium-vaapi.spec | 146 +++++++++++++++++++++++++------------
enable-vaapi.patch | 56 +++++++-------
unrar.patch => nounrar.patch | 38 +++++++---
py2-bootstrap.patch | 32 ++++----
relax-libva-version.patch | 56 ++++++++++++++
sources | 2 +-
widevine.patch | 30 +++-----
14 files changed, 478 insertions(+), 294 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index d8ec4bb..3b3f465 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
/chromium-70.0.3538.77.tar.xz
/chromium-70.0.3538.102.tar.xz
/chromium-70.0.3538.110.tar.xz
+/chromium-71.0.3578.80.tar.xz
diff --git a/ccompiler.patch b/ccompiler.patch
new file mode 100644
index 0000000..db8d046
--- /dev/null
+++ b/ccompiler.patch
@@ -0,0 +1,170 @@
+From cec10e55fdb150b33342ad462907fb6202de364e Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym(a)gentoo.org>
+Date: Wed, 25 Apr 2018 13:22:49 -0400
+Subject: [PATCH] Disable various compiler configs
+
+---
+ build/config/compiler/BUILD.gn | 63 ++++++++++------------------------
+ 1 file changed, 18 insertions(+), 45 deletions(-)
+
+diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
+index 0f7a6b48f7b2..c91b702147d4 100644
+--- a/build/config/compiler/BUILD.gn
++++ b/build/config/compiler/BUILD.gn
+@@ -236,8 +236,6 @@ config("compiler") {
+
+ configs += [
+ # See the definitions below.
+- ":clang_revision",
+- ":compiler_cpu_abi",
+ ":compiler_codegen",
+ ]
+
+@@ -502,17 +500,6 @@ config("compiler") {
+ }
+ }
+
+- if (is_clang && !is_nacl && !use_xcode_clang) {
+- cflags += [
+- # TODO(hans): Remove this once Clang generates better optimized debug info
+- # by default.
https://crbug.com/765793
+- "-Xclang",
+- "-mllvm",
+- "-Xclang",
+- "-instcombine-lower-dbg-declare=0",
+- ]
+- }
+-
+ # Print absolute paths in diagnostics. There is no precedent for doing this
+ # on Linux/Mac (GCC doesn't support it), but MSVC does this with /FC and
+ # Windows developers rely on it (
crbug.com/636109) so only do this on Windows.
+@@ -1498,13 +1485,6 @@ config("default_warnings") {
+ cflags += [
+ # TODO(thakis):
https://crbug.com/753973
+ "-Wno-enum-compare-switch",
+-
+- # Ignore warnings about MSVC optimization pragmas.
+- # TODO(thakis): Only for no_chromium_code?
http://crbug.com/505314
+- "-Wno-ignored-pragma-optimize",
+-
+- # TODO(hans):
https://crbug.com/890307
+- "-Wno-defaulted-function-deleted",
+ ]
+ }
+ }
+@@ -1546,22 +1526,6 @@ config("chromium_code") {
+ "__STDC_FORMAT_MACROS",
+ ]
+
+- if (!is_debug && !using_sanitizer &&
+- (!is_linux || !is_clang || is_official_build) &&
+- current_cpu != "s390x" && current_cpu != "s390"
&&
+- current_cpu != "ppc64" && current_cpu != "ppc64"
&&
+- current_cpu != "mips" && current_cpu != "mips64") {
+- # _FORTIFY_SOURCE isn't really supported by Clang now, see
+- #
http://llvm.org/bugs/show_bug.cgi?id=16821.
+- # It seems to work fine with Ubuntu 12 headers though, so use it in
+- # official builds.
+- #
+- # Non-chromium code is not guaranteed to compile cleanly with
+- # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
+- # disabled, so only do that for Release build.
+- defines += [ "_FORTIFY_SOURCE=2" ]
+- }
+-
+ if (is_mac) {
+ cflags_objc = [ "-Wobjc-missing-property-synthesis" ]
+ cflags_objcc = [ "-Wobjc-missing-property-synthesis" ]
+@@ -1931,7 +1895,8 @@ config("default_stack_frames") {
+ }
+
+ # Default "optimization on" config.
+-config("optimize") {
++config("optimize") { }
++config("xoptimize") {
+ if (is_win) {
+ # TODO(thakis): Remove is_clang here,
https://crbug.com/598772
+ if (is_official_build && full_wpo_on_official && !is_clang) {
+@@ -1965,7 +1930,8 @@ config("optimize") {
+ }
+
+ # Same config as 'optimize' but without the WPO flag.
+-config("optimize_no_wpo") {
++config("optimize_no_wpo") { }
++config("xoptimize_no_wpo") {
+ if (is_win) {
+ # Favor size over speed, /O1 must be before the common flags. The GYP
+ # build also specifies /Os and /GF but these are implied by /O1.
+@@ -1988,7 +1954,8 @@ config("optimize_no_wpo") {
+ }
+
+ # Turn off optimizations.
+-config("no_optimize") {
++config("no_optimize") { }
++config("xno_optimize") {
+ if (is_win) {
+ cflags = [
+ "/Od", # Disable optimization.
+@@ -2012,7 +1979,8 @@ config("no_optimize") {
+ # Turns up the optimization level. On Windows, this implies whole program
+ # optimization and link-time code generation which is very expensive and should
+ # be used sparingly.
+-config("optimize_max") {
++config("optimize_max") { }
++config("xoptimize_max") {
+ if (is_nacl && is_nacl_irt) {
+ # The NaCl IRT is a special case and always wants its own config.
+ # Various components do:
+@@ -2059,7 +2027,8 @@ config("optimize_max") {
+ #
+ #
TODO(crbug.com/621335) - rework how all of these configs are related
+ # so that we don't need this disclaimer.
+-config("optimize_speed") {
++config("optimize_speed") { }
++config("xoptimize_speed") {
+ if (is_nacl && is_nacl_irt) {
+ # The NaCl IRT is a special case and always wants its own config.
+ # Various components do:
+@@ -2097,7 +2066,8 @@ config("optimize_speed") {
+ }
+ }
+
+-config("optimize_fuzzing") {
++config("optimize_fuzzing") { }
++config("xoptimize_fuzzing") {
+ cflags = [ "-O1" ] + common_optimize_on_cflags
+ ldflags = common_optimize_on_ldflags
+ visibility = [ ":default_optimization" ]
+@@ -2183,7 +2153,8 @@ config("afdo") {
+ # configs += [ "//build/config/compiler:symbols" ]
+
+ # Full symbols.
+-config("symbols") {
++config("symbols") { }
++config("xsymbols") {
+ if (is_win) {
+ if (use_goma || is_clang) {
+ # Note that with VC++ this requires is_win_fastlink, enforced elsewhere.
+@@ -2281,7 +2252,8 @@ config("symbols") {
+ # Minimal symbols.
+ # This config guarantees to hold symbol for stack trace which are shown to user
+ # when crash happens in unittests running on buildbot.
+-config("minimal_symbols") {
++config("minimal_symbols") { }
++config("xminimal_symbols") {
+ if (is_win) {
+ # Linker symbols for backtraces only.
+ cflags = []
+@@ -2321,7 +2293,8 @@ config("minimal_symbols") {
+ }
+
+ # No symbols.
+-config("no_symbols") {
++config("no_symbols") { }
++config("xno_symbols") {
+ if (!is_win) {
+ cflags = [ "-g0" ]
+ asmflags = cflags
+--
+2.19.1
+
diff --git a/chromium-71-gcc-fix.patch b/chromium-71-gcc-fix.patch
new file mode 100644
index 0000000..711b827
--- /dev/null
+++ b/chromium-71-gcc-fix.patch
@@ -0,0 +1,57 @@
+From 65be571f6ac2f7942b4df9e50b24da517f829eec Mon Sep 17 00:00:00 2001
+From: Raphael Kubo da Costa <raphael.kubo.da.costa(a)intel.com>
+Date: Mon, 15 Oct 2018 20:26:10 +0000
+Subject: [PATCH] google_util: Explicitly use std::initializer_list with
+ base::NoDestructor
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Follow-up to ac53c5c53 ("Remove CR_DEFINE_STATIC_LOCAL from /components").
+Due to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84849, having
+base::NoDestructor<T<U>> and passing an initializer list of Us does not
+work if this is not done explicitly, as GCC incorrectly fails to determine
+which constructor overload to use:
+
+ ../../components/google/core/common/google_util.cc: In function ‘bool
google_util::{anonymous}::IsCanonicalHostGoogleHostname(base::StringPiece,
google_util::SubdomainPermission)’:
+ ../../components/google/core/common/google_util.cc:120:24: error: call of overloaded
‘NoDestructor(<brace-enclosed initializer list>)’ is ambiguous
+ {GOOGLE_TLD_LIST});
+
+See also:
https://chromium-review.googlesource.com/c/chromium/src/+/1170905
+
+Bug: 819294
+Change-Id: Ie1490b6646d7998d636c485769caabf56c1cf44c
+Reviewed-on:
https://chromium-review.googlesource.com/c/1275854
+Reviewed-by: Peter Kasting <pkasting(a)chromium.org>
+Commit-Queue: Raphael Kubo da Costa (CET) <raphael.kubo.da.costa(a)intel.com>
+Cr-Commit-Position: refs/heads/master@{#599733}
+---
+ components/google/core/common/google_util.cc | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/components/google/core/common/google_util.cc
b/components/google/core/common/google_util.cc
+index a44c84393820..7733848a0443 100644
+--- a/components/google/core/common/google_util.cc
++++ b/components/google/core/common/google_util.cc
+@@ -117,7 +117,7 @@ bool IsCanonicalHostGoogleHostname(base::StringPiece canonical_host,
+ StripTrailingDot(&tld);
+
+ static base::NoDestructor<std::set<std::string>> google_tlds(
+- {GOOGLE_TLD_LIST});
++ std::initializer_list<std::string>({GOOGLE_TLD_LIST}));
+ return base::ContainsKey(*google_tlds, tld.as_string());
+ }
+
+@@ -132,7 +132,8 @@ bool IsGoogleSearchSubdomainUrl(const GURL& url) {
+ StripTrailingDot(&host);
+
+ static base::NoDestructor<std::set<std::string>> google_subdomains(
+- {"ipv4.google.com", "ipv6.google.com"});
++ std::initializer_list<std::string>(
++ {"ipv4.google.com", "ipv6.google.com"}));
+
+ return base::ContainsKey(*google_subdomains, host.as_string());
+ }
+--
+2.19.1
+
diff --git a/chromium-gn-r607596.patch b/chromium-gn-r607596.patch
index 836e3cf..a1d4712 100644
--- a/chromium-gn-r607596.patch
+++ b/chromium-gn-r607596.patch
@@ -1,4 +1,4 @@
-From 4849d9a19f700961e2c25b642bdaaa6514040e60 Mon Sep 17 00:00:00 2001
+From c779208380972b546c1e1ed6d5f8475fd12f6520 Mon Sep 17 00:00:00 2001
From: Raphael Kubo da Costa <raphael.kubo.da.costa(a)intel.com>
Date: Tue, 13 Nov 2018 15:41:11 +0000
Subject: [PATCH] gn bootstrap: Remove sysroot-related options
@@ -17,9 +17,11 @@ Cr-Commit-Position: refs/heads/master@{#607596}
tools/gn/bootstrap/bootstrap.py | 6 ------
1 file changed, 6 deletions(-)
---- chromium-70.0.3538.102/tools/gn/bootstrap/bootstrap.py.orig 2018-11-14
06:52:07.000000000 +0800
-+++ chromium-70.0.3538.102/tools/gn/bootstrap/bootstrap.py 2018-11-15 00:22:05.719552038
+0800
-@@ -46,10 +46,6 @@
+diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py
+index 261fddde7..1945852c4 100755
+--- a/tools/gn/bootstrap/bootstrap.py
++++ b/tools/gn/bootstrap/bootstrap.py
+@@ -46,10 +46,6 @@ def main(argv):
'--build-path',
help='The directory in which to build gn, '
'relative to the src directory. (eg. out/Release)')
@@ -28,9 +30,9 @@ Cr-Commit-Position: refs/heads/master@{#607596}
- action='store_true',
- help='Download and build with the Debian sysroot.')
parser.add_option('-v', '--verbose', help='ignored')
- options, args = parser.parse_args(argv)
- if args:
-@@ -71,8 +67,6 @@
+ parser.add_option(
+ '--skip-generate-buildfiles',
+@@ -76,8 +72,6 @@ def main(argv):
'--no-last-commit-position',
'--out-path=' + gn_build_dir,
]
@@ -39,3 +41,6 @@ Cr-Commit-Position: refs/heads/master@{#607596}
if options.debug:
cmd.append('--debug')
subprocess.check_call(cmd)
+--
+2.19.2
+
diff --git a/chromium-vaapi.spec b/chromium-vaapi.spec
index e39ad2a..a2a5b8c 100644
--- a/chromium-vaapi.spec
+++ b/chromium-vaapi.spec
@@ -16,6 +16,9 @@
%global __requires_exclude %{chromiumdir}/.*\\.so
%global __provides_exclude_from %{chromiumdir}/.*\\.so
#######################################CONFIGS###########################################
+# This package depends on automagic byte compilation
+#
https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompi...
+%global _python_bytecompile_extra 1
#Require harfbuzz >= 1.8.6 for hb_font_funcs_set_glyph_h_advances_func
%if 0%{?fedora} >= 29
%bcond_without system_harfbuzz
@@ -40,13 +43,14 @@
%else
%bcond_without system_minizip
%endif
+# Need re2 ver. 2016.07.21 for re2::LazyRE2
+%bcond_with system_re2
+
#Turn on verbose mode
%global debug_logs 1
# Allow compiling with clang
%global clang 0
-#Allow jumbo builds(turned off by default because it consumes too much memory)
-#enabled by default on rawhide for testing
-#Edit it works
+#Allow jumbo builds
# Enabled by default
%global jumbo 1
#------------------------------------------------------
@@ -67,9 +71,11 @@
%else
%global stopgold 0
%endif
+# Enable building with ozone support
+%global ozone 0
##############################Package Definitions######################################
Name: chromium-vaapi
-Version: 70.0.3538.110
+Version: 71.0.3578.80
Release: 1%{?dist}
Summary: A Chromium web browser with video decoding acceleration
License: BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL
and (MPLv1.1 or GPLv2 or LGPLv2)
@@ -85,7 +91,7 @@ Source0:
https://commondatastorage.googleapis.com/chromium-browser-official/c
# scripts included in official Fedora packages are copied, modified, and used
# to automate the repackaging work.
# Get those helper scripts from
https://src.fedoraproject.org/rpms/chromium
-# If you don't use Fedora services, Just set the value of freeworld in this spec fil
+# If you don't use Fedora services, Just set the value of freeworld in this spec
file
# to 1 to use the upstreanm packaged source.
# The repackaged source tarball used here is produced by:
# ./chromium-latest.py --stable --ffmpegclean --ffmpegarm --deleteunrar
@@ -97,35 +103,7 @@ Source10: %{name}.sh
Source11: %{name}.appdata.xml
#Personal stuff
Source15: LICENSE
-# Enable video acceleration on chromium for Linux
-Patch1: enable-vaapi.patch
-# Enable support for widevine
-Patch2: widevine.patch
-#Will use any clang patch here
-#Fix breaking builds caused by gcc_ar_wrapper.py from upstream
-Patch7: llvm-arflags.patch
-#Gcc patches area.
-#Gcc produces way too many warnings. Try to silence some of it.
-Patch8: silencegcc.patch
-#Fix building with GCC 8
-Patch9: chromium-gcc8-r588316.patch
-Patch10: chromium-gcc8-r588547.patch
-Patch11: chromium-gcc8-r589614.patch
-# More patches to fix chromium build here
-# remove dependency on unrar. That's a nasty code.
-Patch50: unrar.patch
-# Bootstrap still uses python command
-Patch51: py2-bootstrap.patch
-# Fix building with system icu
-Patch52: chromium-system-icu.patch
-# Fix chromium build with harfbuzz 2 in rawhide
-Patch53: chromium-harfbuzz2.patch
-# Let's brand chromium!
-Patch54: brand.patch
-# Disable sysroot related settings
-Patch55: chromium-gn-r607596.patch
-# This build should be only available to amd64
-ExclusiveArch: x86_64
+
########################################################################################
#Compiler settings
%if %{clang}
@@ -153,8 +131,13 @@ BuildRequires: pkgconfig(libffi)
# remove_bundled_libraries.py --do-remove
BuildRequires: python2-rpm-macros
BuildRequires: python2-beautifulsoup4
+BuildRequires: python2-lxml
BuildRequires: python2-html5lib
BuildRequires: python2-markupsafe
+Buildrequires: python2-six
+%if %{with system_re2}
+BuildRequires: re2-devel
+%endif
%if %{with system_ply}
BuildRequires: python2-ply
%endif
@@ -180,7 +163,6 @@ BuildRequires: pkgconfig(libxml-2.0)
%endif
BuildRequires: pkgconfig(libxslt)
BuildRequires: opus-devel
-BuildRequires: re2-devel
BuildRequires: snappy-devel
BuildRequires: yasm
BuildRequires: pciutils-devel
@@ -200,6 +182,42 @@ Recommends: libva-intel-driver%{?_isa}
%if !%{debug_pkg}
%global debug_package %{nil}
%endif
+# This build should be only available to amd64
+ExclusiveArch: x86_64
+# Define Patches here ##
+# Enable video acceleration on chromium for Linux
+Patch1: enable-vaapi.patch
+# Enable support for widevine
+Patch2: widevine.patch
+#Will use any clang patch here
+Patch3: ccompiler.patch
+#Fix breaking builds caused by gcc_ar_wrapper.py from upstream
+Patch7: llvm-arflags.patch
+#Gcc patches area.
+#Gcc produces way too many warnings. Try to silence some of it.
+Patch8: silencegcc.patch
+#Fix building with GCC 8
+Patch9: chromium-71-gcc-fix.patch
+# More patches to fix chromium build here
+# remove dependency on unrar. That's a nasty code.
+Patch50: nounrar.patch
+# Bootstrap still uses python command
+Patch51: py2-bootstrap.patch
+# Fix building with system icu
+Patch52: chromium-system-icu.patch
+# Fix chromium build with harfbuzz 2 in rawhide
+Patch53: chromium-harfbuzz2.patch
+# Let's brand chromium!
+Patch54: brand.patch
+# Disable sysroot related settings
+Patch55: chromium-gn-r607596.patch
+# Since the newer versions of VA-API are ABI compatible, relax the version checks for
VA-API, by using VA_CHECK_VERSION().
+# This will help in updating the libva to the latest releases,while still supporting the
old versions, till the new version of
+# libva is merged and picked by the builds. Thus ensuring that hardware acceleration is
not broken while updating the libva.
+# Taken and rebased from
https://chromium-review.googlesource.com/c/chromium/src/+/1352519
+# The patch might land somewhere in the future and will be removed.
+Patch56: relax-libva-version.patch
+
%description
chromium-vaapi is an open-source web browser, powered by WebKit (Blink)
############################################PREP###########################################################
@@ -209,23 +227,25 @@ chromium-vaapi is an open-source web browser, powered by WebKit
(Blink)
%patch1 -p1 -b .vaapi
%patch2 -p1 -b .widevine
%if %{clang}
+%patch3 -p1 -b .cc
%patch7 -p1 -b .llvmarflags
%else
%patch8 -p1 -b .silencegcc
-%patch9 -p1 -b .r588316
-%patch10 -p1 -b .r588547
-%patch11 -p1 -b .r589614
+%patch9 -p1 -b .gcc
%endif
-%patch50 -p1 -b .unrar
+%patch50 -p1 -b .nounrar
%patch51 -p1 -b .py2boot
%patch52 -p1 -b .icu
%if 0%{?fedora} >= 30
%patch53 -p1 -b .harfbuzz2
%endif
+%if %{freeworld}
%patch54 -p1 -b .brand
+%endif
%patch55 -p1 -b .gn
+%patch56 -p1 -b .relaxva
#Let's change the default shebang of python files.
-find -depth -type f -name "*.py" -exec sed -iE '1s=^#!
*/usr/bin/\(python\|env python\)[23]\?=#!%{__python2}=' {} +
+find -depth -type f -exec sed -iE '1s=^#! */usr/bin/\(python\|env
python\)[23]\?=#!%{__python2}=' {} +
./build/linux/unbundle/remove_bundled_libraries.py --do-remove \
base/third_party/dmg_fp \
base/third_party/dynamic_annotations \
@@ -312,6 +332,7 @@ find -depth -type f -name "*.py" -exec sed -iE '1s=^#!
*/usr/bin/\(python\|env p
%endif
third_party/inspector_protocol \
third_party/jinja2 \
+ third_party/jsoncpp \
third_party/jstemplate \
third_party/khronos \
third_party/leveldatabase \
@@ -341,6 +362,9 @@ find -depth -type f -name "*.py" -exec sed -iE '1s=^#!
*/usr/bin/\(python\|env p
third_party/lzma_sdk \
third_party/mesa \
third_party/metrics_proto \
+%if %{ozone}
+ third_party/minigbm \
+%endif
%if !%{with system_minizip}
third_party/minizip/ \
%endif
@@ -369,6 +393,9 @@ find -depth -type f -name "*.py" -exec sed -iE '1s=^#!
*/usr/bin/\(python\|env p
third_party/protobuf/third_party/six \
third_party/pyjson5 \
third_party/qcms \
+%if !%{with system_re2}
+ third_party/re2 \
+%endif
third_party/rnnoise \
third_party/s2cellid \
third_party/sfntly \
@@ -379,6 +406,7 @@ find -depth -type f -name "*.py" -exec sed -iE '1s=^#!
*/usr/bin/\(python\|env p
third_party/smhasher \
third_party/speech-dispatcher \
third_party/spirv-headers \
+ third_party/SPIRV-Tools \
third_party/spirv-tools-angle \
third_party/sqlite \
third_party/swiftshader \
@@ -389,6 +417,9 @@ find -depth -type f -name "*.py" -exec sed -iE '1s=^#!
*/usr/bin/\(python\|env p
third_party/usrsctp \
third_party/vulkan \
third_party/vulkan-validation-layers \
+%if %{ozone}
+ third_party/wayland \
+%endif
third_party/web-animations-js \
third_party/webdriver \
third_party/WebKit \
@@ -434,7 +465,9 @@ find -depth -type f -name "*.py" -exec sed -iE '1s=^#!
*/usr/bin/\(python\|env p
%endif
libxslt \
opus \
+%if %{with system_re2}
re2 \
+%endif
snappy \
yasm \
%if %{with system_minizip}
@@ -448,6 +481,7 @@ sed -i '/-static-libstdc++/d' tools/gn/build/gen.py
rmdir third_party/markupsafe
ln -s %{python2_sitearch}/markupsafe third_party/markupsafe
+
%if %{with system_ply}
rmdir third_party/ply
ln -s %{python2_sitelib}/ply third_party/ply
@@ -476,10 +510,10 @@ CBUILDFLAGS="$(echo '%{__global_cflags}' | sed -e
's/-fexceptions//' \
-e 's/-g1record-g1cc-switches//'
\
-e 's/^-g / /g' -e 's/ -g /
/g' -e 's/ -g$//g')"
CXXBUILDFLAGS="$(echo
'%{?__global_cxxflags}%{!?__global_cxxflags:%{__global_cflags}}' | sed -e
's/-fexceptions//' \
-
-e 's/-Werror=format-security//' \
-
-e 's/-pipe//' \
-
-e 's/-g1record-g1cc-switches//' \
-
-e 's/^-g / /g' -e 's/ -g / /g' -e 's/ -g$//g')"
+
-e 's/-Werror=format-security//' \
+
-e 's/-pipe//' \
+
-e 's/-g1record-g1cc-switches//' \
+
-e 's/^-g / /g' -e 's/ -g / /g' -e 's/ -g$//g')"
export CFLAGS="${CBUILDFLAGS}"
export CXXFLAGS="${CXXBUILDFLAGS} -fpermissive"
export LDFLAGS='%{__global_ldflags}'
@@ -490,9 +524,9 @@ export CXXFLAGS=$CXXFLAGS" -fpermissive"
gn_args=(
is_debug=false
use_vaapi=true
- enable_swiftshader=false
is_component_build=false
use_sysroot=false
+ enable_swiftshader=false
use_custom_libcxx=false
use_aura=true
'system_libdir="%{_lib}"'
@@ -550,6 +584,19 @@ gn_args+=(
concurrent_links=1
%endif
)
+
+
+# Ozone stuff
+gn_args+=(
+%if %{ozone}
+ use_ozone=true
+ ozone_auto_platforms=true
+ ozone_platform_wayland=true
+ use_xkbcommon=true
+%endif
+)
+
+
#symbol
gn_args+=(
%if %{debug_pkg}
@@ -645,8 +692,15 @@ appstream-util validate-relax --nonet
"%{buildroot}%{_metainfodir}/%{name}.appda
%{chromiumdir}/locales/*.pak
#########################################changelogs#################################################
%changelog
+* Thu Dec 06 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 71.0.3578.80-1
+- Update to 71.0.3578.80
+- Add a patch to fix libva version mismatch error
+- Re bundle re2 as it's ancient on Fedora
+- Enable experimental support for wayland-ozone in the spec file (WIP; disabled by
default)
+- Bring patch definitions closer to %%prep so to find and apply patches easier.
+
* Mon Nov 26 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 70.0.3538.110-1
-- Update to 70.0.3538.110
+- Update to 70.0.3538.110
* Thu Nov 15 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 70.0.3538.102-2
- Add a patch from upstream to remove sysroot-related options from gn bootstrap
diff --git a/enable-vaapi.patch b/enable-vaapi.patch
index 6211000..1997af3 100644
--- a/enable-vaapi.patch
+++ b/enable-vaapi.patch
@@ -1,4 +1,4 @@
-From 9eef10b939b9eee6e7bb58c4ca3a8e119df518c1 Mon Sep 17 00:00:00 2001
+From efdd5bdf093e9074c9eba73650ff5ad95b280ec8 Mon Sep 17 00:00:00 2001
From: Akarshan Biswas <akarshan.biswas(a)gmail.com>
Date: Sun, 4 Nov 2018 20:26:54 +0530
Subject: [PATCH] Enable vaapi on Linux
@@ -17,10 +17,10 @@ Subject: [PATCH] Enable vaapi on Linux
10 files changed, 52 insertions(+), 35 deletions(-)
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
-index d029d0648..39df8d6cf 100644
+index db54ccb61..f32075fb8 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
-@@ -1775,7 +1775,7 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -1797,7 +1797,7 @@ const FeatureEntry kFeatureEntries[] = {
"disable-accelerated-video-decode",
flag_descriptions::kAcceleratedVideoDecodeName,
flag_descriptions::kAcceleratedVideoDecodeDescription,
@@ -29,9 +29,9 @@ index d029d0648..39df8d6cf 100644
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
},
#if defined(OS_WIN)
-@@ -2457,12 +2457,12 @@ const FeatureEntry kFeatureEntries[] = {
- FEATURE_VALUE_TYPE(features::kOpenVR)},
- #endif // ENABLE_OPENVR
+@@ -2456,12 +2456,12 @@ const FeatureEntry kFeatureEntries[] = {
+ FEATURE_VALUE_TYPE(service_manager::features::kXRSandbox)},
+ #endif // ENABLE_ISOLATED_XR_SERVICE
#endif // ENABLE_VR
-#if defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
@@ -45,7 +45,7 @@ index d029d0648..39df8d6cf 100644
{"v8-cache-options", flag_descriptions::kV8CacheOptionsName,
flag_descriptions::kV8CacheOptionsDescription, kOsAll,
MULTI_VALUE_TYPE(kV8CacheOptionsChoices)},
-@@ -4444,12 +4444,14 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -4371,12 +4371,14 @@ const FeatureEntry kFeatureEntries[] = {
"AutofillDropdownLayout")},
#endif // OS_ANDROID
@@ -63,10 +63,10 @@ index d029d0648..39df8d6cf 100644
flag_descriptions::kEnableHomeLauncherGesturesName,
flag_descriptions::kEnableHomeLauncherGesturesDescription, kOsCrOS,
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
-index 0cb812619..df8ecb24e 100644
+index 6cc51bbfb..3c4babe3d 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
-@@ -3053,9 +3053,9 @@ const char kTextSuggestionsTouchBarDescription[] =
+@@ -2996,9 +2996,9 @@ const char kTextSuggestionsTouchBarDescription[] =
#endif
@@ -78,7 +78,7 @@ index 0cb812619..df8ecb24e 100644
const char kAcceleratedMjpegDecodeName[] =
"Hardware-accelerated mjpeg decode for captured frame";
-@@ -3063,6 +3063,18 @@ const char kAcceleratedMjpegDecodeDescription[] =
+@@ -3006,6 +3006,18 @@ const char kAcceleratedMjpegDecodeDescription[] =
"Enable hardware-accelerated mjpeg decode for captured frame where "
"available.";
@@ -97,7 +97,7 @@ index 0cb812619..df8ecb24e 100644
const char kAllowTouchpadThreeFingerClickName[] = "Touchpad
three-finger-click";
const char kAllowTouchpadThreeFingerClickDescription[] =
"Enables touchpad three-finger-click as middle button.";
-@@ -3564,12 +3576,6 @@ const char kUseMonitorColorSpaceDescription[] =
+@@ -3524,12 +3536,6 @@ const char kUseMonitorColorSpaceDescription[] =
"Enables Chrome to use the color space information provided by the
monitor"
" instead of the default sRGB color space.";
@@ -111,10 +111,10 @@ index 0cb812619..df8ecb24e 100644
"Experimental Chromecast support for Video Player";
const char kVideoPlayerChromecastSupportDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
-index b3c5e5691..14d7e33e9 100644
+index 944695782..38d8fe144 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
-@@ -1846,13 +1846,22 @@ extern const char
kPermissionPromptPersistenceToggleDescription[];
+@@ -1824,13 +1824,22 @@ extern const char
kPermissionPromptPersistenceToggleDescription[];
#endif // defined(OS_MACOSX)
@@ -139,7 +139,7 @@ index b3c5e5691..14d7e33e9 100644
extern const char kAllowTouchpadThreeFingerClickName[];
extern const char kAllowTouchpadThreeFingerClickDescription[];
-@@ -2158,9 +2167,6 @@ extern const char kUseMashDescription[];
+@@ -2145,9 +2154,6 @@ extern const char kUseMashDescription[];
extern const char kUseMonitorColorSpaceName[];
extern const char kUseMonitorColorSpaceDescription[];
@@ -150,7 +150,7 @@ index b3c5e5691..14d7e33e9 100644
extern const char kVideoPlayerChromecastSupportDescription[];
diff --git a/components/viz/service/main/viz_main_impl.cc
b/components/viz/service/main/viz_main_impl.cc
-index 2196abef4..b4e0a1ae1 100644
+index 6f5f55de7..b90db3738 100644
--- a/components/viz/service/main/viz_main_impl.cc
+++ b/components/viz/service/main/viz_main_impl.cc
@@ -41,7 +41,7 @@ std::unique_ptr<base::Thread> CreateAndStartIOThread() {
@@ -185,10 +185,10 @@ index 8974e441d..d7eba85a9 100644
+ }
}
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
-index f589d015d..03fd1b44a 100644
+index 8397889b6..188d960a4 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
-@@ -283,7 +283,7 @@ int GpuMain(const MainFunctionParams& parameters) {
+@@ -284,7 +284,7 @@ int GpuMain(const MainFunctionParams& parameters) {
base::PlatformThread::SetName("CrGpuMain");
@@ -197,7 +197,7 @@ index f589d015d..03fd1b44a 100644
// Set thread priority before sandbox initialization.
base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY);
#endif
-@@ -316,7 +316,7 @@ int GpuMain(const MainFunctionParams& parameters) {
+@@ -317,7 +317,7 @@ int GpuMain(const MainFunctionParams& parameters) {
GetContentClient()->SetGpuInfo(gpu_init->gpu_info());
base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL;
@@ -207,10 +207,10 @@ index f589d015d..03fd1b44a 100644
#endif
diff --git a/gpu/config/software_rendering_list.json
b/gpu/config/software_rendering_list.json
-index 445953a64..0aac9ddb6 100644
+index cb6118b6a..7b8ea0f75 100644
--- a/gpu/config/software_rendering_list.json
+++ b/gpu/config/software_rendering_list.json
-@@ -373,17 +373,6 @@
+@@ -369,17 +369,6 @@
"all"
]
},
@@ -229,10 +229,10 @@ index 445953a64..0aac9ddb6 100644
"id": 50,
"description": "Disable VMware software renderer on older
Mesa",
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
-index 684c1d5cf..e887e60bb 100644
+index 41bfa9172..30ca4f40a 100644
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
-@@ -468,7 +468,7 @@ bool IsVideoCaptureAcceleratedJpegDecodingEnabled() {
+@@ -495,7 +495,7 @@ bool IsVideoCaptureAcceleratedJpegDecodingEnabled() {
switches::kUseFakeJpegDecodeAccelerator)) {
return true;
}
@@ -242,7 +242,7 @@ index 684c1d5cf..e887e60bb 100644
#endif
return false;
diff --git a/media/filters/BUILD.gn b/media/filters/BUILD.gn
-index ab6215152..b8d1ee896 100644
+index d558b537a..9ad090e07 100644
--- a/media/filters/BUILD.gn
+++ b/media/filters/BUILD.gn
@@ -5,6 +5,7 @@
@@ -253,7 +253,7 @@ index ab6215152..b8d1ee896 100644
jumbo_source_set("filters") {
# Do not expand the visibility here without double-checking with OWNERS, this
-@@ -198,7 +199,7 @@ jumbo_source_set("filters") {
+@@ -200,7 +201,7 @@ jumbo_source_set("filters") {
deps += [ "//media/base/android" ]
}
@@ -263,10 +263,10 @@ index ab6215152..b8d1ee896 100644
"h264_bitstream_buffer.cc",
"h264_bitstream_buffer.h",
diff --git a/media/gpu/BUILD.gn b/media/gpu/BUILD.gn
-index 9ef4730a4..0c3a06c24 100644
+index 07bfdefda..7e33cd747 100644
--- a/media/gpu/BUILD.gn
+++ b/media/gpu/BUILD.gn
-@@ -501,6 +501,12 @@ if (use_v4l2_codec || use_vaapi || is_mac || is_win) {
+@@ -508,6 +508,12 @@ if (use_v4l2_codec || use_vaapi || is_mac || is_win) {
}
}
@@ -279,7 +279,7 @@ index 9ef4730a4..0c3a06c24 100644
if (use_vaapi) {
test("jpeg_encode_accelerator_unittest") {
deps = [
-@@ -571,6 +577,7 @@ if (use_v4l2_codec || use_vaapi) {
+@@ -578,6 +584,7 @@ if (is_chromeos || is_linux) {
if (use_ozone) {
deps += [ "//ui/ozone" ]
}
@@ -288,5 +288,5 @@ index 9ef4730a4..0c3a06c24 100644
}
--
-2.19.1
+2.19.2
diff --git a/unrar.patch b/nounrar.patch
similarity index 88%
rename from unrar.patch
rename to nounrar.patch
index 5951ab4..d4e680c 100644
--- a/unrar.patch
+++ b/nounrar.patch
@@ -1,8 +1,23 @@
+From 136a79606fb83485e6c10257bb2e970d306c6f5f Mon Sep 17 00:00:00 2001
+From: Akarshan Biswas <biswasab(a)akarshans-desk.biswasab.org>
+Date: Thu, 6 Dec 2018 12:53:47 +0530
+Subject: [PATCH] Don't use unrar
+
+---
+ .../check_client_download_request.cc | 69 -------------------
+ .../check_client_download_request.h | 1 -
+ chrome/common/safe_browsing/BUILD.gn | 2 -
+ chrome/services/file_util/public/cpp/BUILD.gn | 3 -
+ .../public/mojom/safe_archive_analyzer.mojom | 5 --
+ .../file_util/safe_archive_analyzer.cc | 9 ---
+ .../file_util/safe_archive_analyzer.h | 2 -
+ 7 files changed, 91 deletions(-)
+
diff --git
a/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc
b/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc
-index f5aaff83c87a..737e168ec5aa 100644
+index d1413bb1d..ec337e92c 100644
--- a/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc
+++ b/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc
-@@ -379,10 +379,6 @@ void CheckClientDownloadRequest::AnalyzeFile() {
+@@ -380,10 +380,6 @@ void CheckClientDownloadRequest::AnalyzeFile() {
// are enabled.
if
(item_->GetTargetFilePath().MatchesExtension(FILE_PATH_LITERAL(".zip"))) {
StartExtractZipFeatures();
@@ -13,7 +28,7 @@ index f5aaff83c87a..737e168ec5aa 100644
#if defined(OS_MACOSX)
} else if (item_->GetTargetFilePath().MatchesExtension(
FILE_PATH_LITERAL(".dmg")) ||
-@@ -499,71 +495,6 @@ void CheckClientDownloadRequest::ExtractFileFeatures(
+@@ -500,71 +496,6 @@ void CheckClientDownloadRequest::ExtractFileFeatures(
OnFileFeatureExtractionDone();
}
@@ -86,7 +101,7 @@ index f5aaff83c87a..737e168ec5aa 100644
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(item_); // Called directly from Start(), item should still exist.
diff --git
a/chrome/browser/safe_browsing/download_protection/check_client_download_request.h
b/chrome/browser/safe_browsing/download_protection/check_client_download_request.h
-index 9042d5d589ab..1c50dcff4312 100644
+index ae0f6fbe4..b74dde031 100644
--- a/chrome/browser/safe_browsing/download_protection/check_client_download_request.h
+++ b/chrome/browser/safe_browsing/download_protection/check_client_download_request.h
@@ -148,7 +148,6 @@ class CheckClientDownloadRequest
@@ -98,7 +113,7 @@ index 9042d5d589ab..1c50dcff4312 100644
base::TimeTicks rar_analysis_start_time_;
base::TimeTicks zip_analysis_start_time_;
diff --git a/chrome/common/safe_browsing/BUILD.gn b/chrome/common/safe_browsing/BUILD.gn
-index 92cc4f57d03b..4780e931e9e7 100644
+index f971c742a..33f7c9d31 100644
--- a/chrome/common/safe_browsing/BUILD.gn
+++ b/chrome/common/safe_browsing/BUILD.gn
@@ -68,7 +68,6 @@ if (safe_browsing_mode == 1) {
@@ -109,7 +124,7 @@ index 92cc4f57d03b..4780e931e9e7 100644
]
defines = [
-@@ -121,7 +120,6 @@ source_set("safe_browsing") {
+@@ -136,7 +135,6 @@ source_set("safe_browsing") {
deps += [
":archive_analyzer_results",
":download_protection_util",
@@ -118,7 +133,7 @@ index 92cc4f57d03b..4780e931e9e7 100644
]
diff --git a/chrome/services/file_util/public/cpp/BUILD.gn
b/chrome/services/file_util/public/cpp/BUILD.gn
-index 158cbfc6d157..6d8b0df7c59e 100644
+index 158cbfc6d..6d8b0df7c 100644
--- a/chrome/services/file_util/public/cpp/BUILD.gn
+++ b/chrome/services/file_util/public/cpp/BUILD.gn
@@ -14,8 +14,6 @@ source_set("cpp") {
@@ -139,7 +154,7 @@ index 158cbfc6d157..6d8b0df7c59e 100644
]
diff --git a/chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom
b/chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom
-index 6983f7b415d4..15d5aaba3657 100644
+index 6983f7b41..15d5aaba3 100644
--- a/chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom
+++ b/chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom
@@ -22,11 +22,6 @@ interface SafeArchiveAnalyzer {
@@ -155,7 +170,7 @@ index 6983f7b415d4..15d5aaba3657 100644
[Native]
diff --git a/chrome/services/file_util/safe_archive_analyzer.cc
b/chrome/services/file_util/safe_archive_analyzer.cc
-index a13b42b197b3..db49c37b9b49 100644
+index a13b42b19..db49c37b9 100644
--- a/chrome/services/file_util/safe_archive_analyzer.cc
+++ b/chrome/services/file_util/safe_archive_analyzer.cc
@@ -44,12 +44,3 @@ void SafeArchiveAnalyzer::AnalyzeDmgFile(base::File dmg_file,
@@ -172,7 +187,7 @@ index a13b42b197b3..db49c37b9b49 100644
- std::move(callback).Run(results);
-}
diff --git a/chrome/services/file_util/safe_archive_analyzer.h
b/chrome/services/file_util/safe_archive_analyzer.h
-index f21efa6f57ba..2eda4f378bcc 100644
+index f21efa6f5..2eda4f378 100644
--- a/chrome/services/file_util/safe_archive_analyzer.h
+++ b/chrome/services/file_util/safe_archive_analyzer.h
@@ -25,8 +25,6 @@ class SafeArchiveAnalyzer : public chrome::mojom::SafeArchiveAnalyzer
{
@@ -184,3 +199,6 @@ index f21efa6f57ba..2eda4f378bcc 100644
const std::unique_ptr<service_manager::ServiceContextRef> service_ref_;
+--
+2.19.2
+
diff --git a/py2-bootstrap.patch b/py2-bootstrap.patch
index 8a5db71..9d83256 100644
--- a/py2-bootstrap.patch
+++ b/py2-bootstrap.patch
@@ -1,7 +1,7 @@
-diff -up
chromium-69.0.3497.81/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py.py2
chromium-69.0.3497.81/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py
----
chromium-69.0.3497.81/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py.py2 2018-09-06
10:45:17.919774145 -0400
-+++
chromium-69.0.3497.81/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py 2018-09-06
10:45:17.914774254 -0400
-@@ -58,7 +58,7 @@ def _MinifyJS(input_js):
+diff -urN
chromium-71.0.3578.30.orig/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py
chromium-71.0.3578.30/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py
+---
chromium-71.0.3578.30.orig/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py 2018-11-08
14:32:09.783181849 +0300
++++
chromium-71.0.3578.30/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py 2018-11-08
14:32:47.160705794 +0300
+@@ -58,7 +58,7 @@
with tempfile.NamedTemporaryFile() as _:
args = [
@@ -10,7 +10,7 @@ diff -up
chromium-69.0.3497.81/third_party/catapult/common/py_vulcanize/py_vulca
rjsmin_path
]
p = subprocess.Popen(args,
-@@ -177,7 +177,7 @@ def _MinifyCSS(css_text):
+@@ -177,7 +177,7 @@
os.path.join(py_vulcanize_path, 'third_party', 'rcssmin',
'rcssmin.py'))
with tempfile.NamedTemporaryFile() as _:
@@ -19,15 +19,15 @@ diff -up
chromium-69.0.3497.81/third_party/catapult/common/py_vulcanize/py_vulca
p = subprocess.Popen(rcssmin_args,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
-diff -up chromium-69.0.3497.81/tools/gn/bootstrap/bootstrap.py.py2
chromium-69.0.3497.81/tools/gn/bootstrap/bootstrap.py
---- chromium-69.0.3497.81/tools/gn/bootstrap/bootstrap.py.py2 2018-09-06
10:44:42.225550561 -0400
-+++ chromium-69.0.3497.81/tools/gn/bootstrap/bootstrap.py 2018-09-06 13:06:24.251636231
-0400
-@@ -87,7 +87,7 @@ def main(argv):
- if not options.debug:
- gn_gen_args += ' is_debug=false'
- subprocess.check_call([
-- gn_path, 'gen', out_dir,
-+ gn_path, 'gen', out_dir, ' --script-executable=/usr/bin/python2',
- '--args=%s' % gn_gen_args, "--root=" + SRC_ROOT
- ])
+diff -urN chromium-71.0.3578.30.orig/tools/gn/bootstrap/bootstrap.py
chromium-71.0.3578.30/tools/gn/bootstrap/bootstrap.py
+--- chromium-71.0.3578.30.orig/tools/gn/bootstrap/bootstrap.py 2018-11-08
14:33:17.817140200 +0300
++++ chromium-71.0.3578.30/tools/gn/bootstrap/bootstrap.py 2018-11-08 14:33:21.274189185
+0300
+@@ -93,7 +93,7 @@
+ if not options.debug:
+ gn_gen_args += ' is_debug=false'
+ subprocess.check_call([
+- gn_path, 'gen', out_dir,
++ gn_path, 'gen', '--script-executable=/usr/bin/python2',
out_dir,
+ '--args=%s' % gn_gen_args, "--root=" + SRC_ROOT
+ ])
diff --git a/relax-libva-version.patch b/relax-libva-version.patch
new file mode 100644
index 0000000..e297fd6
--- /dev/null
+++ b/relax-libva-version.patch
@@ -0,0 +1,56 @@
+From 6f1309ef8fe10965e4d0018b4f1b80ac6deccdaa Mon Sep 17 00:00:00 2001
+From: Azhar Shaikh <azhar.shaikh(a)intel.com>
+Date: Fri, 30 Nov 2018 23:11:57 +0000
+Subject: [PATCH] media/gpu/vaapi: Relax the version check for VA-API
+
+Since the newer versions of VA-API are ABI compatible, relax the
+version checks for VA-API, by using VA_CHECK_VERSION().
+This will help in updating the libva to the latest releases,
+while still supporting the old versions, till the new version of
+libva is merged and picked by the builds. Thus ensuring that
+hardware accleration is not broken while updating the libva.
+
+Bug: 905814
+TEST=libva-2.3.0 and libva-2.1.0 are able to do hardware acceleration.
+
+Suggested-by: Alexandre Courbot <acourbot(a)chromium.org>
+Signed-off-by: Azhar Shaikh <azhar.shaikh(a)intel.com>
+Change-Id: I510549f72290d20676927eeeeb89a87199c062af
+Reviewed-on:
https://chromium-review.googlesource.com/c/1352519
+Reviewed-by: Alexandre Courbot <acourbot(a)chromium.org>
+Reviewed-by: Hirokazu Honda <hiroh(a)chromium.org>
+Commit-Queue: Miguel Casas <mcasas(a)chromium.org>
+Cr-Commit-Position: refs/heads/master@{#612832}
+---
+
+diff --git a/AUTHORS b/AUTHORS
+index 567fe15..ff42fc5 100644
+--- a/AUTHORS
++++ b/AUTHORS
+@@ -103,6 +103,7 @@
+ Attila Dusnoki <dati91(a)gmail.com>
+ Avinaash Doreswamy <avi.nitk(a)samsung.com>
+ Ayush Khandelwal <k.ayush(a)samsung.com>
++Azhar Shaikh <azhar.shaikh(a)intel.com>
+ Balazs Kelemen <b.kelemen(a)samsung.com>
+ Baul Eun <baul.eun(a)samsung.com>
+ Behara Mani Shyam Patro <behara.ms(a)samsung.com>
+diff --git a/media/gpu/vaapi/vaapi_wrapper.cc b/media/gpu/vaapi/vaapi_wrapper.cc
+index b415642..053384d 100644
+--- a/media/gpu/vaapi/vaapi_wrapper.cc
++++ b/media/gpu/vaapi/vaapi_wrapper.cc
+@@ -333,7 +333,13 @@
+ DVLOG(1) << "VAAPI version: " << major_version <<
"." << minor_version << " "
+ << va_vendor_string_;
+
+- if (major_version != VA_MAJOR_VERSION || minor_version != VA_MINOR_VERSION) {
++ // The VAAPI version is determined from what is loaded on the system by
++ // calling vaInitialize(). We want a runtime evaluation of libva version,
++ // of what is loaded on the system, with, what browser is compiled with.
++ // Also since the libva is now ABI-compatible, relax the version check
++ // which helps in upgrading the libva, without breaking any existing
++ // functionality.
++ if (!VA_CHECK_VERSION(major_version, minor_version, 0)) {
+ LOG(ERROR) << "This build of Chromium requires VA-API version "
+ << VA_MAJOR_VERSION << "." <<
VA_MINOR_VERSION
+ << ", system version: " << major_version <<
"." << minor_version;
diff --git a/sources b/sources
index 12f78f5..4e2d3b4 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f45eadcee2101b1e3f57c98765616d14 chromium-70.0.3538.110.tar.xz
+2cd599a74930294cd01fa79d6ada2198 chromium-71.0.3578.80.tar.xz
diff --git a/widevine.patch b/widevine.patch
index 2fc8d79..4a9f78f 100644
--- a/widevine.patch
+++ b/widevine.patch
@@ -1,23 +1,11 @@
-diff -upr chromium-48.0.2564.82.orig/third_party/widevine/cdm/stub/widevine_cdm_version.h
chromium-48.0.2564.82/third_party/widevine/cdm/stub/widevine_cdm_version.h
----
chromium-48.0.2564.82.orig/third_party/widevine/cdm/stub/widevine_cdm_version.h 2016-01-14
01:05:17.000000000 +0200
-+++ chromium-48.0.2564.82/third_party/widevine/cdm/stub/widevine_cdm_version.h 2016-01-21
19:18:51.287978456 +0200
-@@ -12,4 +12,6 @@
+Index: chromium-71.0.3573.0/third_party/widevine/cdm/widevine_cdm_version.h
+===================================================================
+--- chromium-71.0.3573.0.orig/third_party/widevine/cdm/widevine_cdm_version.h
++++ chromium-71.0.3573.0/third_party/widevine/cdm/widevine_cdm_version.h
+@@ -11,5 +11,6 @@
+ // If the Widevine CDM is available define the following:
+ // - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
+ // as a string, e.g., "1.0.123.456").
++#define WIDEVINE_CDM_VERSION_STRING "unknown"
- #define WIDEVINE_CDM_AVAILABLE
-
-+#define WIDEVINE_CDM_VERSION_STRING "67"
-+
- #endif // WIDEVINE_CDM_VERSION_H_
#endif // WIDEVINE_CDM_VERSION_H_
-
---- a/third_party/widevine/cdm/BUILD.gn
-+++ b/third_party/widevine/cdm/BUILD.gn
-@@ -11,7 +11,7 @@ import("//third_party/widevine/cdm/widev
- # Internal Cast builds set enable_widevine=true to bring in Widevine support.
- # TODO(xhwang): Support component updated CDM on other platforms and remove this
- # assert.
--assert(!enable_widevine || is_win || is_mac || is_chromecast,
-+assert(!enable_widevine || is_win || is_mac || is_chromecast || is_linux,
- "Component updated CDM only supported on Windows and Mac for now.")
-
- widevine_arch = current_cpu