```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
```
45 lines
1.3 KiB
Bash
45 lines
1.3 KiB
Bash
# Template file for 'tevent'
|
|
pkgname=tevent
|
|
version=0.10.2
|
|
revision=2
|
|
build_style=waf3
|
|
build_helper="qemu"
|
|
configure_script="buildtools/bin/waf"
|
|
configure_args="--sysconfdir=/etc --localstatedir=/var
|
|
--disable-rpath --disable-rpath-install --without-gettext
|
|
--builtin-libraries=replace --bundled-libraries=NONE"
|
|
hostmakedepends="pkg-config docbook2x"
|
|
makedepends="python3-devel talloc-devel libxslt gettext-devel"
|
|
short_desc="Event system based on the talloc memory management library"
|
|
maintainer="Yuusha Spacewolf <xyuusha@paranoici.org>"
|
|
license="GPL-3.0-or-later"
|
|
homepage="https://tevent.samba.org"
|
|
distfiles="https://ftp.samba.org/pub/tevent/tevent-${version}.tar.gz"
|
|
checksum=f8427822e5b2878fb8b28d6f50d96848734f3f3130612fb574fdd2d2148a6696
|
|
|
|
export PYTHON_CONFIG="${XBPS_CROSS_BASE}/usr/bin/python3-config"
|
|
|
|
post_patch() {
|
|
# Avoid Python shlib extension noise in libpytallic-util.so
|
|
vsed -e "/env.pyext_PATTERN/s/dct\['SO'\]/'.so'/" \
|
|
-i third_party/waf/waflib/Tools/python.py
|
|
}
|
|
|
|
tevent-python3_package() {
|
|
short_desc+=" - Python3 bindings"
|
|
depends="python3"
|
|
pkg_install() {
|
|
vmove ${py3_lib}
|
|
}
|
|
}
|
|
|
|
tevent-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/pkgconfig
|
|
vmove "usr/lib/*.so"
|
|
}
|
|
}
|