From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <nornagon@nornagon.net>
Date: Thu, 18 Oct 2018 17:03:57 -0700
Subject: sysroot.patch

Make chrome's install-sysroot scripts point to our custom sysroot builds,
which include extra deps that Electron needs (e.g. libnotify)

diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py
index abd7eb4a8d116075751bcf6e44f872bac83431ef..54c01f56ac3f17b4534b6e89d9f8c4ba3bd79bf9 100755
--- a/build/linux/sysroot_scripts/install-sysroot.py
+++ b/build/linux/sysroot_scripts/install-sysroot.py
@@ -41,9 +41,11 @@ except ImportError:
   from urllib2 import urlopen
 
 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+SRC_DIR = os.path.dirname(os.path.dirname(os.path.dirname(SCRIPT_DIR)))
+SYSTOORS_CONFIG_DIR = os.path.join(SRC_DIR, 'electron', 'script')
 
-URL_PREFIX = 'https://commondatastorage.googleapis.com'
-URL_PATH = 'chrome-linux-sysroot/toolchain'
+URL_PREFIX = 'https://dev-cdn.electronjs.org'
+URL_PATH = 'linux-sysroots'
 
 VALID_ARCHS = ('arm', 'arm64', 'i386', 'amd64', 'mips', 'mips64el')
 
@@ -106,7 +108,7 @@ def GetSysrootDict(target_platform, target_arch):
   if target_arch not in VALID_ARCHS:
     raise Error('Unknown architecture: %s' % target_arch)
 
-  sysroots_file = os.path.join(SCRIPT_DIR, 'sysroots.json')
+  sysroots_file = os.path.join(SYSTOORS_CONFIG_DIR, 'sysroots.json')
   sysroots = json.load(open(sysroots_file))
   sysroot_key = '%s_%s' % (target_platform, target_arch)
   if sysroot_key not in sysroots:
