[packages/gyp] Up to 1615ec32

arekm arekm at pld-linux.org
Sat Mar 14 04:08:51 CET 2026


commit 9bdd5e662960dc3b1148e952534493452cb0d052
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sat Mar 14 04:08:43 2026 +0100

    Up to 1615ec32

 gyp-fips.patch     |  35 ------------
 gyp-python3.patch  |  30 ++---------
 gyp-python39.patch | 153 ++++++++++++++++++++++++++++++++++++++---------------
 gyp.spec           |   6 +--
 4 files changed, 118 insertions(+), 106 deletions(-)
---
diff --git a/gyp.spec b/gyp.spec
index 29eec06..59b864e 100644
--- a/gyp.spec
+++ b/gyp.spec
@@ -1,9 +1,9 @@
 #
 # Conditional build:
 %bcond_with	tests		# build without tests
-%bcond_with	python3		# build with python 3.x
+%bcond_without	python3		# build without python 3.x
 
-%define		gitrev	e87d37d6
+%define		gitrev	1615ec32
 %define		rel	1
 Summary:	Generate Your Projects
 Summary(pl.UTF-8):	GYP (Generate Your Projects) - narzędzie do generowania systemów budowania
@@ -15,7 +15,7 @@ License:	New BSD
 Group:		Development/Building
 # use get-source.sh
 Source0:	%{name}-%{version}-git%{gitrev}.tar.xz
-# Source0-md5:	9b6f6c10bb8def91e26c17f0be1f7f90
+# Source0-md5:	9a0c88b2c0c2a739271930e31934c90e
 Patch0:         gyp-rpmoptflags.patch
 Patch1:         gyp-ninja-build.patch
 Patch2:         gyp-python3.patch
