aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--community/chromium/APKBUILD72
-rw-r--r--community/chromium/chromium-clang-r2.patch10
-rw-r--r--community/chromium/chromium-clang-r3.patch19
-rw-r--r--community/chromium/chromium-cors-string-r0.patch51
-rw-r--r--community/chromium/chromium-gcc.patch64
-rw-r--r--community/chromium/chromium-libjpeg-r0.patch62
-rw-r--r--community/chromium/chromium-libwebp-shim-r0.patch43
-rw-r--r--community/chromium/chromium-widevine.patch9
-rw-r--r--community/chromium/media-base.patch12
-rw-r--r--community/chromium/musl-crashpad.patch12
-rw-r--r--community/chromium/musl-fixes.patch42
-rw-r--r--community/chromium/no-execinfo.patch4
-rw-r--r--community/chromium/no-mallinfo.patch11
-rw-r--r--community/chromium/resolver.patch26
-rw-r--r--community/chromium/secure_getenv.patch22
-rw-r--r--community/chromium/unset-madv_free.patch14
16 files changed, 333 insertions, 140 deletions
diff --git a/community/chromium/APKBUILD b/community/chromium/APKBUILD
index f7701c38ec..20ae093503 100644
--- a/community/chromium/APKBUILD
+++ b/community/chromium/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=chromium
-pkgver=66.0.3359.181
+pkgver=68.0.3440.75
pkgrel=0
pkgdesc="chromium web browser"
url="http://www.chromium.org/"
@@ -87,7 +87,6 @@ source="https://commondatastorage.googleapis.com/chromium-browser-official/$pkgn
chromium.desktop
google-api.keys
- chromium-widevine.patch
default-pthread-stacksize.patch
gn_bootstrap.patch
last-commit-position.patch
@@ -99,14 +98,18 @@ source="https://commondatastorage.googleapis.com/chromium-browser-official/$pkgn
no-execinfo.patch
no-mallinfo.patch
resolver.patch
- unset-madv_free.patch
swiftshader.patch
secure_getenv.patch
chromium-clang-r2.patch
- chromium-clang-r3.patch
chromium-gcc-r1.patch
chromium-skia-harmony.patch
+ chromium-cors-string-r0.patch
+ chromium-libjpeg-r0.patch
+ chromium-libwebp-shim-r0.patch
+ media-base.patch
+ musl-crashpad.patch
+ chromium-gcc.patch
"
builddir="$srcdir"/$pkgname-$pkgver
@@ -147,8 +150,10 @@ prepare() {
# reusable system library settings
local use_system="
- fontconfig
flac
+ fontconfig
+ freetype
+ harfbuzz-ng
libdrm
libevent
libjpeg
@@ -160,7 +165,6 @@ prepare() {
re2
snappy
yasm
- zlib
"
for _lib in ${use_system} libjpeg_turbo; do
msg "Removing buildscripts for system provided $_lib"
@@ -235,7 +239,6 @@ build() {
enable_nacl=false \
enable_nacl_nonsfi=false \
enable_precompiled_headers=false \
- enable_widevine=true \
fatal_linker_warnings=false \
ffmpeg_branding=\"Chrome\" \
fieldtrial_testing_like_official_build=true \
@@ -283,39 +286,34 @@ build() {
}
package() {
- cd "$builddir"
+ cd "$builddir"/out/$_buildtype
local bin pak
# paxmark inside chroot too
- paxmark -m out/$_buildtype/mksnapshot
+ paxmark -m mksnapshot
- for bin in chrome natives_blob.bin snapshot_blob.bin; do
- install -Dm755 out/$_buildtype/$bin \
- "$pkgdir"/usr/lib/$pkgname/$bin
+ for bin in chrome chromedriver *.bin; do
+ install -Dm755 $bin "$pkgdir"/usr/lib/$pkgname/$bin
done
paxmark -m "$pkgdir"/usr/lib/$pkgname/chrome
- install -Dm4755 "$builddir"/out/$_buildtype/chrome_sandbox \
- "$pkgdir"/usr/lib/$pkgname/chrome-sandbox
-
- install -m644 "$builddir"/out/$_buildtype/icudtl.dat \
- "$pkgdir"/usr/lib/$pkgname/icudtl.dat
+ install -Dm4755 chrome_sandbox "$pkgdir"/usr/lib/$pkgname/chrome-sandbox
+ install -m644 icudtl.dat "$pkgdir"/usr/lib/$pkgname/icudtl.dat
- for pak in out/$_buildtype/*.pak; do
- install -Dm644 $pak \
- "$pkgdir"/usr/lib/$pkgname/${pak##*/}
+ for pak in *.pak; do
+ install -Dm644 $pak "$pkgdir"/usr/lib/$pkgname/$pak
done
install -Dm755 "$srcdir"/chromium-launcher.sh \
"$pkgdir"/usr/lib/$pkgname/chromium-launcher.sh
- cp -r out/$_buildtype/locales "$pkgdir"/usr/lib/$pkgname/
+ cp -a locales "$pkgdir"/usr/lib/$pkgname/
# It is important that we name the target "chromium-browser",
# xdg-utils expect it; bug #355517.
mkdir -p "$pkgdir"/usr/bin
cd "$pkgdir"/usr/bin
ln -sf /usr/lib/$pkgname/chromium-launcher.sh chromium-browser
- cd "$builddir"
+ ln -sf /usr/lib/$pkgname/chromedriver "$pkgdir"/usr/bin/
install -Dm644 "$srcdir"/chromium.conf \
"$pkgdir"/etc/chromium/chromium.conf
@@ -323,6 +321,7 @@ package() {
install -Dm644 "$srcdir"/chromium.desktop \
"$pkgdir"/usr/share/applications/chromium.desktop
+ cd "$builddir"
for size in 22 24 48 64 128 256; do
install -Dm644 "chrome/app/theme/chromium/product_logo_$size.png" \
"$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
@@ -332,10 +331,6 @@ package() {
install -Dm644 "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \
"$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
done
-
- install -Dm755 "$builddir"/out/$_buildtype/chromedriver \
- "$pkgdir"/usr/lib/$pkgname/chromedriver
- ln -sf /usr/lib/$pkgname/chromedriver "$pkgdir"/usr/bin/
}
chromedriver() {
@@ -346,28 +341,31 @@ chromedriver() {
mv "$pkgdir"/usr/bin/chromedriver "$subpkgdir"/usr/bin
}
-sha512sums="3549cae27ce33a19bab857c91da1ed96c1ae36123b71bdf41a8bbacdc9554d15b4902e835dc4a8ef8016e69344b809aab4e1e3b1b26bd54d5ca651048bcb9886 chromium-66.0.3359.181.tar.xz
+sha512sums="99ab36c9a9c224469f3a34f0193b0b4662b626ac29d23711716117cc6fa437717c2c3357f8a95adf9085b94a262c8b4c46727f88bf50bb231bb85af956afbedb chromium-68.0.3440.75.tar.xz
a3bb959c65944ae2fb765725cedcffd743a58bc0c2cd1f1999d15fe79801d00f3474b08b4ed7b48859ed921eb57093d0ad09d90f201d729ed9b8a419a591ed29 pstables-2.8.h
b9a810416dd7a8ffc3a5ced85ad9acebda1665bd08a57eec7b189698cc5f74d2c3fd69044e20fcb83297a43214b2772a1312b2c6122ea0eb716abacf39524d60 chromium-launcher.sh
f6d962b9e4c22dd42183df3db5d3202dab33eccecafb1bf63ca678147289581262db1e5e64cbe8f9c212beefb0a6717bb8d311e497f56b55fe95b8bab2db493f chromium.conf
e182c998a43d22d1c76a86c561619afd1fca8c2be668265ad5e2f81a3806f7a154272cc027a2f8b370fb69446892c69e5967a4be76082325c14245ee7915234c chromium.desktop
2d8237a940ea691bd10b08315429677a587f7ef9692a0cca53bfd066eae82998a6c71f402a8669e9de39f94d7f3280745d1628ea6eac5d76ca7116844d4e0dac google-api.keys
-55921cc33d623e0751e94d4fef2ddd69afb57381da6115995b1f318e2398978b9173e80f6ffbc6e6c0c0c55a04e934e0e34a46c32e03947cc31f0f5a226e7725 chromium-widevine.patch
05fb6d9434565a7a73f5c18d470ae600bf4afbe15d0e4a7c2770bf2596a0bd2788cdfeb37e0b566fc3d26ff2d0791b70488b2c184e3286cff5a1fa25e17582cd default-pthread-stacksize.patch
46e141a932860c6db1f655c8b188b8c41bce0dbb1654c066379fa53063ce6cc3bf8be156bd8e73e103c7d9e956e436732e2f7db0653f9847eb26cbfebc441a10 gn_bootstrap.patch
8fbfd67a0b6bbdf08364e810bd85b4a80dda9af73fefe3aba8010d9b33022d458a785c628515bbda9c743b8a0293d57cfe18fcc5aa2313c845c6fb948c2335f9 last-commit-position.patch
-ca73f4912c4e41a235821fba5f3a7a5266739ce86dc1b27bc07d6bc2f97dc97b15b2fa47dc95c7a82a7e0b8fa1e6a17071f6dc06ddf47f65a56f216c0aaaf054 musl-fixes.patch
+92c39aaa66d74dd192f1e6fc6702390dadd87c2807d3b6c80cd6240634b8ad86328d51f3c528e2037823c9d2e02970c0969e96ea4bdf29be861db7f3bcdb76e4 musl-fixes.patch
90efbc89151c77f32434364dcbaabaf9d9a207f4a77f147cd51b3fe100832fbfb3a9fb665303a79a3d788e400f4f41890de202ccbb7bd1fc6252e33c6e74e429 musl-fixes-breakpad.patch
507a8db2317f1f6ec18dec6cb5894b716e9b2542b58887bab9319bc6d4c66fe4a4d09b200ca8e3f11b32e380b282442a27e7a1b358d3c25eef0fa7655e9dc134 musl-hacks.patch
95ead57f7338649351948d100e32e5ec1eeadb02bffa136ff15c6c515eceb8013c444be092d777c1b62b945bfb83b97778ba4d3a0ccc2d7c2c9a0a8cd8ee0f01 musl-libc++.patch
9b75d6ac720d1b8ddc597f0f472bc400ff866a733f12b3a4cd3e7e18e724549c5f8e056c7e0d0462ef083bff5e677f8cef6b89b22f4740a40ad6398978269373 musl-sandbox.patch
-31f847b5c78ac26a8f89fa7ff55911023929753ba2e6a2c4a723fdcee17e38388b0b56e395a6cb958da2efb9f17d4efa8fdce3d9dd31471271a1435b37cfa68b no-execinfo.patch
-7a3a4ba4479a22a13126a78ad3d9991188ef030389026c4293d45b4440711751d68e43d28687653d5670d7f00ed5f1b820a8df50a3a08ce06e454f0cad9dbd3c no-mallinfo.patch
-ac0c9d7780ac897ea8ad5d909616d3aa29eed720353c7a660c850ee1404c80f51f5db274b3c5d3c730561a7c3cd138624e1901ece329926b5dc5ca15195d9abf resolver.patch
-27dd7916be3324294a0a913c43c856e9c00be767a2aec4f3da2455fb84e74ebb0017d1aa586b40dd9d989ada6b60fc531522f503d57e04324726a2171bf3a85e unset-madv_free.patch
+0c413940a26c3823213724036d217f43a7de9bca4ae026c5f56d4280800cc7dd4a5cf6efea98dbb102513eda6c29ceae20debb9b938b0fb61628822ecdec0799 no-execinfo.patch
+db7f676d3476820c29f234b1f8f17a74e82b72d67fc727c715307734fd238e3cb0f99d8b5320d45f820b62c01163283c4829caa37afd6a9ca7592a54d3c65819 no-mallinfo.patch
+6833054ef89da20c0de63faac2f87ff250b5aca3ac785fc404da4a9e03c4e00df9d7da009788e611d113cdf3be2ba50f933d85d6baf20f2df6a3711cceff5152 resolver.patch
6b0812725a0fc562527f3556dc4979fec72d1ba92f26a5e78ff2016c39bb2c155a0ff95fc22101f9c097d14b84182d6615276f4247f60ae7833ab45da8366e6d swiftshader.patch
-42c4f9684463f0958c27b0cfa3ad160cb9053c2e5e8940fefecdd69adcb844674e64f03c2003d1abdcbdefa5f415a64f37c85042218b2f1d379690322d6e198c secure_getenv.patch
-b74f94675aad849791f42261325d36bdc796c982d3871c43b7c4f665b1f00762c7e67a6ee7e9d02fbc51b2e23ee171bf0bca36559bdf999e41ffd4fc9f54ceca chromium-clang-r2.patch
-a742e09199bfa2c391bb3684788961d87ba3b51255aff0346de0fa42874160ce83bd0a6569d76addf2155a47c161bde1176cf6ae8438818b9b962412ec82f16c chromium-clang-r3.patch
+de2d6ebc75d0496a9424ea6c025b052d6d59f38477338b0e2a5c21ccec11e774244fd5d340195c523f7a3c02ccfd8ac81486958008bc8b221c848dfa2c71bd50 secure_getenv.patch
+38670c9bdc87b3779593eab141ac23741fa47c774ba491f273239a453566979583e352b032caf350ed485bbc006addca0f689b8c439646c2d37e28e3f3ea476c chromium-clang-r2.patch
6e2bcbed44786c6c0d3beda935269f30fdcdf07c400defa6bf73f8359a60b1d59cc2f80dbc106be651a535635995641321d9e524b18919d3975bd6008a641d59 chromium-gcc-r1.patch
-cbd99d51178fa5c2c3dee1eb4990240ca2ff829cee9151384e36bc3c634698c0ecaf9b51c99e901f38d0a37eef7187fe5ad39b9b7f528f7a9066a855a0c6e49f chromium-skia-harmony.patch"
+cbd99d51178fa5c2c3dee1eb4990240ca2ff829cee9151384e36bc3c634698c0ecaf9b51c99e901f38d0a37eef7187fe5ad39b9b7f528f7a9066a855a0c6e49f chromium-skia-harmony.patch
+e2df9816ce01a8175ae45682f48805dd3ab55154a0e9e7b1b5edabd8584f4326bfa25ad7f94dc174c968e72183fff1416e50e2d75671b17b52f2337c16d6c605 chromium-cors-string-r0.patch
+30e641d99c804740e18e2c1541907a209a8b54aedb01089473d1f5df721bf55f105400fa7aa2a75bc489f59e740657e79408555395d3cd77d13d15c1569b505d chromium-libjpeg-r0.patch
+0f8345102f33f16abea3731d76767cb04b06d8422fa8e4c9f7bcc2c18dc8ede5332559c5dd0db25be740939abfd8045adc8de38ec5973367ffe0624e8d9f8b5f chromium-libwebp-shim-r0.patch
+589a7acf149d44db081da2dd24a7769f2b9572a8cc64d2aad78577a64768d3b6fb2bfa02292b5260acd2c4a28c3ae9b82847ff901ce8a21baeca0b46dcda0ca9 media-base.patch
+05c1af43038f76014f5f8b605085310414242f2bfad0e3258ddb29a08e7f4307de31b2d551b0a291986cc7d5a01cf3a003ac864216877195bb4310fd33193f0f musl-crashpad.patch
+662eff1417530eed19142c154c40c0a3ffa56e5e2cf30d07683cbbd7cb34860e394e57de31e3552653515ffd654efb762621e2712304fbb8edb0ecdd932d8154 chromium-gcc.patch"
diff --git a/community/chromium/chromium-clang-r2.patch b/community/chromium/chromium-clang-r2.patch
index 94932b559a..1c2955796f 100644
--- a/community/chromium/chromium-clang-r2.patch
+++ b/community/chromium/chromium-clang-r2.patch
@@ -1,14 +1,16 @@
+diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
+index 83337d5..8cb93e3 100644
--- ./build/config/compiler/BUILD.gn
+++ ./build/config/compiler/BUILD.gn
-@@ -422,18 +422,6 @@
- cflags += [ "-fcolor-diagnostics" ]
+@@ -488,18 +488,6 @@ config("compiler") {
+ }
}
-- # TODO(hans): Remove this once Clang generates better optimized debug info by
-- # default. https://crbug.com/765793
- if (is_clang && !is_nacl && current_toolchain == host_toolchain &&
- target_os != "chromeos") {
- cflags += [
+- # TODO(hans): Remove this once Clang generates better optimized debug info
+- # by default. https://crbug.com/765793
- "-Xclang",
- "-mllvm",
- "-Xclang",
diff --git a/community/chromium/chromium-clang-r3.patch b/community/chromium/chromium-clang-r3.patch
deleted file mode 100644
index 0010932b3e..0000000000
--- a/community/chromium/chromium-clang-r3.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-# Taken from gentoo:
-# https://gitweb.gentoo.org/repo/gentoo.git/plain/www-client/chromium/files/chromium-clang-r3.patch
-#
-# Prevents this error:
-# ../../device/u2f/u2f_ble_transaction.cc:134:27: error: no viable overloaded '='
-# request_cont_fragments_ = {};
-# ~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~
-
---- ./device/fido/u2f_ble_transaction.cc
-+++ ./device/fido/u2f_ble_transaction.cc
-@@ -131,7 +131,7 @@
-
- void U2fBleTransaction::OnError() {
- request_frame_.reset();
-- request_cont_fragments_ = {};
-+ request_cont_fragments_ = base::queue<U2fBleFrameContinuationFragment>();
- response_frame_assembler_.reset();
- std::move(callback_).Run(base::nullopt);
- }
diff --git a/community/chromium/chromium-cors-string-r0.patch b/community/chromium/chromium-cors-string-r0.patch
new file mode 100644
index 0000000000..74096a7862
--- /dev/null
+++ b/community/chromium/chromium-cors-string-r0.patch
@@ -0,0 +1,51 @@
+From 01d891fa0790950549c7bedb34edf869827a372e Mon Sep 17 00:00:00 2001
+From: Jose Dapena Paz <jose.dapena@lge.com>
+Date: Thu, 31 May 2018 17:03:37 +0000
+Subject: [PATCH] CORS legacy: add missing string include
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The cors_legacy.h file includes declarations using std::string, but
+it is not declared due to missing #include <string>.
+
+Also drop unneeded declarations in .cpp file.
+
+Change-Id: I00df799f84a6c3530c2f12f1e52d24c7d9bd6bfd
+Reviewed-on: https://chromium-review.googlesource.com/1080707
+Reviewed-by: Tom Sepez <tsepez@chromium.org>
+Commit-Queue: José Dapena Paz <jose.dapena@lge.com>
+Cr-Commit-Position: refs/heads/master@{#563282}
+---
+ services/network/public/cpp/cors/cors_legacy.cc | 2 --
+ services/network/public/cpp/cors/cors_legacy.h | 1 +
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/services/network/public/cpp/cors/cors_legacy.cc b/services/network/public/cpp/cors/cors_legacy.cc
+index 8f32ac3be64e..f01af63619b5 100644
+--- ./services/network/public/cpp/cors/cors_legacy.cc
++++ ./services/network/public/cpp/cors/cors_legacy.cc
+@@ -5,8 +5,6 @@
+ #include "services/network/public/cpp/cors/cors_legacy.h"
+
+ #include <algorithm>
+-#include <string>
+-#include <vector>
+
+ #include "url/gurl.h"
+ #include "url/url_util.h"
+diff --git a/services/network/public/cpp/cors/cors_legacy.h b/services/network/public/cpp/cors/cors_legacy.h
+index d2cdf026ca3a..dc9295a92c47 100644
+--- ./services/network/public/cpp/cors/cors_legacy.h
++++ ./services/network/public/cpp/cors/cors_legacy.h
+@@ -5,6 +5,7 @@
+ #ifndef SERVICES_NETWORK_PUBLIC_CPP_CORS_CORS_LEGACY_H_
+ #define SERVICES_NETWORK_PUBLIC_CPP_CORS_CORS_LEGACY_H_
+
++#include <string>
+ #include <vector>
+
+ #include "base/component_export.h"
+--
+2.17.1
+
diff --git a/community/chromium/chromium-gcc.patch b/community/chromium/chromium-gcc.patch
new file mode 100644
index 0000000000..fe7cb22e17
--- /dev/null
+++ b/community/chromium/chromium-gcc.patch
@@ -0,0 +1,64 @@
+From 823d20044c74ff8524954b2f3b01a51f390567b0 Mon Sep 17 00:00:00 2001
+From: Jose Dapena Paz <jose.dapena@lge.com>
+Date: Tue, 29 May 2018 18:38:39 +0000
+Subject: [PATCH] GCC: workaround GCC bug "std::map::insert(value_type &&) not
+ selected"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There are several calls following this pattern:
+std:map<A, std::unique_ptr<B>> map;
+ A a;
+ std::unique_ptr<B> b;
+ map.insert({a, std::move(b)});
+
+This fails in gcc < 7.3 because the operator for inserting from &&
+is not present, as reported here:
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82522
+
+So apply a workaround that makes the move steps explicit.
+
+Change-Id: I54cea26eac6e74a3d9c2d17a37e3c4c9ce62fd74
+Reviewed-on: https://chromium-review.googlesource.com/1076471
+Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
+Reviewed-by: Dan Elphick <delphick@chromium.org>
+Commit-Queue: José Dapena Paz <jose.dapena@lge.com>
+Cr-Commit-Position: refs/heads/master@{#562519}
+---
+ content/browser/background_fetch/background_fetch_context.cc | 5 ++++-
+ content/renderer/input/input_event_prediction.cc | 5 ++++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/content/browser/background_fetch/background_fetch_context.cc b/content/browser/background_fetch/background_fetch_context.cc
+index 5dec01f82db31..649d4595ba83e 100644
+--- ./content/browser/background_fetch/background_fetch_context.cc
++++ ./content/browser/background_fetch/background_fetch_context.cc
+@@ -222,7 +222,10 @@ void BackgroundFetchContext::InitializeController(
+
+ scheduler_->AddJobController(controller.get());
+
+- job_controllers_.insert({unique_id, std::move(controller)});
++ // Workaround for GLIBC C++ < 7.3 that fails to insert with braces
++ // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82522
++ auto pair = std::make_pair(unique_id, std::move(controller));
++ job_controllers_.insert(std::move(pair));
+ std::move(done_closure).Run();
+ }
+
+diff --git a/content/renderer/input/input_event_prediction.cc b/content/renderer/input/input_event_prediction.cc
+index 89636c9736da5..f1bce36364ed9 100644
+--- ./content/renderer/input/input_event_prediction.cc
++++ ./content/renderer/input/input_event_prediction.cc
+@@ -119,7 +119,10 @@ void InputEventPrediction::UpdateSinglePointer(
+ if (predictor != pointer_id_predictor_map_.end()) {
+ predictor->second->Update(data);
+ } else {
+- pointer_id_predictor_map_.insert({event.id, SetUpPredictor()});
++ // Workaround for GLIBC C++ < 7.3 that fails to insert with braces
++ // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82522
++ auto pair = std::make_pair(event.id, SetUpPredictor());
++ pointer_id_predictor_map_.insert(std::move(pair));
+ pointer_id_predictor_map_[event.id]->Update(data);
+ }
+ }
diff --git a/community/chromium/chromium-libjpeg-r0.patch b/community/chromium/chromium-libjpeg-r0.patch
new file mode 100644
index 0000000000..93bd305df8
--- /dev/null
+++ b/community/chromium/chromium-libjpeg-r0.patch
@@ -0,0 +1,62 @@
+From c6b0194f7a4d9f494b2d51f46d2c332e2e5f4050 Mon Sep 17 00:00:00 2001
+From: Daniel Bratell <bratell@opera.com>
+Date: Mon, 28 May 2018 13:13:01 +0000
+Subject: [PATCH] Use the same libjpeg in all of blink/platform
+
+The normal libjpeg renames some symbols with macros so if its
+headers are included together with libjpeg-turbo's headers
+in the same translation unit, there will be an inconsistent
+renaming of libjpeg symbols. This happened in some extreme
+jumbo configuration and resulted in confising linker errors.
+
+This patch changes an include so that jpeglib.h becomes included
+the same way everywhere.
+
+Change-Id: I7f122d0919d58371bb40dc0097a766b857b9815e
+Reviewed-on: https://chromium-review.googlesource.com/1073423
+Reviewed-by: Kentaro Hara <haraken@chromium.org>
+Commit-Queue: Daniel Bratell <bratell@opera.com>
+Cr-Commit-Position: refs/heads/master@{#562243}
+---
+ .../renderer/platform/image-encoders/image_encoder.cc | 11 +++++++++++
+ .../renderer/platform/image-encoders/image_encoder.h | 2 --
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/third_party/blink/renderer/platform/image-encoders/image_encoder.cc b/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
+index 0c7f14c7c0e4..4c450f5d6783 100644
+--- ./third_party/blink/renderer/platform/image-encoders/image_encoder.cc
++++ ./third_party/blink/renderer/platform/image-encoders/image_encoder.cc
+@@ -4,6 +4,17 @@
+
+ #include "third_party/blink/renderer/platform/image-encoders/image_encoder.h"
+
++#include "build/build_config.h"
++
++#if defined(OS_WIN)
++#include <basetsd.h> // Included before jpeglib.h because of INT32 clash
++#endif // OS_WIN
++#include <stdio.h> // Needed by jpeglib.h
++
++#include "jpeglib.h" // for JPEG_MAX_DIMENSION
++
++#include "third_party/libwebp/src/webp/encode.h" // for WEBP_MAX_DIMENSION
++
+ namespace blink {
+
+ bool ImageEncoder::Encode(Vector<unsigned char>* dst,
+diff --git a/third_party/blink/renderer/platform/image-encoders/image_encoder.h b/third_party/blink/renderer/platform/image-encoders/image_encoder.h
+index 0d1460f34827..40306097d507 100644
+--- ./third_party/blink/renderer/platform/image-encoders/image_encoder.h
++++ ./third_party/blink/renderer/platform/image-encoders/image_encoder.h
+@@ -7,8 +7,6 @@
+
+ #include "third_party/blink/renderer/platform/platform_export.h"
+ #include "third_party/blink/renderer/platform/wtf/vector.h"
+-#include "third_party/libjpeg/jpeglib.h" // for JPEG_MAX_DIMENSION
+-#include "third_party/libwebp/src/webp/encode.h" // for WEBP_MAX_DIMENSION
+ #include "third_party/skia/include/core/SkStream.h"
+ #include "third_party/skia/include/encode/SkJpegEncoder.h"
+ #include "third_party/skia/include/encode/SkPngEncoder.h"
+--
+2.17.1
+
diff --git a/community/chromium/chromium-libwebp-shim-r0.patch b/community/chromium/chromium-libwebp-shim-r0.patch
new file mode 100644
index 0000000000..04effddee0
--- /dev/null
+++ b/community/chromium/chromium-libwebp-shim-r0.patch
@@ -0,0 +1,43 @@
+diff --git a/build/linux/unbundle/libwebp.gn b/build/linux/unbundle/libwebp.gn
+index ab92adecf400..12574d87be58 100644
+--- ./build/linux/unbundle/libwebp.gn
++++ ./build/linux/unbundle/libwebp.gn
+@@ -2,12 +2,34 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+
++import("//build/config/linux/pkg_config.gni")
++import("//build/shim_headers.gni")
++
++pkg_config("system_libwebp") {
++ packages = [
++ "libwebp",
++ "libwebpdemux",
++ "libwebpmux",
++ ]
++}
++
++shim_headers("libwebp_shim") {
++ root_path = "src"
++ headers = [
++ "webp/decode.h",
++ "webp/demux.h",
++ "webp/encode.h",
++ "webp/mux.h",
++ "webp/mux_types.h",
++ "webp/types.h",
++ ]
++}
++
+ source_set("libwebp_webp") {
+- libs = [
+- "webp",
+- "webpdemux",
+- "webpmux",
++ deps = [
++ ":libwebp_shim",
+ ]
++ public_configs = [ ":system_libwebp" ]
+ }
+
+ group("libwebp") {
diff --git a/community/chromium/chromium-widevine.patch b/community/chromium/chromium-widevine.patch
deleted file mode 100644
index 6a81c4b1f7..0000000000
--- a/community/chromium/chromium-widevine.patch
+++ /dev/null
@@ -1,9 +0,0 @@
---- third_party/widevine/cdm/stub/widevine_cdm_version.h 2016-01-14 01:05:17.000000000 +0200
-+++ third_party/widevine/cdm/stub/widevine_cdm_version.h 2016-01-21 19:18:51.287978456 +0200
-@@ -12,4 +12,6 @@
-
- #define WIDEVINE_CDM_AVAILABLE
-
-+#define WIDEVINE_CDM_VERSION_STRING "@WIDEVINE_VERSION@"
-+
- #endif // WIDEVINE_CDM_VERSION_H_
diff --git a/community/chromium/media-base.patch b/community/chromium/media-base.patch
new file mode 100644
index 0000000000..0a650d3731
--- /dev/null
+++ b/community/chromium/media-base.patch
@@ -0,0 +1,12 @@
+diff --git a/media/base/subsample_entry.h b/media/base/subsample_entry.h
+index 48f8ea7..1135a18 100644
+--- ./media/base/subsample_entry.h
++++ ./media/base/subsample_entry.h
+@@ -8,6 +8,7 @@
+ #include <stdint.h>
+
+ #include <vector>
++#include <cstddef>
+
+ #include "media/base/media_export.h"
+
diff --git a/community/chromium/musl-crashpad.patch b/community/chromium/musl-crashpad.patch
new file mode 100644
index 0000000000..60f5bc67be
--- /dev/null
+++ b/community/chromium/musl-crashpad.patch
@@ -0,0 +1,12 @@
+diff --git a/third_party/crashpad/crashpad/util/linux/ptracer.cc b/third_party/crashpad/crashpad/util/linux/ptracer.cc
+index 63bee1e..24ef002 100644
+--- ./third_party/crashpad/crashpad/util/linux/ptracer.cc
++++ ./third_party/crashpad/crashpad/util/linux/ptracer.cc
+@@ -26,6 +26,7 @@
+
+ #if defined(ARCH_CPU_X86_FAMILY)
+ #include <asm/ldt.h>
++#include <asm/ptrace-abi.h>
+ #endif
+
+ namespace crashpad {
diff --git a/community/chromium/musl-fixes.patch b/community/chromium/musl-fixes.patch
index ff6611ec51..9d9d6ae82d 100644
--- a/community/chromium/musl-fixes.patch
+++ b/community/chromium/musl-fixes.patch
@@ -108,26 +108,6 @@ index a80ea16..55a2abf 100644
if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) {
// Include a stack trace on a fatal, unless a debugger is attached.
base::debug::StackTrace trace;
---- ./third_party/WebKit/Source/platform/wtf/StackUtil.cpp.orig
-+++ ./third_party/WebKit/Source/platform/wtf/StackUtil.cpp
-@@ -28,7 +28,7 @@
- // FIXME: On Mac OSX and Linux, this method cannot estimate stack size
- // correctly for the main thread.
-
--#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
-+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
- defined(OS_FUCHSIA)
- // pthread_getattr_np() can fail if the thread is not invoked by
- // pthread_create() (e.g., the main thread of webkit_unit_tests).
-@@ -96,7 +96,7 @@
- }
-
- void* GetStackStart() {
--#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
-+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
- defined(OS_FUCHSIA)
- pthread_attr_t attr;
- int error;
--- ./net/dns/dns_config_service_posix.cc.orig
+++ ./net/dns/dns_config_service_posix.cc
@@ -122,7 +122,7 @@
@@ -152,3 +132,25 @@ index a80ea16..55a2abf 100644
namespace base {
std::string NativeLibraryLoadError::ToString() const {
+diff --git ./third_party/blink/renderer/platform/wtf/stack_util.cc b/third_party/blink/renderer/platform/wtf/stack_util.cc
+index 10f1c0d..8e86a2e 100644
+--- ./third_party/blink/renderer/platform/wtf/stack_util.cc
++++ ./third_party/blink/renderer/platform/wtf/stack_util.cc
+@@ -28,7 +28,7 @@ size_t GetUnderestimatedStackSize() {
+ // FIXME: On Mac OSX and Linux, this method cannot estimate stack size
+ // correctly for the main thread.
+
+-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
+ defined(OS_FUCHSIA)
+ // pthread_getattr_np() can fail if the thread is not invoked by
+ // pthread_create() (e.g., the main thread of webkit_unit_tests).
+@@ -96,7 +96,7 @@ size_t GetUnderestimatedStackSize() {
+ }
+
+ void* GetStackStart() {
+-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
+ defined(OS_FUCHSIA)
+ pthread_attr_t attr;
+ int error;
diff --git a/community/chromium/no-execinfo.patch b/community/chromium/no-execinfo.patch
index 4b5e2fa4e6..c91fbd7c64 100644
--- a/community/chromium/no-execinfo.patch
+++ b/community/chromium/no-execinfo.patch
@@ -75,8 +75,8 @@ index 7696be8..20ebe67 100644
ProcessBacktrace(trace_, count_, &handler);
diff --git a/third_party/WebKit/Source/platform/wtf/Assertions.cpp b/third_party/WebKit/Source/platform/wtf/Assertions.cpp
index 9bdece7..0c76188 100644
---- a/third_party/WebKit/Source/platform/wtf/Assertions.cpp
-+++ third_party/WebKit/Source/platform/wtf/Assertions.cpp
+--- ./third_party/blink/renderer/platform/wtf/assertions.cc
++++ ./third_party/blink/renderer/platform/wtf/assertions.cc
@@ -56,7 +56,7 @@
#include <windows.h>
#endif
diff --git a/community/chromium/no-mallinfo.patch b/community/chromium/no-mallinfo.patch
index e95e94814e..2c2112d056 100644
--- a/community/chromium/no-mallinfo.patch
+++ b/community/chromium/no-mallinfo.patch
@@ -1,14 +1,3 @@
---- content/child/content_child_helpers.cc.orig
-+++ content/child/content_child_helpers.cc
-@@ -24,7 +24,7 @@ namespace content {
- // though, this provides only a partial and misleading value.
- // Unfortunately some telemetry benchmark rely on it and these need to
- // be refactored before getting rid of this. See crbug.com/581365 .
--#if defined(OS_LINUX) || defined(OS_ANDROID)
-+#if defined(OS_LINUX) && defined(__GLIBC__) || defined(OS_ANDROID)
- size_t GetMemoryUsageKB() {
- struct mallinfo minfo = mallinfo();
- uint64_t mem_usage =
--- base/trace_event/malloc_dump_provider.cc.orig
+++ base/trace_event/malloc_dump_provider.cc
@@ -243,7 +243,7 @@
diff --git a/community/chromium/resolver.patch b/community/chromium/resolver.patch
index bde36ce1a5..8664aaf376 100644
--- a/community/chromium/resolver.patch
+++ b/community/chromium/resolver.patch
@@ -1,15 +1,3 @@
---- ./net/dns/host_resolver_impl.cc.orig
-+++ ./net/dns/host_resolver_impl.cc
-@@ -2039,8 +2039,7 @@
- NetworkChangeNotifier::AddIPAddressObserver(this);
- NetworkChangeNotifier::AddConnectionTypeObserver(this);
- NetworkChangeNotifier::AddDNSObserver(this);
--#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
-- !defined(OS_ANDROID) && !defined(OS_FUCHSIA)
-+#if defined(__GLIBC__)
- EnsureDnsReloaderInit();
- #endif
-
--- ./net/dns/dns_reloader.cc.orig
+++ ./net/dns/dns_reloader.cc
@@ -4,8 +4,7 @@
@@ -34,3 +22,17 @@
DnsReloaderMaybeReload();
#endif
int err = getaddrinfo(host.c_str(), NULL, &hints, &ai);
+diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
+index bdf16b8..b234edd 100644
+--- ./net/dns/host_resolver_impl.cc
++++ ./net/dns/host_resolver_impl.cc
+@@ -2018,8 +2018,7 @@ HostResolverImpl::HostResolverImpl(const Options& options, NetLog* net_log)
+ NetworkChangeNotifier::AddIPAddressObserver(this);
+ NetworkChangeNotifier::AddConnectionTypeObserver(this);
+ NetworkChangeNotifier::AddDNSObserver(this);
+-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
+- !defined(OS_ANDROID)
++#if defined(__GLIBC__)
+ EnsureDnsReloaderInit();
+ #endif
+
diff --git a/community/chromium/secure_getenv.patch b/community/chromium/secure_getenv.patch
index d142819ffb..7a1e7fb0f6 100644
--- a/community/chromium/secure_getenv.patch
+++ b/community/chromium/secure_getenv.patch
@@ -1,26 +1,24 @@
-diff --git a/third_party/vulkan-validation-layers/src/loader/loader.c b/third_party/vulkan-validation-layers/src/loader/loader.c
-index facddc1..b6a8ee9 100644
---- ./third_party/angle/third_party/vulkan-validation-layers/src/loader/loader.c
+--- ./third_party/angle/third_party/vulkan-validation-layers/src/loader/loader.c.orig
+++ ./third_party/angle/third_party/vulkan-validation-layers/src/loader/loader.c
-@@ -31,6 +31,9 @@
- #include <stdbool.h>
- #include <string.h>
- #include <stddef.h>
+@@ -37,6 +37,9 @@
+ #include <CoreFoundation/CoreFoundation.h>
+ #include <sys/param.h>
+ #endif
+#if defined(HAVE_GETAUXVAL)
+#include <sys/auxv.h>
+#endif
-
#include <sys/types.h>
#if defined(_WIN32)
-@@ -218,6 +221,8 @@ static inline char *loader_secure_getenv(const char *name, const struct loader_i
- return secure_getenv(name);
+ #include "dirent_on_windows.h"
+@@ -240,6 +243,8 @@
#elif defined(HAVE___SECURE_GETENV)
+ (void)inst;
return __secure_getenv(name);
+#elif defined(HAVE_GETAUXVAL)
+ return getauxval(AT_SECURE) ? NULL : getenv(name);
#else
- #pragma message("Warning: Falling back to non-secure getenv for environmental lookups! Consider" \
- " updating to a different libc.")
+ #pragma message( \
+ "Warning: Falling back to non-secure getenv for environmental lookups! Consider" \
--- ./third_party/angle/third_party/vulkan-validation-layers/BUILD.gn.orig
+++ ./third_party/angle/third_party/vulkan-validation-layers/BUILD.gn
@@ -264,8 +264,7 @@
diff --git a/community/chromium/unset-madv_free.patch b/community/chromium/unset-madv_free.patch
deleted file mode 100644
index 613d37c585..0000000000
--- a/community/chromium/unset-madv_free.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- base/allocator/partition_allocator/page_allocator.cc.orig
-+++ base/allocator/partition_allocator/page_allocator.cc
-@@ -17,6 +17,11 @@
- #include <errno.h>
- #include <sys/mman.h>
-
-+#if defined(OS_LINUX) && defined(MADV_FREE)
-+// Added in Linux 4.5, but it breaks the sandbox.
-+#undef MADV_FREE
-+#endif
-+
- #ifndef MADV_FREE
- #define MADV_FREE MADV_DONTNEED
- #endif