void-packages/srcpkgs/meson/template
Đoàn Trần Công Danh 765e304c4b srcpkgs/m*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

55 lines
1.7 KiB
Bash

# Template file for 'meson'
pkgname=meson
reverts="0.58.1_1"
version=0.56.2
revision=2
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=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4
# 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/*/
for dir in ftdetect ftplugin indent syntax; do
nvim_runtime_dir="usr/share/nvim/runtime/$dir"
vmkdir $nvim_runtime_dir
ln -sf /usr/share/vim/vimfiles/$dir/meson.vim ${DESTDIR}/$nvim_runtime_dir
done
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
}