| Name |
libGL.so.1 |
| Description |
Mesa libGL runtime libraries |
| Version |
25.1.9-r0 |
| Package Base |
mesa |
| Homepage |
https://www.mesa3d.org |
| Maintainers |
['Natanael Copa <ncopa@alpinelinux.org>'] |
| Contributors |
['David Heidelberg <david@ixit.cz>'] |
| Distro-repo |
https://gitlab.alpinelinux.org/alpine/aports/-/tree/3.22-stable/main/mesa |
| Sources |
[] |
| Dependencies |
[] |
| Optional-Dependencies |
[] |
| Build-Dependencies |
[] |
| Provides |
['so:libGL.so.1=1.2.0'] |
| Builddate |
27-08-2025 20:58:59 |
| Architecture |
x86_64 |
| Distro-Version |
v3.22 |
| Licenses |
['MIT AND SGI-B-2.0 AND BSL-1.0'] |
| Hash |
Q18S38NMOKh7CTLnL5cexHOIz38M8= |
# Contributor: David Heidelberg <david@ixit.cz>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mesa
pkgver=25.1.9
pkgrel=0
pkgdesc="Mesa DRI OpenGL library"
url="https://www.mesa3d.org"
arch="all"
license="MIT AND SGI-B-2.0 AND BSL-1.0"
subpackages="
$pkgname-dbg
$pkgname-dev
$pkgname-dri-gallium:_gallium
$pkgname-va-gallium:_va
$pkgname-vdpau-gallium:_vdpau
$pkgname-egl
$pkgname-gl
$pkgname-gles
$pkgname-xatracker
$pkgname-gbm
$pkgname-vulkan-ati:_vulkan
$pkgname-vulkan-swrast:_vulkan
$pkgname-vulkan-layers:_vulkan_layers
$pkgname-libd3dadapter9
"
_llvmver=20
depends_dev="
libdrm-dev
libxext-dev
libxdamage-dev
libxcb-dev
libxshmfence-dev
"
makedepends="
$depends_dev
binutils
bison
cbindgen
elfutils-dev
eudev-dev
expat-dev
findutils
flex
gettext
glslang-dev
libtool
libva-dev
libvdpau-dev
libx11-dev
libxfixes-dev
libxml2-dev
libxrandr-dev
libxxf86vm-dev
llvm$_llvmver-dev
meson
py3-cparser
py3-mako
py3-packaging
py3-ply
py3-yaml
python3
vulkan-loader-dev
wayland-dev
wayland-protocols
xorgproto
zlib-dev
zstd-dev
"
_paste_version="1.0.14"
_proc_macro2_version="1.0.86"
_quote_version="1.0.33"
_syn_version="2.0.68"
_unicode_ident_version="1.0.12"
source="
https://mesa.freedesktop.org/archive/mesa-${pkgver/_/-}.tar.xz
paste-$_paste_version.tar.gz::https://crates.io/api/v1/crates/paste/$_paste_version/download
proc-macro2-$_proc_macro2_version.tar.gz::https://crates.io/api/v1/crates/proc-macro2/$_proc_macro2_version/download
quote-$_quote_version.tar.gz::https://crates.io/api/v1/crates/quote/$_quote_version/download
syn-$_syn_version.tar.gz::https://crates.io/api/v1/crates/syn/$_syn_version/download
unicode-ident-$_unicode_ident_version.tar.gz::https://crates.io/api/v1/crates/unicode-ident/$_unicode_ident_version/download
23575.patch
riscv64-tls.patch
symbols-check-register-frame-info-bases.patch
"
builddir="$srcdir/mesa-${pkgver/_/-}"
_dri_driverdir=/usr/lib/dri
_gallium_drivers="r300,r600,radeonsi,nouveau,llvmpipe,virgl,zink"
_vulkan_drivers="amd,swrast"
_vulkan_layers="device-select,overlay"
# extra gallium per arch
case "$CARCH" in
x86*)
_gallium_drivers="$_gallium_drivers,svga,i915,iris,crocus"
;;
armhf|armv7)
_gallium_drivers="$_gallium_drivers,vc4,v3d,freedreno,lima,panfrost,etnaviv,tegra"
_gallium_drivers="${_gallium_drivers//r300,}"
;;
aarch64)
_gallium_drivers="$_gallium_drivers,vc4,v3d,freedreno,lima,panfrost,etnaviv,tegra,asahi"
_gallium_drivers="${_gallium_drivers//r300,}"
;;
riscv64|loongarch64)
_gallium_drivers="${_gallium_drivers//r300,}"
esac
# extra vulkan per arch
case "$CARCH" in
x86*)
_vulkan_drivers="$_vulkan_drivers,intel,intel_hasvk,nouveau"
_vulkan_layers="$_vulkan_layers,intel-nullhw"
subpackages="
$subpackages
$pkgname-vulkan-intel:_vulkan
$pkgname-vulkan-nouveau:_vulkan
"
;;
aarch64)
_vulkan_drivers="$_vulkan_drivers,asahi,broadcom,freedreno,panfrost"
subpackages="
$subpackages
$pkgname-vulkan-asahi:_vulkan
$pkgname-vulkan-broadcom:_vulkan
$pkgname-vulkan-freedreno:_vulkan
$pkgname-vulkan-panfrost:_vulkan
"
;;
esac
_intel_rt=disabled
case "$CARCH" in
x86_64) _intel_rt=enabled ;;
esac
case "$CARCH" in
x86)
# lto fails on x86 only
# mostly:
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21371
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21180
_lto=false
;;
*)
# ~5% smaller
# disable temporarily until resolved:
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/11846
_lto=false
;;
esac
case "$CARCH" in
armv7|aarch64|x86|x86_64)
_rusticl=true
makedepends="
$makedepends
clang$_llvmver-dev
libclc-dev~$_llvmver
rust
rust-bindgen
spirv-llvm-translator-dev
"
subpackages="
$subpackages
$pkgname-rusticl
"
;;
armhf)
# still requires clc for panfrost (https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32720)
makedepends="
$makedepends
clang$_llvmver-dev
libclc-dev~$_llvmver
rust
rust-bindgen
spirv-llvm-translator-dev
"
_rusticl=false
;;
*)
_rusticl=false
;;
esac
prepare() {
default_prepare
cd subprojects/
rm -f paste.wrap proc-macro2.wrap quote.wrap syn.wrap unicode-ident.wrap
mv "$srcdir/paste-$_paste_version" paste
mv "$srcdir/proc-macro2-$_proc_macro2_version" proc-macro2
mv "$srcdir/quote-$_quote_version" quote
mv "$srcdir/syn-$_syn_version" syn
mv "$srcdir/unicode-ident-$_unicode_ident_version" unicode-ident
cp packagefiles/paste/meson.build paste/
cp packagefiles/proc-macro2/meson.build proc-macro2/
cp packagefiles/quote/meson.build quote/
cp packagefiles/syn/meson.build syn/
cp packagefiles/unicode-ident/meson.build unicode-ident/
}
build() {
# use -g1 to generate less debug info:
# 485 MiB -> ~80 MiB
export CFLAGS="$CFLAGS -O2 -g1"
export CXXFLAGS="$CXXFLAGS -O2 -g1"
export CPPFLAGS="$CPPFLAGS -O2 -g1"
case "$CARCH" in
armhf|armv7)
# gnu2 tlsdesc is broken in binutils, see
# https://gitlab.alpinelinux.org/alpine/aports/-/issues/14140
# and
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/13236
export CFLAGS="$CFLAGS -mtls-dialect=gnu"
export CXXFLAGS="$CXXFLAGS -mtls-dialect=gnu"
;;
esac
PATH="$PATH:/usr/lib/llvm$_llvmver/bin" \
abuild-meson \
-Db_ndebug=true \
-Db_lto=$_lto \
-Dallow-kcmp=enabled \
-Dexpat=enabled \
-Dintel-rt=$_intel_rt \
-Dpower8=enabled \
-Dshader-cache=enabled \
-Dxlib-lease=enabled \
-Dxmlconfig=enabled \
-Dzstd=enabled \
-Dbackend_max_links=2 \
-Dbuild-tests=true \
-Ddri-drivers-path=$_dri_driverdir \
-Dgallium-drivers=$_gallium_drivers \
-Dvulkan-drivers=$_vulkan_drivers \
-Dvulkan-layers=$_vulkan_layers \
-Dplatforms=x11,wayland \
-Dllvm=enabled \
-Dshared-llvm=enabled \
-Dgbm=enabled \
-Dglx=dri \
-Dopengl=true \
-Dosmesa=false \
-Dgles1=enabled \
-Dgles2=enabled \
-Degl=enabled \
-Dgallium-extra-hud=true \
-Dgallium-nine=true \
-Dgallium-rusticl=$_rusticl \
-Dgallium-va=enabled \
-Dgallium-vdpau=enabled \
-Dgallium-xa=enabled \
-Drust_std=2021 \
-Dvideo-codecs=all \
. output
# Print config
meson configure --no-pager output
meson compile -C output
}
# Tests workarounds
case "$CARCH" in
armhf|armv7|riscv64|loongarch64|ppc64le)
# https://gitlab.alpinelinux.org/alpine/aports/-/issues/16525
_tests_opts="$_tests_opts --no-suite mesa:llvmpipe"
;;
s390x)
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/9507
# mesa:amd / ac_surface_modifier_test timeouts (CI perf issue I assume)
_tests_opts="$_tests_opts --no-suite mesa:gallium --no-suite mesa:llvmpipe --no-suite mesa:amd"
;;
esac
check() {
LC_ALL=C.UTF=8 meson test --print-errorlogs $_tests_opts -C output
}
package() {
provider_priority=100
DESTDIR="$pkgdir" meson install --no-rebuild -C output
}
egl() {
pkgdesc="Mesa libEGL runtime libraries"
depends="mesa=$pkgver-r$pkgrel"
provider_priority=100
amove usr/lib/libEGL.so*
}
gl() {
pkgdesc="Mesa libGL runtime libraries"
depends="mesa=$pkgver-r$pkgrel"
provider_priority=100
amove usr/lib/libGL.so*
}
gles() {
pkgdesc="Mesa libGLESv2 runtime libraries"
depends="mesa=$pkgver-r$pkgrel"
provider_priority=100
amove usr/lib/libGLES*.so*
}
xatracker() {
pkgdesc="Mesa XA state tracker for vmware"
depends="mesa=$pkgver-r$pkgrel"
provider_priority=100
amove usr/lib/libxatracker*.so.*
}
gbm() {
pkgdesc="Mesa gbm library"
depends="mesa=$pkgver-r$pkgrel"
provider_priority=100
amove usr/lib/libgbm.so.*
}
libd3dadapter9() {
pkgdesc="Mesa directx9 adapter"
depends="mesa=$pkgver-r$pkgrel"
provider_priority=100
amove usr/lib/d3d/d3dadapter9.so*
}
rusticl() {
pkgdesc="Mesa OpenCL driver"
depends="mesa=$pkgver-r$pkgrel clang$_llvmver-headers libclc~$_llvmver"
provider_priority=100
amove usr/lib/libRusticlOpenCL.so.*
amove etc/OpenCL/vendors/
}
# Move links referencing the same file to the subpackage.
# Usage: _mv_links <base directory> <example>
# where <example> is one of the libraries covered by the megadriver.
# The example is used to find other links that point to the same file.
_mv_links() {
install -d "$subpkgdir"/$1
find -L "$pkgdir"/$1 -samefile "$pkgdir"/$1/$2 -print0 \
| xargs -0 -I{} mv {} "$subpkgdir"/$1/
}
_mv_vulkan() {
local i
for i in "$@"; do
amove usr/lib/libvulkan_$i*.so
amove usr/share/vulkan/icd.d/${i}_*.*
done
}
# Mesa uses "megadrivers" where multiple drivers are linked into one shared
# library. This library is then hard-linked to separate files (one for each driver).
# Each subpackage contains one megadriver so that all the hard-links are preserved.
_gallium() {
pkgdesc="Mesa gallium DRI drivers"
depends="mesa=$pkgver-r$pkgrel"
provider_priority=100
# libgallium_dri.so
_mv_links $_dri_driverdir swrast_dri.so
}
_va() {
local n=${subpkgname##*-va-}
pkgdesc="Mesa $n VAAPI drivers"
depends="mesa=$pkgver-r$pkgrel libva"
provider_priority=100
case $n in
gallium)
# libgallium_drv_video.so
_mv_links /usr/lib/dri radeonsi_drv_video.so ;;
esac
}
_vdpau() {
local n=${subpkgname##*-vdpau-}
pkgdesc="Mesa $n VDPAU drivers"
depends="mesa=$pkgver-r$pkgrel libvdpau"
provider_priority=100
case $n in
gallium)
# libvdpau_gallium.so.1.0.0
_mv_links /usr/lib/vdpau libvdpau_radeonsi.so.1.0.0 ;;
esac
}
_vulkan() {
local n=${subpkgname##*-vulkan-}
pkgdesc="Mesa Vulkan API driver for $n"
depends="mesa=$pkgver-r$pkgrel"
provider_priority=100
case $n in
ati)
_mv_vulkan radeon ;;
asahi)
_mv_vulkan asahi ;;
intel)
_mv_vulkan intel ;;
broadcom)
_mv_vulkan broadcom ;;
freedreno)
_mv_vulkan freedreno ;;
nouveau)
_mv_vulkan nouveau ;;
panfrost)
_mv_vulkan panfrost ;;
swrast)
_mv_vulkan lvp ;;
esac
}
_vulkan_layers() {
pkgdesc="collection of vulkan layers from mesa"
depends="python3"
provider_priority=100
# Remove this after the release of the next stable (3.14)
# it originally was claed layer as it only packaged the
# overlay one but now it also packages device-select and
# intel-nullhw (on x86*)
provides="$pkgname-vulkan-layer=$pkgver-r$pkgrel"
provider_priority=100
replaces="$pkgname-vulkan-layer=$pkgver-r$pkgrel"
amove usr/share/vulkan/explicit_layer.d
amove usr/share/vulkan/implicit_layer.d
amove usr/lib/libVkLayer_*.so
amove usr/bin/mesa-overlay-control.py
}
sha512sums="
27d7202968f5639dda590d3647d72c6857cac74031e273edd651fc8ed7f04bda335bccd8a65a961cec368d45d6fe20d004b5375f095266459074f4bc74f5ed98 mesa-25.1.9.tar.xz
3a793f0e5e773a7f7defc798a4c17ae9a40d715144632ea6cb0a8c785e14c4212046491df016bb9838281f8eaf327a79f01c1e2ac5f26785c028bc880faff9ee paste-1.0.14.tar.gz
1cdb7e22a35ae231d880c9420784c9acf97bda2db258b3d34aae5061dc1858449defe19a49e12c6a4173906aa72a4115059ac2db0fc760205fd2ab8b5b414434 proc-macro2-1.0.86.tar.gz
c1e76c3c017e8554eebe309f8167fd56fce931981c06798aa85a0cc6d64a9cba6ab103f5a1324e69c6f9ca5dc47a8e31ff2e847850542748697afcd265b5939c quote-1.0.33.tar.gz
7b781f8ea2b0d01c06f47d165da99cd96e3b44a33de1d77c78a2cb37ebe3f8304f426ba3d0d1cf766241dcc0537908774504df7d455d63bf89ec22ac0499d372 syn-2.0.68.tar.gz
bc1824e1e4452a40732fc69874d7e1a66f7803717a314790dcf48867eba34bc9441331ef031e386912e52c385645c25b6ed39d4f149973b5b97371b1b96b1920 unicode-ident-1.0.12.tar.gz
4cfd6532a96103589efd885240ce12414b473aed05956507e0b78a46e44216974adac1a8dc22db0d185e6c8a98988ebaed79ac0e83156c75a41199591f52f944 23575.patch
ce1887fb7d425b94c375a0547bee40c308809c01f5ce1bcddabcc69a7fcb445efb9d5f5c7bac49b2778ab40687c7bce204d278b0bf028d124c75e59083107fba riscv64-tls.patch
aa2d92716367e90495a7ba10b414445280a772b0065f29ae2d427ea609f75c3eaac93235004307204deee211fd02350c8e94e9ca2ccce814b64a9ac94ef77542 symbols-check-register-frame-info-bases.patch
"