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

22 lines
728 B
Bash

# Template file for 'bootchart2'
pkgname=bootchart2
version=0.14.9
revision=1
wrksrc="bootchart-${version}"
build_style=gnu-makefile
make_install_args="EARLY_PREFIX=/usr DOCDIR=/usr/share/doc/bootchart2"
hostmakedepends="python3"
makedepends="python3"
depends="python3-cairo"
short_desc="Startup graphing tool"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://github.com/xrmx/bootchart"
distfiles="https://github.com/xrmx/bootchart/archive/${version}.tar.gz"
checksum=cec7871c3dba47a1165873b0acde30a82221fde1d3a942da5e7dd09b513d2017
make_dirs="/usr/lib/bootchart/tmpfs 0755 root root"
conflicts="bootchart>=0"
post_patch() {
vsed -i -e 's,\$(EARLY_PREFIX)/sbin/,/usr/bin/,' Makefile
}