void-packages/srcpkgs/foobillard++/template
Đoàn Trần Công Danh be5369a0cb srcpkgs/f*: convert patches to -Np1
* fpc 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

40 lines
1.5 KiB
Bash

# Template file for 'foobillard++'
# often segfaults at launch on musl, but not marking broken yet
pkgname=foobillard++
version=3.42beta
revision=4
wrksrc=foobillardplus-${version}
build_style=gnu-configure
configure_args="--enable-standard"
hostmakedepends="automake pkg-config"
makedepends="libICE-devel freetype-devel libpng-devel glu-devel SDL_mixer-devel SDL_net-devel"
depends="desktop-file-utils"
short_desc="OpenGL billard game - fork of foobillard"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="http://foobillardplus.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/foobillardplus/foobillardplus-$version.tar.gz"
checksum=e276b70674a7d788c45eeff89f1f5db5d48d871a1ab92103813d424a3761e1d9
CFLAGS="-fgnu89-inline"
# flags from freetype-config and sdl-config
CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/freetype2"
CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/SDL -D_GNU_SOURCE=1"
pre_configure() {
autoreconf -fi
vsed -i 's|$prefix/foobillardplus|$prefix|' configure
vsed -i 's|$prefix/data|$prefix/share/foobillardplus|' configure
vsed -i 's|/opt/foobillardplus/bin/||' foobillardplus.desktop
vsed -i 's|/opt/foobillardplus/||' foobillardplus.desktop
}
do_install() {
vbin src/foobillardplus
vmkdir usr/share/foobillardplus
vcopy "data/*" usr/share/foobillardplus
vinstall foobillardplus.desktop 644 usr/share/applications
vinstall foobillardplus.png 644 usr/share/pixmaps
vinstall foobillardplus.xbm 644 usr/share/pixmaps
find ${DESTDIR} -depth -type d -name .svn -exec rm -rf {} \;
}