summaryrefslogtreecommitdiff
path: root/extra/vim/PKGBUILD
blob: 7d8d7da97f467d88a2c343fdfab00c4c05895cd7 (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
unset check

# do not build gvim on i486 - no gtk3 and no libcanberra

makedepends=(
  $(
    echo "${makedepends[@]}" \
    | tr -s ' ' '\n' \
    | grep -vxF 'gtk3' \
    | grep -vxF 'libcanberra'
  )
)
makedepends_i686=(gtk3 libcanberra)
makedepends_pentium4=("${makedepends_i686[@]}")

eval "$(
  declare -f prepare \
  | sed '
    /gvim/ s/^/[ "${CARCH}" = i486 ] || /
  '

  declare -f build \
  | sed '
    /cd gvim/ s/^/[ "${CARCH}" = i486 ] || /
  '

  declare -f package_gvim \
  | sed '
    /^\s*\S*depends=/ {
      h
      s/=/_i686=/
      p
      g
      s/=/_pentium4=/
    }
    /cd gvim/ i [ "${CARCH}" != i486 ] || return 0
  '
)"