void-packages/srcpkgs/vdrift/template
Đoàn Trần Công Danh 76acfa2dd2 srcpkgs/v*: 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

41 lines
1.3 KiB
Bash

# Template file for 'vdrift'
pkgname=vdrift
version=2014.10.20
revision=11
wrksrc="$pkgname"
build_style=scons
make_build_args="release=1 force_feedback=1 extbullet=1 datadir=share/${pkgname}"
make_install_args="$make_build_args"
hostmakedepends="gettext pkg-config"
makedepends="libcurl-devel bullet-devel SDL2_image-devel glew-devel
libvorbis-devel libarchive-devel MesaLib-devel"
depends="desktop-file-utils vdrift-data-${version}_${revision}"
short_desc="Open source driving simulation made with drift racing in mind"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="http://vdrift.net/"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version//./-}.tar.bz2"
checksum=458d45d59075c2ce943ec6bc271a5bd0eb6bc6ed123670b65038703345020be3
python_version=2
post_install() {
# install .desktop file
vinstall $pkgname.desktop 644 usr/share/applications
sed -i '1 s/^\xef\xbb\xbf//' \
${DESTDIR}/usr/share/applications/$pkgname.desktop
# install icons
for f in 16 32 64; do
vinstall data/textures/icons/vdrift-${f}x${f}.png 644 \
usr/share/icons/hicolor/${f}x${f}/apps vdrift.png
done
vinstall data/textures/icons/vdrift-64x64.png 644 \
usr/share/pixmaps vdrift.png
}
vdrift-data_package() {
short_desc+=" - data files"
pkg_install() {
vmove usr/share/vdrift
}
}