Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra/mesa/PKGBUILD
blob: d00f76ac881b53a69a4fe807db07547d2ea51968 (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
57
58
59
60
# 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 gallium-drivers=\)\S\+ /\1 /
        s/-D gallium-omx=bellagio //
        s/-D gallium-opencl=\S\+ //
        s/-D osmesa=gallium //
        s/\(-D gallium-\S\+=\)enabled /\1disabled /g
        s/\(-D gallium-nine=\)true /\1false /g
        s/\(-D vulkan-drivers=\)\S\+ /\1 /
        s/\(-D dri-drivers=\(\S\+,\)\?\)i915,/\1/
        s/\(-D dri-drivers=\(\S\+,\)\?\)i965,/\1/
      '
    declare -f package_mesa | \
      sed '
        \,rm .*/vulkan;,d
        \,bellagio,d
        \,fakeinstall/usr/lib/d3d,d
        \,fakeinstall/usr/lib/libOSMesa\.so\*,d
        \,fakeinstall/usr/lib/libxatracker\.so\*,d
      '
  )"
  pkgname=(
    $(
      printf '%s\n' "${pkgname[@]}" \
      | grep -v '^vulkan-' \
      | grep -vxF opencl-mesa \
      | grep -vxF libva-mesa-driver \
      | grep -vxF mesa-vdpau
    )
  )
fi
eval "$(
  declare -f package_vulkan-intel package_vulkan-radeon | \
    sed '
      /^\s*{\s*$/ a arch=('"$(
        printf '%s\n' "${arch[@]}" | \
          grep -vxF 'i486' | \
          tr '\n' ' '
      )"')
    '
)"