void-packages/srcpkgs/newlisp/template
Đoàn Trần Công Danh 65749575ab srcpkgs/n*: convert patches to -Np1
```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

32 lines
995 B
Bash

# Template file for 'newlisp'
pkgname=newlisp
version=10.7.5
revision=3
makedepends="readline-devel libffi-devel"
short_desc="Lisp-like, general-purpose scripting language"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-only, GFDL-1.2-only, Zlib, $pkgname, BSD-3-Clause"
homepage="http://www.newlisp.org"
distfiles="$homepage/downloads/$pkgname-$version.tgz"
checksum=dc2d0ff651c2b275bc4af3af8ba59851a6fb6e1eaddc20ae75fb60b1e90126ec
do_build() {
case "$XBPS_TARGET_MACHINE" in
x86_64*|aarch64*|ppc64*) export CFLAGS+=" -DNEWLISP64";;
esac
make -f makefile_linuxLP64_utf8_ffi ${makejobs}
}
do_install() {
vmkdir usr/bin
vmkdir usr/share/man/man1
vmkdir usr/share/licenses/$pkgname
make bindir=$DESTDIR/usr/bin datadir=$DESTDIR/usr/share \
mandir=$DESTDIR/usr/share/man install
mv $DESTDIR/usr/share/doc/$pkgname/COPYING \
$DESTDIR/usr/share/licenses/$pkgname
vlicense doc/COPYING
# Create newlisp symlink;
ln -sf newlisp-${version} ${DESTDIR}/usr/bin/newlisp
}