void-packages/srcpkgs/trinity/template
Đoàn Trần Công Danh 4f75cf25fd srcpkgs/t*: 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

29 lines
733 B
Bash

# Template file for 'trinity'
pkgname=trinity
version=1.9
revision=1
build_style=gnu-configure
short_desc="Linux system call fuzzer"
maintainer="Diogo Leal <diogo@diogoleal.com>"
license="GPL-2.0-only"
homepage="https://github.com/kernelslacker/trinity"
distfiles="https://github.com/kernelslacker/trinity/archive/v${version}.tar.gz"
checksum=9abd6cea3f6bd3b36794e038317d5ed6001dc52ad3b1cd7071f6cc7c5baecd3c
nocross="Mis-use of memfd_create declaration"
CFLAGS="-fcommon"
if [ "$CROSS_BUILD" ]; then
export CROSS_COMPILE=${XBPS_TARGET_TRIPLET}
fi
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
CFLAGS+=" -Dloff_t=off_t"
fi
do_install() {
vbin trinity
vdoc Documentation/HACKING.txt
vdoc Documentation/pro-tips.txt
vdoc README
}