void-packages/srcpkgs/enigma/template
Đoàn Trần Công Danh a03d116397 srcpkgs/e*: 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 'enigma'
pkgname=enigma
version=1.21
revision=4
build_style=gnu-configure
hostmakedepends="ImageMagick automake libtool gettext-devel SDL-devel pkg-config"
makedepends="libcurl-devel libxerces-c-devel SDL_mixer-devel SDL_image-devel SDL_ttf-devel"
short_desc="Puzzle game inspired by Oxyd on the Atari ST"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="http://www.nongnu.org/enigma/"
distfiles="${SOURCEFORGE_SITE}/enigma-game/Release%20${version}/${pkgname}-${version}.tar.gz"
checksum=d872cf067d8eb560d3bb1cb17245814bc56ac3953ae1f12e2229c8eb6f82ce01
replaces="enigma-data>=0"
CXXFLAGS="-I${XBPS_CROSS_BASE}/usr/include/SDL"
pre_configure() {
local dir
for dir in . lib-src/enet lib-src/zipios++; do
[ ! -f ${dir}/COPYING ] && cp ${wrksrc}/doc/gpl.txt ${dir}/COPYING
touch ${dir}/NEWS ${dir}/AUTHORS ${dir}/ChangeLog
done
autoreconf -if
}
post_install() {
# remove the libenet headers and static library
rm -r ${DESTDIR}/usr/include ${DESTDIR}/usr/lib/libenet.a
}
enigma-doc_package() {
short_desc+=" - documentation"
pkg_install() {
vmove usr/share/doc
}
}