861ac185a6
```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 ```
34 lines
912 B
Bash
34 lines
912 B
Bash
# Template file for 'libxml2-python'
|
|
pkgname=libxml2-python
|
|
version=2.9.10
|
|
revision=3
|
|
wrksrc="${pkgname%-python}-${version}"
|
|
build_wrksrc=python
|
|
build_style=python-module
|
|
hostmakedepends="python-devel python3-devel"
|
|
makedepends="libxml2-devel python-devel python3-devel"
|
|
depends="python python3"
|
|
short_desc="Library providing XML and HTML support - Python2 bindings"
|
|
maintainer="Enno Boland <gottox@voidlinux.org>"
|
|
license="MIT"
|
|
homepage="http://www.xmlsoft.org/"
|
|
distfiles="http://xmlsoft.org/sources/libxml2-${version}.tar.gz"
|
|
checksum=aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f
|
|
|
|
post_patch() {
|
|
if [ "${CROSS_BUILD}" ]; then
|
|
vsed -i setup.py -e "s:/usr/include:${XBPS_CROSS_BASE}/usr/include:"
|
|
fi
|
|
}
|
|
|
|
post_install() {
|
|
vlicense ../COPYING
|
|
}
|
|
|
|
libxml2-python3_package() {
|
|
short_desc="${short_desc/Python2/Python3}"
|
|
pkg_install() {
|
|
vmove "usr/lib/python3*"
|
|
vlicense ../COPYING
|
|
}
|
|
}
|