libgpiod: build python bindings

This commit is contained in:
HungerHa 2025-01-09 08:58:12 +01:00
parent f656dc12a4
commit 324d455251

View File

@ -7,9 +7,18 @@ PKG_SHA256="ae35329db7027c740e90c883baf27c26311f0614e6a7b115771b28188b992aec"
PKG_LICENSE="GPLv2+"
PKG_SITE="https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/"
PKG_URL="https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_DEPENDS_TARGET="toolchain Python3 setuptools:host"
PKG_LONGDESC="Tools for interacting with the linux GPIO character device."
PKG_TOOLCHAIN="autotools"
PKG_BUILD_FLAGS="+pic"
PKG_BUILD_FLAGS="+pic -sysroot"
PKG_CONFIGURE_OPTS_TARGET="--enable-tools --disable-shared"
post_make_target() {
(
LDFLAGS+=" -L${PKG_BUILD}/.${TARGET_NAME}/lib/.libs"
CFLAGS+=" -I${PKG_BUILD}/include"
cd ../bindings/python
python_target_env python3 -m build -n -w -x
)
}