Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra/mesa/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'extra/mesa/PKGBUILD')
-rw-r--r--extra/mesa/PKGBUILD94
1 files changed, 67 insertions, 27 deletions
diff --git a/extra/mesa/PKGBUILD b/extra/mesa/PKGBUILD
index df6a511e..0705c7b8 100644
--- a/extra/mesa/PKGBUILD
+++ b/extra/mesa/PKGBUILD
@@ -1,47 +1,87 @@
-# 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 "$(
+# defaults changed to SSE2 enabled by default, disable it
+if [ "$CARCH" = 'i686' -o "$CARCH" = 'i486' ]; then
+ 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
- '
-)"
+ 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 /
- s/\(-D dri-drivers=\(\S\+,\)\?\)i915,/\1/
- s/\(-D dri-drivers=\(\S\+,\)\?\)i965,/\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
+ '
)"
- pkgname=(
- $(
- printf '%s\n' "${pkgname[@]}" | \
- grep -v '^vulkan-'
- )
- )
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_vulkan-intel package_vulkan-radeon | \
+ declare -f package_mesa | \
sed '
- /^\s*{\s*$/ a arch=('"$(
- printf '%s\n' "${arch[@]}" | \
- grep -vxF 'i486' | \
- tr '\n' ' '
- )"')
+ /find.*rmdir/d
'
)"