2012-11-21 11:12:43 -06:00
|
|
|
# Description: Mesa 3D Graphics Library
|
2017-03-02 22:20:48 +11:00
|
|
|
# URL: https://www.mesa3d.org/
|
2013-02-02 01:54:23 +11:00
|
|
|
# Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
|
2021-05-07 00:54:38 +10:00
|
|
|
# Depends on: elfutils-32 expat-32 libdrm-32 libglvnd-32 libvdpau-32 llvm-32 mesa xorg-libxdamage-32 xorg-libxrandr-32 xorg-libxshmfence-32 xorg-libxvmc-32 xorg-libxxf86vm-32 zstd-32
|
2021-09-20 22:57:41 +10:00
|
|
|
# Optional: glslang wayland-32 wayland-protocols
|
2012-11-21 11:12:43 -06:00
|
|
|
|
2020-07-22 17:54:19 -05:00
|
|
|
name=mesa-32
|
2021-09-24 22:45:47 +10:00
|
|
|
version=21.2.2
|
2019-11-15 10:15:51 -06:00
|
|
|
release=1
|
2020-11-10 00:27:04 +11:00
|
|
|
source=(https://archive.mesa3d.org/mesa-$version.tar.xz
|
2021-09-26 19:40:07 +10:00
|
|
|
x86-linux-gnu
|
|
|
|
gallium-llvm13.patch)
|
2012-11-21 11:12:43 -06:00
|
|
|
|
|
|
|
build() {
|
2021-09-19 19:57:09 +02:00
|
|
|
prt-get isinst wayland-32 wayland-protocols && PKGMK_MESA_PLATFORMS+=',wayland'
|
2021-09-20 22:57:41 +10:00
|
|
|
prt-get isinst glslang && PKGMK_MESA_PLATFORMS+=' -D vulkan-overlay-layer=true -D vulkan-device-select-layer=true'
|
2021-09-19 19:57:09 +02:00
|
|
|
|
2021-09-26 19:40:07 +10:00
|
|
|
patch -d mesa-$version -p1 -i $SRC/gallium-llvm13.patch
|
|
|
|
|
2021-09-19 19:57:09 +02:00
|
|
|
meson setup mesa-$version build $PKGMK_MESA3D \
|
2019-05-26 22:11:28 +10:00
|
|
|
--cross-file=$SRC/x86-linux-gnu \
|
2013-11-23 20:16:25 +11:00
|
|
|
--prefix=/usr \
|
2012-11-21 11:12:43 -06:00
|
|
|
--libdir=/usr/lib32 \
|
2019-05-26 22:11:28 +10:00
|
|
|
--sysconfdir=/etc \
|
2020-11-10 00:27:04 +11:00
|
|
|
--buildtype=plain \
|
2021-09-19 19:57:09 +02:00
|
|
|
--wrap-mode nodownload \
|
|
|
|
-D b_lto=true \
|
|
|
|
-D b_pie=true \
|
2021-01-03 01:20:30 +11:00
|
|
|
-D llvm=enabled \
|
2020-12-18 22:49:40 +11:00
|
|
|
-D shared-llvm=enabled \
|
2021-01-03 01:20:30 +11:00
|
|
|
-D gbm=enabled \
|
2021-09-19 19:57:09 +02:00
|
|
|
-D gles1=disabled \
|
2021-01-03 01:20:30 +11:00
|
|
|
-D gles2=enabled \
|
2021-04-11 01:26:27 +10:00
|
|
|
-D osmesa=true \
|
2021-09-19 19:57:09 +02:00
|
|
|
-D platforms=x11$PKGMK_MESA_PLATFORMS \
|
2020-12-18 22:49:40 +11:00
|
|
|
-D gallium-xa=enabled \
|
|
|
|
-D gallium-vdpau=enabled \
|
2021-08-20 14:23:00 -05:00
|
|
|
-D gallium-drivers=r300,r600,svga,swrast,radeonsi,nouveau,iris,virgl \
|
2020-11-10 00:27:04 +11:00
|
|
|
-D vulkan-drivers=amd,intel \
|
2021-09-19 19:57:09 +02:00
|
|
|
-D glvnd=true \
|
|
|
|
-D dri3=enabled \
|
|
|
|
-D egl=enabled
|
2019-05-26 22:11:28 +10:00
|
|
|
|
2020-11-10 00:27:04 +11:00
|
|
|
meson compile -C build -j ${JOBS:-1}
|
|
|
|
DESTDIR=$PKG meson install -C build
|
2014-03-19 12:57:26 +11:00
|
|
|
|
2018-08-15 21:18:43 +10:00
|
|
|
# indirect rendering symlink
|
|
|
|
ln -s libGLX_mesa.so.0 $PKG/usr/lib32/libGLX_indirect.so.0
|
|
|
|
|
2018-12-17 00:18:58 +11:00
|
|
|
rm -r $PKG/usr/{include,share/{drirc.d,glvnd}}
|
2012-11-21 11:12:43 -06:00
|
|
|
}
|