From e1c1d565b9a8d29ad1fb125c5f9180abec67bd83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Wed, 26 Feb 2020 22:33:54 +0700 Subject: [PATCH] python3-iwlib: cross-compile Also bump revision because missing dependencies. --- srcpkgs/python3-iwlib/template | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/srcpkgs/python3-iwlib/template b/srcpkgs/python3-iwlib/template index c1b85d9e415..0120b1d1463 100644 --- a/srcpkgs/python3-iwlib/template +++ b/srcpkgs/python3-iwlib/template @@ -1,20 +1,31 @@ # Template file for 'python3-iwlib' pkgname=python3-iwlib version=1.7.0 -revision=2 -wrksrc="${pkgname/python3-/}-${version}" +revision=3 +wrksrc="iwlib-${version}" build_style=python3-module -pycompile_module="iwlib" -hostmakedepends="python3-setuptools" +hostmakedepends="python3-setuptools python3-cffi" makedepends="python3-devel wireless_tools-devel libffi-devel" -depends="python3 wireless_tools" +depends="python3-cffi wireless_tools" short_desc="Python Iwlib wrapper for interacting with wireless devices" maintainer="Orphaned " license="GPL-2.0-only" homepage="https://github.com/nathan-hoad/python-iwlib" distfiles="${PYPI_SITE}/i/iwlib/iwlib-${version}.tar.gz" checksum=a805f6597a70ee3001aba8f039fb7b2dcb75dc15c4e7852f5594fd6379196da1 -nocross=https://build.voidlinux.org/builders/aarch64-musl_builder/builds/11458/steps/shell_3/logs/stdio + +do_patch() { + # _iwlib_build.py try to load the shared object + # to verify if it's built correctly. + # Comment it out and restore it back after build + vsed -i iwlib/_iwlib_build.py \ + -e '/ffibuilder\.verify/s/^/# /' +} + +post_install() { + vsed -i ${DESTDIR}/${py3_sitelib}/iwlib/_iwlib_build.py \ + -e '/ffibuilder\.verify/s/^# //' +} do_check() { python3 test/test_imports.py