void-packages/srcpkgs/python-coverage/template
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

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

26 lines
851 B
Bash

# Template file for 'python-coverage'
pkgname=python-coverage
version=5.0.3
revision=2
wrksrc="${pkgname/python-//}-${version}"
build_style=python-module
hostmakedepends="python-setuptools python3-setuptools"
makedepends="python-devel python3-devel"
depends="python-setuptools"
short_desc="Code coverage testing for Python2"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://bitbucket.org/ned/coveragepy"
distfiles="${PYPI_SITE}/c/coverage/coverage-${version}.tar.gz"
checksum=77afca04240c40450c331fa796b3eab6f1e15c5ecf8bf2b8bee9706cd5452fef
alternatives="coverage:coverage:/usr/bin/coverage2"
python3-coverage_package() {
depends="python3-setuptools"
short_desc="${short_desc/Python2/Python3}"
alternatives="coverage:coverage:/usr/bin/coverage3"
pkg_install() {
vmove usr/bin/*3
vmove usr/lib/python3*
}
}