void-packages/srcpkgs/gatling/template
Đoàn Trần Công Danh 7fc9190f0e srcpkgs/g*: convert patches to -Np1
* gcc is kept at -Np0, because of void-cross

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

27 lines
781 B
Bash

# Template file for 'gatling'
pkgname=gatling
version=0.16
revision=1
build_style=gnu-makefile
make_build_target="gatling dl getlinks"
make_install_args="prefix=/usr MANDIR=/usr/share/man"
makedepends="libowfat openssl-devel zlib-devel"
short_desc="High performance web server"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2.0-only"
homepage="http://www.fefe.de/gatling"
distfiles="https://www.fefe.de/gatling/$pkgname-$version.tar.xz"
checksum=5f96438ee201d7f1f6c2e0849ff273b196bdc7493f29a719ce8ed08c8be6365b
CFLAGS="-std=c99 -I${XBPS_CROSS_BASE}/usr/include/libowfat -fcommon"
pre_build() {
vsed -i GNUmakefile \
-e "s;^CFLAGS=.*;CFLAGS=${CFLAGS};" \
-e "s;\$(CC) \$(LDFLAGS);\$(CC) \$(CFLAGS) \$(LDFLAGS);"
}
pre_install() {
vmkdir usr/share/man/man1
}