void-packages/srcpkgs/scummvm/template
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: 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

31 lines
995 B
Bash

# Template file for 'scummvm'
pkgname=scummvm
version=2.2.0
revision=2
build_style=configure
configure_args="--prefix=/usr --enable-release-mode
--with-sdl-prefix=${XBPS_CROSS_BASE}/usr"
hostmakedepends="pkg-config nasm"
makedepends="zlib-devel libpng-devel SDL2-devel libmad-devel faad2-devel
fluidsynth-devel libvorbis-devel libtheora-devel libflac-devel
freetype-devel libjpeg-turbo-devel libcurl-devel SDL2_net-devel
libmpeg2-devel liba52-devel"
short_desc="Free implementation of LucasArts' SCUMM interpreter"
maintainer="John <me@johnnynator.dev>"
license="GPL-2.0-or-later"
homepage="https://www.scummvm.org/"
distfiles="https://downloads.scummvm.org/frs/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
checksum=1469657e593bd8acbcfac0b839b086f640ebf120633e93f116cab652b5b27387
case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*);;
*) configure_args+=" --disable-nasm";;
esac
if [ "$CROSS_BUILD" ]; then
configure_args+=" --host=${XBPS_CROSS_TRIPLET}"
fi
do_check() {
make test
}