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

22 lines
623 B
Bash

# Template file for 'ht'
pkgname=ht
version=2.1.0
revision=3
build_style=gnu-configure
makedepends="ncurses-devel lzo-devel"
short_desc="File editor/viewer/analyzer for executables"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="GPL-2.0-only"
homepage="http://hte.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/hte/ht-source/${pkgname}-${version}.tar.bz2"
checksum=31f5e8e2ca7f85d40bb18ef518bf1a105a6f602918a0755bc649f3f407b75d70
CXXFLAGS="-Wno-narrowing"
pre_build() {
make CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS= LDFLAGS= -C tools bin2c
}
post_install() {
vinstall doc/ht.info 0644 usr/share/info
}