void-packages/srcpkgs/pahole/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

32 lines
874 B
Bash

# Template file for 'pahole'
pkgname=pahole
version=1.21
revision=1
wrksrc="dwarves-${version}"
build_style=cmake
configure_args="-D__LIB=lib"
makedepends="elfutils-devel zlib-devel"
short_desc="Various DWARF utils"
maintainer="Andrew Benson <abenson+void@gmail.com>"
license="GPL-2.0-only"
homepage="http://git.kernel.org/?p=devel/pahole/pahole.git;a=summary"
distfiles="https://fedorapeople.org/~acme/dwarves/dwarves-${version}.tar.xz"
checksum=33a8bed6c0e1a5889578e01d1afed3f752353dc087d8bda36d258fe83e42a476
case $XBPS_TARGET_MACHINE in
*-musl) makedepends+=" musl-obstack-devel argp-standalone"
esac
pre_configure() {
case $XBPS_TARGET_MACHINE in
*-musl) sed -i CMakeLists.txt -e "/^target_link_libraries/s/)/ obstack argp)/"
esac
}
pahole-devel_package() {
short_desc+=" - development files"
pkg_install() {
vmove /usr/include
vmove "/usr/lib/*.so"
}
}