```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 ```
31 lines
1,000 B
Bash
31 lines
1,000 B
Bash
# Template file for 'uftrace'
|
|
pkgname=uftrace
|
|
version=0.10
|
|
revision=1
|
|
archs="x86_64* i686* aarch64* arm*"
|
|
build_style=configure
|
|
configure_args="--prefix=/usr --libdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
|
|
hostmakedepends="pandoc pkg-config"
|
|
makedepends="capstone-devel elfutils-devel ncurses-devel"
|
|
short_desc="Function graph tracer for user-space"
|
|
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
|
license="GPL-2.0-only"
|
|
homepage="https://github.com/namhyung/uftrace"
|
|
distfiles="https://github.com/namhyung/uftrace/archive/v${version}.tar.gz"
|
|
checksum=b8b56d540ea95c3eafe56440d6a998e0a140d53ca2584916b6ca82702795bbd9
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl) makedepends+=" argp-standalone"; export LDFLAGS=-largp;;
|
|
esac
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*) export ARCH=i386;;
|
|
x86_64*) export ARCH=x86_64;;
|
|
arm*) export ARCH=arm;;
|
|
aarch64*) export ARCH=aarch64;;
|
|
esac
|
|
|
|
post_install() {
|
|
vmkdir usr/share/bash-completion
|
|
mv $DESTDIR/etc/bash_completion.d $DESTDIR/usr/share/bash-completion/completions
|
|
}
|