summaryrefslogtreecommitdiff
path: root/extra/mesa/PKGBUILD
blob: 122512e9abce55b09b34cb1e48c132b6590184dc (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
# defaults changed to SSE2 enabled by default, disable it
if [ "$CARCH" = 'i686' -o "$CARCH" = 'i486' ]; then
  eval "$(
  declare -f build | \
  sed '
    s/arch-meson /arch-meson -Dsse2=false /
  '
  )"
fi

# LTO on i486 results in out-of-memory
if [ "$CARCH" == 'i486' ]; then
  eval "$(
    declare -f build | \
      sed '
        s/-D b_lto=true/-D b_lto=false/
      '
  )"
fi

# See https://bugs.freedesktop.org/show_bug.cgi?id=93089
# 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 /
      '
    declare -f package_mesa | \
      sed '
        \,rm .*/vulkan;,d
      '
    declare -f package_vulkan-intel | \
      sed '
        3 i if false; then
        $ i fi      
      '
    declare -f package_vulkan-radeon | \
      sed '
        3 i if false; then
        $ i fi      
      '
    declare -f package_vulkan-swrast | \
      sed '
        3 i if false; then
        $ i fi      
      '
  )"
fi