void-packages/srcpkgs/matio/template
Đoàn Trần Công Danh 765e304c4b srcpkgs/m*: 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
928 B
Bash

# Template file for 'matio'
pkgname=matio
version=1.5.17
revision=2
build_style=gnu-configure
configure_args="--disable-static"
hostmakedepends="libtool"
makedepends="zlib-devel hdf5-devel"
short_desc="MATLAB MAT file I/O library"
maintainer="Florian Eich <flrn@nrmncr.net>"
license="BSD-2-Clause"
homepage="https://github.com/tbeu/matio"
distfiles="https://github.com/tbeu/matio/releases/download/v${version}/${pkgname}-${version}.tar.gz"
checksum=5e455527d370ab297c4abe5a2ab4d599c93ac7c1a0c85d841cc5c22f8221c400
if [ "$CROSS_BUILD" ]; then
configure_args+=" ac_cv_va_copy=C99"
fi
if [ "$XBPS_TARGET_LIBC" = musl ]; then
makedepends+=" musl-legacy-compat"
fi
post_install() {
vlicense COPYING
}
matio-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
vmove usr/share/man/man3
}
}