diff options
| author | emmett1 <me@emmett1.my> | 2026-06-21 07:20:33 +0800 |
|---|---|---|
| committer | emmett1 <me@emmett1.my> | 2026-06-21 07:20:33 +0800 |
| commit | 93e629250d2f2073dcea128000323264d2c7571f (patch) | |
| tree | 050258a7a205c4eaf1cd7585ebfd0af6081b1219 /repos/extra/mesa | |
| parent | a064f3970799c33ab248649e5218c3137d43447b (diff) | |
| download | alicelinux-93e629250d2f2073dcea128000323264d2c7571f.tar.gz alicelinux-93e629250d2f2073dcea128000323264d2c7571f.zip | |
muon build fixes
Diffstat (limited to 'repos/extra/mesa')
| -rw-r--r-- | repos/extra/mesa/.files | 21 | ||||
| -rw-r--r-- | repos/extra/mesa/.shasum | 1 | ||||
| -rw-r--r-- | repos/extra/mesa/abuild | 22 | ||||
| -rw-r--r-- | repos/extra/mesa/muon.patch | 87 |
4 files changed, 114 insertions, 17 deletions
diff --git a/repos/extra/mesa/.files b/repos/extra/mesa/.files index 34e32e46..3924fc67 100644 --- a/repos/extra/mesa/.files +++ b/repos/extra/mesa/.files @@ -1,14 +1,19 @@ drwxr-xr-x root/root usr/ drwxr-xr-x root/root usr/include/ drwxr-xr-x root/root usr/include/EGL/ --rw-r--r-- root/root usr/include/EGL/eglext_angle.h --rw-r--r-- root/root usr/include/EGL/eglmesaext.h +-rw-rw-r-- root/root usr/include/EGL/eglext_angle.h +-rw-rw-r-- root/root usr/include/EGL/eglmesaext.h drwxr-xr-x root/root usr/include/GL/ drwxr-xr-x root/root usr/include/GL/internal/ --rw-r--r-- root/root usr/include/GL/internal/dri_interface.h --rw-r--r-- root/root usr/include/gbm.h --rw-r--r-- root/root usr/include/gbm_backend_abi.h +-rw-rw-r-- root/root usr/include/GL/internal/dri_interface.h +-rw-rw-r-- root/root usr/include/gbm.h +-rw-rw-r-- root/root usr/include/gbm_backend_abi.h drwxr-xr-x root/root usr/lib/ +drwxr-xr-x root/root usr/lib/dri/ +lrwxrwxrwx root/root usr/lib/dri/nouveau_drv_video.so -> ../libgallium-26.1.2.so +lrwxrwxrwx root/root usr/lib/dri/r600_drv_video.so -> ../libgallium-26.1.2.so +lrwxrwxrwx root/root usr/lib/dri/radeonsi_drv_video.so -> ../libgallium-26.1.2.so +lrwxrwxrwx root/root usr/lib/dri/virtio_gpu_drv_video.so -> ../libgallium-26.1.2.so drwxr-xr-x root/root usr/lib/gbm/ -rwxr-xr-x root/root usr/lib/gbm/dri_gbm.so lrwxrwxrwx root/root usr/lib/libEGL_mesa.so -> libEGL_mesa.so.0 @@ -28,11 +33,11 @@ drwxr-xr-x root/root usr/lib/pkgconfig/ -rw-r--r-- root/root usr/lib/pkgconfig/gbm.pc drwxr-xr-x root/root usr/share/ drwxr-xr-x root/root usr/share/drirc.d/ --rw-r--r-- root/root usr/share/drirc.d/00-mesa-defaults.conf --rw-r--r-- root/root usr/share/drirc.d/00-radv-defaults.conf +-rw-rw-r-- root/root usr/share/drirc.d/00-mesa-defaults.conf +-rw-rw-r-- root/root usr/share/drirc.d/00-radv-defaults.conf drwxr-xr-x root/root usr/share/glvnd/ drwxr-xr-x root/root usr/share/glvnd/egl_vendor.d/ --rw-r--r-- root/root usr/share/glvnd/egl_vendor.d/50_mesa.json +-rw-rw-r-- root/root usr/share/glvnd/egl_vendor.d/50_mesa.json drwxr-xr-x root/root usr/share/vulkan/ drwxr-xr-x root/root usr/share/vulkan/icd.d/ -rw-r--r-- root/root usr/share/vulkan/icd.d/intel_hasvk_icd.x86_64.json diff --git a/repos/extra/mesa/.shasum b/repos/extra/mesa/.shasum index 1463f51e..16f9d2a1 100644 --- a/repos/extra/mesa/.shasum +++ b/repos/extra/mesa/.shasum @@ -1 +1,2 @@ 2826e3659206ca9e233495137b4fe77f3ff58d39909de052a8140530 mesa-26.1.2.tar.xz +9e290833d63bce0a726c0b5da82e3929d1ce1bc7db5b778332606866 muon.patch diff --git a/repos/extra/mesa/abuild b/repos/extra/mesa/abuild index 691c5194..2e5b55d8 100644 --- a/repos/extra/mesa/abuild +++ b/repos/extra/mesa/abuild @@ -1,14 +1,13 @@ name=mesa version=26.1.2 release=1 -source="https://archive.mesa3d.org/$name-$version.tar.xz" - +source="https://archive.mesa3d.org/$name-$version.tar.xz + muon.patch" keep_static=1 -[ -f $SPM_PKGDB/wayland ] && platform="-Dplatforms=wayland -Dglx=disabled" -[ -f $SPM_PKGDB/libx11 ] && platform="-Dplatforms=x11" -[ -f $SPM_PKGDB/libx11 ] && [ -f $SPM_PKGDB/wayland ] && platform="-Dplatforms=wayland,x11" + build_opt=" - $platform + -Dplatforms=wayland + -Dglx=disabled -Dgallium-drivers=r300,r600,radeonsi,nouveau,virgl,svga,i915,iris,crocus,zink -Dvulkan-drivers=amd,intel,intel_hasvk,swrast,virtio -Dvalgrind=disabled @@ -16,7 +15,12 @@ build_opt=" -Dglvnd=enabled -Db_lto=false " - # vulkan driver for nouveau disabled becaused required unusable rust shit! -# FUCK RUST SHIT -# FUCK MESA DEV + +prebuild() { + sed "s|@APKGLLVMVERSION@|$(llvm-config --version)|" -i meson.build + sed "s|@APKGLLVMLIBS@|$(llvm-config --libs)|" -i meson.build + sed "s|@APKGLLVMLDFLAGS@|$(llvm-config --ldflags)|" -i meson.build + sed "s|@APKGLLVMINCLUDEDIR@|$(llvm-config --includedir)|" -i meson.build +} + diff --git a/repos/extra/mesa/muon.patch b/repos/extra/mesa/muon.patch new file mode 100644 index 00000000..0e03943b --- /dev/null +++ b/repos/extra/mesa/muon.patch @@ -0,0 +1,87 @@ +--- mesa-26.1.2-orig/meson.build ++++ mesa-26.1.2/meson.build +@@ -1895,16 +1895,10 @@ + .disable_auto_if(host_machine.system() == 'windows') \ + .allowed() + +-dep_llvm = dependency( +- 'llvm', +- method : host_machine.system() == 'windows' ? 'auto' : 'config-tool', +- version : _llvm_version, +- modules : llvm_modules, +- optional_modules : llvm_optional_modules, +- required : with_llvm, +- static : not _shared_llvm, +- fallback : ['llvm', 'dep_llvm'], +- include_type : 'system', ++dep_llvm = declare_dependency( ++ include_directories: include_directories('@APKGLLVMINCLUDEDIR@'), ++ link_args: ['@APKGLLVMLIBS@', '@APKGLLVMLDFLAGS@'], ++ version: '@APKGLLVMVERSION@', + ) + if dep_llvm.found() + pre_args += '-DMESA_LLVM_VERSION_STRING="@0@"'.format(dep_llvm.version()) +@@ -1928,7 +1922,7 @@ + # ensure that linking works. Note that Win32 compilers does handle mismatching RTTI + # without issues, so only apply this for other compilers. + if dep_llvm.type_name() == 'internal' +- _llvm_rtti = subproject('llvm').get_variable('has_rtti', true) ++ _llvm_rtti = true + else + # The CMake finder will return 'ON', the llvm-config will return 'YES' + _llvm_rtti = ['ON', 'YES'].contains(dep_llvm.get_variable(cmake : 'LLVM_ENABLE_RTTI', configtool: 'has-rtti')) +@@ -1992,7 +1986,7 @@ + + dep_clang = null_dep + if with_clc +- llvm_libdir = dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir') ++ llvm_libdir = '/usr/lib' + + dep_clang = cpp.find_library('clang-cpp', dirs : llvm_libdir, required : false) + +@@ -2162,7 +2156,16 @@ + pre_args += ['-DHAVE_WL_CREATE_QUEUE_WITH_NAME'] + endif + # This can be renamed just `wayland` when we require at least 1.8 +- mod_wl = import('unstable-wayland') ++ wayland_protocols_dep = dependency('wayland-protocols') ++ wayland_protocols_datadir = wayland_protocols_dep.get_pkgconfig_variable('pkgdatadir') ++ wayland_scanner = find_program('wayland-scanner') ++ ++ gen_client_header = generator(wayland_scanner, ++ output: '@BASENAME@-client-protocol.h', ++ arguments: ['client-header', '@INPUT@', '@OUTPUT@']) ++ gen_private_code = generator(wayland_scanner, ++ output: '@BASENAME@-protocol.c', ++ arguments: ['private-code', '@INPUT@', '@OUTPUT@']) + endif + + # Even if we find OpenMP, Gitlab CI fails to link with gcc/i386 and clang/anyarch. +--- mesa-26.1.2-orig/src/loader/meson.build ++++ mesa-26.1.2/src/loader/meson.build +@@ -5,17 +5,17 @@ + + if with_platform_wayland + wp_protos = { +- 'fifo-v1': mod_wl.find_protocol('fifo', state : 'staging', version : 1), +- 'commit-timing-v1': mod_wl.find_protocol('commit-timing', state : 'staging', version : 1), +- 'linux-dmabuf-unstable-v1': mod_wl.find_protocol('linux-dmabuf', state : 'unstable', version : 1), +- 'presentation-time': mod_wl.find_protocol('presentation-time'), +- 'tearing-control-v1': mod_wl.find_protocol('tearing-control', state : 'staging', version : 1), +- 'linux-drm-syncobj-v1': mod_wl.find_protocol('linux-drm-syncobj', state : 'staging', version : 1), +- 'color-management-v1': mod_wl.find_protocol('color-management', state : 'staging', version : 1) ++ 'fifo-v1': join_paths(wayland_protocols_datadir, 'staging/fifo/fifo-v1.xml'), ++ 'commit-timing-v1': join_paths(wayland_protocols_datadir, 'staging/commit-timing/commit-timing-v1.xml'), ++ 'linux-dmabuf-unstable-v1': join_paths(wayland_protocols_datadir, 'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml'), ++ 'presentation-time': join_paths(wayland_protocols_datadir, 'stable/presentation-time/presentation-time.xml'), ++ 'tearing-control-v1': join_paths(wayland_protocols_datadir, 'staging/tearing-control/tearing-control-v1.xml'), ++ 'linux-drm-syncobj-v1': join_paths(wayland_protocols_datadir, 'staging/linux-drm-syncobj/linux-drm-syncobj-v1.xml'), ++ 'color-management-v1': join_paths(wayland_protocols_datadir, 'staging/color-management/color-management-v1.xml') + } + wp_files = {} + foreach name, xml : wp_protos +- wp_files += {name : mod_wl.scan_xml(xml, include_core_only : false)} ++ wp_files += {name : [gen_client_header.process(xml), gen_private_code.process(xml)]} + endforeach + + libloader_wayland_helper = static_library( |