void-packages/srcpkgs/z80ex/template
Đoàn Trần Công Danh e2a21ccfd6 srcpkgs/z*: 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

21 lines
604 B
Bash

# Template file for 'z80ex'
pkgname=z80ex
version=1.1.21
revision=2
build_style=cmake
short_desc="ZiLOG Z80 CPU emulation library"
maintainer="Diogo Leal <diogo@diogoleal.com>"
license="GPL-2.0-only"
homepage="https://sourceforge.net/projects/z80ex/"
distfiles="${SOURCEFORGE_SITE}/project/z80ex/z80ex/${version}/z80ex-${version}.tar.gz"
checksum=6f5e521d068a614b41e10180ad4ae45b1bc258ec28c962543feb9078856c2530
z80ex-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/*.a
vmove usr/lib/*.so
}
}