2022-02-05 14:23:32 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
|
|
|
|
|
|
|
PKG_NAME="i2c-tools"
|
2022-02-27 23:34:12 +00:00
|
|
|
PKG_VERSION="4.3"
|
|
|
|
PKG_SHA256="1f899e43603184fac32f34d72498fc737952dbc9c97a8dd9467fadfdf4600cf9"
|
2022-02-05 14:23:32 +00:00
|
|
|
PKG_LICENSE="GPL"
|
2022-02-27 23:34:12 +00:00
|
|
|
PKG_SITE="https://i2c.wiki.kernel.org/index.php/I2C_Tools"
|
|
|
|
PKG_URL="https://www.kernel.org/pub/software/utils/i2c-tools/${PKG_NAME}-${PKG_VERSION}.tar.xz"
|
|
|
|
PKG_DEPENDS_TARGET="toolchain Python3 distutilscross:host"
|
2022-02-05 14:23:32 +00:00
|
|
|
PKG_LONGDESC="A heterogeneous set of I2C tools for Linux."
|
2022-02-27 23:34:12 +00:00
|
|
|
PKG_BUILD_FLAGS="-sysroot"
|
2022-02-05 14:23:32 +00:00
|
|
|
|
|
|
|
pre_make_target() {
|
2022-02-27 23:34:12 +00:00
|
|
|
export PYTHONXCPREFIX="${SYSROOT_PREFIX}/usr"
|
|
|
|
export LDSHARED="${CC} -shared"
|
2022-02-05 14:23:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
make_target() {
|
2022-02-27 23:34:12 +00:00
|
|
|
make CC="${CC}" \
|
|
|
|
AR="${AR}" \
|
|
|
|
CFLAGS="${TARGET_CFLAGS}" \
|
|
|
|
CPPFLAGS="${TARGET_CPPFLAGS} -I${SYSROOT_PREFIX}/usr/include/${PKG_PYTHON_VERSION}" \
|
|
|
|
PYTHON=${TOOLCHAIN}/bin/python3 \
|
|
|
|
all
|
|
|
|
|
2022-02-05 14:23:32 +00:00
|
|
|
make EXTRA="py-smbus" \
|
2022-02-27 23:34:12 +00:00
|
|
|
CC="${CC}" \
|
|
|
|
AR="${AR}" \
|
|
|
|
CFLAGS="${TARGET_CFLAGS}" \
|
|
|
|
CPPFLAGS="${TARGET_CPPFLAGS} -I${SYSROOT_PREFIX}/usr/include/${PKG_PYTHON_VERSION}" \
|
|
|
|
PYTHON=${TOOLCHAIN}/bin/python3 \
|
|
|
|
all-python
|
2022-02-05 14:23:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
makeinstall_target() {
|
2022-02-27 23:34:12 +00:00
|
|
|
make EXTRA="py-smbus" \
|
|
|
|
DESTDIR=${INSTALL} \
|
|
|
|
PREFIX="/usr" \
|
|
|
|
prefix="/usr" \
|
|
|
|
PYTHON=${TOOLCHAIN}/bin/python3 \
|
|
|
|
install
|
2022-02-05 14:23:32 +00:00
|
|
|
}
|