blob: a05c9b018ae720ceb9d49d957a9f8cc87ea76f39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# 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>
pkgname=libnode
pkgver=22.6.0
pkgrel=1
pkgdesc='libnode.so from nodejs-shared'
arch=('x86_64')
url='https://nodejs.org/'
license=('MIT')
options=(!lto)
depends=('icu' 'libuv' 'libnghttp2' 'libnghttp3' 'libngtcp2' 'openssl' 'zlib' 'brotli' 'c-ares') # 'http-parser' 'v8')
makedepends=('python' 'procps-ng')
source=("nodejs-${pkgver}.tar.gz::https://github.com/nodejs/node/archive/refs/tags/v${pkgver}.tar.gz")
sha512sums=('de04d1d2dec6668c06143b0a4d6bb4cc51b61b80a6030120d099ba7b6c8d83804ae097f8c9a057724414be24616db5e0f65c75fbaf91e047dc792ce5429e9bd5')
build() {
cd node-${pkgver}
# /usr/lib/libnode.so uses malloc_usable_size, which is incompatible with fortification level 3
export CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
export CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
./configure \
--prefix=/usr \
--without-npm \
--with-intl=system-icu \
--shared \
--shared-libuv \
--shared-nghttp2 \
--shared-nghttp3 \
--shared-ngtcp2 \
--shared-openssl \
--shared-zlib \
--shared-brotli \
--shared-cares
# --shared-v8
# --shared-http-parser
make
}
package() {
conflicts=('nodejs-shared')
cd node-${pkgver}
make DESTDIR="$pkgdir" install
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
cd "$pkgdir"/usr/lib
ln -s libnode.so.* libnode.so
mv "$pkgdir"/usr/include/node "$pkgdir/usr/include/$pkgname"
rm -r "$pkgdir"/usr/{bin,lib/node_modules,share/doc,share/man}
}
# vim:set ts=2 sw=2 et:
|