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

18 lines
628 B
Bash

# Template file for 'opensurge'
pkgname=opensurge
version=0.5.2.1
revision=1
build_style=cmake
hostmakedepends="surgescript pkg-config"
makedepends="allegro5-devel surgescript surgescript-devel"
short_desc="Retro platformer inspired by Sonic"
maintainer="Andrew Benson <abenson+void@gmail.com>"
license="GPL-3.0-or-later"
homepage="https://opensurge2d.org/"
distfiles="https://github.com/alemart/opensurge/archive/v${version}.tar.gz"
checksum=27764a82d97b54026c90044fbc31ea4a61f7836568020b869e63376322a155af
replaces="opensurge-data>=0"
pre_configure() {
vsed -i CMakeLists.txt -e 's/GAME_BINDIR "games"/GAME_BINDIR "bin"/'
}