Skip to content

Commit 2fef570

Browse files
committed
1 parent 1f5382d commit 2fef570

27 files changed

+438
-687
lines changed

node_modules/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@
170170
!/node-gyp/node_modules/make-fetch-happen
171171
!/node-gyp/node_modules/minimatch
172172
!/node-gyp/node_modules/minipass-fetch
173-
!/node-gyp/node_modules/nopt
174173
!/node-gyp/node_modules/npmlog
175174
!/node-gyp/node_modules/ssri
176175
!/node-gyp/node_modules/unique-filename

node_modules/node-gyp/addon.gypi

+31-12
Original file line numberDiff line numberDiff line change
@@ -103,22 +103,41 @@
103103
'-Wl,-bimport:<(node_exp_file)'
104104
],
105105
}],
106+
[ 'OS=="os400"', {
107+
'ldflags': [
108+
'-Wl,-bimport:<(node_exp_file)'
109+
],
110+
}],
106111
[ 'OS=="zos"', {
107-
'cflags': [
108-
'-q64',
109-
'-Wc,DLL',
110-
'-qlonglong',
111-
'-qenum=int',
112-
'-qxclang=-fexec-charset=ISO8859-1'
112+
'conditions': [
113+
[ '"<!(echo $CC)" != "clang" and \
114+
"<!(echo $CC)" != "ibm-clang64" and \
115+
"<!(echo $CC)" != "ibm-clang"', {
116+
'cflags': [
117+
'-q64',
118+
'-Wc,DLL',
119+
'-qlonglong',
120+
'-qenum=int',
121+
'-qxclang=-fexec-charset=ISO8859-1'
122+
],
123+
'ldflags': [
124+
'-q64',
125+
'<(node_exp_file)',
126+
],
127+
}, {
128+
'cflags': [
129+
'-m64',
130+
],
131+
'ldflags': [
132+
'-m64',
133+
'<(node_exp_file)',
134+
],
135+
}],
113136
],
114137
'defines': [
115-
'_ALL_SOURCE=1',
138+
'_ALL_SOURCE',
116139
'MAP_FAILED=-1',
117-
'_UNIX03_SOURCE=1'
118-
],
119-
'ldflags': [
120-
'-q64',
121-
'<(node_exp_file)'
140+
'_UNIX03_SOURCE',
122141
],
123142
}],
124143
[ 'OS=="win"', {

node_modules/node-gyp/gyp/pylib/gyp/__init__.py

+24
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import traceback
1616
from gyp.common import GypError
1717

18+
1819
# Default debug modes for GYP
1920
debug = {}
2021

@@ -103,6 +104,18 @@ def Load(
103104
for (key, val) in generator.generator_default_variables.items():
104105
default_variables.setdefault(key, val)
105106

107+
output_dir = params["options"].generator_output or params["options"].toplevel_dir
108+
if default_variables["GENERATOR"] == "ninja":
109+
default_variables.setdefault(
110+
"PRODUCT_DIR_ABS",
111+
os.path.join(output_dir, "out", default_variables["build_type"]),
112+
)
113+
else:
114+
default_variables.setdefault(
115+
"PRODUCT_DIR_ABS",
116+
os.path.join(output_dir, default_variables["CONFIGURATION_NAME"]),
117+
)
118+
106119
# Give the generator the opportunity to set additional variables based on
107120
# the params it will receive in the output phase.
108121
if getattr(generator, "CalculateVariables", None):
@@ -451,8 +464,19 @@ def gyp_main(args):
451464
metavar="TARGET",
452465
help="include only TARGET and its deep dependencies",
453466
)
467+
parser.add_argument(
468+
"-V",
469+
"--version",
470+
dest="version",
471+
action="store_true",
472+
help="Show the version and exit.",
473+
)
454474

455475
options, build_files_arg = parser.parse_args(args)
476+
if options.version:
477+
import pkg_resources
478+
print(f"v{pkg_resources.get_distribution('gyp-next').version}")
479+
return 0
456480
build_files = build_files_arg
457481

458482
# Set up the configuration directory (defaults to ~/.gyp)

node_modules/node-gyp/gyp/pylib/gyp/common.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,8 @@ def GetFlavor(params):
454454
return "aix"
455455
if sys.platform.startswith(("os390", "zos")):
456456
return "zos"
457+
if sys.platform == "os400":
458+
return "os400"
457459

458460
return "linux"
459461

@@ -463,9 +465,14 @@ def CopyTool(flavor, out_path, generator_flags={}):
463465
to |out_path|."""
464466
# aix and solaris just need flock emulation. mac and win use more complicated
465467
# support scripts.
466-
prefix = {"aix": "flock", "solaris": "flock", "mac": "mac", "win": "win"}.get(
467-
flavor, None
468-
)
468+
prefix = {
469+
"aix": "flock",
470+
"os400": "flock",
471+
"solaris": "flock",
472+
"mac": "mac",
473+
"ios": "mac",
474+
"win": "win",
475+
}.get(flavor, None)
469476
if not prefix:
470477
return
471478

node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def ExecFlock(self, lockfile, *cmd_list):
4141
# with EBADF, that's why we use this F_SETLK
4242
# hack instead.
4343
fd = os.open(lockfile, os.O_WRONLY | os.O_NOCTTY | os.O_CREAT, 0o666)
44-
if sys.platform.startswith("aix"):
44+
if sys.platform.startswith("aix") or sys.platform == "os400":
4545
# Python on AIX is compiled with LARGEFILE support, which changes the
4646
# struct size.
4747
op = struct.pack("hhIllqq", fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)

0 commit comments

Comments
 (0)