compat-32/mesa-32/Pkgfile

59 lines
2.4 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
2023-08-17 19:40:17 +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
# Optional: clang-32 glslang libclc libva-32 libvdpau-32 spirv-llvm-translator-32 vulkan-loader-32 wayland-protocols
2020-07-23 00:54:19 +02:00
name=mesa-32
version=24.1.3
2024-03-14 22:39:36 +01: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'
2023-09-29 20:51:55 +02:00
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'
prt-get isinst glslang spirv-llvm-translator-32 clang-32 && PKGMK_MESA+=' -D vulkan-drivers=auto -D vulkan-layers=device-select,intel-nullhw,overlay' || PKGMK_MESA+=' -D vulkan-drivers='
prt-get isinst libclc clang-32 && PKGMK_MESA_GALLIUM+='iris,'
2023-09-29 20:51:55 +02:00
prt-get isinst libva-32 && PKGMK_MESA+=' -D gallium-va=enabled' || PKGMK_MESA+=' -D gallium-va=disabled'
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'
2023-09-29 20:51:55 +02:00
prt-get isinst vulkan-loader-32 && PKGMK_MESA_GALLIUM+='zink,'
2021-10-16 08:09:48 +02:00
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 \
2022-12-30 09:56:58 +01:00
-D b_lto=false \
2023-09-29 20:51:55 +02:00
-D b_pie=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 \
2020-12-18 12:49:40 +01:00
-D gallium-xa=enabled \
2024-06-01 12:48:08 +02:00
-D gallium-drivers=${PKGMK_MESA_GALLIUM}crocus,nouveau,r300,r600,radeonsi,svga,swrast,virgl,i915 \
2021-10-16 08:09:48 +02:00
-D platforms=${PKGMK_MESA_PLATFORMS#,} \
-D shared-glapi=enabled \
2022-10-20 19:50:19 +02:00
-D video-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc \
-D glvnd=enabled
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}}
}