void-packages/srcpkgs/halibut/template
Đoàn Trần Công Danh 200bed5c06 srcpkgs/h*: 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

31 lines
822 B
Bash

# Template file for 'halibut'
pkgname=halibut
version=1.2
revision=1
build_style=gnu-makefile
hostmakedepends="perl"
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" halibut"
fi
short_desc="Yet another free document preparation system"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="MIT"
homepage="http://www.chiark.greenend.org.uk/~sgtatham/halibut/"
distfiles="http://www.chiark.greenend.org.uk/~sgtatham/${pkgname}/${pkgname}-${version}/${pkgname}-${version}.tar.gz"
checksum=1aedfb6240f27190c36a390fcac9ce732edbdbaa31c85ee675b994e2b083163f
CFLAGS='-I../charset -I../build -fcommon'
pre_build() {
export LIBS="$LDFLAGS"
}
do_install() {
if [ "$CROSS_BUILD" ]; then
export HALIBUT=/usr/bin/halibut
fi
make -e -C doc
vman doc/halibut.1
vdoc doc/halibut.txt
vbin build/halibut
vlicense LICENCE LICENSE
}