void-packages/srcpkgs/giac/template
Đoàn Trần Công Danh 7fc9190f0e srcpkgs/g*: convert patches to -Np1
* gcc is kept at -Np0, because of void-cross

```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

49 lines
1.3 KiB
Bash

# Template file for 'giac'
pkgname=giac
version=1.5.0.87
revision=4
wrksrc="giac-${version%.*}"
build_style=gnu-configure
makedepends="fltk-devel gmp-devel gsl-devel lapack-devel
libjpeg-turbo-devel libpng-devel readline-devel mpfr-devel pari-devel"
depends="desktop-file-utils hicolor-icon-theme"
short_desc="Free computer algebra system"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://www-fourier.ujf-grenoble.fr/~parisse/giac.html"
distfiles="https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_${version%.*}-${version##*.}.tar.gz"
checksum=bbd6f0aafe373de3c9ed53d21878224e847359fdd9a7cdf9e9096e7c960f10b4
# need more than 4*65536 stack, see try_parse() in gen.cc line 11812
LDFLAGS="-Wl,-z,stack-size=2097152"
post_install() {
# remove duplicates
rm -r ${DESTDIR}/usr/share/doc
}
libgiac_package() {
short_desc+=" - runtime library"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}
giac-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision} $makedepends"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}
giac-doc_package() {
short_desc+=" - Documentation and Examples"
pkg_install() {
vmove "usr/share/giac/doc"
vmove "usr/share/giac/examples"
find ${PKGDESTDIR} -name "Makefile*" -delete
}
}