void-packages/srcpkgs/xnp2/template
Đoàn Trần Công Danh 3353bf4722 srcpkgs/x*: 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

27 lines
714 B
Bash

# Template file for 'xnp2'
pkgname=xnp2
version=0.86
revision=1
build_wrksrc=x11
build_style=gnu-configure
configure_args="--enable-ia32 --enable-build-all"
hostmakedepends="pkg-config nasm"
makedepends="gtk+-devel SDL2-devel"
short_desc="A port for UNIX with X11 of the Neko Project II PC-9801 emulator"
maintainer="hipperson0 <hipperson0@gmail.com>"
license="BSD"
homepage="https://www.nonakap.org/np2"
distfiles="https://www.nonakap.org/np2/release/xnp2-${version}.tar.bz2"
checksum=e0b8c93f54682a4b3373907fd9ffe78094f95f7430dffc5038eccbcc4c3f78fd
do_install() {
vbin xnp2
vbin xnp21
vman xnp2.1
vman xnp2.1j
vman xnp21.1
vman xnp21.1j
vdoc README.ja
sed '/\*\//q' main.c > LICENSE
vlicense LICENSE
}