summaryrefslogtreecommitdiff
path: root/extra/mesa/PKGBUILD
blob: e447a2bca235c9d1025c3924e85bf75eda992cd6 (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
# disable openswf as it requires AVX, makes no sense with old CPUs
# disable every new software rasterizer and take the old ones
# see also FS32#39
eval "$(
  declare -f build | \
    sed '
      /arch-meson/s/\(gallium-drivers=.*\),swrast,swr/\1,swrast/
      /arch-meson/s/\(-D swr-arches=\)avx,avx2/\1/
    '
  declare -f package_mesa | \
    sed '
      s@_install fakeinstall/usr/lib/libswrAVX.*@#\0@g
    '
)"

# do not build/package vulkan on i486
# do not build i915,i965 on i486
if [ "$CARCH" = 'i486' ]; then
  eval "$(
    declare -f build | \
      sed '
        s/\(-D vulkan-drivers=\)\S\+ /\1 /
        s/\(-D dri-drivers=\(\S\+,\)\?\)i915,/\1/
        s/\(-D dri-drivers=\(\S\+,\)\?\)i965,/\1/
      '
  )"
  pkgname=(
    $(
      printf '%s\n' "${pkgname[@]}" | \
        grep -v '^vulkan-'
    )
  )
fi
eval "$(
  declare -f package_vulkan-intel package_vulkan-radeon | \
    sed '
      /^\s*{\s*$/ a arch=('"$(
        printf '%s\n' "${arch[@]}" | \
          grep -vxF 'i486' | \
          tr '\n' ' '
      )"')
    '
)"