765e304c4b
```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 ```
30 lines
884 B
Bash
30 lines
884 B
Bash
# Template file for 'mg'
|
|
pkgname=mg
|
|
version=20210314
|
|
revision=1
|
|
hostmakedepends="pkg-config"
|
|
makedepends="libbsd-devel ncurses-devel"
|
|
short_desc="Micro GNU/emacs"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="Public Domain"
|
|
homepage="https://github.com/hboetes/mg"
|
|
distfiles="https://github.com/hboetes/mg/archive/${version}.tar.gz"
|
|
checksum=6820e76a0e27d9a744624d421b3b30b0030140c2a817df1310b25c3abe397106
|
|
|
|
CFLAGS="-DTCSASOFT=0"
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl) CFLAGS+=" -DREG_STARTEND=0";;
|
|
esac
|
|
|
|
do_configure() {
|
|
sed -i "s,\(BSD_CPPFLAGS:=\).*,\1 -isystem ${XBPS_CROSS_BASE}/usr/include/bsd -DLIBBSD_OVERLAY,g" GNUmakefile
|
|
sed -i "s,\(BSD_LIBS:=\).*,\1 -lbsd,g" GNUmakefile
|
|
}
|
|
do_build() {
|
|
make CC="$CC" CFLAGS="$CFLAGS" prefix=/usr ${makejobs}
|
|
}
|
|
do_install() {
|
|
vmkdir usr/bin
|
|
make install prefix=/usr bindir=/usr/bin mandir=/usr/share/man DESTDIR=${DESTDIR}
|
|
}
|