void-packages/srcpkgs/openbabel/template
Đoàn Trần Công Danh 2fd8d4df94 srcpkgs/o*: 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

32 lines
877 B
Bash

# Template file for 'openbabel'
pkgname=openbabel
version=2.4.1
revision=7
_ver=${version//./-}
wrksrc=${pkgname}-${pkgname}-${_ver}
build_style=cmake
build_helper=cmake-wxWidgets-gtk3
hostmakedepends="pkg-config"
makedepends="cairo-devel libxml2-devel eigen3.2 wxWidgets-gtk3-devel"
short_desc="The Open Source Chemistry Toolbox"
maintainer="Diogo Leal <diogo@diogoleal.com>"
license="GPL-2.0-only"
homepage="http://openbabel.org"
distfiles="https://github.com/openbabel/openbabel/archive/openbabel-${_ver}.tar.gz"
checksum=594c7f8a83f3502381469d643f7b185882da1dd4bc2280c16502ef980af2a776
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" python"
fi
openbabel-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/cmake
vmove usr/lib/pkgconfig
}
}