void-packages/srcpkgs/libexecinfo/template
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: 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

36 lines
1.1 KiB
Bash

# Template file for 'libexecinfo'
pkgname=libexecinfo
version=1.1
revision=3
archs="*-musl"
build_style=gnu-makefile
short_desc="BSD licensed clone of the GNU libc backtrace facility"
maintainer="John <me@johnnynator.dev>"
license="BSD-2-Clause"
homepage="http://www.freshports.org/devel/libexecinfo"
distfiles="http://distcache.freebsd.org/local-distfiles/itetcu/libexecinfo-${version}.tar.bz2"
checksum=c9a21913e7fdac8ef6b33250b167aa1fc0a7b8a175145e26913a4c19d8a59b1f
do_install() {
vsed -e "/Version:/s@version@${version}@" -i libexecinfo.pc
vinstall execinfo.h 644 usr/include
vinstall stacktraverse.h 644 usr/include
vinstall libexecinfo.a 755 usr/lib
vinstall libexecinfo.so.1 755 usr/lib
ln -s libexecinfo.so.1 ${DESTDIR}/usr/lib/libexecinfo.so
vinstall libexecinfo.pc 644 usr/lib/pkgconfig
head -28 execinfo.c > LICENSE
vlicense LICENSE
}
libexecinfo-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/*.so
vmove usr/lib/*.a
vmove usr/lib/pkgconfig
}
}