[arch-commits] Commit in electron/repos (10 files)

Evangelos Foutras foutrelis at archlinux.org
Tue Apr 28 11:27:45 UTC 2020


    Date: Tuesday, April 28, 2020 @ 11:27:44
  Author: foutrelis
Revision: 621995

archrelease: copy trunk to community-staging-x86_64

Added:
  electron/repos/community-staging-x86_64/
  electron/repos/community-staging-x86_64/PKGBUILD
    (from rev 621994, electron/trunk/PKGBUILD)
  electron/repos/community-staging-x86_64/chromium-skia-harmony.patch
    (from rev 621994, electron/trunk/chromium-skia-harmony.patch)
  electron/repos/community-staging-x86_64/default_app-icon.patch
    (from rev 621994, electron/trunk/default_app-icon.patch)
  electron/repos/community-staging-x86_64/electron.desktop
    (from rev 621994, electron/trunk/electron.desktop)
  electron/repos/community-staging-x86_64/fix-building-with-system-zlib.patch
    (from rev 621994, electron/trunk/fix-building-with-system-zlib.patch)
  electron/repos/community-staging-x86_64/fix-building-with-unbundled-libxml.patch
    (from rev 621994, electron/trunk/fix-building-with-unbundled-libxml.patch)
  electron/repos/community-staging-x86_64/fix-shim-header-generation-when-unbundling-ICU.patch
    (from rev 621994, electron/trunk/fix-shim-header-generation-when-unbundling-ICU.patch)
  electron/repos/community-staging-x86_64/icu67.patch
    (from rev 621994, electron/trunk/icu67.patch)
  electron/repos/community-staging-x86_64/use-system-libraries-in-node.patch
    (from rev 621994, electron/trunk/use-system-libraries-in-node.patch)

------------------------------------------------------+
 PKGBUILD                                             |  204 +++++++++++++++++
 chromium-skia-harmony.patch                          |   14 +
 default_app-icon.patch                               |   21 +
 electron.desktop                                     |    7 
 fix-building-with-system-zlib.patch                  |   32 ++
 fix-building-with-unbundled-libxml.patch             |  127 ++++++++++
 fix-shim-header-generation-when-unbundling-ICU.patch |   50 ++++
 icu67.patch                                          |  169 ++++++++++++++
 use-system-libraries-in-node.patch                   |   56 ++++
 9 files changed, 680 insertions(+)

