void-packages/srcpkgs/TSC/template
Đoàn Trần Công Danh ec4c2d75fa srcpkgs/[A-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

29 lines
1 KiB
Bash

# Template file for 'TSC'
pkgname=TSC
version=2.1.0
revision=2
build_wrksrc=tsc
build_style=cmake
build_helper="qemu"
configure_args="-DFIXED_DATA_DIR=/usr/share/TSC -DBINARY_DIR=/usr/bin
-DUSE_SYSTEM_MRUBY=ON -DUSE_SYSTEM_TINYCLIPBOARD=ON"
hostmakedepends="bison gperf pkg-config gettext mruby"
makedepends="SFML-devel boost-devel cegui-devel devil-devel gettext-devel
glew-devel libvorbis-devel libxml++-devel libXt-devel tinyclipboard-devel
mruby"
depends="mruby>=0"
short_desc="OSS 2D platform game"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://www.secretchronicles.org/"
distfiles="https://ftp.secretchronicles.org/releases/${pkgname}-${version}.tar.gz"
checksum=6a16765b4951e3d5d1ea2b84e6da8f67b0271460f0c570b53ccdab80d7396261
replaces="TSC-data"
if [ "$XBPS_WORDSIZE" != "$XBPS_TARGET_WORDSIZE" ]; then
broken="The host ($XBPS_WORDSIZE) and target ($XBPS_TARGET_WORDSIZE) word sizes need to be the same for cross building."
fi
post_install() {
vinstall extras/tsc.desktop 644 usr/share/applications
}