libgpiod.mk 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ################################################################################
  2. #
  3. # libgpiod
  4. #
  5. ################################################################################
  6. # Be careful when bumping versions.
  7. # Dependency on kernel header versions may change.
  8. LIBGPIOD_VERSION = 1.6.4
  9. LIBGPIOD_SOURCE = libgpiod-$(LIBGPIOD_VERSION).tar.xz
  10. LIBGPIOD_SITE = https://www.kernel.org/pub/software/libs/libgpiod
  11. LIBGPIOD_LICENSE = LGPL-2.1+
  12. LIBGPIOD_LICENSE_FILES = COPYING
  13. LIBGPIOD_INSTALL_STAGING = YES
  14. LIBGPIOD_DEPENDENCIES = host-pkgconf host-autoconf-archive
  15. # We're patching configure.ac
  16. LIBGPIOD_AUTORECONF = YES
  17. LIBGPIOD_AUTORECONF_OPTS = --include=$(HOST_DIR)/share/autoconf-archive
  18. LIBGPIOD_CONF_OPTS = --disable-tests --disable-examples
  19. ifeq ($(BR2_PACKAGE_LIBGPIOD_TOOLS),y)
  20. LIBGPIOD_CONF_OPTS += --enable-tools
  21. else
  22. LIBGPIOD_CONF_OPTS += --disable-tools
  23. endif
  24. ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
  25. LIBGPIOD_CONF_OPTS += --enable-bindings-cxx
  26. else
  27. LIBGPIOD_CONF_OPTS += --disable-bindings-cxx
  28. endif
  29. ifeq ($(BR2_PACKAGE_PYTHON3),y)
  30. LIBGPIOD_CONF_OPTS += --enable-bindings-python
  31. LIBGPIOD_DEPENDENCIES += python3
  32. LIBGPIOD_CONF_ENV += \
  33. PYTHON=$(HOST_DIR)/bin/python3 \
  34. PYTHON_CPPFLAGS="`$(STAGING_DIR)/usr/bin/python3-config --includes`" \
  35. PYTHON_LIBS="`$(STAGING_DIR)/usr/bin/python3-config --ldflags`"
  36. else
  37. LIBGPIOD_CONF_OPTS += --disable-bindings-python
  38. endif
  39. $(eval $(autotools-package))