commit 27c3c5207390c757a188ac7ded17c6bb34c28cca
Author: Akarshan Biswas <hellbanger(a)ga-lmt-s2.biswasab.org>
Date: Sat Oct 20 11:27:21 2018 +0530
Update to 70.0.3538.67 with new vaapi patch
.gitignore | 1 +
chromium-gcc8-r588316.patch | 98 ++++++++
chromium-gcc8-r588547.patch | 30 +++
chromium-gcc8-r589614.patch | 37 +++
chromium-vaapi.appdata.xml | 4 +-
chromium-vaapi.sh | 4 -
chromium-vaapi.spec | 193 +++++++++++-----
enable-vaapi.patch | 257 +++++++++++++++++++++
silencegcc.patch | 31 +++
sources | 2 +-
vaapi.patch | 542 --------------------------------------------
11 files changed, 588 insertions(+), 611 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 6317544..808c350 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/chromium-69.0.3497.100.tar.xz
+/chromium-70.0.3538.67.tar.xz
diff --git a/chromium-gcc8-r588316.patch b/chromium-gcc8-r588316.patch
new file mode 100644
index 0000000..d980805
--- /dev/null
+++ b/chromium-gcc8-r588316.patch
@@ -0,0 +1,98 @@
+From 87902b3202f81d689dd314c17006ffc907fe12a1 Mon Sep 17 00:00:00 2001
+From: Wang Qing <wangqing-hf(a)loongson.cn>
+Date: Mon, 3 Sep 2018 02:41:08 +0000
+Subject: [PATCH] Fix build error for blink.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This CLs fixed the error of constexpr function call to non-constexpr function.
+
+Bug: 878202
+Change-Id: I6ad217a687e62a9a384980d852743a56479de3a9
+Reviewed-on:
https://chromium-review.googlesource.com/1192467
+Commit-Queue: 汪 清 <wangqing-hf(a)loongson.cn>
+Reviewed-by: Eric Willigers <ericwilligers(a)chromium.org>
+Cr-Commit-Position: refs/heads/master@{#588316}
+---
+ .../core/animation/animation_time_delta.cc | 22 ++++++++++++++
+ .../core/animation/animation_time_delta.h | 30 +++++++------------
+ 2 files changed, 32 insertions(+), 20 deletions(-)
+
+diff --git a/third_party/blink/renderer/core/animation/animation_time_delta.cc
b/third_party/blink/renderer/core/animation/animation_time_delta.cc
+index 1b25469c7f2f..2e30a18890da 100644
+--- a/third_party/blink/renderer/core/animation/animation_time_delta.cc
++++ b/third_party/blink/renderer/core/animation/animation_time_delta.cc
+@@ -7,6 +7,28 @@
+ namespace blink {
+
+ #if !defined(BLINK_ANIMATION_USE_TIME_DELTA)
++// Comparison operators on AnimationTimeDelta.
++bool CORE_EXPORT operator==(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs) {
++ return lhs.InSecondsF() == rhs.InSecondsF();
++}
++bool CORE_EXPORT operator!=(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs) {
++ return lhs.InSecondsF() != rhs.InSecondsF();
++}
++bool CORE_EXPORT operator>(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs) {
++ return lhs.InSecondsF() > rhs.InSecondsF();
++}
++bool CORE_EXPORT operator>=(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs) {
++ return lhs.InSecondsF() >= rhs.InSecondsF();
++}
++bool CORE_EXPORT operator<=(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs) {
++ return lhs.InSecondsF() <= rhs.InSecondsF();
++}
++
+ std::ostream& operator<<(std::ostream& os, AnimationTimeDelta time) {
+ return os << time.InSecondsF() << " s";
+ }
+diff --git a/third_party/blink/renderer/core/animation/animation_time_delta.h
b/third_party/blink/renderer/core/animation/animation_time_delta.h
+index 1903c1150d3e..95d218466d90 100644
+--- a/third_party/blink/renderer/core/animation/animation_time_delta.h
++++ b/third_party/blink/renderer/core/animation/animation_time_delta.h
+@@ -90,26 +90,16 @@ AnimationTimeDelta operator*(T a, AnimationTimeDelta td) {
+ }
+
+ // Comparison operators on AnimationTimeDelta.
+-constexpr bool CORE_EXPORT operator==(const AnimationTimeDelta& lhs,
+- const AnimationTimeDelta& rhs) {
+- return lhs.InSecondsF() == rhs.InSecondsF();
+-}
+-constexpr bool CORE_EXPORT operator!=(const AnimationTimeDelta& lhs,
+- const AnimationTimeDelta& rhs) {
+- return lhs.InSecondsF() != rhs.InSecondsF();
+-}
+-constexpr bool CORE_EXPORT operator>(const AnimationTimeDelta& lhs,
+- const AnimationTimeDelta& rhs) {
+- return lhs.InSecondsF() > rhs.InSecondsF();
+-}
+-constexpr bool CORE_EXPORT operator>=(const AnimationTimeDelta& lhs,
+- const AnimationTimeDelta& rhs) {
+- return lhs.InSecondsF() >= rhs.InSecondsF();
+-}
+-constexpr bool CORE_EXPORT operator<=(const AnimationTimeDelta& lhs,
+- const AnimationTimeDelta& rhs) {
+- return lhs.InSecondsF() <= rhs.InSecondsF();
+-}
++bool CORE_EXPORT operator==(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs);
++bool CORE_EXPORT operator!=(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs);
++bool CORE_EXPORT operator>(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs);
++bool CORE_EXPORT operator>=(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs);
++bool CORE_EXPORT operator<=(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs);
+
+ // Defined to allow DCHECK_EQ/etc to work with the class.
+ CORE_EXPORT std::ostream& operator<<(std::ostream& os, AnimationTimeDelta
time);
+--
+2.17.2
+
diff --git a/chromium-gcc8-r588547.patch b/chromium-gcc8-r588547.patch
new file mode 100644
index 0000000..5f12f7f
--- /dev/null
+++ b/chromium-gcc8-r588547.patch
@@ -0,0 +1,30 @@
+From e3ad3deb6a6e79284f3748fa7410311d87df91c5 Mon Sep 17 00:00:00 2001
+From: Henrique Nakashima <hnakashima(a)chromium.org>
+Date: Tue, 4 Sep 2018 16:49:51 +0000
+Subject: [PATCH] IWYU: stdint.h in pdfium_mem_buffer_file_write.h for uint8_t
+
+Bug: 879900
+Change-Id: I9c15d1c280a23c53d31f2d72c9d0d1db79eab886
+Reviewed-on:
https://chromium-review.googlesource.com/1204410
+Reviewed-by: Lei Zhang <thestig(a)chromium.org>
+Commit-Queue: Henrique Nakashima <hnakashima(a)chromium.org>
+Cr-Commit-Position: refs/heads/master@{#588547}
+---
+ pdf/pdfium/pdfium_mem_buffer_file_write.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/pdf/pdfium/pdfium_mem_buffer_file_write.h
b/pdf/pdfium/pdfium_mem_buffer_file_write.h
+index 03c54bb63800..82e82d23684d 100644
+--- a/pdf/pdfium/pdfium_mem_buffer_file_write.h
++++ b/pdf/pdfium/pdfium_mem_buffer_file_write.h
+@@ -6,6 +6,7 @@
+ #define PDF_PDFIUM_PDFIUM_MEM_BUFFER_FILE_WRITE_H_
+
+ #include <stddef.h>
++#include <stdint.h>
+
+ #include <vector>
+
+--
+2.17.2
+
diff --git a/chromium-gcc8-r589614.patch b/chromium-gcc8-r589614.patch
new file mode 100644
index 0000000..0c187fd
--- /dev/null
+++ b/chromium-gcc8-r589614.patch
@@ -0,0 +1,37 @@
+From cbdb8bd6567c8143dc8c1e5e86a21a8ea064eea4 Mon Sep 17 00:00:00 2001
+From: Maksim Sisov <msisov(a)igalia.com>
+Date: Fri, 7 Sep 2018 18:57:42 +0000
+Subject: [PATCH] OmniboxTextView: fix gcc error for structure initialization
+
+It looks like there is bug in GCC 6, which cannot go through
+structure initialization normally.
+
+Thus, instead of a default initialization of one of the members,
+explicitly initialize it to a default value.
+
+Change-Id: Ia55cc6658e6b6b2f8a80c2582dd28f001c9e648c
+Reviewed-on:
https://chromium-review.googlesource.com/1213181
+Reviewed-by: Scott Violet <sky(a)chromium.org>
+Commit-Queue: Maksim Sisov <msisov(a)igalia.com>
+Cr-Commit-Position: refs/heads/master@{#589614}
+---
+ chrome/browser/ui/views/omnibox/omnibox_text_view.cc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/chrome/browser/ui/views/omnibox/omnibox_text_view.cc
b/chrome/browser/ui/views/omnibox/omnibox_text_view.cc
+index f0a8083dc930..9021284f166d 100644
+--- a/chrome/browser/ui/views/omnibox/omnibox_text_view.cc
++++ b/chrome/browser/ui/views/omnibox/omnibox_text_view.cc
+@@ -175,7 +175,8 @@ void ApplyTextStyleForType(SuggestionAnswer::TextStyle text_style,
+ style = {part_color, .baseline = gfx::SUPERIOR};
+ break;
+ case SuggestionAnswer::TextStyle::BOLD:
+- style = {part_color, .weight = gfx::Font::Weight::BOLD};
++ style = {part_color, .baseline = gfx::NORMAL_BASELINE,
++ .weight = gfx::Font::Weight::BOLD};
+ break;
+ case SuggestionAnswer::TextStyle::NORMAL:
+ case SuggestionAnswer::TextStyle::NORMAL_DIM:
+--
+2.17.2
+
diff --git a/chromium-vaapi.appdata.xml b/chromium-vaapi.appdata.xml
index a2b2064..167b69a 100644
--- a/chromium-vaapi.appdata.xml
+++ b/chromium-vaapi.appdata.xml
@@ -2,7 +2,7 @@
<!-- Referenced from
https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#...
-->
<component type="desktop">
<id>chromium-vaapi.desktop</id>
- <update_contact> chromium-vaapi-owner(a)rpmfusion.org</update_contact>
+ <update_contact>chromium-vaapi-owner(a)rpmfusion.org</update_contact>
<metadata_license>CC0-1.0</metadata_license>
<project_license>BSD-3-Clause and LGPL-2.1+ and Apache-2.0 and IJG and MIT and
GPL-2.0+ and ISC and OpenSSL and (MPL-1.1 or GPL-2.0 or LGPL-2.0)</project_license>
<name>chromium-vaapi</name>
@@ -27,7 +27,7 @@ Sometimes "Video Decode" in the "Graphics Feature
Status" maybe misleading, Plea
<
image>https://gitlab.com/biswasab/Project-screenshots/raw/master/a.png...
</screenshot>
<screenshot>
- <caption>The chrome://gpu page</caption>
+ <caption>The chrome GPU page</caption>
<
image>https://gitlab.com/biswasab/Project-screenshots/raw/master/b.png...
</screenshot>
</screenshots>
diff --git a/chromium-vaapi.sh b/chromium-vaapi.sh
index 77a0027..dbdaf4a 100644
--- a/chromium-vaapi.sh
+++ b/chromium-vaapi.sh
@@ -50,11 +50,7 @@ CHROMIUM_DISTRO_FLAGS=" --enable-plugins \
--enable-extensions \
--enable-user-scripts \
--enable-printing \
- --enable-accelerated-video \
- --enable-native-gpu-memory-buffers \
- --enable-accelerated-mjpeg-decode \
--enable-gpu-rasterization \
- --disable-gpu-driver-bug-workarounds \
--enable-sync"
exec -a "$0" "@@CHROMIUMDIR@@/$(basename "$0" | sed
's/\.sh$//')" $CHROMIUM_DISTRO_FLAGS "$@"
diff --git a/chromium-vaapi.spec b/chromium-vaapi.spec
index 958163b..9ecd1ef 100644
--- a/chromium-vaapi.spec
+++ b/chromium-vaapi.spec
@@ -1,13 +1,3 @@
-# This spec file is based on other spec files, ebuilds, PKGBUILDs available from
-# [1]
https://repos.fedorapeople.org/repos/spot/chromium/
-# [2]
https://copr.fedoraproject.org/coprs/churchyard/chromium-russianfedora-te...
-# [3]
https://www.archlinux.org/packages/extra/x86_64/chromium/
-# [4]
https://src.fedoraproject.org/rpms/chromium/
-# [5]
https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/
-# [6]
https://copr.fedorainfracloud.org/coprs/lantw44/chromium/
-# Get the version number of latest stable version
-# $ curl -s 'https://omahaproxy.appspot.com/all?os=linux&channel=stable' |
sed 1d | cut -d , -f 3
-######################################################################################################################
#Global Libraries
#Do not turn it on in Fedora copr!
%global freeworld 1
@@ -26,8 +16,8 @@
%global __requires_exclude %{chromiumdir}/.*\\.so
%global __provides_exclude_from %{chromiumdir}/.*\\.so
#######################################CONFIGS###########################################
-# Require harfbuzz >= 1.5.0 for hb_glyph_info_t
-%if 0%{?fedora} >= 28
+#Require harfbuzz >= 1.8.6 for hb_font_funcs_set_glyph_h_advances_func
+%if 0%{?fedora} >= 29
%bcond_without system_harfbuzz
%else
%bcond_with system_harfbuzz
@@ -51,46 +41,86 @@
%endif
#Turn on verbose mode
%global debug_logs 1
-#Build debug packages for debugging
-%global debug_pkg 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
+# Enabled by default
+%global jumbo 1
+#------------------------------------------------------
+%if %{clang}
+#Disable Build debug packages for debugging on clang
+%global debug_pkg 0
+#Disable building with Fedora compilation flags on clang
+%global fedora_compilation_flags 0
+%else
+#Build debug packages for debugging
+%global debug_pkg 1
#Allow building with Fedora compilation flags
%global fedora_compilation_flags 1
+%endif
+# Use ld in rawhide as gold is faulty
+%if 0%{?fedora} >= 30
+%global stopgold 1
+%else
+%global stopgold 0
+%endif
##############################Package Definitions######################################
Name: chromium-vaapi
-Version: 69.0.3497.100
-Release: 4%{?dist}
+Version: 70.0.3538.67
+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)
URL:
https://www.chromium.org/Home
%if %{freeworld}
Source0:
https://commondatastorage.googleapis.com/chromium-browser-official/chromi...
%else
-Source0: chromium-%{version}-clean.tar.xz
+# Unfortunately, Fedora & Copr forbids uploading sources with patent-encumbered
+# ffmpeg code even if they are never compiled and linked to target binraies,
+# so we must repackage upstream tarballs to satisfy this requirement. However,
+# we cannot simply delete all code of ffmpeg because this will disable support
+# for some commonly-used free codecs such as Ogg Theora. Instead, helper
+# 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
+# to 1 to use the upstreanm packaged source.
+# The repackaged source tarball used here is produced by:
+# ./chromium-latest.py --stable --ffmpegclean --ffmpegarm --deleteunrar
+Source0: chromium-%{version}-clean.tar.xz
%endif
# The following two source files are copied and modified from the chromium source
-Source10: %{name}.sh
-#Add our own appdata file. ##TODO
-Source11: %{name}.appdata.xml
+Source10: %{name}.sh
+#Add our own appdata file.
+Source11: %{name}.appdata.xml
#Personal stuff
-Source15: LICENSE
-#Video acceleration patch from
https://chromium-review.googlesource.com/c/chromium/src/+/532294
-Patch1: vaapi.patch
+Source15: LICENSE
+# Enable video acceleration on chromium for Linux
+# Enabled video decode acceleration and webrtc encode acceleration(flag disabled by
default)
+# Used existing flag instead of creating a new one
+Patch1: enable-vaapi.patch
+# Enable support for widevine
Patch2: widevine.patch
%if %{clang}
#Will use any clang patch here
#Fix breaking builds caused by gcc_ar_wrapper.py from upstream
-Patch7: llvm-arflags.patch
+Patch7: llvm-arflags.patch
%else
#Gcc patches area.
-%endif
-#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
-#This build should be only available to amd64
+#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
+%endif
+# 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
+# This build should be only available to amd64
ExclusiveArch: x86_64
########################################################################################
#Compiler settings
@@ -104,7 +134,7 @@ BuildRequires: gcc-c++
%endif
# Basic tools and libraries needed for building
BuildRequires: ninja-build, nodejs, bison, gperf, hwdata
-BuildRequires: libgcc, glibc, libatomic, libstdc++-static
+BuildRequires: libgcc, glibc, libatomic
BuildRequires: libcap-devel, cups-devel, alsa-lib-devel
BuildRequires: mesa-libGL-devel, mesa-libEGL-devel
%if %{with system_minizip}
@@ -195,6 +225,7 @@ find -depth -type f -name "*.py" -exec sed -iE '1s=^#!
*/usr/bin/\(python\|env p
net/third_party/nss \
net/third_party/quic \
net/third_party/spdy \
+ net/third_party/uri_template \
third_party/abseil-cpp \
third_party/adobe \
third_party/analytics \
@@ -223,6 +254,7 @@ find -depth -type f -name "*.py" -exec sed -iE '1s=^#!
*/usr/bin/\(python\|env p
third_party/catapult/common/py_vulcanize/third_party/rcssmin \
third_party/catapult/common/py_vulcanize/third_party/rjsmin \
third_party/catapult/third_party/polymer \
+ third_party/catapult/third_party/six \
third_party/catapult/tracing/third_party/d3 \
third_party/catapult/tracing/third_party/gl-matrix \
third_party/catapult/tracing/third_party/jszip \
@@ -262,6 +294,8 @@ find -depth -type f -name "*.py" -exec sed -iE '1s=^#!
*/usr/bin/\(python\|env p
third_party/leveldatabase \
third_party/libaddressinput \
third_party/libaom \
+ third_party/libaom/source/libaom/third_party/vector \
+ third_party/libaom/source/libaom/third_party/x86inc \
third_party/libjingle \
third_party/libphonenumber \
third_party/libsecret \
@@ -336,6 +370,13 @@ find -depth -type f -name "*.py" -exec sed -iE '1s=^#!
*/usr/bin/\(python\|env p
third_party/webdriver \
third_party/WebKit \
third_party/webrtc \
+ third_party/webrtc/common_audio/third_party/fft4g \
+ third_party/webrtc/common_audio/third_party/spl_sqrt_floor \
+ third_party/webrtc/modules/third_party/fft \
+ third_party/webrtc/modules/third_party/g711 \
+ third_party/webrtc/modules/third_party/g722 \
+ third_party/webrtc/rtc_base/third_party/base64 \
+ third_party/webrtc/rtc_base/third_party/sigslot \
third_party/widevine \
third_party/woff2 \
third_party/xdg-utils \
@@ -346,10 +387,10 @@ find -depth -type f -name "*.py" -exec sed -iE '1s=^#!
*/usr/bin/\(python\|env p
%endif
tools/gn/base/third_party/icu \
url/third_party/mozilla \
- v8/third_party/antlr4 \
v8/src/third_party/valgrind \
v8/src/third_party/utf8-decoder \
- v8/third_party/inspector_protocol
+ v8/third_party/inspector_protocol \
+ v8/third_party/v8
./build/linux/unbundle/replace_gn_files.py --system-libraries \
flac \
@@ -376,15 +417,12 @@ find -depth -type f -name "*.py" -exec sed -iE '1s=^#!
*/usr/bin/\(python\|env p
%if %{with system_minizip}
zlib
%endif
-
sed -i 's|//third_party/usb_ids|/usr/share/hwdata|g' device/usb/BUILD.gn
-%if %{clang}
-# Remove compiler flags not supported by our system clang
- sed -i \
- -e '/"-Wno-ignored-pragma-optimize"/d' \
- build/config/compiler/BUILD.gn
-%endif
+
+# Don't use static libstdc++
+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}
@@ -396,7 +434,7 @@ mkdir -p third_party/node/linux/node-linux-x64/bin
ln -s %{_bindir}/node third_party/node/linux/node-linux-x64/bin/node
# Hard code extra version
FILE=chrome/common/channel_info_posix.cc
-sed -i.orig -e 's/getenv("CHROME_VERSION_EXTRA")/"Chromium(vaapi)
Fedora Project"/' $FILE
+sed -i.orig -e 's/getenv("CHROME_VERSION_EXTRA")/"chromium-vaapi
Fedora Project"/' $FILE
#####################################BUILD#############################################
%build
#export compilar variables
@@ -407,28 +445,28 @@ export CC=clang CXX=clang++
export AR=ar NM=nm
export CC=gcc CXX=g++
%if %{fedora_compilation_flags}
-#Build falgs to make hardened binaries
-#Remove some flags which can create conflicts with chromium gyp flags.
-export CFLAGS="$(echo '%{__global_cflags}' |sed -e
's/-fexceptions//' \
- -e 's/-Werror=format-security//'
\
- -e 's/-pipe//' \
- -e 's/-g/-g1/g' \
- -e 's/-g1record-g1cc-switches//'
)"
-export CXXFLAGS="$(echo
'%{?__global_cxxflags}%{!?__global_cxxflags:%{__global_cflags}}' | sed -e
's/-fexceptions//' \
-
-e 's/-Werror=format-security//' \
-
-e 's/-pipe//' \
-
-e 's/-g/-g1/g' \
-
-e 's/-g1record-g1cc-switches//' )"
-
+#Build flags to make hardened binaries
+#Remove some flags which are incompatible with chromium code.
+CBUILDFLAGS="$(echo '%{__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')"
+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')"
+export CFLAGS="${CBUILDFLAGS}"
+export CXXFLAGS="${CXXBUILDFLAGS} -fpermissive"
export LDFLAGS='%{__global_ldflags}'
%else
-export CXXFLAGS=$CXXFLAGS" -fno-delete-null-pointer-checks"
+export CXXFLAGS=$CXXFLAGS" -fpermissive"
%endif
%endif
gn_args=(
is_debug=false
use_vaapi=true
- use_gtk3=true
enable_swiftshader=false
is_component_build=false
use_sysroot=false
@@ -441,6 +479,7 @@ gn_args=(
use_kerberos=true
use_libpci=true
use_pulseaudio=true
+ link_pulseaudio=true
use_system_freetype=true
enable_widevine=true
%if %{with system_harfbuzz}
@@ -466,6 +505,7 @@ gn_args=(
'google_default_client_id="%{default_client_id}"'
'google_default_client_secret="%{default_client_secret}"'
)
+# Gold is faulty on rawhide so disabled it.
gn_args+=(
%if %{clang}
is_clang=true
@@ -474,9 +514,25 @@ gn_args+=(
%else
is_clang=false
use_lld=false
+%if %{stopgold}
+ use_gold=false
+%endif
+%endif
+)
+#Jumbo stuff
+gn_args+=(
+%if %{jumbo}
+ use_jumbo_build=true
+ jumbo_file_merge_limit=12
+ concurrent_links=1
+%endif
+)
+#symbol
+gn_args+=(
+%if %{debug_pkg}
+ symbol_level=1
%endif
)
-
tools/gn/bootstrap/bootstrap.py --gn-gen-args "${gn_args[*]}"
%{target}/gn --script-executable=%{__python2} gen --args="${gn_args[*]}"
%{target}
%if %{debug_logs}
@@ -489,13 +545,13 @@ ninja %{_smp_mflags} -C %{target} chrome chrome_sandbox
chromedriver
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{chromiumdir}/locales
mkdir -p %{buildroot}%{_mandir}/man1
-mkdir -p %{buildroot}%{_datadir}/metainfo
+mkdir -p %{buildroot}%{_metainfodir}
mkdir -p %{buildroot}%{_datadir}/applications
mkdir -p %{buildroot}%{_datadir}/gnome-control-center/default-apps
sed -e "s|@@CHROMIUMDIR@@|%{chromiumdir}|" -e "s|@@BUILDTARGET@@|`cat
/etc/redhat-release`|" \
%{SOURCE10} > chromium-vaapi.sh
install -m 755 chromium-vaapi.sh %{buildroot}%{_bindir}/%{name}
-install -m 644 %{SOURCE11} %{buildroot}%{_datadir}/metainfo
+install -m 644 %{SOURCE11} %{buildroot}%{_metainfodir}
sed -e "s|@@MENUNAME@@|%{name}|g" -e "s|@@PACKAGE@@|%{name}|g" \
chrome/app/resources/manpage.1.in > chrome.1
install -m 644 chrome.1 %{buildroot}%{_mandir}/man1/%{name}.1
@@ -531,13 +587,13 @@ for i in 22 24 32 48 64 128 256; do
done
####################################check##################################################
%check
-appstream-util validate-relax --nonet
"%{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml"
+appstream-util validate-relax --nonet
"%{buildroot}%{_metainfodir}/%{name}.appdata.xml"
######################################files################################################
%files
%license LICENSE
%doc AUTHORS
%{_bindir}/chromium-vaapi
-%{_datadir}/metainfo/chromium-vaapi.appdata.xml
+%{_metainfodir}/chromium-vaapi.appdata.xml
%{_datadir}/applications/chromium-vaapi.desktop
%{_datadir}/gnome-control-center/default-apps/chromium-vaapi.xml
%{_datadir}/icons/hicolor/16x16/apps/chromium-vaapi.png
@@ -566,8 +622,21 @@ appstream-util validate-relax --nonet
"%{buildroot}%{_datadir}/metainfo/%{name}.
%{chromiumdir}/locales/*.pak
#########################################changelogs#################################################
%changelog
+* Wed Oct 17 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 70.0.3538.67-1
+- Update to 70.0.3538.67
+- brand new vaapi patch
+- Add few patches to fix gcc
+- turned on support for jumbo builds by default across all branches
+- Added -fpermissive flag as requirement
+
+* Fri Oct 12 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.100-5
+- turned of gold in rawhide as it crashes with fedora flags
+- spec cleanup
+- Minor appdata typo fix
+
* Thu Oct 11 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.100-4
- Rebuild for new libva version on fedora 29+
+- Use metainfodir for installing metadata
* Fri Sep 28 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.100-3
- Remove dependency on minizip-compat
package(https://bugzilla.redhat.com/show_bug.cgi?id=1632170)
diff --git a/enable-vaapi.patch b/enable-vaapi.patch
new file mode 100644
index 0000000..2cb451e
--- /dev/null
+++ b/enable-vaapi.patch
@@ -0,0 +1,257 @@
+From a4d39ad4677cbc83c5e32a205d25c27beb84e13c Mon Sep 17 00:00:00 2001
+From: Akarshan Biswas <hellbanger(a)ga-lmt-s2.biswasab.org>
+Date: Fri, 19 Oct 2018 19:19:44 +0530
+Subject: [PATCH] Enable hardware video decoding and encoding using libva vaapi
+---
+ chrome/browser/about_flags.cc | 14 +++++++-------
+ chrome/browser/flag_descriptions.cc | 6 +++---
+ chrome/browser/flag_descriptions.h | 8 ++++++--
+ components/viz/service/main/viz_main_impl.cc | 2 +-
+ content/gpu/BUILD.gn | 5 +++++
+ content/gpu/gpu_main.cc | 4 ++--
+ gpu/config/software_rendering_list.json | 11 -----------
+ media/base/media_switches.cc | 2 +-
+ media/filters/BUILD.gn | 3 ++-
+ media/gpu/BUILD.gn | 7 +++++++
+ 10 files changed, 34 insertions(+), 28 deletions(-)
+
+diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
+index d029d0648..942f3627b 100644
+--- a/chrome/browser/about_flags.cc
++++ b/chrome/browser/about_flags.cc
+@@ -1386,18 +1386,18 @@ const FeatureEntry kFeatureEntries[] = {
+ flag_descriptions::kUiPartialSwapDescription, kOsAll,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
+ {"disable-webrtc-hw-decoding", flag_descriptions::kWebrtcHwDecodingName,
+- flag_descriptions::kWebrtcHwDecodingDescription, kOsAndroid | kOsCrOS,
++ flag_descriptions::kWebrtcHwDecodingDescription, kOsAndroid | kOsCrOS | kOsLinux,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)},
+ {"disable-webrtc-hw-encoding", flag_descriptions::kWebrtcHwEncodingName,
+ flag_descriptions::kWebrtcHwEncodingDescription, kOsAndroid | kOsCrOS,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding)},
+ {"enable-webrtc-hw-h264-encoding",
+ flag_descriptions::kWebrtcHwH264EncodingName,
+- flag_descriptions::kWebrtcHwH264EncodingDescription, kOsAndroid | kOsCrOS,
++ flag_descriptions::kWebrtcHwH264EncodingDescription, kOsAndroid | kOsCrOS |
kOsLinux,
+ FEATURE_VALUE_TYPE(features::kWebRtcHWH264Encoding)},
+ {"enable-webrtc-hw-vp8-encoding",
+ flag_descriptions::kWebrtcHwVP8EncodingName,
+- flag_descriptions::kWebrtcHwVP8EncodingDescription, kOsAndroid | kOsCrOS,
++ flag_descriptions::kWebrtcHwVP8EncodingDescription, kOsAndroid | kOsCrOS |
kOsLinux,
+ FEATURE_VALUE_TYPE(features::kWebRtcHWVP8Encoding)},
+ #if !defined(OS_ANDROID)
+ {"enable-webrtc-remote-event-log",
+@@ -1775,7 +1775,7 @@ const FeatureEntry kFeatureEntries[] = {
+ "disable-accelerated-video-decode",
+ flag_descriptions::kAcceleratedVideoDecodeName,
+ flag_descriptions::kAcceleratedVideoDecodeDescription,
+- kOsMac | kOsWin | kOsCrOS | kOsAndroid,
++ kOsMac | kOsWin | kOsCrOS | kOsAndroid | kOsLinux,
+ 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
+ #endif // ENABLE_VR
+-#if defined(OS_CHROMEOS)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX)
+ {"disable-accelerated-mjpeg-decode",
+ flag_descriptions::kAcceleratedMjpegDecodeName,
+- flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS,
++ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)},
+-#endif // OS_CHROMEOS
++#endif // OS_CHROMEOS OS_LINUX
+ {"v8-cache-options", flag_descriptions::kV8CacheOptionsName,
+ flag_descriptions::kV8CacheOptionsDescription, kOsAll,
+ MULTI_VALUE_TYPE(kV8CacheOptionsChoices)},
+diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
+index 0cb812619..b53567008 100644
+--- a/chrome/browser/flag_descriptions.cc
++++ b/chrome/browser/flag_descriptions.cc
+@@ -3053,9 +3053,9 @@ const char kTextSuggestionsTouchBarDescription[] =
+
+ #endif
+
+-// Chrome OS -------------------------------------------------------------------
++// Chrome OS and
Linux-------------------------------------------------------------------
+
+-#if defined(OS_CHROMEOS)
++#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
+
+ const char kAcceleratedMjpegDecodeName[] =
+ "Hardware-accelerated mjpeg decode for captured frame";
+@@ -3595,7 +3595,7 @@ const char kZipArchiverUnpackerName[] = "ZIP archiver -
Unpacker";
+ const char kZipArchiverUnpackerDescription[] =
+ "Enable or disable the ability to unpack archives in incognito mode";
+
+-#endif // defined(OS_CHROMEOS)
++#endif // defined(OS_CHROMEOS) defined(OS_LINUX)
+
+ // Random platform combinations -----------------------------------------------
+
+diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
+index b3c5e5691..3306c5a27 100644
+--- a/chrome/browser/flag_descriptions.h
++++ b/chrome/browser/flag_descriptions.h
+@@ -1846,13 +1846,17 @@ extern const char
kPermissionPromptPersistenceToggleDescription[];
+
+ #endif // defined(OS_MACOSX)
+
+-// Chrome OS ------------------------------------------------------------------
+
+-#if defined(OS_CHROMEOS)
++
++#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
+
+ extern const char kAcceleratedMjpegDecodeName[];
+ extern const char kAcceleratedMjpegDecodeDescription[];
+
++#endif
++// Only Chrome OS ------------------------------------------------------------------
++#if defined(OS_CHROMEOS)
++
+ extern const char kAllowTouchpadThreeFingerClickName[];
+ extern const char kAllowTouchpadThreeFingerClickDescription[];
+
+diff --git a/components/viz/service/main/viz_main_impl.cc
b/components/viz/service/main/viz_main_impl.cc
+index 2196abef4..b4e0a1ae1 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() {
+ // It should be possible to use |main_task_runner_| for doing IO tasks.
+ base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0);
+ thread_options.priority = base::ThreadPriority::NORMAL;
+-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
++#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_LINUX)
+ // TODO(reveman): Remove this in favor of setting it explicitly for each
+ // type of process.
+ thread_options.priority = base::ThreadPriority::DISPLAY;
+diff --git a/content/gpu/BUILD.gn b/content/gpu/BUILD.gn
+index 8974e441d..24b7acd3d 100644
+--- a/content/gpu/BUILD.gn
++++ b/content/gpu/BUILD.gn
+@@ -6,6 +6,7 @@ import("//build/config/jumbo.gni")
+ import("//build/config/ui.gni")
+ import("//gpu/vulkan/features.gni")
+ import("//media/media_options.gni")
++import("//media/gpu/args.gni")
+ import("//ui/ozone/ozone.gni")
+
+ # See //content/BUILD.gn for how this works.
+@@ -134,4 +135,8 @@ target(link_target_type, "gpu_sources") {
+ (!is_chromecast || is_cast_desktop_build)) {
+ configs += [ "//build/config/linux/dri" ]
+ }
++ # Use vaapi on desktop Linux builds when use_vaapi is set
++ if (is_desktop_linux && use_vaapi) {
++ public_configs = [ "//media/gpu:libva_config" ]
++ }
+ }
+diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
+index f589d015d..03fd1b44a 100644
+--- a/content/gpu/gpu_main.cc
++++ b/content/gpu/gpu_main.cc
+@@ -283,7 +283,7 @@ int GpuMain(const MainFunctionParams& parameters) {
+
+ base::PlatformThread::SetName("CrGpuMain");
+
+-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
++#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_LINUX)
+ // Set thread priority before sandbox initialization.
+ base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY);
+ #endif
+@@ -316,7 +316,7 @@ int GpuMain(const MainFunctionParams& parameters) {
+ GetContentClient()->SetGpuInfo(gpu_init->gpu_info());
+
+ base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL;
+-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
++#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_LINUX)
+ io_thread_priority = base::ThreadPriority::DISPLAY;
+ #endif
+
+diff --git a/gpu/config/software_rendering_list.json
b/gpu/config/software_rendering_list.json
+index 445953a64..0aac9ddb6 100644
+--- a/gpu/config/software_rendering_list.json
++++ b/gpu/config/software_rendering_list.json
+@@ -373,17 +373,6 @@
+ "all"
+ ]
+ },
+- {
+- "id": 48,
+- "description": "Accelerated video decode is unavailable on
Linux",
+- "cr_bugs": [137247],
+- "os": {
+- "type": "linux"
+- },
+- "features": [
+- "accelerated_video_decode"
+- ]
+- },
+ {
+ "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
+--- a/media/base/media_switches.cc
++++ b/media/base/media_switches.cc
+@@ -468,7 +468,7 @@ bool IsVideoCaptureAcceleratedJpegDecodingEnabled() {
+ switches::kUseFakeJpegDecodeAccelerator)) {
+ return true;
+ }
+-#if defined(OS_CHROMEOS)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX)
+ return true;
+ #endif
+ return false;
+diff --git a/media/filters/BUILD.gn b/media/filters/BUILD.gn
+index ab6215152..b8d1ee896 100644
+--- a/media/filters/BUILD.gn
++++ b/media/filters/BUILD.gn
+@@ -5,6 +5,7 @@
+ import("//build/config/jumbo.gni")
+ import("//media/media_options.gni")
+ import("//third_party/libaom/options.gni")
++import("//media/gpu/args.gni")
+
+ jumbo_source_set("filters") {
+ # Do not expand the visibility here without double-checking with OWNERS, this
+@@ -198,7 +199,7 @@ jumbo_source_set("filters") {
+ deps += [ "//media/base/android" ]
+ }
+
+- if (current_cpu != "arm" && is_linux) {
++ if (use_vaapi && is_linux) {
+ sources += [
+ "h264_bitstream_buffer.cc",
+ "h264_bitstream_buffer.h",
+diff --git a/media/gpu/BUILD.gn b/media/gpu/BUILD.gn
+index 9ef4730a4..0c3a06c24 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) {
+ }
+ }
+
++import("//build/config/linux/pkg_config.gni")
++
++pkg_config("libva_config") {
++ packages = [ "libva" ]
++}
++
+ if (use_vaapi) {
+ test("jpeg_encode_accelerator_unittest") {
+ deps = [
+@@ -571,6 +577,7 @@ if (use_v4l2_codec || use_vaapi) {
+ if (use_ozone) {
+ deps += [ "//ui/ozone" ]
+ }
++ public_configs = [ ":libva_config" ]
+ }
+ }
+
+--
+2.17.2
+
diff --git a/silencegcc.patch b/silencegcc.patch
new file mode 100644
index 0000000..e5c6c9a
--- /dev/null
+++ b/silencegcc.patch
@@ -0,0 +1,31 @@
+From 8f49c61779610638bf4313000c0e9f467523730e Mon Sep 17 00:00:00 2001
+From: Akarshan Biswas <hellbanger(a)ga-lmt-s2.biswasab.org>
+Date: Sat, 20 Oct 2018 09:53:26 +0530
+Subject: [PATCH] Silence some gcc warnings on linux
+
+---
+ build/config/compiler/BUILD.gn | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
+index d1bb5597f..05aae1063 100644
+--- a/build/config/compiler/BUILD.gn
++++ b/build/config/compiler/BUILD.gn
+@@ -239,6 +239,14 @@ config("compiler") {
+ ":compiler_cpu_abi",
+ ":compiler_codegen",
+ ]
++ # Avoid warning flood on linux with gcc
++ if (is_linux && !is_clang) {
++ cflags += [ "-Wno-pragmas" ]
++ cflags += [ "-Wno-attributes" ]
++ cflags += [ "-Wno-ignored-attributes" ]
++ cflags += [ "-Wno-packed-not-aligned" ]
++ cflags_cc += [ "-Wno-class-memaccess" ]
++ }
+
+ # In general, Windows is totally different, but all the other builds share
+ # some common GCC configuration.
+--
+2.17.2
+
diff --git a/sources b/sources
index 7d1e885..f405063 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-1779724693bdcf7b4e01ea1133abdde2 chromium-69.0.3497.100.tar.xz
+2c6e39bdbeea70fdd30832fa18bbe6fb chromium-70.0.3538.67.tar.xz