|
1 | 1 | --- PKGBUILD |
2 | 2 | +++ PKGBUILD |
3 | | -@@ -41,6 +41,12 @@ validpgpkeys=( |
4 | | - 'C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C' # Richard Lau <rlau@redhat.com> |
| 3 | +@@ -48,15 +48,25 @@ validpgpkeys=( |
| 4 | + 'C0D6248439F1D5604AAFFB4021D900FFDB233756' # Antoine du Hamel <duhamelantoine1995@gmail.com> |
5 | 5 | ) |
6 | 6 |
|
7 | | -+prepare() { |
8 | | -+ cd node |
9 | | -+ patch -Np1 -i ../fix-trap-handler.patch |
10 | | -+ patch -Np1 -i ../v8-disable-trap-handler.patch |
| 7 | ++_set_compilation_env() { |
| 8 | ++ # https://github.com/riscv-forks/electron/issues/7 |
| 9 | ++ export CC=/usr/bin/clang |
| 10 | ++ export CXX=/usr/bin/clang++ |
11 | 11 | +} |
12 | 12 | + |
| 13 | + prepare() { |
| 14 | + cd node |
| 15 | + patch -Np1 -i ../0001-test-make-test-crypto-hash-compatible-with-OpenSSL-3.patch |
| 16 | + patch -Np1 -i ../0002-test-adjust-OpenSSL-error-code-for-3.4.0.patch |
| 17 | + patch -Np1 -i ../0001-test-disable-openssl-3.4.0-incompatible-tests.patch |
| 18 | ++ patch -Np1 -i ../fix-trap-handler.patch |
| 19 | ++ patch -Np1 -i ../v8-disable-trap-handler.patch |
| 20 | ++ patch -Np1 -d deps/v8 < ../0001-riscv-Flush-icache-in-both-local-and-remote-harts.patch |
| 21 | + } |
| 22 | + |
13 | 23 | build() { |
14 | 24 | cd node |
| 25 | ++ _set_compilation_env |
| 26 | + |
| 27 | + # /usr/lib/libnode.so uses malloc_usable_size, which is incompatible with fortification level 3 |
| 28 | + export CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" |
| 29 | +@@ -82,6 +92,7 @@ build() { |
15 | 30 |
|
16 | | -@@ -77,4 +83,8 @@ package() { |
| 31 | + check() { |
| 32 | + cd node |
| 33 | ++ _set_compilation_env |
| 34 | + # Running an individual test: tools/test.py test/parallel/test-tls-psk-circuit.js |
| 35 | + # OpenSSL 3.4 broke a few tests in nodejs: |
| 36 | + # - https://github.com/nodejs/node/issues/56159 |
| 37 | +@@ -92,8 +103,16 @@ check() { |
| 38 | + |
| 39 | + package() { |
| 40 | + cd node |
| 41 | ++ _set_compilation_env |
| 42 | + make DESTDIR="$pkgdir" install |
17 | 43 | install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/nodejs/ |
18 | 44 | } |
19 | 45 |
|
| 46 | ++makedepends+=(clang) |
20 | 47 | +source+=("fix-trap-handler.patch" |
21 | | -+ "v8-disable-trap-handler.patch") |
| 48 | ++ "v8-disable-trap-handler.patch" |
| 49 | ++ "https://github.com/riscv-forks/electron/blob/d620bc038f02a412f396bc1bb84ea2bdd4c32114/patches/v8/0001-riscv-Flush-icache-in-both-local-and-remote-harts.patch") |
22 | 50 | +sha512sums+=('f2ff6da8cf5dcc994a7a20342e2928dc1821fbbf42891009a6234b6051277e0200d7e3fbba63b9a2773887591d0ad5ceb1bb3d25e5efeb557f6d00109a80253c' |
23 | | -+ 'b6495aefd36915969ee848cca350a565317c74864cd33e6a69a310ed9cbc71dfbd91f31e8c6176667f6f72daa1762eb4d519700a024cdbe8b18049100a9e3c80') |
| 51 | ++ 'b6495aefd36915969ee848cca350a565317c74864cd33e6a69a310ed9cbc71dfbd91f31e8c6176667f6f72daa1762eb4d519700a024cdbe8b18049100a9e3c80' |
| 52 | ++ 'f25b4f57c2623f4c6d7dec2741f3e53e95f34217e012d2a330846ec73bb0d797124ec57e86aa450ba9ee7ad59d19974c81f674eb65dca0deb2ebd5b10f125824') |
24 | 53 | # vim:set ts=2 sw=2 et: |
0 commit comments