void-packages/srcpkgs/pijul/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

28 lines
982 B
Bash

# Template file for 'pijul'
pkgname=pijul
version=0.12.2
revision=4
build_style=cargo
_sequoia_ver=0.9.0
hostmakedepends="pkg-config clang"
makedepends="libsodium-devel openssl-devel nettle-devel"
short_desc="Distributed version control system based on patches"
maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
license="GPL-2.0-only"
homepage="https://pijul.org/"
distfiles="https://crates.io/api/v1/crates/pijul/${version}/download>pijul-${version}.tar.gz
https://gitlab.com/sequoia-pgp/sequoia/-/archive/v${_sequoia_ver}/sequoia-v${_sequoia_ver}.tar.gz"
checksum="f92a3f4063e780ca45c161ceb0f42baf34dfeddf3359ebf6c2e0442d9abb5889
71823c88b9666611f3cfa6b1d923bd66fda92fa6a53368b195bd2f962fdf7f4b"
if [ "$CROSS_BUILD" ]; then
export HOST_CC="$BUILD_CC"
export HOST_CFLAGS="$BUILD_CFLAGS"
export BINDGEN_EXTRA_CLANG_ARGS="--sysroot=$XBPS_CROSS_BASE"
fi
# We only want to install the binary, so don't run cargo install
do_install() {
vbin target/${RUST_TARGET}/release/pijul
}