void-packages/srcpkgs/astyle/template
Đoàn Trần Công Danh ae69000001 srcpkgs/a*: convert patches to -Np1
* arduino and antiword is kept at -Np0

```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

21 lines
575 B
Bash

# Template file for 'astyle'
pkgname=astyle
version=3.1
revision=3
wrksrc="$pkgname"
build_wrksrc="build/gcc"
build_style=gnu-makefile
short_desc="Free, fast and small formatter for C, C++, C#, and Java source code"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="http://astyle.sourceforge.net"
distfiles="${SOURCEFORGE_SITE}/$pkgname/${pkgname}_${version}_linux.tar.gz"
checksum=cbcc4cf996294534bb56f025d6f199ebfde81aa4c271ccbd5ee1c1a3192745d7
do_install() {
vbin bin/astyle
vlicense ../../LICENSE.md
for f in ../../doc/*.html; do
vdoc $f
done
}