void-packages/srcpkgs/meson/template
2021-12-17 00:25:56 +01:00

47 lines
1.5 KiB
Bash

# Template file for 'meson'
pkgname=meson
version=0.60.2
revision=1
build_style=python3-module
hostmakedepends="python3-devel python3-setuptools"
depends="ninja python3-setuptools"
checkdepends="glib-devel gobject-introspection ninja
gcc-objc++ clang qt5-devel cmake llvm git pkg-config vala python-devel
cross-arm-linux-gnueabihf"
short_desc="Super fast build system"
maintainer="John <me@johnnynator.dev>"
license="Apache-2.0"
homepage="https://mesonbuild.com"
changelog="https://github.com/mesonbuild/meson/blob/master/docs/markdown/Release-notes-for-${version%.*}.0.md"
distfiles="https://github.com/mesonbuild/meson/releases/download/$version/$pkgname-$version.tar.gz"
checksum=64e6968565bf1b8152f4f9d6ca8154efb9e14caa9aabf7b22e71e6c5d053e921
# XXX: sanitizers aren't available on musl
if [ "$XBPS_TARGET_LIBC" = glibc ]; then
checkdepends+=" libsanitizer-devel"
fi
post_patch() {
if [ "$XBPS_TARGET_LIBC" = musl ]; then
vsed -e 's/test_pch_with_address_sanitizer/_&/' \
-e 's/test_generate_gir_with_address_sanitizer/_&/' \
-i run_unittests.py
fi
}
do_check() {
# meson depends on trillion of things to perform actual tests
# see checkdepends=() on arch
# 1 test still fails
( CC=gcc ./run_unittests.py )
}
post_install() {
vmkdir usr/share/vim/vimfiles
cp -rt ${DESTDIR}/usr/share/vim/vimfiles data/syntax-highlighting/vim/*/
vinstall data/syntax-highlighting/emacs/meson.el 644 usr/share/emacs/site-lisp
vcompletion data/shell-completions/bash/meson bash
vcompletion data/shell-completions/zsh/_meson zsh
}