Source
FROM stagex/pallet-gcc-meson-busybox AS build
ARG VERSION
COPY --from=stagex/pallet-rust . /
COPY --from=stagex/pallet-clang-cmake-busybox . /
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-samurai . /
COPY --from=stagex/core-binutils . /
COPY --from=stagex/core-bison . /
COPY --from=stagex/core-rust-bindgen . /
COPY --from=stagex/user-eudev . /
COPY --from=stagex/core-expat . /
COPY --from=stagex/core-llvm . /
COPY --from=stagex/core-findutils . /
COPY --from=stagex/core-flex . /
COPY --from=stagex/core-gettext . /
COPY --from=stagex/core-rust . /
COPY --from=stagex/user-elfutils . /
COPY --from=stagex/user-libvdpau . /
COPY --from=stagex/user-glslang . /
COPY --from=stagex/core-libtool . /
COPY --from=stagex/user-libxfixes . /
COPY --from=stagex/user-libva . /
COPY --from=stagex/core-libxml2 . /
COPY --from=stagex/user-libxrandr . /
COPY --from=stagex/user-libxrender . /
COPY --from=stagex/user-libxxf86vm . /
COPY --from=stagex/core-llvm . /
COPY --from=stagex/user-py-cparser . /
COPY --from=stagex/user-py-mako . /
COPY --from=stagex/user-py-markupsafe . /
COPY --from=stagex/user-py-pygments . /
COPY --from=stagex/core-py-packaging . /
COPY --from=stagex/user-py-ply . /
COPY --from=stagex/user-py-yaml . /
COPY --from=stagex/core-python . /
COPY --from=stagex/user-vulkan-headers . /
COPY --from=stagex/user-vulkan-loader . /
COPY --from=stagex/user-wayland . /
COPY --from=stagex/user-wayland-protocols . /
COPY --from=stagex/core-zlib . /
COPY --from=stagex/core-libzstd . /
COPY --from=stagex/user-libclc . /
COPY --from=stagex/user-libxdamage . /
COPY --from=stagex/user-libdrm . /
COPY --from=stagex/user-libxext . /
COPY --from=stagex/user-libxcb . /
COPY --from=stagex/user-libx11 . /
COPY --from=stagex/user-xorgproto . /
COPY --from=stagex/user-libxdmcp . /
COPY --from=stagex/user-libxau . /
COPY --from=stagex/user-libxshmfence . /
COPY --from=stagex/user-libpciaccess . /
COPY --from=stagex/user-spirv-llvm-translator . /
COPY --from=stagex/user-spirv-tools . /
COPY --from=stagex/user-spirv-headers . /
ADD fetch/mesa-${VERSION}.tar.xz .
WORKDIR /mesa-${VERSION}
RUN --network=none <<-EOF
set -eux
meson env2mfile \
--native \
--system=linux \
--cpu-family=$(uname -m) \
--cpu=$(uname -m) \
--endian=little \
-o meson.cross
meson setup \
-Db_ndebug=true \
-Db_lto=false \
-Dallow-kcmp=enabled \
-Dexpat=enabled \
-Dintel-rt=enabled \
-Dpower8=enabled \
-Dshader-cache=enabled \
-Dxlib-lease=enabled \
-Dxmlconfig=enabled \
-Dzstd=enabled \
-Dbackend_max_links=2 \
-Dbuild-tests=true \
-Ddri-drivers-path=/usr/lib/dri \
-Dgallium-drivers=r300,r600,radeonsi,nouveau,llvmpipe,virgl,zink,svga,i915,iris,crocus \
-Dvulkan-drivers=amd,swrast,intel,intel_hasvk \
-Dvulkan-layers=device-select,overlay,intel-nullhw \
-Dplatforms=x11,wayland \
-Dllvm=enabled \
-Dshared-llvm=enabled \
-Dshared-glapi=enabled \
-Dgbm=enabled \
-Dglx=dri \
-Dopengl=true \
-Dosmesa=true \
-Dgles1=enabled \
-Dgles2=enabled \
-Degl=enabled \
-Dgallium-extra-hud=true \
-Dgallium-nine=true \
-Dgallium-rusticl=true \
-Dgallium-va=enabled \
-Dgallium-vdpau=enabled \
-Dgallium-xa=enabled \
-Drust_std=2021 \
-Dvideo-codecs=all \
. output || { cat /mesa-24.3.4/output/meson-logs/meson-log.txt && exit;}
meson configure --no-pager output
meson compile -C output
DESTDIR=/rootfs meson install --no-rebuild -C output
EOF
FROM scratch AS package-osmesa
COPY --from=stagex/core-busybox . /
COPY --from=build /rootfs/usr/local/lib/libOSMesa.so* /usr/lib/
RUN mkdir -p /usr/lib/pkgconfig/
COPY --from=build /rootfs/usr/local/lib/pkgconfig/* /usr/lib/pkgconfig/
FROM stagex/core-filesystem AS package-mesa
COPY --from=build /rootfs/ /