void-packages/srcpkgs/proot/template
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par 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

29 lines
788 B
Bash

# Template file for 'proot'
pkgname=proot
version=5.1.0
revision=7
archs="x86_64* i686* aarch64* arm*"
build_wrksrc=src
build_style=gnu-makefile
make_use_env=yes
makedepends="libarchive-devel talloc-devel"
short_desc="User-space implementation of chroot, mount --bind, and binfmt_misc"
maintainer="Piraty <piraty1@inbox.ru>"
license="GPL-2.0-or-later"
homepage="https://proot-me.github.io"
distfiles="https://github.com/proot-me/PRoot/archive/v${version}.tar.gz"
checksum=ce0a3baca8312613bd10f65bb436a3aaa28e1034f498a22c35ad0693600e01dd
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" musl-legacy-compat"
fi
pre_build() {
# Fix glibc ptrace.h specific constants for musl libc
cp ${FILESDIR}/ptrace_compat.h .
}
do_install() {
vbin proot
vman ../doc/proot/man.1 proot.1
}