void-packages/srcpkgs/Gauche/template
Đoàn Trần Công Danh ec4c2d75fa srcpkgs/[A-Z]*: 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

37 lines
1.3 KiB
Bash

# Template file for 'Gauche'
pkgname=Gauche
version=0.9.9
revision=1
build_style=gnu-configure
hostmakedepends="texinfo"
makedepends="libticonv-devel libatomic_ops-devel"
short_desc="Practical Scheme R7RS implementation"
maintainer="rc-05 <rc23@email.it>"
license="BSD-3-Clause"
homepage="https://practical-scheme.net/gauche/"
distfiles="${SOURCEFORGE_SITE}/gauche/${pkgname}-${version}.tgz"
checksum=4ca9325322a7efadb9680d156eb7b53521321c9ca4955c4cbe738bc2e1d7f7fb
alternatives="
scheme:scheme:/usr/bin/gauche
scheme:scheme.1:/usr/share/man/man1/gauche.1
"
if [ -n "$CROSS_BUILD" ]; then
# Gauche needs itself to bootstrap for cross compilation.
hostmakedepends+=" Gauche"
# Normally BUILD_GOSH doesn't need to be set but in this case it is mandatory
# as the native Gauche binary (which is needed to cross-compile for another
# architecture) has been renamed for conflict problems with another package with
# the same name.
configure_args="BUILD_GOSH=/usr/bin/gauche"
make_install_args="GOSH=/usr/bin/gauche"
fi
post_install() {
# Needed as Gauche's binary conflicts with the "gosh" package bin.
mv $DESTDIR/usr/bin/gosh $DESTDIR/usr/bin/gauche
# Modify also the manual page filename to remain consitent.
mv $DESTDIR/usr/share/man/man1/gosh.1 $DESTDIR/usr/share/man/man1/gauche.1
vlicense COPYING
}