xorg/mesa/Pkgfile

56 lines
2.3 KiB
Plaintext
Raw Normal View History

2006-04-07 18:48:00 +02:00
# Description: Mesa 3D Graphics Library
# URL: https://www.mesa3d.org/
2012-07-13 20:14:36 +02:00
# Maintainer: CRUX Xorg Team, xorg-ports at crux dot nu
# Depends on: elfutils libdrm libglvnd llvm python3-mako xorg-libxdamage xorg-libxrandr xorg-libxshmfence xorg-libxvmc xorg-libxxf86vm
# Optional: directx-headers glslang libclc libunwind libva libvdpau lm_sensors rust-bindgen spirv-llvm-translator vulkan-loader wayland-protocols
2006-04-07 18:48:00 +02:00
2020-07-22 14:21:45 +02:00
name=mesa
2024-03-14 09:20:20 +01:00
version=24.0.3
release=1
2023-11-30 10:09:04 +01:00
source=(https://archive.mesa3d.org/$name-$version.tar.xz)
2006-04-07 18:48:00 +02:00
build() {
prt-get isinst directx-headers && PKGMK_MESA_GALLIUM+='d3d12,'
prt-get isinst libclc spirv-llvm-translator && PKGMK_MESA+=' -D gallium-opencl=icd'
prt-get isinst libclc rust-bindgen spirv-llvm-translator && PKGMK_MESA+=' -D gallium-rusticl=true'
prt-get isinst glslang && PKGMK_MESA+=' -D vulkan-drivers=auto -D vulkan-layers=device-select,intel-nullhw,overlay' || PKGMK_MESA+=' -D vulkan-drivers='
prt-get isinst libunwind && PKGMK_MESA+=' -D libunwind=enabled'
prt-get isinst libva && PKGMK_MESA+=' -D gallium-va=enabled' || PKGMK_MESA+=' -D gallium-va=disabled'
prt-get isinst libvdpau && PKGMK_MESA+=' -D gallium-vdpau=enabled' || PKGMK_MESA+=' -D gallium-vdpau=disabled'
prt-get isinst lm_sensors && PKGMK_MESA+=' -D lmsensors=enabled'
prt-get isinst vulkan-loader && PKGMK_MESA_GALLIUM+='zink,'
prt-get isinst wayland-protocols && PKGMK_MESA_PLATFORMS+='wayland'
## for future references
#prt-get isinst xorg-libxdamage xorg-libxrandr xorg-libxshmfence xorg-libxvmc xorg-libxxf86vm && PKGMK_MESA_PLATFORMS+=',x11'
PKGMK_MESA_PLATFORMS+=',x11'
meson setup build $name-$version $PKGMK_MESA \
--prefix=/usr \
2015-01-16 20:36:11 +01:00
--sysconfdir=/etc \
2020-11-04 17:36:58 +01:00
--buildtype=plain \
--wrap-mode nodownload \
2022-12-30 09:41:21 +01:00
-D b_lto=false \
-D b_pie=true \
-D dri3=enabled \
-D egl=enabled \
2020-11-07 15:08:19 +01:00
-D llvm=enabled \
-D shared-llvm=enabled \
-D gbm=enabled \
-D gles1=disabled \
2020-11-07 15:08:19 +01:00
-D gles2=enabled \
-D glx=dri \
2021-04-09 15:35:20 +02:00
-D osmesa=true \
2020-11-07 15:08:19 +01:00
-D gallium-xa=enabled \
2022-12-16 15:40:07 +01:00
-D gallium-drivers=${PKGMK_MESA_GALLIUM}crocus,iris,nouveau,r300,r600,radeonsi,svga,swrast,virgl,i915 \
-D platforms=${PKGMK_MESA_PLATFORMS#,} \
-D shared-glapi=enabled \
2022-10-12 11:05:39 +02:00
-D video-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc \
2020-11-04 17:36:58 +01:00
-D glvnd=true
2020-11-04 17:36:58 +01:00
meson compile -C build -j ${JOBS:-1}
DESTDIR=$PKG meson install -C build
# indirect rendering symlink
ln -s libGLX_mesa.so.0 $PKG/usr/lib/libGLX_indirect.so.0
2006-04-07 18:48:00 +02:00
}