void-packages/srcpkgs/zsnes/template
Đoàn Trần Công Danh e2a21ccfd6 srcpkgs/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

32 lines
834 B
Bash

# Template file for 'zsnes'
#
# 32bit
archs="i686"
lib32mode="full"
wrksrc="zsnes_1_51"
build_wrksrc="src"
pkgname=zsnes
version=1.51
revision=3
build_style=gnu-configure
configure_args="force_arch=i686"
hostmakedepends="nasm pkg-config"
makedepends="MesaLib-devel SDL-devel libpng-devel ncurses-devel"
depends="desktop-file-utils hicolor-icon-theme"
short_desc="Super Nintendo emulator"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2"
homepage="http://www.zsnes.com/"
distfiles="${SOURCEFORGE_SITE}/zsnes/zsnes151src.tar.bz2"
checksum=2856dedba272e9eed66cbf68dd4a9ae56797c373686c57371a65c7df35264623
CFLAGS="-fcommon"
post_install() {
vmkdir usr/share
mv ${DESTDIR}/usr/man ${DESTDIR}/usr/share
vinstall ${FILESDIR}/zsnes.png 644 usr/share/pixmaps
vinstall ${FILESDIR}/zsnes.desktop 644 usr/share/applications
}