summaryrefslogtreecommitdiff
path: root/mesa-32/Pkgfile
blob: c4bdc8e5136cdf405d3720bc03300cfbd46f9702 (plain)
    1 # Description: Mesa 3D Graphics Library
    2 # URL: https://www.mesa3d.org/
    3 # Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
    4 # Depends on: elfutils-32 expat-32 libdrm-32 libglvnd-32 llvm-32 mesa xorg-libxdamage-32 xorg-libxrandr-32 xorg-libxshmfence-32 xorg-libxvmc-32 xorg-libxxf86vm-32 zstd-32
    5 # Optional: libva libvdpau-32 wayland-protocols
    6 
    7 name=mesa-32
    8 version=22.3.2
    9 release=1
   10 source=(https://archive.mesa3d.org/mesa-$version.tar.xz
   11 	x86-linux-gnu x86-linux-gnu-ccache)
   12 
   13 build() {
   14 	export PKG_CONFIG_LIBDIR='/usr/lib32/pkgconfig:/usr/share/pkgconfig'
   15 	prt-get isinst vulkan-loader-32 && PKGMK_MESA_GALLIUM+='zink,'
   16 	prt-get isinst ccache && local _cross_file='x86-linux-gnu-ccache' || local _cross_file='x86-linux-gnu'
   17 	prt-get isinst libvdpau-32 && PKGMK_MESA+=' -D gallium-vdpau=enabled' || PKGMK_MESA+=' -D gallium-vdpau=disabled'
   18 	prt-get isinst wayland-protocols && PKGMK_MESA_PLATFORMS+='wayland'
   19 	## for future references
   20 	#prt-get isinst xorg-libxdamage-32 xorg-libxrandr-32 xorg-libxshmfence-32 xorg-libxvmc-32 xorg-libxxf86vm-32 && PKGMK_MESA_PLATFORMS+=',x11'
   21 	PKGMK_MESA_PLATFORMS+=',x11'
   22 
   23 	meson setup mesa-$version build $PKGMK_MESA \
   24 		--cross-file=$SRC/$_cross_file \
   25 		--prefix=/usr \
   26 		--libdir=/usr/lib32 \
   27 		--sysconfdir=/etc \
   28 		--buildtype=plain \
   29 		--wrap-mode nodownload \
   30 		-D b_lto=false \
   31 		-D dri3=enabled \
   32 		-D egl=enabled \
   33 		-D llvm=enabled \
   34 		-D shared-llvm=enabled \
   35 		-D gbm=enabled \
   36 		-D gles1=disabled \
   37 		-D gles2=enabled \
   38 		-D glx=dri \
   39 		-D osmesa=true \
   40 		-D osmesa=true \
   41 		-D gallium-xa=enabled \
   42 		-D gallium-drivers=${PKGMK_MESA_GALLIUM}crocus,iris,nouveau,r300,r600,radeonsi,svga,swrast,virgl \
   43 		-D platforms=${PKGMK_MESA_PLATFORMS#,} \
   44 		-D shared-glapi=enabled \
   45 		-D vulkan-drivers=amd,intel \
   46 		-D vulkan-layers=device-select,intel-nullhw,overlay \
   47 		-D video-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc \
   48 		-D glvnd=true
   49 
   50 	meson compile -C build -j ${JOBS:-1}
   51 	DESTDIR=$PKG meson install -C build
   52 
   53 	# indirect rendering symlink
   54 	ln -s libGLX_mesa.so.0 $PKG/usr/lib32/libGLX_indirect.so.0
   55 	rm -r $PKG/usr/{include,share/{drirc.d,glvnd}}
   56 	rm -rf $PKG/usr/{bin,share/vulkan/{explicit_layer.d,implicit_layer.d}}
   57 }

Generated by cgit