index : packages | |
Archlinux32 package modifications | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2023-05-22 20:18:50 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2023-05-22 20:18:50 +0200 |
commit | e74cde76c104df82b120a7b13964cb786da8f565 (patch) | |
tree | 39967e24037929c04aaf79922aa260b437a60a5e /extra/nodejs/PKGBUILD | |
parent | 73e1d3b448cc583ab38cae4d61a26f313fad946b (diff) |
-rw-r--r-- | extra/nodejs/PKGBUILD | 35 |
diff --git a/extra/nodejs/PKGBUILD b/extra/nodejs/PKGBUILD new file mode 100644 index 00000000..0a1713cb --- /dev/null +++ b/extra/nodejs/PKGBUILD @@ -0,0 +1,35 @@ +# actually build a 32-bit version +eval "$( + declare -f build | \ + sed ' + s|./configure|./configure --dest-cpu x86|g + ' +)" + +# linker runs out of memory on 32-bit +eval "$( + declare -f build | \ + sed ' + 3 i LDFLAGS+=" -Wl,--no-keep-memory" + 3 i CFLAGS+=" -g1" + 3 i CXXFLAGS+=" -g1" + ' +)" + +# add -latomic where needed (i486) +if [ "$CARCH" = 'i486' ]; then + source+=('node-17.1.0-atomic.patch') + sha512sums+=('a2acca076dc0f65e17ffb5ac0bbf4dc9b8be845a400b66b5f83f5efbfca16e01ecc675a307eb0c28527874dea6464699f3969c3ee9a94226af568fb18feca331') + eval "$( + declare -f prepare | \ + sed ' + $i patch -Np1 -i "../node-17.1.0-atomic.patch" + ' + )" + eval "$( + declare -f build | \ + sed ' + 3 i LDFLAGS+=" -latomic" + ' + )" +fi |