* update gyp to 20240207.1615ec32-1

This commit is contained in:
Alexander Baldeck 2025-01-02 08:25:18 +01:00
parent 3690c33197
commit d903637734
7 changed files with 2824 additions and 188 deletions

View File

@ -1,24 +1,20 @@
pkgbase = gyp
pkgdesc = Generate Your Projects meta-build system
pkgver = 20230914.a03d7413
pkgrel = 3
pkgver = 20240207.1615ec32
pkgrel = 1
url = https://gyp.gsrc.io/
arch = any
license = custom:BSD
license = BSD-3-Clause
makedepends = git
makedepends = python-build
makedepends = python-installer
makedepends = python-setuptools
makedepends = python-wheel
depends = ninja
depends = python-six
source = git+https://chromium.googlesource.com/external/gyp#commit=a03d7413becefc8d55c8aa3df58b55b9bd0e9052
source = 0001-gyp-python38.patch
source = 0002-gyp-fix-cmake.patch
source = 0003-gyp-fips.patch
b2sums = SKIP
b2sums = 639848a0f0eb26bc16304b9c1ef2944f5cf37b2d7367a7de34becf2ec0962ce43820a21cd6c4d839775fc2dc1440c6e94f10cfd7781c5fe2278ba497b3fbdcb9
b2sums = f77bda072b6a3916c78c2061ceffa8b17bf1341d13509089effd3961e22cb315f68fdf749ab4a6abea37a9ecd61989ddcd75229a45d026e068bf11037ad4499c
b2sums = 61febe5fb8672c2ad4012957b1f42d2909b7adae9b9c62417c22073b7d97dfad37cb34c19839b13bea54f8ab45c068f7b121bd3b4ae62d5234611861cae73c98
depends = python
source = git+https://chromium.googlesource.com/external/gyp#commit=1615ec326858f8c2bd8f30b3a86ea71830409ce4
source = 0001-Fix-Python-compat-and-remove-six.patch
b2sums = 011245ee2d08baf1cd9731b184e4206640e42087c35c24388e2636fcb2dfd9b345dadca1bf57c0a2e228debb76ce1b8654a338dd7e8e3810fe5616446d91aab9
b2sums = 5110f87d01089cc954923c9323b8edd4490615a6709523db7232e0a1a82e7ac5a65aa4740376f5cf771ebdc3cd123744634356263b116d337310e4de55070671
pkgname = gyp

3
gyp/.nvchecker.toml Normal file
View File

@ -0,0 +1,3 @@
[gyp]
source = "git"
git = "https://chromium.googlesource.com/external/gyp"

File diff suppressed because it is too large Load Diff

View File

