mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-16 20:13:52 +02:00
nodejs-lts-10: fix build for targets without native atomic8
patches/ppc32.patch used "host_arch" instead of "target_arch" to check whether to link against -latomic, and didn't include 32-bit ARM in the list of targets that might need it. This addresses build failures on armv6l as well as some lesser-used architectures. Additionally, libatomic-devel is now included in makedepends for all architectures (not just when `XBPS_TARGET_NO_ATOMIC8` is set) because the build system can't tell the difference between armv6l and armv7l. This matches how it's done for `nodejs{,-lts}` and doesn't cause the armv7l build to actually depend on libatomic at runtime.
This commit is contained in:
parent
6cc2e7320e
commit
4c3e6cc301
3 changed files with 22 additions and 27 deletions
14
srcpkgs/nodejs-lts-10/patches/atomic8.patch
Normal file
14
srcpkgs/nodejs-lts-10/patches/atomic8.patch
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
--- node.gyp
|
||||||
|
+++ node.gyp
|
||||||
|
@@ -479,6 +479,11 @@
|
||||||
|
'msvs_disabled_warnings!': [4244],
|
||||||
|
|
||||||
|
'conditions': [
|
||||||
|
+ [ 'target_arch=="mips" or target_arch=="mipsel" or target_arch=="ppc" or target_arch=="arm"', {
|
||||||
|
+ 'link_settings': {
|
||||||
|
+ 'libraries': [ '-latomic' ],
|
||||||
|
+ },
|
||||||
|
+ }],
|
||||||
|
[ 'node_code_cache_path!=""', {
|
||||||
|
'sources': [ '<(node_code_cache_path)' ]
|
||||||
|
}, {
|
|
@ -9,20 +9,6 @@
|
||||||
'__x86_64__' : 'x64',
|
'__x86_64__' : 'x64',
|
||||||
'__s390__' : 's390',
|
'__s390__' : 's390',
|
||||||
'__s390x__' : 's390x',
|
'__s390x__' : 's390x',
|
||||||
--- node.gyp
|
|
||||||
+++ node.gyp
|
|
||||||
@@ -479,6 +479,11 @@
|
|
||||||
'msvs_disabled_warnings!': [4244],
|
|
||||||
|
|
||||||
'conditions': [
|
|
||||||
+ [ 'host_arch=="mips" or host_arch=="mipsel" or host_arch=="ppc"', {
|
|
||||||
+ 'link_settings': {
|
|
||||||
+ 'libraries': [ '-latomic' ],
|
|
||||||
+ },
|
|
||||||
+ }],
|
|
||||||
[ 'node_code_cache_path!=""', {
|
|
||||||
'sources': [ '<(node_code_cache_path)' ]
|
|
||||||
}, {
|
|
||||||
--- deps/v8/src/libsampler/sampler.cc
|
--- deps/v8/src/libsampler/sampler.cc
|
||||||
+++ deps/v8/src/libsampler/sampler.cc
|
+++ deps/v8/src/libsampler/sampler.cc
|
||||||
@@ -418,9 +418,15 @@ void SignalHandler::FillRegisterState(void* context, RegisterState* state) {
|
@@ -418,9 +418,15 @@ void SignalHandler::FillRegisterState(void* context, RegisterState* state) {
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
# Template file for 'nodejs-lts-10'
|
# Template file for 'nodejs-lts-10'
|
||||||
pkgname=nodejs-lts-10
|
pkgname=nodejs-lts-10
|
||||||
version=10.24.0
|
version=10.24.0
|
||||||
revision=1
|
revision=2
|
||||||
wrksrc="node-v${version}"
|
wrksrc="node-v${version}"
|
||||||
hostmakedepends="pkg-config python zlib-devel which $(vopt_if icu icu-devel)
|
# atomic8.patch will pull in -latomic even for some architectures
|
||||||
$(vopt_if ssl openssl-devel) $(vopt_if libuv libuv-devel)
|
# not covered by XBPS_TARGET_NO_ATOMIC8.
|
||||||
|
hostmakedepends="pkg-config python which zlib-devel libatomic-devel
|
||||||
|
$(vopt_if icu icu-devel) $(vopt_if ssl openssl-devel) $(vopt_if libuv libuv-devel)
|
||||||
$(vopt_if http_parser http-parser-devel) $(vopt_if nghttp2 nghttp2-devel)
|
$(vopt_if http_parser http-parser-devel) $(vopt_if nghttp2 nghttp2-devel)
|
||||||
$(vopt_if cares c-ares-devel)"
|
$(vopt_if cares c-ares-devel)"
|
||||||
makedepends="zlib-devel python-devel $(vopt_if icu icu-devel)
|
makedepends="libatomic-devel zlib-devel python-devel
|
||||||
$(vopt_if ssl openssl-devel) $(vopt_if libuv libuv-devel)
|
$(vopt_if icu icu-devel) $(vopt_if ssl openssl-devel) $(vopt_if libuv libuv-devel)
|
||||||
$(vopt_if http_parser http-parser-devel) $(vopt_if nghttp2 nghttp2-devel)
|
$(vopt_if http_parser http-parser-devel) $(vopt_if nghttp2 nghttp2-devel)
|
||||||
$(vopt_if cares c-ares-devel)"
|
$(vopt_if cares c-ares-devel)"
|
||||||
checkdepends="procps-ng"
|
checkdepends="procps-ng"
|
||||||
|
@ -18,7 +20,7 @@ license="MIT"
|
||||||
homepage="https://nodejs.org/"
|
homepage="https://nodejs.org/"
|
||||||
distfiles="${homepage}/download/release/v${version}/node-v${version}.tar.xz"
|
distfiles="${homepage}/download/release/v${version}/node-v${version}.tar.xz"
|
||||||
checksum=158273af66f891b2fca90aec7336c42f7574f467affad02c14e80ca163cb3acc
|
checksum=158273af66f891b2fca90aec7336c42f7574f467affad02c14e80ca163cb3acc
|
||||||
python_version=2 #unverified
|
python_version=3
|
||||||
|
|
||||||
build_options="ssl libuv http_parser icu nghttp2 cares"
|
build_options="ssl libuv http_parser icu nghttp2 cares"
|
||||||
desc_option_ssl="Enable shared openssl"
|
desc_option_ssl="Enable shared openssl"
|
||||||
|
@ -37,13 +39,6 @@ if [ "$XBPS_WORDSIZE" -ne "$XBPS_TARGET_WORDSIZE" ]; then
|
||||||
nocross="host and target must have the same pointer size"
|
nocross="host and target must have the same pointer size"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
|
||||||
makedepends+=" libatomic-devel"
|
|
||||||
fi
|
|
||||||
if [ "$XBPS_NO_ATOMIC8" ]; then
|
|
||||||
hostmakedepends+=" libatomic-devel"
|
|
||||||
fi
|
|
||||||
|
|
||||||
CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||||
CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue