i2c-tools: use python3 build_helper

This commit is contained in:
classabbyamp 2022-08-25 15:20:12 -04:00 committed by classabbyamp
parent 95fa41a7f3
commit e8ce48744f
1 changed files with 2 additions and 16 deletions

View File

@ -1,8 +1,9 @@
# Template file for 'i2c-tools'
pkgname=i2c-tools
version=4.3
revision=2
revision=3
build_style=gnu-makefile
build_helper=python3
make_build_args="EXTRA=py-smbus"
make_install_args="sbindir=/usr/bin EXTRA=py-smbus"
hostmakedepends="python3 python3-setuptools"
@ -16,21 +17,6 @@ distfiles="https://mirrors.edge.kernel.org/pub/software/utils/i2c-tools/i2c-tool
checksum=1f899e43603184fac32f34d72498fc737952dbc9c97a8dd9467fadfdf4600cf9
system_groups="i2c"
if [ -n "$CROSS_BUILD" ]; then
export PYPREFIX="$XBPS_CROSS_BASE"
export CFLAGS+=" -I${XBPS_CROSS_BASE}/${py3_inc} -I${XBPS_CROSS_BASE}/usr/include"
export LDFLAGS+=" -L${XBPS_CROSS_BASE}/${py3_lib} -L${XBPS_CROSS_BASE}/usr/lib"
export CC="${XBPS_CROSS_TRIPLET}-gcc -pthread $CFLAGS $LDFLAGS"
export LDSHARED="${CC} -shared $LDFLAGS"
export PYTHONPATH="${XBPS_CROSS_BASE}/${py3_lib}"
for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
f=${f##*/}
_PYTHON_SYSCONFIGDATA_NAME=${f%.py}
done
export _PYTHON_SYSCONFIGDATA_NAME
fi
post_install() {
vinstall "${FILESDIR}/45-i2c-tools.rules" 644 usr/lib/udev/rules.d
}