Copied: electron/repos/community-staging-x86_64/PKGBUILD (from rev 621994, electron/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-04-28 11:27:44 UTC (rev 621995)
@@ -0,0 +1,204 @@
+# Maintainer: Nicola Squartini <tensor5 at gmail.com>
+
+pkgname=electron
+pkgver=8.2.3
+_commit=663d389925a9637609c07f1212edeca337f591be
+_chromiumver=80.0.3987.163
+pkgrel=2
+pkgdesc='Build cross platform desktop apps with web technologies'
+arch=('x86_64')
+url='https://electronjs.org/'
+license=('MIT' 'custom')
+depends=('c-ares' 'ffmpeg' 'gtk3' 'http-parser' 'libevent' 'libxslt' 'libxss'
+         'minizip' 'nss' 're2' 'snappy')
+makedepends=('clang' 'git' 'gn' 'gperf' 'harfbuzz-icu' 'java-runtime-headless'
+             'jsoncpp' 'libnotify' 'lld' 'llvm' 'ninja' 'npm' 'pciutils' 'yarn'
+             'python2' 'wget' 'yasm')
+optdepends=('kde-cli-tools: file deletion support (kioclient5)'
+            'libappindicator-gtk3: StatusNotifierItem support'
+            'trash-cli: file deletion support (trash-put)'
+            "xdg-utils: open URLs with desktop's default (xdg-email, xdg-open)")
+source=('git+https://github.com/electron/electron.git'
+        'git+https://chromium.googlesource.com/chromium/tools/depot_tools.git'
+        'electron.desktop'
+        'default_app-icon.patch'
+        'use-system-libraries-in-node.patch'
+        'icu67.patch'
+        'chromium-skia-harmony.patch'
+        'fix-building-with-system-zlib.patch'
+        'fix-building-with-unbundled-libxml.patch'
+        'fix-shim-header-generation-when-unbundling-ICU.patch'
+       )
+sha256sums=('SKIP'
+            'SKIP'
+            '5270db01f3f8aaa5137dec275a02caa832b7f2e37942e068cba8d28b3a29df39'
+            '00b21418b9468064f6f275566d3cf64c6b014e596acc650100a5a46da31efbfa'
+            'c7eadac877179e586d0cce7f898aa1462b4c207733e68ecc17de9754b691713a'
+            '5315977307e69d20b3e856d3f8724835b08e02085a4444a5c5cefea83fd7d006'
+            '771292942c0901092a402cc60ee883877a99fb804cb54d568c8c6c94565a48e1'
+            '18276e65c68a0c328601b12fefb7e8bfc632346f34b87e64944c9de8c95c5cfa'
+            'e530d1b39504c2ab247e16f1602359c484e9e8be4ef6d4824d68b14d29a7f60b'
+            'e477aa48a11ca4d53927f66a9593567fcd053325fb38af30ac3508465f1dd1f6')
+
+_system_libs=('ffmpeg'
+              'flac'
+              'fontconfig'
+              'freetype'
+              'harfbuzz-ng'
+              'icu'
+              'libdrm'
+              'libevent'
+              'libjpeg'
+#              'libpng'
+              'libvpx'
+              'libwebp'
+              'libxml'
+              'libxslt'
+#              'openh264'
+              'opus'
+              're2'
+              'snappy'
+              'yasm'
+              'zlib'
+             )
+
+prepare() {
+  mkdir -p "${srcdir}"/python2-path
+  ln -sf /usr/bin/python2 "${srcdir}/python2-path/python"
+  export PATH="${srcdir}/python2-path:${PATH}:${srcdir}/depot_tools"
+
+  echo "Fetching chromium..."
+  git clone --branch=${_chromiumver} --depth=1 \
+      https://chromium.googlesource.com/chromium/src.git
+
+  echo "solutions = [
+  {
+    \"name\": \"src/electron\",
+    \"url\": \"file://${srcdir}/electron@${_commit}\",
+    \"deps_file\": \"DEPS\",
+    \"managed\": False,
+    \"custom_deps\": {
+      \"src\": None,
+    },
+    \"custom_vars\": {},
+  },
+]" > .gclient
+
+  python2 "${srcdir}/depot_tools/gclient.py" sync \
+      --with_branch_heads \
+      --with_tags \
+      --nohooks
+
+  sed -e "s/'am'/'apply'/" -i src/electron/script/lib/git.py
+
+  echo "Running hooks..."
+  # python2 "${srcdir}/depot_tools/gclient.py" runhooks
+  python2 src/build/landmines.py
+  python2 src/build/util/lastchange.py -o src/build/util/LASTCHANGE
+  python2 src/build/util/lastchange.py -m GPU_LISTS_VERSION \
+    --revision-id-only --header src/gpu/config/gpu_lists_version.h
+  python2 src/build/util/lastchange.py -m SKIA_COMMIT_HASH \
+    -s src/third_party/skia --header src/skia/ext/skia_commit_hash.h
+  # Create sysmlink to system Node.js
+  mkdir -p src/third_party/node/linux/node-linux-x64/bin
+  ln -sf /usr/bin/node src/third_party/node/linux/node-linux-x64/bin
+  python2 src/third_party/depot_tools/download_from_google_storage.py \
+    --no_resume --extract --no_auth --bucket chromium-nodejs \
+    -s src/third_party/node/node_modules.tar.gz.sha1
+  vpython src/tools/download_cros_provided_profile.py \
+    --newest_state=src/chrome/android/profiles/newest.txt \
+    --local_state=src/chrome/android/profiles/local.txt \
+    --output_name=src/chrome/android/profiles/afdo.prof \
+    --gs_url_base=chromeos-prebuilt/afdo-job/llvm
+  python2 src/electron/script/apply_all_patches.py \
+      src/electron/patches/config.json
+  cd src/electron
+  yarn install --frozen-lockfile
+  cd ..
+
+  echo "Applying local patches..."
+  patch -Np3 -d v8 <../icu67.patch
+  patch -Np0 -i ../chromium-skia-harmony.patch
+  patch -Np1 -i ../fix-building-with-system-zlib.patch
+  patch -Np1 -i ../fix-building-with-unbundled-libxml.patch
+  patch -Np1 -i ../fix-shim-header-generation-when-unbundling-ICU.patch
+  patch -Np1 -i ../use-system-libraries-in-node.patch
+  patch -Np1 -i ../default_app-icon.patch  # Icon from .desktop file
+
+  echo "Patching Chromium for using system libraries..."
+  sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
+      tools/generate_shim_headers/generate_shim_headers.py
+  for lib in "${_system_libs[@]}" libjpeg_turbo; do
+      third_party_dir="third_party/${lib}"
+      if [ ! -d ${third_party_dir} ]; then
+        third_party_dir="base/${third_party_dir}"
+      fi
+      find ${third_party_dir} -type f \
+          \! -path "${third_party_dir}/chromium/*" \
+          \! -path "${third_party_dir}/google/*" \
+          \! -path 'third_party/yasm/run_yasm.py' \
+          \! -regex '.*\.\(gn\|gni\|isolate\)' \
+          -delete
+  done
+  python2 build/linux/unbundle/replace_gn_files.py \
+      --system-libraries \
+      "${_system_libs[@]}"
+}
+
+build() {
+  export CC=clang
+  export CXX=clang++
+  export AR=ar
+  export NM=nm
+
+  # Do not warn about unknown warning options
+  CFLAGS+='   -Wno-unknown-warning-option'
+  CXXFLAGS+=' -Wno-unknown-warning-option'
+
+  cd src
+  export CHROMIUM_BUILDTOOLS_PATH="${PWD}/buildtools"
+  GN_EXTRA_ARGS='
+    blink_symbol_level = 0
+    clang_use_chrome_plugins = false
+    custom_toolchain = "//build/toolchain/linux/unbundle:default"
+    host_toolchain = "//build/toolchain/linux/unbundle:default"
+    icu_use_data_file = false
+    is_component_ffmpeg = false
+    link_pulseaudio = true
+    linux_use_bundled_binutils = false
+    treat_warnings_as_errors = false
+    use_custom_libcxx = false
+    use_gnome_keyring = false
+    use_sysroot = false
+  '
+  gn gen out/Release \
+      --args="import(\"//electron/build/args/release.gn\") ${GN_EXTRA_ARGS}"
+  ninja -C out/Release electron
+  # Strip before zip to avoid
+  # zipfile.LargeZipFile: Filesize would require ZIP64 extensions
+  strip -s out/Release/electron
+  ninja -C out/Release electron_dist_zip
+  # ninja -C out/Release third_party/electron_node:headers
+}
+
+package() {
+  install -dm755 "${pkgdir}/usr/lib/electron"
+  bsdtar -xf src/out/Release/dist.zip -C "${pkgdir}/usr/lib/electron"
+
+  chmod u+s "${pkgdir}/usr/lib/electron/chrome-sandbox"
+
+  install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
+  for l in "${pkgdir}/usr/lib/electron"/{LICENSE,LICENSES.chromium.html}; do
+    ln -s  \
+      $(realpath --relative-to="${pkgdir}/usr/share/licenses/${pkgname}" ${l}) \
+      "${pkgdir}/usr/share/licenses/${pkgname}"
+  done
+
+  install -dm755 "${pkgdir}"/usr/bin
+  ln -s ../lib/electron/electron "${pkgdir}"/usr/bin
+
+  # Install .desktop and icon file (see default_app-icon.patch)
+  install -Dm644 -t "${pkgdir}/usr/share/applications" electron.desktop
+  install -Dm644 src/electron/default_app/icon.png \
+          "${pkgdir}/usr/share/pixmaps/electron.png"  # hicolor has no 1024x1024
+}

