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

23 lines
681 B
Bash

# Template file for 'hlint'
pkgname=hlint
version=2.2.11
revision=2
build_style=haskell-stack
stackage="lts-16.13"
makedepends="ncurses-devel"
short_desc="Haskell source code suggestions"
maintainer="Inokentiy Babushkin <twk@twki.de>"
license="BSD-3-Clause"
homepage="https://github.com/ndmitchell/${pkgname}"
distfiles="https://github.com/ndmitchell/${pkgname}/archive/v${version}.tar.gz"
checksum=207539d3627efd3caed9e6fd3b1aeb8f1eb64553f1f9f166090adbf2fb71e172
nocross=yes # Can't yet cross compile Haskell
nopie_files="/usr/bin/hlint"
post_install() {
rm -f ${DESTDIR}/usr/bin/engine
vmkdir usr/share/hlint
vcopy data usr/share/hlint
vman data/hlint.1
vlicense LICENSE
}