sysroot.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Jeremy Apthorp <[email protected]>
  3. Date: Thu, 18 Oct 2018 17:03:57 -0700
  4. Subject: sysroot.patch
  5. Make chrome's install-sysroot scripts point to our custom sysroot builds,
  6. which include extra deps that Electron needs (e.g. libnotify)
  7. diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py
  8. index d7e36862f48e8a2e3dff406f1183df26ca1ef700..e702004c4bc8afbad0ba42fe45511d30dc445f6e 100755
  9. --- a/build/linux/sysroot_scripts/install-sysroot.py
  10. +++ b/build/linux/sysroot_scripts/install-sysroot.py
  11. @@ -41,9 +41,11 @@ except ImportError:
  12. from urllib2 import urlopen
  13. SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
  14. +SRC_DIR = os.path.dirname(os.path.dirname(os.path.dirname(SCRIPT_DIR)))
  15. +SYSTOORS_CONFIG_DIR = os.path.join(SRC_DIR, 'electron', 'script')
  16. -URL_PREFIX = 'https://commondatastorage.googleapis.com'
  17. -URL_PATH = 'chrome-linux-sysroot/toolchain'
  18. +URL_PREFIX = 'https://dev-cdn.electronjs.org'
  19. +URL_PATH = 'linux-sysroots'
  20. VALID_ARCHS = ('arm', 'arm64', 'i386', 'amd64', 'mips', 'mips64el')
  21. @@ -107,7 +109,7 @@ def GetSysrootDict(target_platform, target_arch):
  22. if target_arch not in VALID_ARCHS:
  23. raise Error('Unknown architecture: %s' % target_arch)
  24. - sysroots_file = os.path.join(SCRIPT_DIR, 'sysroots.json')
  25. + sysroots_file = os.path.join(SYSTOORS_CONFIG_DIR, 'sysroots.json')
  26. sysroots = json.load(open(sysroots_file))
  27. sysroot_key = '%s_%s' % (target_platform, target_arch)
  28. if sysroot_key not in sysroots: