mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-09 07:51:59 -09:00
Unlike libgpiod2, this version of libgpiod relies on the deprecated GPIO
ABI version 1. This ABI used to be enabled by default. However, since
Linux 7.1-rc1 (commit 7673e4c7f7f9 "Do not enable the v1 uAPI by
default"), this is not the case anymore. Failing to enable the ABI
results in a non-functional libgpiod. For instance:
# gpioinfo
gpioinfo: error creating line iterator: Invalid argument
Fix this by enabling the ABI v1 in LIBGPIOD_LINUX_CONFIG_FIXUPS.
Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
49 lines
1.5 KiB
Makefile
49 lines
1.5 KiB
Makefile
################################################################################
|
|
#
|
|
# libgpiod
|
|
#
|
|
################################################################################
|
|
|
|
# Be careful when bumping versions.
|
|
# Dependency on kernel header versions may change.
|
|
LIBGPIOD_VERSION = 1.6.5
|
|
LIBGPIOD_SOURCE = libgpiod-$(LIBGPIOD_VERSION).tar.xz
|
|
LIBGPIOD_SITE = https://www.kernel.org/pub/software/libs/libgpiod
|
|
LIBGPIOD_LICENSE = LGPL-2.1+
|
|
LIBGPIOD_LICENSE_FILES = COPYING
|
|
LIBGPIOD_INSTALL_STAGING = YES
|
|
LIBGPIOD_DEPENDENCIES = host-pkgconf host-autoconf-archive
|
|
# We're patching configure.ac
|
|
LIBGPIOD_AUTORECONF = YES
|
|
LIBGPIOD_AUTORECONF_OPTS = --include=$(HOST_DIR)/share/autoconf-archive
|
|
LIBGPIOD_CONF_OPTS = --disable-tests --disable-examples
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBGPIOD_TOOLS),y)
|
|
LIBGPIOD_CONF_OPTS += --enable-tools
|
|
else
|
|
LIBGPIOD_CONF_OPTS += --disable-tools
|
|
endif
|
|
|
|
define LIBGPIOD_LINUX_CONFIG_FIXUPS
|
|
$(call KCONFIG_ENABLE_OPT,CONFIG_GPIO_CDEV_V1)
|
|
endef
|
|
|
|
ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
|
|
LIBGPIOD_CONF_OPTS += --enable-bindings-cxx
|
|
else
|
|
LIBGPIOD_CONF_OPTS += --disable-bindings-cxx
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
|
LIBGPIOD_CONF_OPTS += --enable-bindings-python
|
|
LIBGPIOD_DEPENDENCIES += python3
|
|
LIBGPIOD_CONF_ENV += \
|
|
PYTHON=$(HOST_DIR)/bin/python3 \
|
|
PYTHON_CPPFLAGS="`$(STAGING_DIR)/usr/bin/python3-config --includes`" \
|
|
PYTHON_LIBS="`$(STAGING_DIR)/usr/bin/python3-config --ldflags`"
|
|
else
|
|
LIBGPIOD_CONF_OPTS += --disable-bindings-python
|
|
endif
|
|
|
|
$(eval $(autotools-package))
|