summaryrefslogtreecommitdiff
path: root/core/gcc/PKGBUILD
blob: 6acf8302769c4fb1e986ddabdf33a18db3b4eb85 (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
makedepends=(
  $(
    printf '%s\n' "${makedepends[@]}" | \
      grep -v '^lib32-glibc\($\|[<>=]\)'
  )
)
pkgname=(
  $(
    printf '%s\n' "${pkgname[@]}" | \
      grep -vFx 'lib32-gcc-libs'
  )
)
unset -f 'package_lib32-gcc-libs'
eval "$(
  declare -f prepare | \
    sed '
      \,/s/lib64/lib/, d
    '
  declare -f build | \
    sed '
      s/--enable-multilib/--disable-multilib/
    '
  declare -f package_gcc-libs | \
    sed '
      s/\$pkgname-multilib//
      s@libsanitizer/{a,l,ub,t}san@libsanitizer/{a,l,ub}san@
      \@/usr/lib32/@ d
    '
  declare -f package_gcc | \
    sed '
      s/"lib32-gcc-libs[^"]*"//g
    '
  declare -f package_gcc-ada | \
    sed '
      \,cd .*/32/libada,{
        N
        d
      }
    '
)"
eval "$(
  for name in "${pkgname[@]}"; do
    declare -f package_${name} | \
      sed '
        s/$pkgname-multilib//
        s/{,32}//
        \,/lib32/,d
        \,/32/,d
      '
  done
)"