861ac185a6
```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 ```
34 lines
999 B
Bash
34 lines
999 B
Bash
# Template file for 'libsigsegv'
|
|
pkgname=libsigsegv
|
|
version=2.12
|
|
revision=1
|
|
build_style=gnu-configure
|
|
short_desc="Handling page faults in user mode"
|
|
maintainer="Martin Riese <grauehaare@gmx.de>"
|
|
license="GPL-2"
|
|
homepage="https://www.gnu.org/software/libsigsegv/"
|
|
distfiles="https://ftpmirror.gnu.org/libsigsegv/libsigsegv-${version}.tar.gz"
|
|
checksum=3ae1af359eebaa4ffc5896a1aee3568c052c99879316a1ab57f8fe1789c390b6
|
|
configure_args="--enable-shared"
|
|
|
|
post_configure() {
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
arm*-musl)
|
|
# Avoid double include of signal.h
|
|
sed -e "s;#define HAVE_SYS_SIGNAL_H 1;#undef HAVE_SYS_SIGNAL_H;" \
|
|
-i ${wrksrc}/config.h
|
|
# struct sigcontext already defined through sigsegv.h
|
|
sed -e "s;#include <asm/sigcontext.h>;;" \
|
|
-i ${wrksrc}/src/fault-linux-arm-old.h
|
|
;;
|
|
esac
|
|
}
|
|
libsigsegv-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
}
|
|
}
|