void-packages/srcpkgs/texi2mdoc/template
Đoàn Trần Công Danh 4f75cf25fd srcpkgs/t*: 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

23 lines
616 B
Bash

# Template file for 'texi2mdoc'
pkgname=texi2mdoc
version=0.1.2
revision=2
build_style=gnu-makefile
short_desc="Convert Texinfo documentation into man pages (mdoc)"
maintainer="Orphaned <orphan@voidlinux.org>"
license="ISC"
homepage="http://mdocml.bsd.lv/texi2mdoc"
distfiles="http://mdocml.bsd.lv/texi2mdoc/snapshots/${pkgname}-${version}.tgz"
checksum=7a45fd87c27cc8970a18db9ddddb2f09f18b8dd5152bf0ca377c3a5e7d304bfe
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" musl-legacy-compat"
fi
post_extract() {
sed -i '/CC.*-o/s/$/ $(LDFLAGS)/' Makefile
}
do_install() {
vbin texi2mdoc
vman texi2mdoc.1
}