2017-06-17 21:12:52 +10:00
|
|
|
# Description: Evented I/O for V8 javascript.
|
2020-06-21 20:21:42 +10:00
|
|
|
# URL: https://nodejs.org/
|
2017-06-17 21:12:52 +10:00
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
2022-01-15 15:45:26 +01:00
|
|
|
# Depends on: libnghttp2 libuv openssl zlib
|
|
|
|
# Optional: brotli c-ares icu
|
2020-11-10 19:08:13 +11:00
|
|
|
|
2017-06-17 21:12:52 +10:00
|
|
|
name=nodejs
|
2022-05-22 17:27:46 +10:00
|
|
|
version=18.2.0
|
2017-06-17 21:12:52 +10:00
|
|
|
release=1
|
2021-08-27 00:43:23 +10:00
|
|
|
source=(https://nodejs.org/dist/v$version/node-v$version.tar.xz
|
|
|
|
system-c-ares.patch)
|
2017-06-17 21:12:52 +10:00
|
|
|
|
|
|
|
build() {
|
|
|
|
cd node-v$version
|
|
|
|
|
2021-06-26 23:47:27 +10:00
|
|
|
prt-get isinst brotli && PKGMK_NODEJS+=' --shared-brotli'
|
|
|
|
prt-get isinst c-ares && PKGMK_NODEJS+=' --shared-cares'
|
2021-08-27 00:43:23 +10:00
|
|
|
prt-get isinst c-ares && patch -Rp1 -i $SRC/system-c-ares.patch
|
2021-06-26 23:47:27 +10:00
|
|
|
prt-get isinst icu && PKGMK_NODEJS+=' --with-intl=system-icu'
|
2019-01-28 18:49:53 +11:00
|
|
|
|
|
|
|
./configure ${PKGMK_NODEJS} \
|
2017-06-17 21:12:52 +10:00
|
|
|
--prefix=/usr \
|
2021-07-08 09:12:11 +10:00
|
|
|
--enable-lto \
|
2022-01-15 15:45:26 +01:00
|
|
|
--ninja \
|
2017-06-17 21:12:52 +10:00
|
|
|
--without-npm \
|
2020-10-20 20:40:42 +11:00
|
|
|
--shared-libuv \
|
2019-10-24 18:05:18 +11:00
|
|
|
--shared-zlib \
|
2022-01-15 15:45:26 +01:00
|
|
|
--shared-openssl \
|
|
|
|
--shared-nghttp2 \
|
|
|
|
--experimental-http-parser
|
2018-11-03 21:37:36 +11:00
|
|
|
|
2017-06-17 21:12:52 +10:00
|
|
|
make
|
|
|
|
make DESTDIR=$PKG install
|
|
|
|
|
|
|
|
rm -r $PKG/usr/share/doc
|
|
|
|
|
|
|
|
# clean up
|
|
|
|
find $PKG -type f \( \
|
|
|
|
-name 'README.md' -o \
|
|
|
|
-name 'AUTHORS.md' -o \
|
|
|
|
-name 'INSTALL.md' -o \
|
|
|
|
-name 'TODO.org' -o \
|
|
|
|
-name 'ChangeLog' -o \
|
|
|
|
-name 'NEWS' \) -delete
|
|
|
|
}
|