From 0fa4d5617cf277dc6f7d1f2b89870f6c810c0e4f Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Mon, 25 Oct 2021 11:26:47 +0000 Subject: [PATCH] add nodejs --- extra/nodejs/build.sh | 38 +++++++++++++++++++++++++++++++ extra/nodejs/remove-latomic.patch | 27 ++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 extra/nodejs/build.sh create mode 100644 extra/nodejs/remove-latomic.patch diff --git a/extra/nodejs/build.sh b/extra/nodejs/build.sh new file mode 100644 index 0000000..8e54976 --- /dev/null +++ b/extra/nodejs/build.sh @@ -0,0 +1,38 @@ +pkgname=nodejs +pkgver=16.6.1 + +fetch() { + curl -L "https://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz + tar -xf $pkgname-$pkgver.tar.xz + mv node-v$pkgver $pkgname-$pkgver + cd $pkgname-$pkgver + sed -i 's/-latomic//' node.gyp +} + +build() { + cd $pkgname-$pkgver + ./configure \ + --shared-zlib \ + --shared-openssl \ + --with-intl=none \ + --without-etw \ + --without-dtrace \ + --without-report \ + --without-node-snapshot \ + --without-node-code-cache \ + --ninja + + samu -C out/Release +} + +package() { + cd $pkgname-$pkgver + + ./tools/install.py install $pkgdir /usr +} + +license() { + cd $pkgname-$pkgver + cat LICENSE +# cat COPYING +} diff --git a/extra/nodejs/remove-latomic.patch b/extra/nodejs/remove-latomic.patch new file mode 100644 index 0000000..81e2f69 --- /dev/null +++ b/extra/nodejs/remove-latomic.patch @@ -0,0 +1,27 @@ +From 8dbc49deefb50f4af05710d3e6ad1ca7ff6dbfac Mon Sep 17 00:00:00 2001 +From: Ishimoto Shinobu +Date: Sun, 21 Feb 2021 09:43:21 +0900 +Subject: [PATCH] remove -latomic library + +Signed-off-by: Ishimoto Shinobu +--- + node.gyp | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/node.gyp b/node.gyp +index 131461de..051d2816 100644 +--- a/node.gyp ++++ b/node.gyp +@@ -343,9 +343,6 @@ + '-Wl,-bnoerrmsg', + ], + }], +- ['OS == "linux" and llvm_version != "0.0"', { +- 'libraries': ['-latomic'], +- }], + ], + }, + +-- +2.29.2 +