void-packages/srcpkgs/nettle/template
Đoàn Trần Công Danh 65749575ab srcpkgs/n*: 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
865 B
Bash

# Template file for 'nettle'
pkgname=nettle
version=3.7.3
revision=1
build_style=gnu-configure
configure_args="--enable-shared"
hostmakedepends="m4 texinfo"
makedepends="gmp-devel"
short_desc="Low-level cryptographic library"
maintainer="Érico Nogueira <ericonr@disroot.org>"
license="GPL-2.0-or-later, GPL-3.0-or-later"
homepage="https://www.lysator.liu.se/~nisse/nettle/"
distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
checksum=661f5eb03f048a3b924c3a8ad2515d4068e40f67e774e8a26827658007e3bcf0
nettle-devel_package() {
depends="gmp-devel ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
vmove usr/share/info
}
}
nettle-tools_package() {
short_desc+=" - bundled tools"
pkg_install() {
vmove usr/bin
}
}