Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/core/pacman/PKGBUILD
blob: f38a577b983d96d7648c8b3aebcb17aa1dd5e2f8 (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
# upstream git revision: 557099dcb495b55b563735a21fdc393d0fc050fb

depends+=(archlinux32-keyring)

# fail if upstream changes makepkg.conf or pacman.conf
for ((i=0; i<${#sha256sums[@]}; i++)); do
  if [ "${sha256sums[${i}]}" = 'f2791b51588104ec6dbaafa389451056f3c61fa6c19510dcce3a9a6cc19cba29' ]; then
    sha256sums[${i}]='2ad58ba534fed9d728d273c7b5920a495c15cfb58b5c3864bfa023a939abc5d0'
  fi
  if [ "${sha256sums[${i}]}" = '656c4d4cb8cb12adbf178fc8cb2fd25f8c285d6572bbdbb24d865d00e0d5a85a' ]; then
    sha256sums[${i}]='fa05e6f8a83f09fc347988a8ad9dce6fad50d542b2d77fc07fd1b604309990be'
  fi
done

if [ ! "${CARCH}" = "i686" ]; then
  # patch architecture where needed
  eval "$(
    declare -f package | \
      sed '
        /install.*makepkg.conf/ a \
          sed -i "s@i686@'"${CARCH}"'@g; /^CHOST/ s/pentium4-/i686-/" "$pkgdir/etc/makepkg.conf"
      '
  )"
fi

# patch pacman for automatic architecture detection (applied in wildcard patch above)
source+=('replace-i686-by-pentium4-when-architecture-is-auto.patch')
sha256sums+=('6a7906bd28a57cbcff58d856ffefbbb9096a163aaff79913b4fac69d75d0028a')

# not supported on i486 -fcf-protection
# LTO currently no availavle on i486
if [ "${CARCH}" = "i486" ]; then
  eval "$(
    {
      declare -f package || \
      printf 'package() {\n}\n'
    } \
    | sed '
      $i sed -i "s/-fcf-protection//g" "$pkgdir/etc/makepkg.conf"
      $i sed -i "s/LTOFLAGS.*/LTOFLAGS=\\\"-fno-lto\\\"/" "$pkgdir/etc/makepkg.conf"
    '
  )"
fi

# broken Python/asciidoc
eval "$(
  declare -f build | \
    sed '
      /meson/s/-Ddoc=enabled/-Ddoc=disabled/
    '
)"

# overload wrong checksums
sha256sums[11]='468837eed9a4ffd3778f159a7e62f89a38a4244f822a3a5b014daa69e3c65d28'
sha256sums[13]='d08d4a56dc3a977fdfd4591c30733fa28976710ffba53786541d98717892dc24'
sha256sums[14]='4a3cdfba490121a20f3648791cd47ba323f3d3d56bf7ced21b9badb1f22d6abc'