blob: c2a2d2d19456c8591d6d394083054e8e5b86e819 (
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 libvdpau-32 llvm-32 mesa xorg-libxdamage-32 xorg-libxrandr-32 xorg-libxshmfence-32 xorg-libxvmc-32 xorg-libxxf86vm-32 zstd-32
5 # Optional: glslang-32 wayland-32 wayland-protocols
6
7 name=mesa-32
8 version=21.2.1
9 release=1
10 source=(https://archive.mesa3d.org/mesa-$version.tar.xz
11 x86-linux-gnu)
12
13 build() {
14 prt-get isinst wayland-32 wayland-protocols && PKGMK_MESA_PLATFORMS+=',wayland'
15 prt-get isinst glslang-32 && PKGMK_MESA_PLATFORMS+=' -D vulkan-overlay-layer=true -D vulkan-device-select-layer=true'
16
17 meson setup mesa-$version build $PKGMK_MESA3D \
18 --cross-file=$SRC/x86-linux-gnu \
19 --prefix=/usr \
20 --libdir=/usr/lib32 \
21 --sysconfdir=/etc \
22 --buildtype=plain \
23 --wrap-mode nodownload \
24 -D b_lto=true \
25 -D b_pie=true \
26 -D llvm=enabled \
27 -D shared-llvm=enabled \
28 -D gbm=enabled \
29 -D gles1=disabled \
30 -D gles2=enabled \
31 -D osmesa=true \
32 -D platforms=x11$PKGMK_MESA_PLATFORMS \
33 -D gallium-xa=enabled \
34 -D gallium-vdpau=enabled \
35 -D gallium-drivers=r300,r600,svga,swrast,radeonsi,nouveau,iris,virgl \
36 -D vulkan-drivers=amd,intel \
37 -D glvnd=true \
38 -D dri3=enabled \
39 -D egl=enabled
40
41 meson compile -C build -j ${JOBS:-1}
42 DESTDIR=$PKG meson install -C build
43
44 # indirect rendering symlink
45 ln -s libGLX_mesa.so.0 $PKG/usr/lib32/libGLX_indirect.so.0
46
47 rm -r $PKG/usr/{include,share/{drirc.d,glvnd}}
48 }
|