Skip to content

Commit

Permalink
deps: node-gyp@9.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Nov 2, 2022
1 parent 1f5382d commit 2fef570
Show file tree
Hide file tree
Showing 27 changed files with 438 additions and 687 deletions.
1 change: 0 additions & 1 deletion node_modules/.gitignore
Expand Up @@ -170,7 +170,6 @@
!/node-gyp/node_modules/make-fetch-happen
!/node-gyp/node_modules/minimatch
!/node-gyp/node_modules/minipass-fetch
!/node-gyp/node_modules/nopt
!/node-gyp/node_modules/npmlog
!/node-gyp/node_modules/ssri
!/node-gyp/node_modules/unique-filename
Expand Down
43 changes: 31 additions & 12 deletions node_modules/node-gyp/addon.gypi
Expand Up @@ -103,22 +103,41 @@
'-Wl,-bimport:<(node_exp_file)'
],
}],
[ 'OS=="os400"', {
'ldflags': [
'-Wl,-bimport:<(node_exp_file)'
],
}],
[ 'OS=="zos"', {
'cflags': [
'-q64',
'-Wc,DLL',
'-qlonglong',
'-qenum=int',
'-qxclang=-fexec-charset=ISO8859-1'
'conditions': [
[ '"<!(echo $CC)" != "clang" and \
"<!(echo $CC)" != "ibm-clang64" and \
"<!(echo $CC)" != "ibm-clang"', {
'cflags': [
'-q64',
'-Wc,DLL',
'-qlonglong',
'-qenum=int',
'-qxclang=-fexec-charset=ISO8859-1'
],
'ldflags': [
'-q64',
'<(node_exp_file)',
],
}, {
'cflags': [
'-m64',
],
'ldflags': [
'-m64',
'<(node_exp_file)',
],
}],
],
'defines': [
'_ALL_SOURCE=1',
'_ALL_SOURCE',
'MAP_FAILED=-1',
'_UNIX03_SOURCE=1'
],
'ldflags': [
'-q64',
'<(node_exp_file)'
'_UNIX03_SOURCE',
],
}],
[ 'OS=="win"', {
Expand Down
24 changes: 24 additions & 0 deletions node_modules/node-gyp/gyp/pylib/gyp/__init__.py
Expand Up @@ -15,6 +15,7 @@
import traceback
from gyp.common import GypError


# Default debug modes for GYP
debug = {}

Expand Down Expand Up @@ -103,6 +104,18 @@ def Load(
for (key, val) in generator.generator_default_variables.items():
default_variables.setdefault(key, val)

output_dir = params["options"].generator_output or params["options"].toplevel_dir
if default_variables["GENERATOR"] == "ninja":
default_variables.setdefault(
"PRODUCT_DIR_ABS",
os.path.join(output_dir, "out", default_variables["build_type"]),
)
else:
default_variables.setdefault(
"PRODUCT_DIR_ABS",
os.path.join(output_dir, default_variables["CONFIGURATION_NAME"]),
)

# Give the generator the opportunity to set additional variables based on
# the params it will receive in the output phase.
if getattr(generator, "CalculateVariables", None):
Expand Down Expand Up @@ -451,8 +464,19 @@ def gyp_main(args):
metavar="TARGET",
help="include only TARGET and its deep dependencies",
)
parser.add_argument(
"-V",
"--version",
dest="version",
action="store_true",
help="Show the version and exit.",
)

options, build_files_arg = parser.parse_args(args)
if options.version:
import pkg_resources
print(f"v{pkg_resources.get_distribution('gyp-next').version}")
return 0
build_files = build_files_arg

# Set up the configuration directory (defaults to ~/.gyp)
Expand Down
13 changes: 10 additions & 3 deletions node_modules/node-gyp/gyp/pylib/gyp/common.py
Expand Up @@ -454,6 +454,8 @@ def GetFlavor(params):
return "aix"
if sys.platform.startswith(("os390", "zos")):
return "zos"
if sys.platform == "os400":
return "os400"

return "linux"

Expand All @@ -463,9 +465,14 @@ def CopyTool(flavor, out_path, generator_flags={}):
to |out_path|."""
# aix and solaris just need flock emulation. mac and win use more complicated
# support scripts.
prefix = {"aix": "flock", "solaris": "flock", "mac": "mac", "win": "win"}.get(
flavor, None
)
prefix = {
"aix": "flock",
"os400": "flock",
"solaris": "flock",
"mac": "mac",
"ios": "mac",
"win": "win",
}.get(flavor, None)
if not prefix:
return

Expand Down
2 changes: 1 addition & 1 deletion node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py
Expand Up @@ -41,7 +41,7 @@ def ExecFlock(self, lockfile, *cmd_list):
# with EBADF, that's why we use this F_SETLK
# hack instead.
fd = os.open(lockfile, os.O_WRONLY | os.O_NOCTTY | os.O_CREAT, 0o666)
if sys.platform.startswith("aix"):
if sys.platform.startswith("aix") or sys.platform == "os400":
# Python on AIX is compiled with LARGEFILE support, which changes the
# struct size.
op = struct.pack("hhIllqq", fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
Expand Down

0 comments on commit 2fef570

Please sign in to comment.