void-packages/srcpkgs/darkplaces/template
Đoàn Trần Công Danh b6bcd8cd34 srcpkgs/d*: convert patches to -Np1
* daemontools and dmraid is kept at -Np0

```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

43 lines
1.3 KiB
Bash

# Template file for 'darkplaces'
pkgname=darkplaces
version=20140513
revision=3
create_wrksrc=yes
hostmakedepends="unzip"
makedepends="zlib-devel alsa-lib-devel libjpeg-turbo-devel libXpm-devel libXxf86vm-devel SDL-devel MesaLib-devel"
depends="desktop-file-utils hicolor-icon-theme"
short_desc="An advanced Quake 1 game engine"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2"
homepage="http://icculus.org/twilight/darkplaces/"
distfiles="http://icculus.org/twilight/$pkgname/files/darkplacesengine${version}.zip"
checksum=69e5a50991884196e403bd6aab4a33bba553a934a167be366672ab4e223b06c9
post_extract() {
# Extract the real source code.
unzip -q darkplacesenginesource${version}.zip
}
do_build() {
make_build_args="DP_FS_BASEDIR=/opt/quake DP_LINK_TO_LIBJPEG=1"
case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*) ;;
*) make_build_args+=" CFLAGS_SSE= CFLAGS_SSE2=" ;;
esac
cd ${pkgname}
# LDFLAGS to make PIE work
make OPTIM_RELEASE="${CFLAGS} ${LDFLAGS}" ${make_build_args} release
}
do_install() {
cd ${pkgname}
install -d ${DESTDIR}/usr/{bin,share/quake}
install -m755 darkplaces-{dedicated,glx,sdl} ${DESTDIR}/usr/bin
for i in 16 24 32 48 64 72; do
install -Dm644 darkplaces${i}x${i}.png ${DESTDIR}/usr/share/icons/hicolor/${i}x${i}/apps/darkplaces.png
done
vinstall ${FILESDIR}/${pkgname}.desktop 644 usr/share/applications
}