diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2022-04-23 12:02:36 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2022-04-23 12:02:36 +0200 |
commit | 14ad7b4156119c6a76e70f43d3779c205e3b0320 (patch) | |
tree | d249d76e16ce76a8656fecbbd08344edfe6d0416 /build-support/disabled | |
parent | 9d88444f45b6adb4a184bcd195218c29731b017f (diff) | |
download | packages-14ad7b4156119c6a76e70f43d3779c205e3b0320.tar.xz |
added bootstrapping mesa to build-support
Diffstat (limited to 'build-support/disabled')
-rw-r--r-- | build-support/disabled/mesa/mesa | 177 |
1 files changed, 177 insertions, 0 deletions
diff --git a/build-support/disabled/mesa/mesa b/build-support/disabled/mesa/mesa new file mode 100644 index 00000000..81de2061 --- /dev/null +++ b/build-support/disabled/mesa/mesa @@ -0,0 +1,177 @@ +# 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 + ' +)" + +# 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 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' ' ' + )"') + ' + )" +fi + +# break cycle with conflicting installation files between mesa and libglvnd +# (indirect dependency via libva) +# i486-specific +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 | \ + sed ' + 3 i if false; then + $ i fi + ' + declare -f package_vulkan-swrast | \ + sed ' + 3 i if false; then + $ i fi + ' + 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_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 | \ + 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 + ' +)" |