Skip to content

Commit

Permalink
mesa-asahi: drop conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
dkwo committed Dec 22, 2024
1 parent b91529d commit 7c01b95
Showing 1 changed file with 10 additions and 22 deletions.
32 changes: 10 additions & 22 deletions srcpkgs/mesa-asahi/template
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,28 @@ pkgname=mesa-asahi
version=20241211
revision=1
build_style=meson
build_helper="qemu"
_llvmver=19
_mesaver=25.0.0
#Disable LTO flag should be present, see https://gitlab.freedesktop.org/mesa/mesa/-/issues/6911
configure_args="-Dglvnd=enabled -Dshared-glapi=enabled -Dgbm=enabled -Degl=enabled
-Dosmesa=true -Dgles1=enabled -Dgles2=enabled -Dglx=dri
-Dlmsensors=enabled -Dplatforms=x11$(vopt_if wayland ,wayland)
-Dllvm=enabled -Db_lto=false -Dcpp_std=gnu++17"
-Dllvm=enabled -Db_lto=false -Dcpp_std=gnu++17
-Dgallium-vdpau=enabled -Dgallium-va=enabled
-Dvulkan-drivers=swrast,virtio -Dvulkan-layers=device-select,overlay
-Dgallium-drivers=swrast,asahi,virgl,zink
-Dgallium-opencl=icd -Dgallium-rusticl=true -Drust_std=2021"
hostmakedepends="gettext flex pkg-config python3-Mako glslang llvm${_llvmver}
$(vopt_if wayland 'wayland-protocols wayland-devel') python3-pycparser python3-yaml"
$(vopt_if wayland 'wayland-protocols wayland-devel') python3-pycparser python3-yaml
clang${_llvmver} rust rust-bindgen"
makedepends="elfutils-devel expat-devel libXdamage-devel
libXxf86vm-devel libdrm-devel libffi-devel libva-devel
libvdpau-devel libxshmfence-devel ncurses-devel zlib-devel
$(vopt_if wayland 'wayland-devel wayland-protocols') llvm${_llvmver}-devel libsensors-devel
libXrandr-devel libglvnd-devel libzstd-devel libxml2-devel lua53-devel
libarchive-devel"
libarchive-devel vulkan-loader clang${_llvmver} libclc${_llvmver} rust
SPIRV-LLVM-Translator${_llvmver}-devel SPIRV-Tools-devel"
depends="libglvnd"
short_desc="Open source implementation of OpenGL and Vulkan - Asahi"
maintainer="Orphaned <[email protected]>"
Expand All @@ -30,7 +37,6 @@ replaces="mesa>=0 mesa-libgallium>=0 libglapi>=0"
provides="mesa-${_mesaver}_${version} mesa-libgallium-${_mesaver}_${version} libglapi-${_mesaver}_${version}"
shlib_provides="libglapi.so libgallium-${_mesaver}-devel.so"

build_helper="qemu"
build_options="wayland"
build_options_default="wayland"

Expand All @@ -41,24 +47,6 @@ subpackages="libgbm-asahi libgbm-asahi-devel libOSMesa-asahi mesa-asahi-vaapi me
# Replace old mesa pkgs, superseded by libglvnd.
replaces="libGL>=10_1<19.2.5_2 libEGL>=10_1<19.2.5_2 libGLES>=10_1<19.2.5_2"

# Driver configuration
# Check for correctness on major mesa version updates
# Particularly, check if any new worthwhile drivers were added

# swrast always present
_gallium_drivers=" -Dgallium-drivers=swrast,asahi,virgl,zink"
_vulkan_drivers=" -Dvulkan-drivers=swrast,virtio"

configure_args+=" -Dgallium-vdpau=enabled -Dgallium-va=enabled ${_vulkan_drivers} -Dvulkan-layers=device-select,overlay"
configure_args+=" ${_gallium_drivers}"
makedepends+=" vulkan-loader"

hostmakedepends+=" clang${_llvmver} rust rust-bindgen"
makedepends+=" clang${_llvmver} libclc${_llvmver} rust
SPIRV-LLVM-Translator${_llvmver}-devel SPIRV-Tools-devel"
subpackages+=" mesa-asahi-opencl"
configure_args+=" -Dgallium-opencl=icd -Dgallium-rusticl=true -Drust_std=2021"

post_configure() {
if [ "$CROSS_BUILD" ]; then
find -iname "*.ninja" -exec sed -i "{}" \
Expand Down

0 comments on commit 7c01b95

Please sign in to comment.