* 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
```
28 lines
880 B
Bash
28 lines
880 B
Bash
# Template file for 'python-requests'
|
|
pkgname=python-requests
|
|
version=2.25.1
|
|
revision=1
|
|
wrksrc="requests-${version}"
|
|
build_style=python-module
|
|
hostmakedepends="python-setuptools python3-setuptools"
|
|
depends="ca-certificates python-chardet python-urllib3 python-idna"
|
|
short_desc="Python2 HTTP library for human beings"
|
|
maintainer="Alessio Sergi <al3hex@gmail.com>"
|
|
license="Apache-2.0"
|
|
homepage="https://python-requests.org/"
|
|
changelog="https://raw.githubusercontent.com/psf/requests/master/HISTORY.md"
|
|
distfiles="${PYPI_SITE}/r/requests/requests-${version}.tar.gz"
|
|
checksum=27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804
|
|
|
|
post_patch() {
|
|
vsed -i '/certifi/d' setup.py
|
|
}
|
|
|
|
python3-requests_package() {
|
|
depends="ca-certificates python3-chardet python3-urllib3 python3-idna"
|
|
short_desc="${short_desc/Python2/Python3}"
|
|
pkg_install() {
|
|
vmove usr/lib/python3*
|
|
}
|
|
}
|