From 9c39d98a60ff0bc67ad3b48c16dba89bf1543bee Mon Sep 17 00:00:00 2001 From: q66 Date: Thu, 15 Aug 2019 17:06:59 +0200 Subject: [PATCH] nodejs-lts: fix on ppc32 [ci skip] --- srcpkgs/nodejs-lts/patches/ppc32.patch | 25 +++++++++++++++++++++++++ srcpkgs/nodejs-lts/template | 6 ++++++ 2 files changed, 31 insertions(+) diff --git a/srcpkgs/nodejs-lts/patches/ppc32.patch b/srcpkgs/nodejs-lts/patches/ppc32.patch index fe28ab7511..343eff5851 100644 --- a/srcpkgs/nodejs-lts/patches/ppc32.patch +++ b/srcpkgs/nodejs-lts/patches/ppc32.patch @@ -1,3 +1,28 @@ +--- configure.py ++++ configure.py +@@ -848,7 +848,7 @@ def host_arch_cc(): + '__MIPSEL__' : 'mipsel', + '__mips__' : 'mips', + '__PPC64__' : 'ppc64', +- '__PPC__' : 'ppc64', ++ '__PPC__' : 'ppc', + '__x86_64__' : 'x64', + '__s390__' : 's390', + '__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 @@ -418,9 +418,15 @@ void SignalHandler::FillRegisterState(void* context, RegisterState* state) { diff --git a/srcpkgs/nodejs-lts/template b/srcpkgs/nodejs-lts/template index b5d307fb30..b260e1c070 100644 --- a/srcpkgs/nodejs-lts/template +++ b/srcpkgs/nodejs-lts/template @@ -36,6 +36,12 @@ if [ "$XBPS_WORDSIZE" -ne "$XBPS_TARGET_WORDSIZE" ]; then nocross="host and target must have the same pointer size" fi +case "$XBPS_MACHINE" in + ppc64*) ;; + mips*|ppc*) hostmakedepends+=" libatomic-devel" ;; + *) ;; +esac + do_configure() { local _args