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

28 lines
671 B
Bash

# Template file for 'zlib'
pkgname=zlib
version=1.2.11
revision=3
bootstrap=yes
build_style=configure
short_desc="Compression/decompression Library"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Zlib"
homepage="http://www.zlib.net"
distfiles="$homepage/$pkgname-$version.tar.gz"
checksum=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
do_configure() {
LDFLAGS= LDSHAREDLIBC= ./configure --prefix=/usr --shared
}
zlib-devel_package() {
depends="zlib>=${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
}
}