Skip to content

Commit

Permalink
Merge pull request msys2#21512 from raedrizqie/njs
Browse files Browse the repository at this point in the history
nodejs: update to 22.5.1
  • Loading branch information
lazka authored Jul 27, 2024
2 parents c1257e6 + f508ec5 commit e208243
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Subject: [PATCH 08/23] Link with -municode and extern wmain for Unicode
2 files changed, 10 insertions(+)

diff --git a/node.gyp b/node.gyp
index 811d15b0..d60ea49e 100644
index 2a8e6a66..d83cdef1 100644
--- a/node.gyp
+++ b/node.gyp
@@ -545,6 +545,9 @@
@@ -576,6 +576,9 @@
'msvs_disabled_warnings!': [4244],

'conditions': [
Expand All @@ -22,7 +22,7 @@ index 811d15b0..d60ea49e 100644
[ 'error_on_warn=="true"', {
'cflags': ['-Werror'],
'xcode_settings': {
@@ -1219,6 +1222,9 @@
@@ -1336,6 +1339,9 @@
[ 'OS in "linux mac"', {
'defines': ['NODE_JS2C_USE_STRING_LITERALS'],
}],
Expand All @@ -32,7 +32,7 @@ index 811d15b0..d60ea49e 100644
[ 'debug_node=="true"', {
'cflags!': [ '-O3' ],
'cflags': [ '-g', '-O0' ],
@@ -1266,6 +1272,9 @@
@@ -1383,6 +1389,9 @@
['node_write_snapshot_as_array_literals=="true"', {
'defines': [ 'NODE_MKSNAPSHOT_USE_ARRAY_LITERALS=1' ],
}],
Expand All @@ -43,16 +43,16 @@ index 811d15b0..d60ea49e 100644
'defines': [
'HAVE_OPENSSL=1',
diff --git a/node.gypi b/node.gypi
index 95133818..39d6c081 100644
index ccce1243..e5d520fb 100644
--- a/node.gypi
+++ b/node.gypi
@@ -68,6 +68,7 @@
# but we still inherit it from uv.h.
'NOMINMAX',
'_UNICODE=1',
@@ -63,6 +63,7 @@
'FD_SETSIZE=1024',
# we need to use node's preferred "win32" rather than gyp's preferred "win"
'NODE_PLATFORM="win32"',
+ 'UNICODE',
'_UNICODE=1',
],
'msvs_precompiled_header': 'tools/msvs/pch/node_pch.h',
'msvs_precompiled_source': 'tools/msvs/pch/node_pch.cc',
'conditions': [
--
2.17.0.windows.1
69 changes: 37 additions & 32 deletions mingw-w64-nodejs/0101-node-buildflags-fixes.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
diff --git a/common.gypi b/common.gypi
index fc45ca43..5b1ac89e 100644
index fc45ca43..c79f163e 100644
--- a/common.gypi
+++ b/common.gypi
@@ -152,7 +152,7 @@
'cflags': [ '-fPIC' ],
'ldflags': [ '-fPIC' ]
}],
- ['clang==1', {
+ ['OS == "msvc" and clang==1', {
'msbuild_toolset': 'ClangCL',
}],
],
@@ -243,7 +243,7 @@
'cflags': [ '-fPIC', '-I<(android_ndk_path)/sources/android/cpufeatures' ],
'ldflags': [ '-fPIC' ]
}],
- ['clang==1', {
+ ['OS == "msvc" and clang==1', {
'msbuild_toolset': 'ClangCL',
}],
],
@@ -482,6 +482,9 @@
'NOMINMAX',
],
Expand Down Expand Up @@ -79,10 +97,10 @@ index 6c86c3fa..4e439dbb 100644
'_WIN32_WINNT=0x0602',
'_GNU_SOURCE',
diff --git a/node.gyp b/node.gyp
index 2a8e6a66..e1b9445a 100644
index 2a8e6a66..b1b17fad 100644
--- a/node.gyp
+++ b/node.gyp
@@ -465,14 +465,13 @@
@@ -465,14 +465,14 @@
# Putting these explicitly here so not to depend on `common.gypi`.
# `common.gypi` need to be more general because it is used to build userland native addons.
# Refs: https://github.com/nodejs/node-gyp/issues/1118
Expand All @@ -95,34 +113,21 @@ index 2a8e6a66..e1b9445a 100644
'-W',
'-Wno-unused-parameter',
- '-Werror=undefined-inline',
+ '-Wno-undefined-inline',
'-Werror=extra-semi',
],
},
@@ -502,6 +501,11 @@
}],
],
}],
+ ['OS!="msvc" and clang==0', {
+ 'cflags_cc': [
+ '-Wno-template-id-cdtor'
+ ]
+ }],
['OS in "aix os400"', {
'ldflags': [
'-Wl,-bnoerrmsg',
@@ -550,6 +554,11 @@
'sources': [
'src/node_main.cc'
],
+ 'conditions': [
+ ['OS!="msvc"', {
+ 'sources': [ 'src/res/node.rc' ]
+ }]
+ ],

'dependencies': [
'deps/histogram/histogram.gyp:histogram',
@@ -592,7 +601,7 @@
@@ -582,6 +582,9 @@
'WARNING_CFLAGS': [ '-Werror' ],
},
}],
+ [ 'OS=="win" and OS!="msvc"', {
+ 'sources': [ 'src/res/node.rc' ],
+ }],
[ 'node_intermediate_lib_type=="static_library" and '
'node_shared=="true" and OS in "aix os400"', {
# For AIX, shared lib is linked by static lib and .exp. In the
@@ -592,7 +595,7 @@
}, {
'dependencies': [ '<(node_lib_target_name)' ],
'conditions': [
Expand All @@ -131,7 +136,7 @@ index 2a8e6a66..e1b9445a 100644
'dependencies': ['generate_node_def'],
'msvs_settings': {
'VCLinkerTool': {
@@ -626,7 +635,7 @@
@@ -626,7 +629,7 @@
'-Wl,--no-whole-archive',
],
}],
Expand All @@ -140,7 +145,7 @@ index 2a8e6a66..e1b9445a 100644
'sources': [ 'src/res/node.rc' ],
}],
],
@@ -1442,7 +1451,7 @@
@@ -1442,7 +1445,7 @@
},
]
}], # end aix section
Expand All @@ -150,15 +155,15 @@ index 2a8e6a66..e1b9445a 100644
{
'target_name': 'gen_node_def',
diff --git a/node.gypi b/node.gypi
index ccce1243..af049539 100644
index ccce1243..64a61ad6 100644
--- a/node.gypi
+++ b/node.gypi
@@ -27,7 +27,10 @@

'conditions': [
[ 'clang==1', {
- 'cflags': [ '-Werror=undefined-inline', '-Werror=extra-semi']
+ 'cflags': [ '-Werror=extra-semi' ]
+ 'cflags': [ '-Wno-undefined-inline', '-Werror=extra-semi' ]
+ }],
+ [ 'clang==0', {
+ 'cflags_cc': [ '-Wno-template-id-cdtor' ]
Expand Down
8 changes: 4 additions & 4 deletions mingw-w64-nodejs/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
_realname=nodejs
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=22.5.0
pkgver=22.5.1
pkgrel=1
pkgdesc="An open-source, cross-platform JavaScript runtime environment (mingw-w64)"
arch=('any')
Expand Down Expand Up @@ -182,13 +182,13 @@ package() {
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/nodejs/LICENSE"
}

sha256sums=('5a86238f00393716a03cd304f7c63f4c27144889d05a3938bb0f242c8d29d62f'
sha256sums=('924f381a32cf26b6bedbe95feedde348450f4fd321283d3bf3f7965aa45ce831'
'cb56e4f4160dae1041448be64760296634a3aa86fb163ccbfd645f4ae96d2026'
'e9a8bd133ec58cdf1987ec4c3dd7f0b2e290ebd708d0f988f56e28c01f376767'
'c420caaa03bc1c809f48ddcb19157ba0284e33fb6cffff8354c9fc4aa75e2afc'
'38f7e93770f3788e7d23915c8fe2e3e625f2191f827a389115930c9a2313aec8'
'5cb60fcd16378926fa89ffd114b8244bb063bc8a890f141858952084a9aabd0d'
'55501a2154f6fe37fce3728a38c8775d03532a9ddfa32214ab63112fd482836c'
'b04f402e65556bcda04f021c7f159ed85238c3517b40cdf38aaba53169754666'
'8a685608e4ef8d2a53222135dfbc51bb337b043939dcd7f50683acd8787f4fe1'
'c2daca3eec876a98adcbb35c7438afe24beb8a1953b62947912f7ea25c63fcb9'
'63cc0a5996fcbdc0959ede2755740493b7c3eda5d878dacc76f6ddec22321c65'
Expand All @@ -202,7 +202,7 @@ sha256sums=('5a86238f00393716a03cd304f7c63f4c27144889d05a3938bb0f242c8d29d62f'
'335a58064e22d0ca140be69060951054dbabf5c4c929d7831209609da48aa506'
'701cef4edacfd6b2512bb7a42ef388eb704bc500108062af4ead0439667da416'
'7d498f8090ab05458f28a5d2c60ef8511d2b48bc5368fda06922c35ca2584a22'
'136a153ca8863ae878a045311e08a1ea9571ad1ed9ad690259d92cbbf3482cdc'
'601ca4c84533c88fe30b5bbfa3f9cabc51a7316b8ce88e56a641b10861d66135'
'18ca0c99da6761aeba3b2e8b6fa23787d7d3114e1798fecd9037e9a7a8bc93c1'
'b1d14a5bc854bbee934a5b04cc2f9c5559fa7d54db45db92a4663e7117150640'
'67d40fde6aaa108db2de4d946874857607bade8fa0ee76d77b759439fa80f246'
Expand Down

0 comments on commit e208243

Please sign in to comment.