name='nodejs' version='24.0.2' release='1' desc='Evented I/O for V8 javascript ("Current" release).' desk_ru='Событийно-ориентированный I/O для V8 javascript ("Текущая" версия).' homepage='https://nodejs.org/' maintainer='Evgeny Khramov ' maintainer_ru='Евгений Храмов ' architectures=('amd64') license=('MIT') provides=('nodejs') conflicts=('nodejs') deps=( 'brotli' 'c-ares' 'icu' 'libnghttp2' 'libnghttp3' 'libngtcp2' 'libuv' 'openssl' 'simdjson' 'zlib' ) deps_arch=( 'brotli' 'c-ares' 'icu-devel' 'libnghttp2' 'libnghttp3' 'libngtcp2' 'libuv' 'openssl' 'simdjson' 'zlib' ) build_deps=( 'git' 'procps-ng' 'python3' 'python3-devel' 'libuv-devel' 'brotli-devel' 'c-ares-devel' 'icu' 'libnghttp2-devel' 'simdjson' 'libnghttp3' 'libngtcp2' ) build_deps_arch=( 'git' 'procps-ng' 'python' ) opt_deps=('npm: nodejs менеджер пакетов') options=('!lto') sources=("https://github.com/nodejs/node/archive/refs/tags/v$version.tar.gz") checksums=('SKIP') scripts=( ['postinstall']='postinstall.sh' ) _set_flags() { # /usr/lib/libnode.so uses malloc_usable_size, which is incompatible with fortification level 3 CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" } build() { _set_flags cd node-$version ./configure \ --prefix=/usr \ --without-npm \ --with-intl=system-icu \ --shared-brotli \ --shared-cares \ --shared-libuv \ --shared-nghttp2 \ --shared-nghttp3 \ --shared-ngtcp2 \ --shared-openssl \ --shared-simdjson \ --shared-zlib make -j$(($(nproc) - 1)) } check() { _set_flags cd node-$version # ignore failing tests, they work when compiled locally rm test/parallel/test-http2-client-set-priority.js rm test/parallel/test-http2-priority-event.js rm test/parallel/test-http-outgoing-end-cork.js make test-only -j$(($(nproc) - 1)) } package() { _set_flags cd node-$version make DESTDIR="$pkgdir" install install-license LICENSE ./nodejs/LICENSE } #files() { # echo ./usr/bin/gpu-screen-recorder # echo ./usr/bin/gsr-kms-server # echo ./usr/lib/modprobe.d/gsr-nvidia.conf # echo ./usr/lib/systemd/user/gpu-screen-recorder.service #}