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

32 lines
758 B
Bash

# Template file for 'zimg'
pkgname=zimg
version=2.9.3
revision=1
wrksrc=zimg-release-${version}
build_style=gnu-configure
hostmakedepends="automake libtool pkg-config"
short_desc="Image processing library"
maintainer="lemmi <lemmi@nerd2nerd.org>"
license="WTFPL"
homepage="https://github.com/sekrit-twc/zimg"
distfiles="https://github.com/sekrit-twc/zimg/archive/release-${version}.tar.gz"
checksum=a15c0483fbe945ffe695a1a989bc43b3381c8bf33e2d1760464ec21d32cdf30b
pre_configure() {
./autogen.sh
}
post_install() {
vlicense COPYING
}
zimg-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"
}
}