void-packages/srcpkgs/bsdunzip/template
Đoàn Trần Công Danh c6ce65d3d0 srcpkgs/b*: 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

20 lines
591 B
Bash

# Template file for 'bsdunzip'
pkgname=bsdunzip
version=20160115
revision=2
build_style=gnu-makefile
makedepends="libarchive-devel"
short_desc="Libarchive(3)-utilizing unzip implementation from FreeBSD"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-2-Clause, ISC"
homepage="https://github.com/somasis/bsdunzip"
distfiles="https://github.com/somasis/bsdunzip/archive/${version}.tar.gz"
checksum=06c52c77fa518732665aa2daa73f364cd2470a5d47a83c9c79f86f207cf3ecc1
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" musl-legacy-compat"
fi
post_install() {
vlicense LICENSE
}