@ -1,71 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tom Hughes <tom@compton.nu>
Date: Fri, 23 Aug 2019 09:33:14 +0100
Subject: [PATCH] gyp-python38
Fix python 3.8 warnings
(From Fedora)
---
pylib/gyp/input.py | 2 +-
test/lib/TestCmd.py | 6 +++---
test/lib/TestGyp.py | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/pylib/gyp/input.py b/pylib/gyp/input.py
index 4c1289164045..2bea3341adc5 100644
--- a/pylib/gyp/input.py
+++ b/pylib/gyp/input.py
@@ -1183,7 +1183,7 @@ def LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key):
if variable_name in variables:
# If the variable is already set, don't set it.
continue
- if the_dict_key is 'variables' and variable_name in the_dict:
+ if the_dict_key == 'variables' and variable_name in the_dict:
# If the variable is set without a % in the_dict, and the_dict is a
# variables dict (making |variables| a varaibles sub-dict of a
# variables dict), use the_dict's definition.
diff --git a/test/lib/TestCmd.py b/test/lib/TestCmd.py
index 1ec50933a4a8..457694c877d4 100644
--- a/test/lib/TestCmd.py
+++ b/test/lib/TestCmd.py
@@ -283,7 +283,7 @@ if os.name in ('posix', 'nt'):
else:
tempfile.template = 'testcmd.'
-re_space = re.compile('\s')
+re_space = re.compile(r'\s')
_Cleanup = []
@@ -882,7 +882,7 @@ class TestCmd(object):
#self.diff_function = difflib.unified_diff
self._dirlist = []
self._preserve = {'pass_test': 0, 'fail_test': 0, 'no_result': 0}
- if 'PRESERVE' in os.environ and os.environ['PRESERVE'] is not '':
+ if 'PRESERVE' in os.environ and os.environ['PRESERVE'] != '':
self._preserve['pass_test'] = os.environ['PRESERVE']
self._preserve['fail_test'] = os.environ['PRESERVE']
self._preserve['no_result'] = os.environ['PRESERVE']
@@ -1103,7 +1103,7 @@ class TestCmd(object):
the temporary working directories to be preserved for all
conditions.
"""
- if conditions is ():
+ if len(conditions) == 0:
conditions = ('pass_test', 'fail_test', 'no_result')
for cond in conditions:
self._preserve[cond] = 1
diff --git a/test/lib/TestGyp.py b/test/lib/TestGyp.py
index 2aa78684f517..badfa910100f 100644
--- a/test/lib/TestGyp.py
+++ b/test/lib/TestGyp.py
@@ -743,7 +743,7 @@ def FindVisualStudioInstallation():
build_tool = None
if not build_tool:
args1 = ['reg', 'query',
- 'HKLM\Software\Microsoft\VisualStudio\SxS\VS7',
+ r'HKLM\Software\Microsoft\VisualStudio\SxS\VS7',
'/v', '15.0', '/reg:32']
build_tool = subprocess.check_output(args1).decode(
'utf-8', 'ignore').strip().split(b'\r\n').pop().split(b' ').pop()

View File

@ -1,44 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Sat, 25 Jun 2022 20:41:40 +0000
Subject: [PATCH] gyp-fix-cmake
(From Fedora, with fixed exception type)
---
pylib/gyp/generator/cmake.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pylib/gyp/generator/cmake.py b/pylib/gyp/generator/cmake.py
index 4a2041cf2687..12461dc1d48b 100644
--- a/pylib/gyp/generator/cmake.py
+++ b/pylib/gyp/generator/cmake.py
@@ -40,9 +40,9 @@ import gyp.xcode_emulation
try:
# maketrans moved to str in python3.
- _maketrans = string.maketrans
-except NameError:
_maketrans = str.maketrans
+except AttributeError:
+ _maketrans = string.maketrans
generator_default_variables = {
'EXECUTABLE_PREFIX': '',
@@ -281,7 +281,7 @@ def WriteActions(target_name, actions, extra_sources, extra_deps,
dirs = set(dir for dir in (os.path.dirname(o) for o in outputs) if dir)
if int(action.get('process_outputs_as_sources', False)):
- extra_sources.extend(zip(cmake_outputs, outputs))
+ extra_sources.extend(list(zip(cmake_outputs, outputs)))
# add_custom_command
output.write('add_custom_command(OUTPUT ')
@@ -987,7 +987,7 @@ def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use,
# XCode settings
xcode_settings = config.get('xcode_settings', {})
- for xcode_setting, xcode_value in xcode_settings.viewitems():
+ for xcode_setting, xcode_value in xcode_settings.items():
SetTargetProperty(output, cmake_target_name,
"XCODE_ATTRIBUTE_%s" % xcode_setting, xcode_value,
'' if isinstance(xcode_value, str) else ' ')

View File

@ -1,46 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Sat, 25 Jun 2022 20:45:54 +0000
Subject: [PATCH] gyp-fips
(From Fedora, ported to gyp master)
---
pylib/gyp/generator/make.py | 2 +-
pylib/gyp/generator/ninja.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pylib/gyp/generator/make.py b/pylib/gyp/generator/make.py
index 997eec08666e..06c763db609a 100644
--- a/pylib/gyp/generator/make.py
+++ b/pylib/gyp/generator/make.py
@@ -1774,7 +1774,7 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
# Hash the target name to avoid generating overlong filenames.
cmdstring = (command if command else self.target).encode('utf-8')
- cmddigest = hashlib.sha1(cmdstring).hexdigest()
+ cmddigest = hashlib.sha1(cmdstring, usedforsecurity=False).hexdigest()
intermediate = "%s.intermediate" % (cmddigest)
self.WriteLn('%s: %s' % (' '.join(outputs), intermediate))
self.WriteLn('\t%s' % '@:');
diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py
index 3bcfe352925b..c439c8b728ad 100644
--- a/pylib/gyp/generator/ninja.py
+++ b/pylib/gyp/generator/ninja.py
@@ -752,7 +752,7 @@ class NinjaWriter(object):
if self.flavor == 'win':
# WriteNewNinjaRule uses unique_name for creating an rsp file on win.
extra_bindings.append(('unique_name',
- hashlib.md5(six.ensure_binary(outputs[0])).hexdigest()))
+ hashlib.md5(six.ensure_binary(outputs[0]), usedforsecurity=False).hexdigest()))
self.ninja.build(outputs, rule_name, self.GypPathToNinja(source),
implicit=inputs,
@@ -2389,7 +2389,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
qualified_target_for_hash = gyp.common.QualifiedTarget(build_file, name,
toolset)
qualified_target_for_hash = qualified_target_for_hash.encode('utf-8')
- hash_for_rules = hashlib.md5(qualified_target_for_hash).hexdigest()
+ hash_for_rules = hashlib.md5(qualified_target_for_hash, usedforsecurity=False).hexdigest()
base_path = os.path.dirname(build_file)
obj = 'obj'

View File

@ -2,15 +2,15 @@
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
pkgname=gyp
pkgver=20230914.a03d7413
pkgrel=3
pkgver=20240207.1615ec32
pkgrel=1
pkgdesc="Generate Your Projects meta-build system"
url="https://gyp.gsrc.io/"
arch=(any)
license=(custom:BSD)
license=(BSD-3-Clause)
depends=(
ninja
python-six
python
)
makedepends=(
git
@ -19,17 +19,13 @@ makedepends=(
python-setuptools
python-wheel
)
_commit=a03d7413becefc8d55c8aa3df58b55b9bd0e9052 # changes/05/4858505/3
_commit=1615ec326858f8c2bd8f30b3a86ea71830409ce4 # changes/79/5276479/4
source=(
"git+https://chromium.googlesource.com/external/gyp#commit=$_commit"
0001-gyp-python38.patch
0002-gyp-fix-cmake.patch
0003-gyp-fips.patch
0001-Fix-Python-compat-and-remove-six.patch
)
b2sums=('SKIP'
'639848a0f0eb26bc16304b9c1ef2944f5cf37b2d7367a7de34becf2ec0962ce43820a21cd6c4d839775fc2dc1440c6e94f10cfd7781c5fe2278ba497b3fbdcb9'
'f77bda072b6a3916c78c2061ceffa8b17bf1341d13509089effd3961e22cb315f68fdf749ab4a6abea37a9ecd61989ddcd75229a45d026e068bf11037ad4499c'
'61febe5fb8672c2ad4012957b1f42d2909b7adae9b9c62417c22073b7d97dfad37cb34c19839b13bea54f8ab45c068f7b121bd3b4ae62d5234611861cae73c98')
b2sums=('011245ee2d08baf1cd9731b184e4206640e42087c35c24388e2636fcb2dfd9b345dadca1bf57c0a2e228debb76ce1b8654a338dd7e8e3810fe5616446d91aab9'
'5110f87d01089cc954923c9323b8edd4490615a6709523db7232e0a1a82e7ac5a65aa4740376f5cf771ebdc3cd123744634356263b116d337310e4de55070671')
pkgver() {
cd gyp
@ -42,9 +38,7 @@ pkgver() {
prepare() {
cd gyp
# Python 3 fixes from Fedora
git apply -3 ../*.patch
git apply -3 ../0001-Fix-Python-compat-and-remove-six.patch
}
build() {