tevent: enable python bindings

Also support cross compilation without relying on "answer" files.
This commit is contained in:
Andrew J. Hesford 2020-12-13 16:50:32 -05:00
parent 02517ce311
commit 4ec9f82ea8
3 changed files with 23 additions and 65 deletions

1
srcpkgs/tevent-python3 Symbolic link
View file

@ -0,0 +1 @@
tevent

View file

@ -1,51 +0,0 @@
Checking uname sysname type: "Linux"
Checking uname machine type: "dontcare"
Checking uname release type: "dontcare"
Checking uname version type: "dontcare"
Checking simple C program: OK
Checking for -D_LARGE_FILES: OK
building library support: OK
Checking for large file support: OK
Checking for -D_FILE_OFFSET_BITS=64: OK
Checking for WORDS_BIGENDIAN: OK
Checking size of char: "1"
Checking size of int: "4"
Checking size of long long: "4"
Checking size of long: "4"
Checking size of off_t: "4"
Checking size of short: "2"
Checking size of size_t: "4"
Checking size of ssize_t: "4"
Checking size of dev_t: "4"
Checking size of ino_t: "4"
Checking size of time_t: "4"
Checking size of void*: "4"
Checking for C99 vsnprintf: OK
Checking for HAVE_SECURE_MKSTEMP: OK
rpath library support: OK
-Wl,--version-script support: OK
Checking size of bool: "1"
Checking size of int8_t: "1"
Checking size of uint8_t: "1"
Checking size of int16_t: "2"
Checking size of uint16_t: "2"
Checking size of int32_t: "4"
Checking size of uint32_t: "4"
Checking size of int64_t: "4"
Checking size of uint64_t: "4"
Checking correct behavior of strtoll: OK
Checking correct behavior of strptime: OK
Checking for HAVE_IFACE_GETIFADDRS: OK
Checking for HAVE_IFACE_IFCONF: OK
Checking for HAVE_IFACE_IFREQ: OK
Checking getconf LFS_CFLAGS: "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
Checking for large file support without additional flags: OK
Checking for working strptime: OK
Checking for HAVE_SHARED_MMAP: OK
Checking for HAVE_MREMAP: OK
Checking for HAVE_INCOHERENT_MMAP: NO
Checking getconf large file support flags work: OK
Checking value of NSIG: 64
Checking value of _NSIG: 64
Checking value of SIGRTMAX: 32
Checking value of SIGRTMIN: 32

View file

@ -1,10 +1,15 @@
# Template file for 'tevent'
pkgname=tevent
version=0.10.2
revision=1
build_style=configure
hostmakedepends="python3 pkg-config which"
makedepends="talloc-devel libtirpc-devel"
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"
@ -12,17 +17,20 @@ homepage="https://tevent.samba.org"
distfiles="https://ftp.samba.org/pub/tevent/tevent-${version}.tar.gz"
checksum=f8427822e5b2878fb8b28d6f50d96848734f3f3130612fb574fdd2d2148a6696
do_configure() {
case "XBPS_TARGET_WORDSIZE" in
32) vsed -e '/NSIG/s,64,32,' -e '/_NSIG/s,64,32,' -i "$FILESDIR"/cross-32bit.answers
esac
export PYTHON_CONFIG="${XBPS_CROSS_BASE}/usr/bin/python3-config"
if [ "$CROSS_BUILD" ]; then
cp "$FILESDIR"/cross-32bit.answers .
_args="${configure_args} --cross-compile --hostcc=${CC} --cross-answers=cross-32bit.answers"
fi
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
}
./configure --prefix=/usr --disable-python ${_args}
tevent-python3_package() {
short_desc+=" - Python3 bindings"
depends="python3"
pkg_install() {
vmove ${py3_lib}
}
}
tevent-devel_package() {
@ -31,6 +39,6 @@ tevent-devel_package() {
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/lib/*.so
vmove "usr/lib/*.so"
}
}