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

34 lines
1.1 KiB
Bash

# Template file for 'higan'
pkgname=higan
version=110
revision=1
wrksrc="higan_v${version}-source"
build_wrksrc=higan
build_style=gnu-makefile
make_build_args='compiler=${CXX} platform=linux'
make_install_args='compiler=${CXX} platform=linux prefix=${DESTDIR}/usr'
hostmakedepends="unzip pkg-config"
makedepends="gtk+-devel gtksourceview2-devel libgomp-devel
SDL2-devel MesaLib-devel libXv-devel libao-devel
alsa-lib-devel libopenal-devel pulseaudio-devel"
short_desc="Multi-system emulator (SNES/Game Boy/Mega Drive/PC Engine/WonderSwan)"
maintainer="John <me@johnnynator.dev>"
license="GPL-3.0-or-later, ISC"
homepage="https://byuu.org/emulation/higan/"
distfiles="https://byuu.org/download/higan/higan_v${version}-source.zip"
checksum=1b70d85454aaae557fd5ba5aaed9add8cb8c939f2b7a07a6d3734f971bb07ab7
build_options="icarus"
build_options_default="icarus"
if [ "$build_option_icarus" ];then
post_build() {
cd $wrksrc/icarus
make ${makejobs} compiler=${CXX} platform=linux
}
post_install() {
cd $wrksrc/icarus
make STRIP=true compiler=${CXX} platform=linux prefix=${DESTDIR}/usr install
}
fi