Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra/mesa/PKGBUILD
blob: a338f5809d954b6cf55ceed790ad5a11bd13c1f2 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# 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

# no LTO on i486
if [ "$CARCH" = 'i486' ]; then
  sed -i '
    1i options=(!lto)
  ' PKGBUILD
fi
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
# libclc doesn't build at all on 32-bit
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      
      '
    declare -f package_opencl-mesa | \
      sed '
        3 i if false; then
        $ i fi      
      '
  )"
fi

# disable rust stuff on i486
if [ "$CARCH" = 'i486' ]; then
  eval "$(
    declare -f build | \
      sed '
        s/-D gallium-rusticl=true/-D gallium-rusticl=false/g
        s/-D rust_std=\S\+//
      '
    declare -f package_vulkan-virtio | \
      sed '
        /.*virtio_icd.*json.*/d
        /.*libvulkan_virtio.so.*/d
      '
  )"
  makedepends=(${makedepends[@]//rust-bindgen/})
  makedepends=(${makedepends[@]//rust/})
fi

# this just fails and annoys me
eval "$(
  declare -f package_mesa | \
    sed '
      /find.*rmdir/d
    '
)"

# intel-rt is amd64 only
eval "$(
  declare -f build | \
      sed '
        s/-D intel-rt=enabled/-D intel-rt=disabled/
      '
)"