wok-current view mesa/receipt @ rev 25710

Build full mesa features and split it
author Stanislas Leduc <shann@slitaz.org>
date Mon Jun 10 19:04:54 2024 +0000 (3 weeks ago)
parents 91035b7cc264
children 5f3c47fa6c89
line source
1 # SliTaz package receipt.
3 PACKAGE="mesa"
4 VERSION="21.3.5"
5 CATEGORY="meta"
6 SHORT_DESC="3D Graphics Library that is an open-source implementaton of OpenGL."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="MIT"
9 SOURCE="mesa"
10 TARBALL="$SOURCE-$VERSION.tar.xz"
11 WEB_SITE="https://www.mesa3d.org/"
12 WGET_URL="https://archive.mesa3d.org/$TARBALL"
13 PROVIDE="mesa"
15 DEPENDS="expat libdrm xorg-libXdamage xorg-libXxf86vm xorg-libXt \
16 xorg-libxshmfence udev" #libpthread-stubs
18 DEPENDS="libegl-mesa libgbm-mesa libglapi-mesa libglx-mesa \
19 libopencl-mesa libos-mesa libxvmc-mesa libxatracker-mesa mesa-vulkan"
21 BUILD_DEPENDS="expat-dev libdrm-dev xorg-libXdamage-dev pkg-config \
22 xorg-libXxf86vm-dev xorg-libXt-dev xorg-libXvMC-dev xorg-libXv-dev \
23 xorg-dri2proto xorg-glproto talloc xorg-makedepend lesstif-dev \
24 libxml2-python xorg-imake xorg-libxshmfence-dev udev-dev file \
25 xorg-libpciaccess-dev libtool meson054 llvm python3-mako libvdpau-dev \
26 elfutils-dev libglvnd-dev directx-headers libclc libva-dev clang polly cmake"
27 # libpthread-stubs-dev xorg-dri3proto xorg-presentproto
29 # What is the latest version available today?
30 current_version()
31 {
32 wget -O - 'https://gitlab.freedesktop.org/mesa/mesa/-/tags?sort=updated_desc&search=mesa-7' 2>/dev/null | \
33 sed '/item-title/!d;/-rc/d;s|.*">[a-z-]*||;s|<.*||;q'
34 }
36 # Rules to configure and make the package.
37 compile_rules()
38 {
39 DRI_DRIVERS="i915,i965,r100,r200,nouveau"
40 GALLIUM_DRIVERS="nouveau,r300,r600,svga,radeonsi,swrast,virgl,iris,crocus,d3d12"
42 # Use meson 0.54, issue with meson 0.62
43 # see https://gitlab.freedesktop.org/mesa/mesa/-/issues/5576
45 # use CFLAGS with arch i586 instead i486
46 # see https://bugs.freedesktop.org/show_bug.cgi?id=93089
47 export CFLAGS="-march=i586 -Os -pipe -fomit-frame-pointer"
48 export CXXFLAGS="$CFLAGS"
49 VULKAN_DRIVERS="amd,intel,swrast"
51 meson _build \
52 --prefix=/usr \
53 --libdir=lib \
54 --bindir=/usr/bin \
55 --sbindir=/usr/sbin \
56 --buildtype=release \
57 -Dplatforms=x11 \
58 -Ddri-drivers=$DRI_DRIVERS \
59 -Dgallium-drivers=$GALLIUM_DRIVERS \
60 -Dgallium-nine=true \
61 -Dgallium-opencl=icd \
62 -Dvulkan-drivers=$VULKAN_DRIVERS \
63 -Dvulkan-layers=device-select \
64 -Dglvnd=true \
65 -Dllvm=enabled \
66 -Dshared-llvm=enabled \
67 -Dshared-glapi=enabled \
68 -Degl=enabled \
69 -Dgles1=enabled \
70 -Dgles2=enabled \
71 -Dopengl=true \
72 -Dosmesa=true \
73 -Dglx=dri \
74 -Dstrip=true
76 ninja -C _build
77 DESTDIR=$install ninja -C _build install
78 }
80 # Rules to gen a SliTaz package suitable for Tazpkg.
81 genpkg_rules()
82 {
83 mkdir -p $fs/usr/lib
84 cp -a $install/usr/lib/*.so* $fs/usr/lib
86 # Remove libs provide by others mesa split
87 rm $fs/usr/lib/libEGL*.so* $fs/usr/lib/libGLX*.so*
88 rm $fs/usr/lib/libOS*.so* $fs/usr/lib/libglapi.so*
89 rm $fs/usr/lib/libvulkan*.so* $fs/usr/lib/libVk*.so*
90 rm $fs/usr/lib/libgbm.so* $fs/usr/lib/libxatracker.so*
91 rm $fs/usr/lib/lib*OpenCL* $fs/usr/lib/libXvMC*.so*
92 }