summaryrefslogtreecommitdiff
path: root/mesa/Pkgfile
blob: 2a8a2dcf2c884a841e714b5fe31edc86aa5abc9d (plain)
    1 # Description: Mesa 3D Graphics Library
    2 # URL: https://www.mesa3d.org/
    3 # Maintainer: CRUX Xorg Team, xorg-ports at crux dot nu
    4 # Depends on: elfutils libdrm libglvnd llvm python3-mako xorg-libxdamage xorg-libxrandr xorg-libxshmfence xorg-libxvmc xorg-libxxf86vm
    5 # Optional: libva libvdpau wayland-protocols
    6 
    7 name=mesa
    8 version=22.0.3
    9 release=1
   10 source=(https://archive.mesa3d.org/$name-$version.tar.xz)
   11 
   12 build() {
   13 	prt-get isinst glslang && PKGMK_MESA+=' -D vulkan-layers=device-select,intel-nullhw,overlay'
   14 	prt-get isinst libvdpau && PKGMK_MESA+=' -D gallium-vdpau=enabled' || PKGMK_MESA+=' -D gallium-vdpau=disabled'
   15 	prt-get isinst wayland-protocols && PKGMK_MESA_PLATFORMS+='wayland'
   16 	## for future references
   17 	#prt-get isinst xorg-libxdamage xorg-libxrandr xorg-libxshmfence xorg-libxvmc xorg-libxxf86vm && PKGMK_MESA_PLATFORMS+=',x11'
   18 	PKGMK_MESA_PLATFORMS+=',x11'
   19 
   20 	meson setup build mesa-$version $PKGMK_MESA \
   21 		--prefix=/usr \
   22 		--sysconfdir=/etc \
   23 		--buildtype=plain \
   24 		--wrap-mode nodownload \
   25 		-D b_lto=true \
   26 		-D b_pie=true \
   27 		-D dri3=enabled \
   28 		-D egl=enabled \
   29 		-D llvm=enabled \
   30 		-D shared-llvm=enabled \
   31 		-D gbm=enabled \
   32 		-D gles1=disabled \
   33 		-D gles2=enabled \
   34 		-D glx=dri \
   35 		-D osmesa=true \
   36 		-D gallium-xa=enabled \
   37 		-D gallium-drivers=r300,r600,svga,swrast,radeonsi,nouveau,iris,virgl,crocus \
   38 		-D platforms=${PKGMK_MESA_PLATFORMS#,} \
   39 		-D shared-glapi=enabled \
   40 		-D vulkan-drivers=amd,intel \
   41 		-D glvnd=true
   42 
   43 	meson compile -C build -j ${JOBS:-1}
   44 	DESTDIR=$PKG meson install -C build
   45 
   46 	# indirect rendering symlink
   47 	ln -s libGLX_mesa.so.0 $PKG/usr/lib/libGLX_indirect.so.0
   48 }

Generated by cgit