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

21 lines
737 B
Bash

# Template file for 'oprofile'
pkgname=oprofile
version=1.4.0
revision=1
build_style=gnu-configure
configure_args="--disable-static"
hostmakedepends="pkg-config"
makedepends="popt-devel binutils-devel libiberty-devel"
system_accounts="_oprofile"
oprofile_homedir="/var/lib/oprofile"
make_dirs="/var/lib/oprofile 0750 _oprofile _oprofile"
short_desc="Transparent low-overhead system-wide profiler for Linux"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="http://oprofile.sourceforge.net"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
checksum=7ba06f99d7c188389d20d1d5e53ee690c7733f87aa9af62bd664fa0ca235a412
case "$XBPS_TARGET_MACHINE" in
ppc*) makedepends+=" papi-devel";;
esac