void-packages/srcpkgs/indent/template
Đoàn Trần Công Danh 986c0a7d5e srcpkgs/i*: 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

25 lines
756 B
Bash

# Template file for 'indent'
pkgname=indent
version=2.2.12
revision=1
build_style=gnu-configure
configure_args="--docdir=/usr/share/doc/indent"
hostmakedepends="texinfo"
short_desc="Indent can be used to make code easier to read"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="http://www.gnu.org/s/indent/"
distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
checksum=e77d68c0211515459b8812118d606812e300097cfac0b4e9fb3472664263bb8b
pre_configure() {
sed -i 's#^docdir = .*$#docdir = @docdir@#' doc/Makefile.in
}
post_build() {
# manpages are not created properly, so recreate it
unset CC LD AR AS RANLIB CPP CFLAGS CPPFLAGS LDFLAGS
cd man
rm indent.1
make CC=cc LD=cc CFLAGS= LDFLAGS= clean all
}