void-packages/srcpkgs/http-parser/template
Đoàn Trần Công Danh 200bed5c06 srcpkgs/h*: 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

35 lines
894 B
Bash

# Template file for 'http-parser'
pkgname=http-parser
# 2.9.4, plus upstream commits through ec8b5ee, plus fc70ce0 from nodejs/node
version=2.9.4.20201223
revision=1
_githash=ec8b5ee63f0e51191ea43bb0c6eac7bfbff3141d
wrksrc="${pkgname}-${_githash}"
build_style=gnu-makefile
make_build_target=library
short_desc="HTTP request/response parser for c"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="MIT"
homepage="https://github.com/nodejs/http-parser"
distfiles="${homepage}/archive/${_githash}.tar.gz"
checksum=765a21444322ea2476ca1e3cfeb74d280eeb37f4713cf52d2bf398dabf6e4128
pre_install() {
vmkdir usr/lib/pkgconfig
vmkdir usr/include
}
post_install() {
vlicense LICENSE-MIT
}
http-parser-devel_package() {
depends="$sourcepkg>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
}
}