void-packages/srcpkgs/libglvnd/template

52 lines
1.5 KiB
Bash

# Template file for 'libglvnd'
pkgname=libglvnd
version=1.3.2
revision=2
wrksrc="libglvnd-v${version}"
build_style=meson
hostmakedepends="pkg-config"
makedepends="libXext-devel libX11-devel xorgproto"
checkdepends="xvfb-run"
short_desc="GL Vendor-Neutral Dispatch library"
maintainer="Stefano Ragni <st3r4g@protonmail.com>"
license="custom:MIT-alike"
homepage="https://gitlab.freedesktop.org/glvnd/libglvnd"
distfiles="https://gitlab.freedesktop.org/glvnd/libglvnd/-/archive/v${version}/libglvnd-v${version}.tar.gz"
checksum=6332c27f4c792b09a3eb1d7ae18c2d6ff6a0acaf3a746489caf859e659fca2f7
provides="libGL-7.11_1 libEGL-7.11_1 libGLES-7.11_1"
replaces="libGL>=0 libEGL>=0 libGLES>=0"
# Disable TLS with musl: https://bugs.freedesktop.org/show_bug.cgi?id=35268
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
configure_args="-Dtls=disabled"
fi
# ppc64_tsd (used when ppc64_tls is not available)
# is broken with threads, so disable it on musl
case "$XBPS_TARGET_MACHINE" in
ppc*-musl) configure_args+=" -Dasm=disabled";;
ppc64*) ;;
arm*|mips*|ppc*) configure_args+=" -Dasm=disabled";;
esac
do_check() {
xvfb-run ninja -C build test
}
post_install() {
grep -A 25 "Copyright (c) 2013, NVIDIA CORPORATION." README.md > LICENSE
vlicense LICENSE
}
libglvnd-devel_package() {
depends="${makedepends} ${sourcepkg}-${version}_${revision}"
conflicts="MesaLib-devel<19.2.5_2"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
}
}