diff options
Diffstat (limited to 'external/nss/gyp-buildsystem.patch.0')
-rw-r--r-- | external/nss/gyp-buildsystem.patch.0 | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/external/nss/gyp-buildsystem.patch.0 b/external/nss/gyp-buildsystem.patch.0 new file mode 100644 index 000000000000..8323d1a7a7c3 --- /dev/null +++ b/external/nss/gyp-buildsystem.patch.0 @@ -0,0 +1,119 @@ +--- pylib/gyp/msvs_emulation.py.sav 2020-02-19 21:45:13.150161000 +0100 ++++ pylib/gyp/msvs_emulation.py 2020-02-21 23:51:56.815937600 +0100 +@@ -138,7 +138,7 @@ def _FindDirectXInstallation(): + if not dxsdk_dir: + # Setup params to pass to and attempt to launch reg.exe. + cmd = ['reg.exe', 'query', r'HKLM\Software\Microsoft\DirectX', '/s'] +- p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) ++ p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,universal_newlines=True) + for line in p.communicate()[0].splitlines(): + if 'InstallPath' in line: + dxsdk_dir = line.split(' ')[3] + "\\" +@@ -321,7 +321,7 @@ class MsvsSettings(object): + # first level is globally for the configuration (this is what we consider + # "the" config at the gyp level, which will be something like 'Debug' or + # 'Release'), VS2015 and later only use this level +- if self.vs_version.short_name >= 2015: ++ if int(self.vs_version.short_name) >= 2015: + return config + # and a second target-specific configuration, which is an + # override for the global one. |config| is remapped here to take into +@@ -485,7 +485,7 @@ class MsvsSettings(object): + prefix='/arch:') + cflags.extend(['/FI' + f for f in self._Setting( + ('VCCLCompilerTool', 'ForcedIncludeFiles'), config, default=[])]) +- if self.vs_version.project_version >= 12.0: ++ if float(self.vs_version.project_version) >= 12.0: + # New flag introduced in VS2013 (project version 12.0) Forces writes to + # the program database (PDB) to be serialized through MSPDBSRV.EXE. + # https://msdn.microsoft.com/en-us/library/dn502518.aspx +@@ -1050,7 +1050,7 @@ def GenerateEnvironmentFiles(toplevel_bu + args = vs.SetupScript(arch) + args.extend(('&&', 'set')) + popen = subprocess.Popen( +- args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) ++ args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,universal_newlines=True) + variables, _ = popen.communicate() + if popen.returncode != 0: + raise Exception('"%s" failed with error %d' % (args, popen.returncode)) +@@ -1071,7 +1071,7 @@ def GenerateEnvironmentFiles(toplevel_bu + args = vs.SetupScript(arch) + args.extend(('&&', + 'for', '%i', 'in', '(cl.exe)', 'do', '@echo', 'LOC:%~$PATH:i')) +- popen = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE) ++ popen = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE,universal_newlines=True) + output, _ = popen.communicate() + cl_paths[arch] = _ExtractCLPath(output) + return cl_paths +--- pylib/gyp/generator/ninja.py.sav 2020-02-19 21:45:13.150161000 +0100 ++++ pylib/gyp/generator/ninja.py 2020-02-22 00:42:48.090472000 +0100 +@@ -1741,7 +1741,10 @@ def CalculateGeneratorInputInfo(params): + def OpenOutput(path, mode='w'): + """Open |path| for writing, creating directories if necessary.""" + gyp.common.EnsureDirExists(path) +- return open(path, mode) ++ if sys.version_info[0] < 3: ++ return open(path, mode) ++ else: ++ return open(path, mode, encoding="utf-8") + + + def CommandWithWrapper(cmd, wrappers, prog): +--- pylib/gyp/win_tool.py.sav 2020-02-19 21:45:13.150161000 +0100 ++++ pylib/gyp/win_tool.py 2020-03-04 12:46:55.098189500 +0100 +@@ -130,7 +130,7 @@ class WinTool(object): + # For that reason, since going through the shell doesn't seem necessary on + # non-Windows don't do that there. + link = subprocess.Popen(args, shell=sys.platform == 'win32', env=env, +- stdout=subprocess.PIPE, stderr=subprocess.STDOUT) ++ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,universal_newlines=True) + out, _ = link.communicate() + for line in out.splitlines(): + if (not line.startswith(' Creating library ') and +@@ -197,8 +197,8 @@ class WinTool(object): + # and sometimes doesn't unfortunately. + with open(our_manifest, 'r') as our_f: + with open(assert_manifest, 'r') as assert_f: +- our_data = our_f.read().translate(None, string.whitespace) +- assert_data = assert_f.read().translate(None, string.whitespace) ++ our_data = our_f.read().translate(str.maketrans('','', string.whitespace)) ++ assert_data = assert_f.read().translate(str.maketrans('','', string.whitespace)) + if our_data != assert_data: + os.unlink(out) + def dump(filename): +@@ -223,7 +223,7 @@ class WinTool(object): + tool).""" + env = self._GetEnv(arch) + popen = subprocess.Popen(args, shell=True, env=env, +- stdout=subprocess.PIPE, stderr=subprocess.STDOUT) ++ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,universal_newlines=True) + out, _ = popen.communicate() + for line in out.splitlines(): + if line and 'manifest authoring warning 81010002' not in line: +@@ -255,7 +255,7 @@ class WinTool(object): + idl] + env = self._GetEnv(arch) + popen = subprocess.Popen(args, shell=True, env=env, +- stdout=subprocess.PIPE, stderr=subprocess.STDOUT) ++ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,universal_newlines=True) + out, _ = popen.communicate() + # Filter junk out of stdout, and write filtered versions. Output we want + # to filter is pairs of lines that look like this: +@@ -274,7 +274,7 @@ class WinTool(object): + """Filter logo banner from invocations of asm.exe.""" + env = self._GetEnv(arch) + popen = subprocess.Popen(args, shell=True, env=env, +- stdout=subprocess.PIPE, stderr=subprocess.STDOUT) ++ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,universal_newlines=True) + out, _ = popen.communicate() + for line in out.splitlines(): + if (not line.startswith('Copyright (C) Microsoft Corporation') and +@@ -289,7 +289,7 @@ class WinTool(object): + don't support the /nologo flag.""" + env = self._GetEnv(arch) + popen = subprocess.Popen(args, shell=True, env=env, +- stdout=subprocess.PIPE, stderr=subprocess.STDOUT) ++ stdout=subprocess.PIPE, stderr=subprocess.STDOUT,universal_newlines=True) + out, _ = popen.communicate() + for line in out.splitlines(): + if (not line.startswith('Microsoft (R) Windows (R) Resource Compiler') and |