summaryrefslogtreecommitdiff
path: root/extra/mesa/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'extra/mesa/PKGBUILD')
-rw-r--r--extra/mesa/PKGBUILD164
1 files changed, 19 insertions, 145 deletions
diff --git a/extra/mesa/PKGBUILD b/extra/mesa/PKGBUILD
index a55eb8f5..122512e9 100644
--- a/extra/mesa/PKGBUILD
+++ b/extra/mesa/PKGBUILD
@@ -1,92 +1,35 @@
-# 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
-# do not build/package vulkan on i486
-# do not build i915,i965 on i486
-if [ "$CARCH" = 'i486' ]; then
+# LTO on i486 results in out-of-memory
+if [ "$CARCH" == 'i486' ]; then
eval "$(
declare -f build | \
sed '
- s/-D gallium-omx=bellagio //
- s/-D gallium-opencl=\S\+ //
- s/-D osmesa=true /-D osmesa=false /
- 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
- '
- )"
-else
- eval "$(
- declare -f package_vulkan-intel package_vulkan-radeon package_opencl-mesa package_libva-mesa-driver package_mesa-vdpau | \
- sed '
- /^\s*{\s*$/ a arch=('"$(
- printf '%s\n' "${arch[@]}" | \
- grep -vxF 'i486' | \
- tr '\n' ' '
- )"')
+ s/-D b_lto=true/-D b_lto=false/
'
)"
fi
-# break cycle with conflicting installation files between mesa and libglvnd
-# (indirect dependency via libva)
-# i486-specific
+# 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 package_mesa | \
- sed '
- $ i rm -rf $pkgdir/usr/include/EGL/egl.h \
- rm -rf $pkgdir/usr/include/EGL/eglext.h \
- rm -rf $pkgdir/usr/include/EGL/eglplatform.h \
- rm -rf $pkgdir/usr/include/GL/gl.h \
- rm -rf $pkgdir/usr/include/GL/glcorearb.h \
- rm -rf $pkgdir/usr/include/GL/glext.h \
- rm -rf $pkgdir/usr/include/GL/glx.h \
- rm -rf $pkgdir/usr/include/GL/glxext.h \
- rm -rf $pkgdir/usr/include/GLES2/gl2.h \
- rm -rf $pkgdir/usr/include/GLES2/gl2ext.h \
- rm -rf $pkgdir/usr/include/GLES2/gl2platform.h \
- rm -rf $pkgdir/usr/include/GLES3/gl3.h \
- rm -rf $pkgdir/usr/include/GLES3/gl31.h \
- rm -rf $pkgdir/usr/include/GLES3/gl32.h \
- rm -rf $pkgdir/usr/include/GLES3/gl3ext.h \
- rm -rf $pkgdir/usr/include/GLES3/gl3platform.h \
- rm -rf $pkgdir/usr/include/KHR/khrplatform.h \
- rm -rf $pkgdir/usr/lib/pkgconfig/egl.pc \
- rm -rf $pkgdir/usr/lib/pkgconfig/gl.pc \
- rm -rf $pkgdir/usr/lib/pkgconfig/glesv2.pc
- '
- declare -f package_vulkan-mesa-layers | \
+ declare -f build | \
sed '
- 3 i if false; then
- $ i fi
+ s/\(-D vulkan-drivers=\)\S\+ /\1 /
'
- declare -f package_vulkan-swrast | \
+ declare -f package_mesa | \
sed '
- 3 i if false; then
- $ i fi
+ \,rm .*/vulkan;,d
'
declare -f package_vulkan-intel | \
sed '
@@ -98,79 +41,10 @@ if [ "$CARCH" = 'i486' ]; then
3 i if false; then
$ i fi
'
- declare -f package_opencl-mesa | \
- sed '
- 3 i if false; then
- $ i fi
- '
- declare -f package_libva-mesa-driver | \
- sed '
- 3 i if false; then
- $ i fi
- '
- declare -f package_libva-mesa-vdpau | \
- sed '
- 3 i if false; then
- $ i fi
- '
- declare -f package_mesa-vdpau | \
+ declare -f package_vulkan-swrast | \
sed '
3 i if false; then
$ i fi
'
- )
- "
-fi
-
-# add libdrm and libxshmfence explocitily for now, as deep down in th
-# dependency tree as reasonable instead of patching all packages failing above
-if [ "$CARCH" = 'i486' ]; then
- depends+=(libdrm)
- depends+=(libxshmfence)
- depends+=(wayland)
-fi
-
-# 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
-
-# libclc needs spirv-llvm-translator which throws heavily errors on 32-bit
-# LLVM_SPIRV :: DebugInfo/X86/dbg-declare-alloca.ll
-# LLVM_SPIRV :: DebugInfo/X86/dbg-declare-arg.ll
-# LLVM_SPIRV :: DebugInfo/X86/dbg-value-const-byref.ll
-# LLVM_SPIRV :: DebugInfo/X86/dw_op_minus_direct.ll
-# LLVM_SPIRV :: DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll
-# LLVM_SPIRV :: DebugInfo/X86/frame-register.ll
-# LLVM_SPIRV :: DebugInfo/X86/this-stack_value.ll
-# LLVM_SPIRV :: spirv-extensions-control.ll
-# LLVM_SPIRV :: transcoding/SPV_KHR_integer_dot_product-sat.ll
-# usually with segfaults in the middle of LLVM itself
-# this might be hopeless to get working
-makedepends=(${makedepends[@]//libclc/})
-eval "$(
- declare -f build | \
- sed '
- s/-D gallium-opencl=icd/-D gallium-opencl=disabled/
- '
- declare -f package_opencl-mesa | \
- sed '
- 3 i if false; then
- $ i fi
- '
-)"