void-packages/srcpkgs/SMC/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

37 lines
1.2 KiB
Bash

# Template file for 'SMC'
pkgname=SMC
version=1.9
revision=9
wrksrc=${pkgname,,}-${version}
build_style=gnu-configure
hostmakedepends="automake libtool gettext-devel pkg-config unzip"
makedepends="MesaLib-devel boost-devel cegui07-devel gettext-devel
SDL_image-devel SDL_mixer-devel SDL_ttf-devel"
short_desc="Two-dimensional platform game similar to Super Mario"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="http://www.secretmaryo.org/"
distfiles="
${SOURCEFORGE_SITE}/smclone/${pkgname,,}-${version}.tar.bz2
${SOURCEFORGE_SITE}/smclone/SMC_Music_5.0_high.zip"
checksum="
b4194e70d3f1de3da884dd1a11e4f5cec25a205f66a3b85cc9fc1c86289b237d
c5bb2e1830c7cbe499c93851f5a02b2b900b4730d2c7a133a44a7b43a297dab8"
replaces="SMC-data>=0"
CXXFLAGS="-fpermissive -std=c++11"
LDFLAGS="-Wl,--no-as-needed -lX11 -lboost_system"
post_extract() {
# remove CRs from end of line
find ${wrksrc}/src -type f -exec sed -i "{}" -e "s;\r$;;" \;
mv ${XBPS_BUILDDIR}/data/music/* ${wrksrc}/data/music
}
pre_configure() {
vsed -i configure.ac -e "/AM_INIT_AUTOMAKE/s/)/ subdir-objects)/"
NOCONFIGURE=1 ./autogen.sh
}
post_install() {
vinstall ${FILESDIR}/smc.desktop 644 usr/share/applications
vinstall ${FILESDIR}/smc.png 644 usr/share/pixmaps
}