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
|
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
|
2023-09-29 20:51:55 +02:00
|
|
|
# Optional: glslang libva-32 libvdpau-32 wayland-protocols
|
2012-11-21 11:12:43 -06:00
|
|
|
|
2020-07-22 17:54:19 -05:00
|
|
|
name=mesa-32
|
2024-01-11 16:34:35 +01:00
|
|
|
version=23.3.3
|
2023-09-29 20:51:55 +02:00
|
|
|
release=1
|
2020-11-10 00:27:04 +11:00
|
|
|
source=(https://archive.mesa3d.org/mesa-$version.tar.xz
|
2021-12-19 23:21:31 +11:00
|
|
|
x86-linux-gnu x86-linux-gnu-ccache)
|
2012-11-21 11:12:43 -06:00
|
|
|
|
|
|
|
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 23:21:31 +11:00
|
|
|
prt-get isinst ccache && local _cross_file='x86-linux-gnu-ccache' || local _cross_file='x86-linux-gnu'
|
2023-09-29 20:51:55 +02:00
|
|
|
prt-get isinst glslang && PKGMK_MESA+=' -D vulkan-drivers=auto -D vulkan-layers=device-select,intel-nullhw,overlay' || PKGMK_MESA+=' -D vulkan-drivers='
|
|
|
|
prt-get isinst libva-32 && PKGMK_MESA+=' -D gallium-va=enabled' || PKGMK_MESA+=' -D gallium-va=disabled'
|
2021-10-16 17:09:48 +11: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 17:09:48 +11: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-09-19 19:57:09 +02:00
|
|
|
|
2021-10-16 17:09:48 +11:00
|
|
|
meson setup mesa-$version build $PKGMK_MESA \
|
2021-12-19 23:21:31 +11:00
|
|
|
--cross-file=$SRC/$_cross_file \
|
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 \
|
2022-12-30 08:56:58 +00:00
|
|
|
-D b_lto=false \
|
2023-09-29 20:51:55 +02:00
|
|
|
-D b_pie=true \
|
2021-10-16 17:09:48 +11:00
|
|
|
-D dri3=enabled \
|
|
|
|
-D egl=enabled \
|
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-10-16 17:09:48 +11:00
|
|
|
-D glx=dri \
|
|
|
|
-D osmesa=true \
|
2020-12-18 22:49:40 +11:00
|
|
|
-D gallium-xa=enabled \
|
2023-09-29 20:51:55 +02:00
|
|
|
-D gallium-drivers=${PKGMK_MESA_GALLIUM}crocus,iris,nouveau,r300,r600,radeonsi,svga,swrast,virgl,i915 \
|
2021-10-16 17:09:48 +11: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 \
|
2021-10-16 17:09:48 +11:00
|
|
|
-D glvnd=true
|
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
|
2021-12-19 23:21:31 +11:00
|
|
|
rm -r $PKG/usr/{include,share/{drirc.d,glvnd}}
|
|
|
|
rm -rf $PKG/usr/{bin,share/vulkan/{explicit_layer.d,implicit_layer.d}}
|
2012-11-21 11:12:43 -06:00
|
|
|
}
|