diff options
author | alpine-mips-patches <info@mobile-stream.com> | 2018-12-03 10:26:31 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2018-12-17 08:01:17 +0000 |
commit | af971ca01cc7354cfaa2f8f0afece0b5faf204bc (patch) | |
tree | 6bd579d1fcf5aeb4818c47d522ce603d05212891 /community/nodejs-current | |
parent | 8727ae44520c0d5792e4367256ae286e296f90cd (diff) | |
download | aports-af971ca01cc7354cfaa2f8f0afece0b5faf204bc.tar.bz2 aports-af971ca01cc7354cfaa2f8f0afece0b5faf204bc.tar.xz |
community/nodejs-current: fix build on mips{el} (-latomic), disable on mips64*
Diffstat (limited to 'community/nodejs-current')
-rw-r--r-- | community/nodejs-current/APKBUILD | 14 | ||||
-rw-r--r-- | community/nodejs-current/link-with-libatomic-on-mips32.patch | 28 |
2 files changed, 39 insertions, 3 deletions
diff --git a/community/nodejs-current/APKBUILD b/community/nodejs-current/APKBUILD index bb5f7b5bc3..bfd63e1d4c 100644 --- a/community/nodejs-current/APKBUILD +++ b/community/nodejs-current/APKBUILD @@ -22,7 +22,7 @@ pkgver=11.3.0 pkgrel=0 pkgdesc="JavaScript runtime built on V8 engine - current stable version" url="https://nodejs.org/" -arch="all" +arch="all !mips64 !mips64el" license="MIT" depends="ca-certificates" depends_dev="libuv" @@ -33,7 +33,9 @@ subpackages="$pkgname-dev $pkgname-doc" provides="nodejs" replaces="nodejs nodejs-lts" # nodejs-lts for backward compatibility source="https://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz - dont-run-gyp-files-for-bundled-deps.patch" + dont-run-gyp-files-for-bundled-deps.patch + link-with-libatomic-on-mips32.patch + " builddir="$srcdir/node-v$pkgver" prepare() { @@ -46,7 +48,12 @@ prepare() { build() { cd "$builddir" + case "$CARCH" in + mips*) _carchflags="--with-mips-arch-variant=r1 --with-mips-float-abi=soft";; + esac + ./configure --prefix=/usr \ + $_carchflags \ --shared-zlib \ --shared-libuv \ --shared-openssl \ @@ -85,4 +92,5 @@ package() { } sha512sums="dd1475bd61dbc2aac563e12ced0b9423bf1f5fc421d0699526799b60254d89cbb8d01530f2f029fe146777aecadc4aa54ad62d7b33fb9195f16d8a54b1278588 node-v11.3.0.tar.gz -9145a28bc3c2ebfc5e29e7416f8387a68808607eea4d87830a14a27c80628177a02ef4ed54b0efe2384c39fedf7356d12c267567d06d53d669c55d6211bfcf8a dont-run-gyp-files-for-bundled-deps.patch" +9145a28bc3c2ebfc5e29e7416f8387a68808607eea4d87830a14a27c80628177a02ef4ed54b0efe2384c39fedf7356d12c267567d06d53d669c55d6211bfcf8a dont-run-gyp-files-for-bundled-deps.patch +97b4e5aabcb8c6ad93c3194826325f00d56942fbfa3934565baa51a1a047288a06066c838f34233c38a351e8d8c287601ae08b2b6b6e8dbc5aa44cbb088f24eb link-with-libatomic-on-mips32.patch" diff --git a/community/nodejs-current/link-with-libatomic-on-mips32.patch b/community/nodejs-current/link-with-libatomic-on-mips32.patch new file mode 100644 index 0000000000..62fb6fec13 --- /dev/null +++ b/community/nodejs-current/link-with-libatomic-on-mips32.patch @@ -0,0 +1,28 @@ +--- a/deps/v8/gypfiles/v8.gyp ++++ b/deps/v8/gypfiles/v8.gyp +@@ -2012,6 +2012,11 @@ + }], + ], + 'conditions': [ ++ [ '(target_arch=="mips" or target_arch=="mipsel") and mips_arch_variant!="r6"', { ++ 'link_settings': { ++ 'libraries': [ '-latomic' ], ++ }, ++ }], + ['component=="shared_library"', { + 'defines': [ + 'BUILDING_V8_BASE_SHARED', +--- a/node.gyp ++++ b/node.gyp +@@ -479,6 +479,11 @@ + 'msvs_disabled_warnings!': [4244], + + 'conditions': [ ++ [ '(target_arch=="mips" or target_arch=="mipsel") and mips_arch_variant!="r6"', { ++ 'link_settings': { ++ 'libraries': [ '-latomic' ], ++ }, ++ }], + [ 'node_code_cache_path!=""', { + 'sources': [ '<(node_code_cache_path)' ] + }, { |