void-packages/srcpkgs/shapelib/template
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: 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

28 lines
704 B
Bash

# Template file for 'shapelib'
pkgname=shapelib
version=1.5.0
revision=1
build_style=cmake
short_desc="Library for reading and writing of ESRI Shapefiles"
maintainer="Piotr Wójcik <chocimier@tlen.pl>"
license="LGPL-2.0-only"
homepage="http://shapelib.maptools.org/"
distfiles="http://download.osgeo.org/shapelib/shapelib-${version}.tar.gz"
checksum=1fc0a480982caef9e7b9423070b47750ba34cd0ba82668f2e638fab1d07adae1
shapelib-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/share/shp
}
}
shapelib-tools_package() {
short_desc+=" - tools"
pkg_install() {
vmove usr/bin
}
}