void-packages/srcpkgs/mog/template
Đoàn Trần Công Danh 765e304c4b srcpkgs/m*: 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

37 lines
1.1 KiB
Bash

# Template file for 'mog'
pkgname=mog
version=0.63
revision=3
_build=1548
wrksrc=${pkgname}-${version}.${_build}
build_style=gnu-makefile
makedepends="SDL_image-devel SDL_mixer-devel SDL_sound-devel"
depends="mog-data>=${version}_${revision}"
short_desc="Remake of classic MSX game The Maze of Galious"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="http://www.braingames.getput.com/mog/"
distfiles="http://urchlay.naptime.net/~urchlay/src/mog.src_${version}-${_build}.tgz"
checksum=707bbc1b167a55989916f803dbe55c288652fb54df6194be029c41be99e9ec3a
broken="ELF in /usr/share"
CFLAGS="-g3 -O3 -Wno-write-strings -I${XBPS_CROSS_BASE}/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT"
pre_build() {
local libs="-L${XBPS_CROSS_BASE}/usr/lib"
libs+=" -lstdc++ -lm"
libs+=" -lSDL_image"
libs+=" -lSDL_mixer"
libs+=" -lSDL_sound"
libs+=" -lSDL -lpthread"
sed -i build/linux/Makefile -e "s;@LIBS@;${libs};"
}
mog-data_package() {
short_desc+=" - data files"
pkg_install() {
vmove usr/share/mog/graphics
vmove usr/share/mog/sound
vmove usr/share/mog/rooms
}
}