void-packages/srcpkgs/papi/template
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

```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

40 lines
1.1 KiB
Bash

# Template file for 'papi'
pkgname=papi
version=5.7.0
revision=1
wrksrc="papi-${version}"
build_wrksrc="src"
build_style=gnu-configure
short_desc="Provides interface for use of performance counter hardware"
maintainer="johannes <johannes.brechtmann@gmail.com>"
license="BSD-3-Clause"
homepage="http://icl.cs.utk.edu/papi/"
distfiles="http://icl.utk.edu/projects/papi/downloads/papi-${version}.tar.gz"
checksum=d1a3bb848e292c805bc9f29e09c27870e2ff4cda6c2fba3b7da8b4bba6547589
if [ -n "$CROSS_BUILD" ]; then
_ARCH="${XBPS_TARGET_MACHINE%-musl}"
configure_args+=" --with-ffsll --with-tls
--with-walltimer=clock_realtime --with-virtualtimer=cloc_thread_cputime_id
--with-CPU=${_ARCH} --with-arch=${_ARCH}"
fi
case "$XBPS_TARGET_MACHINE" in
ppc*-musl) broken="requires non-standard __ppc_get_timebase_freq";;
esac
post_install() {
vlicense ../LICENSE.txt
}
papi-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/*.a
vmove usr/lib/*.so
vmove usr/lib/pkgconfig
vmove usr/share/man/man3
}
}