compat-32/mesa-32/Pkgfile

55 lines
1.9 KiB
Plaintext
Raw Normal View History

# Description: Mesa 3D Graphics Library
2017-03-02 12:20:48 +01:00
# URL: https://www.mesa3d.org/
# Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
2021-10-16 08:09:48 +02:00
# 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
# Optional: libva libvdpau-32 wayland-protocols
2020-07-23 00:54:19 +02:00
name=mesa-32
2021-11-25 10:40:02 +01:00
version=21.2.6
2019-11-15 17:15:51 +01:00
release=1
2020-11-09 14:27:04 +01:00
source=(https://archive.mesa3d.org/mesa-$version.tar.xz
2021-10-16 08:09:48 +02:00
x86-linux-gnu)
build() {
2021-09-30 23:02:43 +02:00
export PKG_CONFIG_LIBDIR='/usr/lib32/pkgconfig:/usr/share/pkgconfig'
2021-10-16 08:09:48 +02:00
prt-get isinst glslang && PKGMK_MESA+=' -D vulkan-layers=device-select,intel-nullhw,overlay'
prt-get isinst libvdpau-32 && 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-32 xorg-libxrandr-32 xorg-libxshmfence-32 xorg-libxvmc-32 xorg-libxxf86vm-32 && PKGMK_MESA_PLATFORMS+=',x11'
PKGMK_MESA_PLATFORMS+=',x11'
2021-10-16 08:09:48 +02:00
meson setup mesa-$version build $PKGMK_MESA \
2019-05-26 14:11:28 +02:00
--cross-file=$SRC/x86-linux-gnu \
--prefix=/usr \
--libdir=/usr/lib32 \
2019-05-26 14:11:28 +02:00
--sysconfdir=/etc \
2020-11-09 14:27:04 +01:00
--buildtype=plain \
--wrap-mode nodownload \
-D b_lto=true \
2021-10-16 08:09:48 +02:00
-D dri3=enabled \
-D egl=enabled \
2021-01-02 15:20:30 +01:00
-D llvm=enabled \
2020-12-18 12:49:40 +01:00
-D shared-llvm=enabled \
2021-01-02 15:20:30 +01:00
-D gbm=enabled \
-D gles1=disabled \
2021-01-02 15:20:30 +01:00
-D gles2=enabled \
2021-10-16 08:09:48 +02:00
-D glx=dri \
-D osmesa=true \
2021-04-10 17:26:27 +02:00
-D osmesa=true \
2020-12-18 12:49:40 +01:00
-D gallium-xa=enabled \
2021-08-20 21:23:00 +02:00
-D gallium-drivers=r300,r600,svga,swrast,radeonsi,nouveau,iris,virgl \
2021-10-16 08:09:48 +02:00
-D platforms=${PKGMK_MESA_PLATFORMS#,} \
-D shared-glapi=enabled \
2020-11-09 14:27:04 +01:00
-D vulkan-drivers=amd,intel \
2021-10-16 08:09:48 +02:00
-D glvnd=true
2019-05-26 14:11:28 +02:00
2020-11-09 14:27:04 +01:00
meson compile -C build -j ${JOBS:-1}
DESTDIR=$PKG meson install -C build
2014-03-19 02:57:26 +01:00
2018-08-15 13:18:43 +02:00
# indirect rendering symlink
ln -s libGLX_mesa.so.0 $PKG/usr/lib32/libGLX_indirect.so.0
rm -r $PKG/usr/{bin,include,share/{drirc.d,glvnd,vulkan/{explicit_layer.d,implicit_layer.d}}} || true
}