void-packages/srcpkgs/XyGrib/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

38 lines
1.1 KiB
Bash

# Template file for 'XyGrib'
pkgname=XyGrib
version=1.2.6.1
revision=3
build_style=cmake
hostmakedepends="qt5-devel pkg-config"
makedepends="jasper-devel libnova-devel nettle-devel proj-devel qt5-devel
qwt-devel libopenjpeg2-devel"
short_desc="Weather data visulization"
maintainer="Andrew Benson <abenson+void@gmail.com>"
license="GPL-3.0-or-later"
homepage="https://opengribs.org/"
distfiles="https://github.com/opengribs/XyGrib/archive/v${version}.tar.gz"
checksum=2dc6099293ae6f7a4bfbfc0cab590cf7ad48241d608e6d7a76e35961b9fc2157
if [ "$CROSS_BUILD" ]; then
make_build_args="LINK=${XBPS_CROSS_TRIPLET}-c++"
fi
post_patch() {
vsed -i -e '\!/usr/include/openjpeg-2.3!i /usr/include/openjpeg-2.4' \
CMakeLists.txt
}
post_install() {
vbin ${FILESDIR}/XyGrib
vmkdir usr/share/applications
vinstall ${FILESDIR}/XyGrib.desktop 0644 usr/share/applications
vmkdir usr/share/icons
vinstall ${FILESDIR}/XyGrib.png 0644 usr/share/icons
mv ${DESTDIR}/usr/XyGrib ${DESTDIR}/usr/share/
vmkdir usr/lib/XyGrib
mv ${DESTDIR}/usr/share/XyGrib/XyGrib ${DESTDIR}/usr/lib/XyGrib/XyGrib
}