void-packages/srcpkgs/cmocka/template
Đoàn Trần Công Danh c987560802 srcpkgs/c*: 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

26 lines
757 B
Bash

# Template file for 'cmocka'
pkgname=cmocka
version=1.1.5
revision=1
build_style=cmake
configure_args="-DUNIT_TESTING=ON"
# Generated build/CMakeDoxygenDefaults.cmake is broken:
# It contains a filename "\makeindex"
# hostmakedepends="doxygen graphviz"
short_desc="Unit testing framework in C"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://cmocka.org/"
distfiles="https://cmocka.org/files/${version%.*}/cmocka-${version}.tar.xz"
checksum=f0ccd8242d55e2fd74b16ba518359151f6f8383ff8aef4976e48393f77bba8b6
cmocka-devel_package() {
depends="cmocka-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/lib/cmake
vmove "usr/lib/*.so"
}
}