Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/community/nodejs/PKGBUILD
blob: 08611e9623eba8682c5469b69df7d2a94b56489c (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
# actually build a 32-bit version
eval "$(
  declare -f build | \
    sed '
	  s|./configure|./configure --dest-cpu ia32|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+=('0fd62af37c4c0e2cd81fc613f4610741dbe6e883b5d15aa1fd64bcdbca8ec8d95aa98a37525425e5f80e8ca1305e222235f3ca6069779e3fcc1940b20207d50a')
  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