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

33 lines
813 B
Bash

# Template file for 'libdill'
pkgname=libdill
version=2.14
revision=1
build_style=gnu-configure
hostmakedepends="automake libtool"
short_desc="Structured concurrency library for C"
maintainer="Tai Chi Minh Ralph Eastwood <tcmreastwood@gmail.com>"
license="MIT"
homepage="http://libdill.org/"
distfiles="https://github.com/sustrik/libdill/archive/${version}.tar.gz"
checksum=ebba0e5b433ec123b74a57d49b89dfa673aa258e03e6a452959e556b4c4529b9
pre_configure() {
export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=?/}"
autoreconf -fi
}
post_install() {
vlicense COPYING
}
libdill-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/share/man/man3
}
}