xorg/mesa/Pkgfile

57 lines
1.9 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 glslang libdrm libglvnd llvm python3-mako xorg-libxdamage xorg-libxrandr xorg-libxshmfence xorg-libxvmc xorg-libxxf86vm
# Optional: libva libvdpau wayland-protocols
2006-04-07 18:48:00 +02:00
2020-07-22 14:21:45 +02:00
name=mesa
2023-02-09 11:04:25 +01:00
version=22.3.5
2022-07-02 15:58:25 +02:00
release=1
2022-12-30 09:41:21 +01:00
source=(https://archive.mesa3d.org/$name-$version.tar.xz
0001-anv-force-MEDIA_INTERFACE_DESCRIPTOR_LOAD-reemit-aft.patch)
2006-04-07 18:48:00 +02:00
build() {
prt-get isinst vulkan-loader && PKGMK_MESA_GALLIUM+='zink,'
prt-get isinst libvdpau && PKGMK_MESA+=' -D gallium-vdpau=enabled' || PKGMK_MESA+=' -D gallium-vdpau=disabled'
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'
CFLAGS+=' -mtls-dialect=gnu'
CXXFLAGS+=' -mtls-dialect=gnu'
2022-12-30 09:41:21 +01:00
patch -Np1 -d mesa-$version -i $SRC/0001-anv-force-MEDIA_INTERFACE_DESCRIPTOR_LOAD-reemit-aft.patch
meson setup build mesa-$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 \
2020-11-04 17:36:58 +01:00
-D vulkan-drivers=amd,intel \
-D vulkan-layers=device-select,intel-nullhw,overlay \
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
}