PKGBUILDs/community/nodejs/PKGBUILD
2021-04-17 19:29:15 +00:00

73 lines
2.3 KiB
Bash

# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: James Campos <james.r.campos@gmail.com>
# Contributor: BlackEagle < ike DOT devolder AT gmail DOT com >
# Contributor: Dongsheng Cai <dongsheng at moodle dot com>
# Contributor: Masutu Subric <masutu.arch at googlemail dot com>
# Contributor: TIanyi Cui <tianyicui@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - set config and gyp flags
buildarch=28
pkgname=nodejs
pkgver=15.14.0
pkgrel=2
pkgdesc='Evented I/O for V8 javascript'
arch=('x86_64')
url='https://nodejs.org/'
license=('MIT')
# c-ares: wait until a newer release than 1.16.1
depends=('openssl' 'zlib' 'icu' 'libuv' 'libnghttp2') # 'c-ares' 'http-parser' 'v8')
makedepends=('python' 'procps-ng')
optdepends=('npm: nodejs package manager')
source=("nodejs-$pkgver.tar.gz::https://github.com/nodejs/node/archive/v$pkgver.tar.gz"
v8-call-new-ListFormatter-createInstance.patch)
sha512sums=('ec77322d6832e01f4be22e62ebb6cd232a840d4bd917f532543915a4e5203eec931191563dfbbeaa6a08db4b25b583e38c210abad17b19d86db35ef826f30a00'
'd21c1e3ba9ce31358a08579b8ff5dd60c231c5f9074d3b225f671889aa3e0c28259f6dce789adc838729edc4d81a23da4d81ec9ac188a7652c43c1396e21b5b4')
prepare() {
cd node-$pkgver
patch -Np1 -d deps/v8 <../v8-call-new-ListFormatter-createInstance.patch
}
build() {
cd node-$pkgver
[[ "$CARCH" == "armv6h" ]] && export CONFIG="--with-arm-float-abi=hard --with-arm-fpu=vfp" && export GYPFLAGS="-Darm_thumb -Darm_float_abi=hard -Darm_version=6 -Darm_fpu=vfpv2"
[[ "$CARCH" == "armv7h" ]] && export CONFIG="--with-arm-float-abi=hard --with-arm-fpu=vfpv3-d16" && export GYPFLAGS="-Darm_thumb -Darm_float_abi=hard -Darm_version=7 -Darm_fpu=vfpv3-d16"
./configure \
--prefix=/usr \
--with-intl=system-icu \
--without-npm \
--shared-openssl \
--shared-zlib \
--shared-libuv \
--experimental-http-parser \
--shared-nghttp2 \
${CONFIG}
# --shared-cares \
# --shared-v8
# --shared-http-parser
make
}
check() {
cd node-$pkgver
make test || :
}
package() {
cd node-$pkgver
make DESTDIR="$pkgdir" install
install -D -m644 LICENSE \
"$pkgdir"/usr/share/licenses/nodejs/LICENSE
}
# vim:set ts=2 sw=2 et: