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

21 lines
789 B
Bash

# Template file for 'python3-pikepdf'
pkgname=python3-pikepdf
version=2.12.2
revision=1
wrksrc="pikepdf-${version}"
build_style=python3-module
hostmakedepends="python3-pybind11 python3-setuptools_scm python3-toml python3-wheel"
makedepends="libqpdf-devel python3-pybind11"
depends="python3-lxml python3-Pillow"
checkdepends="python3-dateutil python3-hypothesis python3-lxml python3-Pillow python3-psutil python3-pytest"
short_desc="Python library for reading and writing PDF files"
maintainer="Philipp David <pd@3b.pm>"
license="MPL-2.0"
homepage="https://github.com/pikepdf/pikepdf"
distfiles="${PYPI_SITE}/p/pikepdf/pikepdf-${version}.tar.gz"
checksum=5ff35499b1ae7b181277f78ce5b1bcc8d3009182bb389917791c5dc811fcc8e4
pre_build() {
vsed -e '/setuptools_scm_git_archive/d' -i setup.py
}