compat-32/mesa-32/Pkgfile

58 lines
2.1 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
2023-08-03 22:37:11 +02:00
version=23.1.5
2023-05-27 10:34:22 +02:00
release=1
2020-11-09 14:27:04 +01:00
source=(https://archive.mesa3d.org/mesa-$version.tar.xz
2021-12-19 13:21:31 +01:00
x86-linux-gnu x86-linux-gnu-ccache)
build() {
2021-09-30 23:02:43 +02:00
export PKG_CONFIG_LIBDIR='/usr/lib32/pkgconfig:/usr/share/pkgconfig'
prt-get isinst vulkan-loader-32 && PKGMK_MESA_GALLIUM+='zink,'
2021-12-19 13:21:31 +01:00
prt-get isinst ccache && local _cross_file='x86-linux-gnu-ccache' || local _cross_file='x86-linux-gnu'
2021-10-16 08:09:48 +02:00
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 \
2021-12-19 13:21:31 +01:00
--cross-file=$SRC/$_cross_file \
--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 \
2022-12-30 09:56:58 +01:00
-D b_lto=false \
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 \
-D gallium-drivers=${PKGMK_MESA_GALLIUM}crocus,iris,nouveau,r300,r600,radeonsi,svga,swrast,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 \
2022-09-27 11:20:44 +02:00
-D vulkan-layers=device-select,intel-nullhw,overlay \
2022-10-20 19:50:19 +02:00
-D video-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc \
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
2021-12-19 13:21:31 +01:00
rm -r $PKG/usr/{include,share/{drirc.d,glvnd}}
rm -rf $PKG/usr/{bin,share/vulkan/{explicit_layer.d,implicit_layer.d}}
}