diff --git a/gyp-fips.patch b/gyp-fips.patch
deleted file mode 100644
index 639d1b5..0000000
--- a/gyp-fips.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff --git a/pylib/gyp/generator/make.py b/pylib/gyp/generator/make.py
-index 997eec08..06c763db 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 bf04e567..631ef7f2 100644
---- a/pylib/gyp/generator/ninja.py
-+++ b/pylib/gyp/generator/ninja.py
-@@ -751,7 +751,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(outputs[0]).hexdigest()))
-+              hashlib.md5(outputs[0], usedforsecurity=False).hexdigest()))
- 
-         self.ninja.build(outputs, rule_name, self.GypPathToNinja(source),
-                          implicit=inputs,
-@@ -2388,7 +2388,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'
diff --git a/gyp-python3.patch b/gyp-python3.patch
index 6235b82..d28e9cd 100644
--- a/gyp-python3.patch
+++ b/gyp-python3.patch
@@ -1,36 +1,16 @@
-diff -pruN gyp-0.1-gitfcd686f1.orig/gyp gyp-0.1-gitfcd686f1/gyp
---- gyp-0.1-gitfcd686f1.orig/gyp	2015-04-30 09:48:21.000000000 +0000
-+++ gyp-0.1-gitfcd686f1/gyp	2019-08-14 09:41:05.343208034 +0000
-@@ -5,4 +5,4 @@
- 
- set -e
- base=$(dirname "$0")
--exec python "${base}/gyp_main.py" "$@"
-+exec python3 "${base}/gyp_main.py" "$@"
-diff -pruN gyp-0.1-gitfcd686f1.orig/gyp_main.py gyp-0.1-gitfcd686f1/gyp_main.py
---- gyp-0.1-gitfcd686f1.orig/gyp_main.py	2016-10-17 02:00:37.000000000 +0000
-+++ gyp-0.1-gitfcd686f1/gyp_main.py	2019-08-14 09:41:43.380207320 +0000
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- 
- # Copyright (c) 2009 Google Inc. All rights reserved.
- # Use of this source code is governed by a BSD-style license that can be
-diff -pruN gyp-0.1-gitfcd686f1.orig/gyptest.py gyp-0.1-gitfcd686f1/gyptest.py
---- gyp-0.1-gitfcd686f1.orig/gyptest.py	2019-08-14 09:05:50.000000000 +0000
-+++ gyp-0.1-gitfcd686f1/gyptest.py	2019-08-14 09:41:48.578208719 +0000
+--- a/gyptest.py
++++ b/gyptest.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python
 +#!/usr/bin/env python3
  # Copyright (c) 2012 Google Inc. All rights reserved.
  # Use of this source code is governed by a BSD-style license that can be
  # found in the LICENSE file.
-diff -pruN gyp-0.1-gitfcd686f1.orig/setup.py gyp-0.1-gitfcd686f1/setup.py
---- gyp-0.1-gitfcd686f1.orig/setup.py	2015-04-30 09:48:21.000000000 +0000
-+++ gyp-0.1-gitfcd686f1/setup.py	2019-08-14 09:41:53.510210046 +0000
+--- a/setup.py
++++ b/setup.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python
 +#!/usr/bin/env python3
- 
+
  # Copyright (c) 2009 Google Inc. All rights reserved.
  # Use of this source code is governed by a BSD-style license that can be
diff --git a/gyp-python39.patch b/gyp-python39.patch
index cb5f2e1..a27db5b 100644
--- a/gyp-python39.patch
+++ b/gyp-python39.patch
@@ -1,55 +1,122 @@
-diff --git a/pylib/gyp/common.py b/pylib/gyp/common.py
-index b268d229..03c99cab 100644
---- a/pylib/gyp/common.py
-+++ b/pylib/gyp/common.py
-@@ -4,7 +4,6 @@
- 
- from __future__ import with_statement
- 
--import collections
- import errno
- import filecmp
- import os.path
-@@ -12,6 +11,11 @@ import re
+diff -pruN gyp-patching.orig/pylib/gyp/common.py gyp-patching/pylib/gyp/common.py
+--- gyp-patching.orig/pylib/gyp/common.py	2026-03-14 03:50:12.000000000 +0100
++++ gyp-patching/pylib/gyp/common.py	2026-03-14 03:54:33.797408490 +0100
+@@ -11,7 +11,7 @@ import re
  import tempfile
  import sys
  
-+try:
-+  from collections.abc import MutableSet
-+except ImportError:
-+  from collections import MutableSet
-+
+-from six.moves import collections_abc
++from collections.abc import MutableSet
+ 
  
  # A minimal memoizing decorator. It'll blow up if the args aren't immutable,
- # among other "problems".
-@@ -494,7 +498,7 @@ def uniquer(seq, idfun=None):
+@@ -495,7 +495,7 @@ def uniquer(seq, idfun=None):
  
  
  # Based on http://code.activestate.com/recipes/576694/.
--class OrderedSet(collections.MutableSet):
+-class OrderedSet(collections_abc.MutableSet):
 +class OrderedSet(MutableSet):
    def __init__(self, iterable=None):
      self.end = end = []
      end += [None, end, end]         # sentinel node for doubly linked list
-diff --git a/pylib/gyp/generator/msvs.py b/pylib/gyp/generator/msvs.py
-index 843e7067..327fe8d2 100644
---- a/pylib/gyp/generator/msvs.py
-+++ b/pylib/gyp/generator/msvs.py
-@@ -4,7 +4,7 @@
- 
- from __future__ import print_function
- 
--import collections
-+from collections import OrderedDict
- import copy
- import ntpath
- import os
-@@ -195,7 +195,7 @@ def _ConvertSourcesToFilterHierarchy(sources, prefix=None, excluded=None,
-   if not prefix: prefix = []
-   result = []
-   excluded_result = []
--  folders = collections.OrderedDict()
-+  folders = OrderedDict()
-   # Gather files into the final result, excluded, or folders.
-   for s in sources:
-     if len(s) == 1:
+diff -pruN gyp-patching.orig/pylib/gyp/generator/make.py gyp-patching/pylib/gyp/generator/make.py
+--- gyp-patching.orig/pylib/gyp/generator/make.py	2026-03-14 03:50:12.000000000 +0100
++++ gyp-patching/pylib/gyp/generator/make.py	2026-03-14 03:54:43.143253804 +0100
+@@ -1774,7 +1774,7 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)
+ 
+       # 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 -pruN gyp-patching.orig/pylib/gyp/generator/ninja.py gyp-patching/pylib/gyp/generator/ninja.py
+--- gyp-patching.orig/pylib/gyp/generator/ninja.py	2026-03-14 03:50:12.000000000 +0100
++++ gyp-patching/pylib/gyp/generator/ninja.py	2026-03-14 03:54:40.630201972 +0100
+@@ -14,7 +14,6 @@ import re
+ import signal
+ import subprocess
+ import sys
+-import six
+ import gyp
+ import gyp.common
+ from gyp.common import OrderedSet
+@@ -752,7 +751,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(outputs[0].encode('utf-8'), usedforsecurity=False).hexdigest()))
+ 
+         self.ninja.build(outputs, rule_name, self.GypPathToNinja(source),
+                          implicit=inputs,
+@@ -2389,7 +2388,7 @@ def GenerateOutputForConfig(target_list,
+     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'
+diff -pruN gyp-patching.orig/pylib/gyp/msvs_emulation.py gyp-patching/pylib/gyp/msvs_emulation.py
+--- gyp-patching.orig/pylib/gyp/msvs_emulation.py	2026-03-14 03:50:12.000000000 +0100
++++ gyp-patching/pylib/gyp/msvs_emulation.py	2026-03-14 03:54:36.069920471 +0100
+@@ -12,7 +12,7 @@ import re
+ import subprocess
+ import sys
+ 
+-from six.moves import collections_abc
++from collections.abc import Iterable
+ 
+ from gyp.common import OrderedSet
+ import gyp.MSVSUtil
+@@ -94,7 +94,7 @@ def _AddPrefix(element, prefix):
+   """Add |prefix| to |element| or each subelement if element is iterable."""
+   if element is None:
+     return element
+-  if (isinstance(element, collections_abc.Iterable) and
++  if (isinstance(element, Iterable) and
+       not isinstance(element, basestring)):
+     return [prefix + e for e in element]
+   else:
+@@ -107,7 +107,7 @@ def _DoRemapping(element, map):
+   if map is not None and element is not None:
+     if not callable(map):
+       map = map.get # Assume it's a dict, otherwise a callable to do the remap.
+-    if (isinstance(element, collections_abc.Iterable) and
++    if (isinstance(element, Iterable) and
+         not isinstance(element, basestring)):
+       element = filter(None, [map(elem) for elem in element])
+     else:
+@@ -120,7 +120,7 @@ def _AppendOrReturn(append, element):
+   then add |element| to it, adding each item in |element| if it's a list or
+   tuple."""
+   if append is not None and element is not None:
+-    if (isinstance(element, collections_abc.Iterable) and
++    if (isinstance(element, Iterable) and
+         not isinstance(element, basestring)):
+       append.extend(element)
+     else:
+diff -pruN gyp-patching.orig/test/lib/TestGyp.py gyp-patching/test/lib/TestGyp.py
+--- gyp-patching.orig/test/lib/TestGyp.py	2026-03-14 03:50:12.000000000 +0100
++++ gyp-patching/test/lib/TestGyp.py	2026-03-14 03:54:46.190581585 +0100
+@@ -18,7 +18,7 @@ import tempfile
+ 
+ from contextlib import contextmanager
+ 
+-from six.moves import collections_abc
++from collections.abc import Iterable
+ 
+ import TestCmd
+ import TestCommon
+@@ -497,7 +497,7 @@ class TestGypCMake(TestGypBase):
+     if status is None:
+       kw['status'] = None
+     else:
+-      if not isinstance(status, collections_abc.Iterable): status = (status,)
++      if not isinstance(status, Iterable): status = (status,)
+       kw['status'] = list(itertools.chain((0,), status))
+     self.cmake_build(gyp_file, target, **kw)
+     kw['status'] = status
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gyp.git/commitdiff/9bdd5e662960dc3b1148e952534493452cb0d052



More information about the pld-cvs-commit mailing list