Copied: electron/repos/community-staging-x86_64/chromium-skia-harmony.patch (from rev 621994, electron/trunk/chromium-skia-harmony.patch)
===================================================================
--- community-staging-x86_64/chromium-skia-harmony.patch	                        (rev 0)
+++ community-staging-x86_64/chromium-skia-harmony.patch	2020-04-28 11:27:44 UTC (rev 621995)
@@ -0,0 +1,14 @@
+--- third_party/skia/src/ports/SkFontHost_FreeType.cpp.orig	2019-07-19 11:08:34.770972665 +0000
++++ third_party/skia/src/ports/SkFontHost_FreeType.cpp	2019-07-19 11:08:44.274442065 +0000
+@@ -128,9 +128,9 @@ public:
+         : fGetVarDesignCoordinates(nullptr)
+         , fGetVarAxisFlags(nullptr)
+         , fLibrary(nullptr)
+-        , fIsLCDSupported(false)
++        , fIsLCDSupported(true)
+         , fLightHintingIsYOnly(false)
+-        , fLCDExtra(0)
++        , fLCDExtra(2)
+     {
+         if (FT_New_Library(&gFTMemory, &fLibrary)) {
+             return;

Copied: electron/repos/community-staging-x86_64/default_app-icon.patch (from rev 621994, electron/trunk/default_app-icon.patch)
===================================================================
--- community-staging-x86_64/default_app-icon.patch	                        (rev 0)
+++ community-staging-x86_64/default_app-icon.patch	2020-04-28 11:27:44 UTC (rev 621995)
@@ -0,0 +1,21 @@
+--- a/electron/default_app/default_app.ts
++++ b/electron/default_app/default_app.ts
+@@ -62,7 +62,7 @@
+   };
+ 
+   if (process.platform === 'linux') {
+-    options.icon = path.join(__dirname, 'icon.png');
++    options.icon = '/usr/share/pixmaps/electron.png';
+   }
+ 
+   mainWindow = new BrowserWindow(options);
+--- a/electron/filenames.gni
++++ b/electron/filenames.gni
+@@ -6,7 +6,6 @@
+   ]
+ 
+   default_app_static_sources = [
+-    "default_app/icon.png",
+     "default_app/index.html",
+     "default_app/package.json",
+     "default_app/styles.css",

Copied: electron/repos/community-staging-x86_64/electron.desktop (from rev 621994, electron/trunk/electron.desktop)
===================================================================
--- community-staging-x86_64/electron.desktop	                        (rev 0)
+++ community-staging-x86_64/electron.desktop	2020-04-28 11:27:44 UTC (rev 621995)
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Type=Application
+Name=Electron
+Icon=electron
+Exec=electron %u
+Categories=Development;GTK;
+StartupNotify=true

Copied: electron/repos/community-staging-x86_64/fix-building-with-system-zlib.patch (from rev 621994, electron/trunk/fix-building-with-system-zlib.patch)
===================================================================
--- community-staging-x86_64/fix-building-with-system-zlib.patch	                        (rev 0)
+++ community-staging-x86_64/fix-building-with-system-zlib.patch	2020-04-28 11:27:44 UTC (rev 621995)
@@ -0,0 +1,32 @@
+From cda86e34ddadba5f08dea764881bbb6c8ec01e8a Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09 at googlemail.com>
+Date: Sat, 25 Jan 2020 02:00:43 +0000
+Subject: [PATCH] Fix building with system zlib
+
+Add zlib_config target because perfetto depends on it.
+
+Bug: 977964
+Change-Id: I2aac5c3704f1274f932a61264d1c26a05f2db55e
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2019035
+Reviewed-by: Thomas Anderson <thomasanderson at chromium.org>
+Commit-Queue: Thomas Anderson <thomasanderson at chromium.org>
+Cr-Commit-Position: refs/heads/master@{#735201}
+---
+ build/linux/unbundle/zlib.gn | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/build/linux/unbundle/zlib.gn b/build/linux/unbundle/zlib.gn
+index 1fdd472f35e..97d6aebe6d5 100644
+--- a/build/linux/unbundle/zlib.gn
++++ b/build/linux/unbundle/zlib.gn
+@@ -13,6 +13,10 @@ config("system_zlib") {
+   defines = [ "USE_SYSTEM_ZLIB=1" ]
+ }
+ 
++config("zlib_config") {
++  configs = [ ":system_zlib" ]
++}
++
+ source_set("zlib") {
+   deps = [ ":zlib_shim" ]
+   libs = [ "z" ]

Copied: electron/repos/community-staging-x86_64/fix-building-with-unbundled-libxml.patch (from rev 621994, electron/trunk/fix-building-with-unbundled-libxml.patch)
===================================================================
--- community-staging-x86_64/fix-building-with-unbundled-libxml.patch	                        (rev 0)
+++ community-staging-x86_64/fix-building-with-unbundled-libxml.patch	2020-04-28 11:27:44 UTC (rev 621995)
@@ -0,0 +1,127 @@
+From d3afade220ddb307e16a6dd4f2b0ec88b2af91e7 Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09 at googlemail.com>
+Date: Tue, 28 Jan 2020 18:16:54 +0000
+Subject: [PATCH] Fix building with unbundled libxml
+
+Add new targets to libxml.gn that were added in
+ https://chromium-review.googlesource.com/c/chromium/src/+/1894877
+Adjust includes to use system libxml headers too
+
+Bug: 1043042
+Change-Id: I948c063e212e49b9e7f42fed2b8bf7f4af042ca7
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2007110
+Reviewed-by: Robert Sesek <rsesek at chromium.org>
+Reviewed-by: Daniel Cheng <dcheng at chromium.org>
+Reviewed-by: Nico Weber <thakis at chromium.org>
+Commit-Queue: Robert Sesek <rsesek at chromium.org>
+Cr-Commit-Position: refs/heads/master@{#735957}
+---
+ build/linux/unbundle/libxml.gn             | 41 ++++++++++++++++++++--
+ third_party/libxml/chromium/libxml_utils.h |  4 +--
+ third_party/libxml/chromium/xml_reader.cc  |  3 +-
+ third_party/libxml/chromium/xml_writer.cc  |  3 +-
+ 4 files changed, 45 insertions(+), 6 deletions(-)
+
+diff --git a/build/linux/unbundle/libxml.gn b/build/linux/unbundle/libxml.gn
+index c481bd3547b..3587881eea8 100644
+--- a/build/linux/unbundle/libxml.gn
++++ b/build/linux/unbundle/libxml.gn
+@@ -8,11 +8,48 @@ pkg_config("system_libxml") {
+   packages = [ "libxml-2.0" ]
+ }
+ 
+-static_library("libxml") {
++source_set("libxml") {
++  public_configs = [ ":system_libxml" ]
++}
++
++static_library("libxml_utils") {
++  # Do not expand this visibility list without first consulting with the
++  # Security Team.
++  visibility = [
++    ":xml_reader",
++    ":xml_writer",
++    "//base/test:test_support",
++    "//services/data_decoder:xml_parser_fuzzer",
++  ]
+   sources = [
+     "chromium/libxml_utils.cc",
+     "chromium/libxml_utils.h",
+   ]
+-
+   public_configs = [ ":system_libxml" ]
+ }
++
++static_library("xml_reader") {
++  # Do not expand this visibility list without first consulting with the
++  # Security Team.
++  visibility = [
++    "//base/test:test_support",
++    "//components/policy/core/common:unit_tests",
++    "//services/data_decoder:*",
++    "//tools/traffic_annotation/auditor:auditor_sources",
++  ]
++  sources = [
++    "chromium/xml_reader.cc",
++    "chromium/xml_reader.h",
++  ]
++  deps = [ ":libxml_utils" ]
++}
++
++static_library("xml_writer") {
++  # The XmlWriter is considered safe to use from any target.
++  visibility = [ "*" ]
++  sources = [
++    "chromium/xml_writer.cc",
++    "chromium/xml_writer.h",
++  ]
++  deps = [ ":libxml_utils" ]
++}
+diff --git a/third_party/libxml/chromium/libxml_utils.h b/third_party/libxml/chromium/libxml_utils.h
+index ff969fab540..8b2383f9c8b 100644
+--- a/third_party/libxml/chromium/libxml_utils.h
++++ b/third_party/libxml/chromium/libxml_utils.h
+@@ -5,9 +5,9 @@
+ #ifndef THIRD_PARTY_LIBXML_CHROMIUM_LIBXML_UTILS_H_
+ #define THIRD_PARTY_LIBXML_CHROMIUM_LIBXML_UTILS_H_
+ 
+-#include <string>
++#include <libxml/xmlreader.h>
+ 
+-#include "third_party/libxml/src/include/libxml/xmlreader.h"
++#include <string>
+ 
+ // libxml uses a global error function pointer for reporting errors.
+ // A ScopedXmlErrorFunc object lets you change the global error pointer
+diff --git a/third_party/libxml/chromium/xml_reader.cc b/third_party/libxml/chromium/xml_reader.cc
+index 92464f4cbcc..899ccefb7c8 100644
+--- a/third_party/libxml/chromium/xml_reader.cc
++++ b/third_party/libxml/chromium/xml_reader.cc
+@@ -4,10 +4,11 @@
+ 
+ #include "third_party/libxml/chromium/xml_reader.h"
+ 
++#include <libxml/xmlreader.h>
++
+ #include <vector>
+ 
+ #include "third_party/libxml/chromium/libxml_utils.h"
+-#include "third_party/libxml/src/include/libxml/xmlreader.h"
+ 
+ using internal::XmlStringToStdString;
+ 
+diff --git a/third_party/libxml/chromium/xml_writer.cc b/third_party/libxml/chromium/xml_writer.cc
+index 51fce8ebeb1..7c58031fe2d 100644
+--- a/third_party/libxml/chromium/xml_writer.cc
++++ b/third_party/libxml/chromium/xml_writer.cc
+@@ -4,8 +4,9 @@
+ 
+ #include "third_party/libxml/chromium/xml_writer.h"
+ 
++#include <libxml/xmlwriter.h>
++
+ #include "third_party/libxml/chromium/libxml_utils.h"
+-#include "third_party/libxml/src/include/libxml/xmlwriter.h"
+ 
+ XmlWriter::XmlWriter() : writer_(nullptr), buffer_(nullptr) {}
+ 

Copied: electron/repos/community-staging-x86_64/fix-shim-header-generation-when-unbundling-ICU.patch (from rev 621994, electron/trunk/fix-shim-header-generation-when-unbundling-ICU.patch)
===================================================================
--- community-staging-x86_64/fix-shim-header-generation-when-unbundling-ICU.patch	                        (rev 0)
+++ community-staging-x86_64/fix-shim-header-generation-when-unbundling-ICU.patch	2020-04-28 11:27:44 UTC (rev 621995)
@@ -0,0 +1,50 @@
+From dcad5af090528018599277dc5d7e160fb6b2d68e Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09 at googlemail.com>
+Date: Wed, 15 Jan 2020 20:26:40 +0000
+Subject: [PATCH] Fix shim header generation when unbundling ICU
+
+listformatter.h was moved from icuuc to icui18n
+
+Bug: 989153
+Change-Id: I9fcb56f6d5af7787f34ea99b737e2ed8fe741c84
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2000142
+Reviewed-by: Lei Zhang <thestig at chromium.org>
+Commit-Queue: Lei Zhang <thestig at chromium.org>
+Cr-Commit-Position: refs/heads/master@{#732114}
+---
+ AUTHORS                     | 1 +
+ build/linux/unbundle/icu.gn | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/AUTHORS b/AUTHORS
+index 7523e483aae..1618fddc633 100644
+--- a/AUTHORS
++++ b/AUTHORS
+@@ -891,6 +891,7 @@ Soren Dreijer <dreijerbit at gmail.com>
+ Sreerenj Balachandran <sreerenj.balachandran at intel.com>
+ Srirama Chandra Sekhar Mogali <srirama.m at samsung.com>
+ Staphany Park <stapark008 at gmail.com>
++Stephan Hartmann <stha09 at googlemail.com>
+ Stephen Searles <stephen.searles at gmail.com>
+ Steve Sanders <steve at zanderz.com>
+ Steven Pennington <spenn at engr.uvic.ca>
+diff --git a/build/linux/unbundle/icu.gn b/build/linux/unbundle/icu.gn
+index 923bd7f5ac3..e77bc43db87 100644
+--- a/build/linux/unbundle/icu.gn
++++ b/build/linux/unbundle/icu.gn
+@@ -92,6 +92,7 @@ shim_headers("icui18n_shim") {
+     "unicode/fpositer.h",
+     "unicode/gender.h",
+     "unicode/gregocal.h",
++    "unicode/listformatter.h",
+     "unicode/measfmt.h",
+     "unicode/measunit.h",
+     "unicode/measure.h",
+@@ -174,7 +175,6 @@ shim_headers("icuuc_shim") {
+     "unicode/icudataver.h",
+     "unicode/icuplug.h",
+     "unicode/idna.h",
+-    "unicode/listformatter.h",
+     "unicode/localpointer.h",
+     "unicode/locdspnm.h",
+     "unicode/locid.h",

Copied: electron/repos/community-staging-x86_64/icu67.patch (from rev 621994, electron/trunk/icu67.patch)
===================================================================
--- community-staging-x86_64/icu67.patch	                        (rev 0)
+++ community-staging-x86_64/icu67.patch	2020-04-28 11:27:44 UTC (rev 621995)
@@ -0,0 +1,169 @@
+From 2b107e7670ffb43719a66ee4a55ab408a5dcf2a5 Mon Sep 17 00:00:00 2001
+From: Ujjwal Sharma <ryzokuken at disroot.org>
+Date: Wed, 22 Apr 2020 12:20:17 +0530
+Subject: [PATCH] deps: V8: backport 3f8dc4b2e5ba
+
+Original commit message:
+
+    [intl] Remove soon-to-be removed getAllFieldPositions
+
+    Needed to land ICU67.1 soon.
+
+    Bug: v8:10393
+    Change-Id: I3c7737ca600d6ccfdc46ffaddfb318ce60bc7618
+    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2136489
+    Reviewed-by: Jakob Kummerow <jkummerow at chromium.org>
+    Commit-Queue: Frank Tang <ftang at chromium.org>
+    Cr-Commit-Position: refs/heads/master@{#67027}
+
+Refs: https://github.com/v8/v8/commit/3f8dc4b2e5baf77b463334c769af85b79d8c1463
+---
+ common.gypi                             |  2 +-
+ deps/v8/src/objects/js-number-format.cc | 72 +++++++++++++------------
+ 2 files changed, 38 insertions(+), 36 deletions(-)
+
+diff --git a/deps/v8/src/objects/js-number-format.cc b/deps/v8/src/objects/js-number-format.cc
+index 92d3e2fb82e..ced408aa173 100644
+--- a/deps/v8/src/objects/js-number-format.cc
++++ b/deps/v8/src/objects/js-number-format.cc
+@@ -1197,42 +1197,31 @@ MaybeHandle<JSNumberFormat> JSNumberFormat::New(Isolate* isolate,
+ }
+ 
+ namespace {
+-Maybe<icu::UnicodeString> IcuFormatNumber(
++Maybe<bool> IcuFormatNumber(
+     Isolate* isolate,
+     const icu::number::LocalizedNumberFormatter& number_format,
+-    Handle<Object> numeric_obj, icu::FieldPositionIterator* fp_iter) {
++    Handle<Object> numeric_obj, icu::number::FormattedNumber* formatted) {
+   // If it is BigInt, handle it differently.
+   UErrorCode status = U_ZERO_ERROR;
+-  icu::number::FormattedNumber formatted;
+   if (numeric_obj->IsBigInt()) {
+     Handle<BigInt> big_int = Handle<BigInt>::cast(numeric_obj);
+     Handle<String> big_int_string;
+     ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, big_int_string,
+                                      BigInt::ToString(isolate, big_int),
+-                                     Nothing<icu::UnicodeString>());
+-    formatted = number_format.formatDecimal(
++                                     Nothing<bool>());
++    *formatted = number_format.formatDecimal(
+         {big_int_string->ToCString().get(), big_int_string->length()}, status);
+   } else {
+     double number = numeric_obj->Number();
+-    formatted = number_format.formatDouble(number, status);
++    *formatted = number_format.formatDouble(number, status);
+   }
+   if (U_FAILURE(status)) {
+     // This happen because of icu data trimming trim out "unit".
+     // See https://bugs.chromium.org/p/v8/issues/detail?id=8641
+-    THROW_NEW_ERROR_RETURN_VALUE(isolate,
+-                                 NewTypeError(MessageTemplate::kIcuError),
+-                                 Nothing<icu::UnicodeString>());
+-  }
+-  if (fp_iter) {
+-    formatted.getAllFieldPositions(*fp_iter, status);
++    THROW_NEW_ERROR_RETURN_VALUE(
++        isolate, NewTypeError(MessageTemplate::kIcuError), Nothing<bool>());
+   }
+-  icu::UnicodeString result = formatted.toString(status);
+-  if (U_FAILURE(status)) {
+-    THROW_NEW_ERROR_RETURN_VALUE(isolate,
+-                                 NewTypeError(MessageTemplate::kIcuError),
+-                                 Nothing<icu::UnicodeString>());
+-  }
+-  return Just(result);
++  return Just(true);
+ }
+ 
+ }  // namespace
+@@ -1243,10 +1232,16 @@ MaybeHandle<String> JSNumberFormat::FormatNumeric(
+     Handle<Object> numeric_obj) {
+   DCHECK(numeric_obj->IsNumeric());
+ 
+-  Maybe<icu::UnicodeString> maybe_format =
+-      IcuFormatNumber(isolate, number_format, numeric_obj, nullptr);
++  icu::number::FormattedNumber formatted;
++  Maybe<bool> maybe_format =
++      IcuFormatNumber(isolate, number_format, numeric_obj, &formatted);
+   MAYBE_RETURN(maybe_format, Handle<String>());
+-  return Intl::ToString(isolate, maybe_format.FromJust());
++  UErrorCode status = U_ZERO_ERROR;
++  icu::UnicodeString result = formatted.toString(status);
++  if (U_FAILURE(status)) {
++    THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kIcuError), String);
++  }
++  return Intl::ToString(isolate, result);
+ }
+ 
+ namespace {
+@@ -1359,12 +1354,18 @@ std::vector<NumberFormatSpan> FlattenRegionsToParts(
+ }
+ 
+ namespace {
+-Maybe<int> ConstructParts(Isolate* isolate, const icu::UnicodeString& formatted,
+-                          icu::FieldPositionIterator* fp_iter,
++Maybe<int> ConstructParts(Isolate* isolate,
++                          icu::number::FormattedNumber* formatted,
+                           Handle<JSArray> result, int start_index,
+                           Handle<Object> numeric_obj, bool style_is_unit) {
++  UErrorCode status = U_ZERO_ERROR;
++  icu::UnicodeString formatted_text = formatted->toString(status);
++  if (U_FAILURE(status)) {
++    THROW_NEW_ERROR_RETURN_VALUE(
++        isolate, NewTypeError(MessageTemplate::kIcuError), Nothing<int>());
++  }
+   DCHECK(numeric_obj->IsNumeric());
+-  int32_t length = formatted.length();
++  int32_t length = formatted_text.length();
+   int index = start_index;
+   if (length == 0) return Just(index);
+ 
+@@ -1373,13 +1374,14 @@ Maybe<int> ConstructParts(Isolate* isolate, const icu::UnicodeString& formatted,
+   // other region covers some part of the formatted string. It's possible
+   // there's another field with exactly the same begin and end as this backdrop,
+   // in which case the backdrop's field_id of -1 will give it lower priority.
+-  regions.push_back(NumberFormatSpan(-1, 0, formatted.length()));
++  regions.push_back(NumberFormatSpan(-1, 0, formatted_text.length()));
+ 
+   {
+-    icu::FieldPosition fp;
+-    while (fp_iter->next(fp)) {
+-      regions.push_back(NumberFormatSpan(fp.getField(), fp.getBeginIndex(),
+-                                         fp.getEndIndex()));
++    icu::ConstrainedFieldPosition cfp;
++    cfp.constrainCategory(UFIELD_CATEGORY_NUMBER);
++    while (formatted->nextPosition(cfp, status)) {
++      regions.push_back(
++          NumberFormatSpan(cfp.getField(), cfp.getStart(), cfp.getLimit()));
+     }
+   }
+ 
+@@ -1401,7 +1403,7 @@ Maybe<int> ConstructParts(Isolate* isolate, const icu::UnicodeString& formatted,
+     Handle<String> substring;
+     ASSIGN_RETURN_ON_EXCEPTION_VALUE(
+         isolate, substring,
+-        Intl::ToString(isolate, formatted, part.begin_pos, part.end_pos),
++        Intl::ToString(isolate, formatted_text, part.begin_pos, part.end_pos),
+         Nothing<int>());
+     Intl::AddElement(isolate, result, index, field_type_string, substring);
+     ++index;
+@@ -1421,14 +1423,14 @@ MaybeHandle<JSArray> JSNumberFormat::FormatToParts(
+       number_format->icu_number_formatter().raw();
+   CHECK_NOT_NULL(fmt);
+ 
+-  icu::FieldPositionIterator fp_iter;
+-  Maybe<icu::UnicodeString> maybe_format =
+-      IcuFormatNumber(isolate, *fmt, numeric_obj, &fp_iter);
++  icu::number::FormattedNumber formatted;
++  Maybe<bool> maybe_format =
++      IcuFormatNumber(isolate, *fmt, numeric_obj, &formatted);
+   MAYBE_RETURN(maybe_format, Handle<JSArray>());
+ 
+   Handle<JSArray> result = factory->NewJSArray(0);
+   Maybe<int> maybe_format_to_parts = ConstructParts(
+-      isolate, maybe_format.FromJust(), &fp_iter, result, 0, numeric_obj,
++      isolate, &formatted, result, 0, numeric_obj,
+       number_format->style() == JSNumberFormat::Style::UNIT);
+   MAYBE_RETURN(maybe_format_to_parts, Handle<JSArray>());
+ 

Copied: electron/repos/community-staging-x86_64/use-system-libraries-in-node.patch (from rev 621994, electron/trunk/use-system-libraries-in-node.patch)
===================================================================
--- community-staging-x86_64/use-system-libraries-in-node.patch	                        (rev 0)
+++ community-staging-x86_64/use-system-libraries-in-node.patch	2020-04-28 11:27:44 UTC (rev 621995)
@@ -0,0 +1,56 @@
+--- a/third_party/electron_node/BUILD.gn
++++ b/third_party/electron_node/BUILD.gn
+@@ -42,6 +42,18 @@
+   node_module_version = ""
+ }
+ 
++if (is_linux) {
++  import("//build/config/linux/pkg_config.gni")
++
++  pkg_config("cares") {
++    packages = [ "libcares" ]
++  }
++
++  pkg_config("nghttp2") {
++    packages = [ "libnghttp2" ]
++  }
++}
++
+ assert(!node_use_dtrace, "node_use_dtrace not supported in GN")
+ assert(!node_use_etw, "node_use_etw not supported in GN")
+ 
+@@ -203,12 +215,8 @@
+ component("node_lib") {
+   deps = [
+     ":node_js2c",
+-    "deps/cares",
+     "deps/histogram",
+-    "deps/http_parser",
+     "deps/llhttp",
+-    "deps/nghttp2",
+-    "deps/zlib",
+     "//third_party/brotli:dec",
+     "//third_party/brotli:enc",
+     "//v8:v8_libplatform",
+@@ -222,6 +230,21 @@
+   public_configs = [ ":node_lib_config" ]
+   include_dirs = [ "src" ]
+   libs = []
++  if (is_linux) {
++    configs += [
++      ":cares",
++      ":nghttp2",
++    ]
++    deps += [ "//third_party/zlib" ]
++    libs += [ "http_parser" ]
++  } else {
++    deps += [
++      "deps/cares",
++      "deps/http_parser",
++      "deps/nghttp2",
++      "deps/zlib",
++    ]
++  }
+   cflags_cc = [
+     "-Wno-deprecated-declarations",
+     "-Wno-implicit-fallthrough",



More information about the arch-commits mailing list