update libgpiod
This commit is contained in:
@@ -0,0 +1,91 @@
|
|||||||
|
From 5e9e7223a3633ee82b557d21b1f18aa15becd450 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
||||||
|
Date: Mon, 7 Dec 2020 20:38:30 +0100
|
||||||
|
Subject: build: add a configure switch for building examples
|
||||||
|
|
||||||
|
Example code for bindings is currently always built if bindings are
|
||||||
|
enabled. Make it conditional with a new configure switch.
|
||||||
|
|
||||||
|
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
||||||
|
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
||||||
|
[Retrieved from:
|
||||||
|
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/commit/?id=5e9e7223a3633ee82b557d21b1f18aa15becd450]
|
||||||
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||||
|
---
|
||||||
|
bindings/cxx/Makefile.am | 8 +++++++-
|
||||||
|
bindings/python/Makefile.am | 10 ++++++++--
|
||||||
|
configure.ac | 6 ++++++
|
||||||
|
3 files changed, 21 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/bindings/cxx/Makefile.am b/bindings/cxx/Makefile.am
|
||||||
|
index 5c40ceb..87463b0 100644
|
||||||
|
--- a/bindings/cxx/Makefile.am
|
||||||
|
+++ b/bindings/cxx/Makefile.am
|
||||||
|
@@ -18,10 +18,16 @@ include_HEADERS = gpiod.hpp
|
||||||
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = libgpiodcxx.pc
|
||||||
|
|
||||||
|
-SUBDIRS = . examples
|
||||||
|
+SUBDIRS = .
|
||||||
|
|
||||||
|
if WITH_TESTS
|
||||||
|
|
||||||
|
SUBDIRS += tests
|
||||||
|
|
||||||
|
endif
|
||||||
|
+
|
||||||
|
+if WITH_EXAMPLES
|
||||||
|
+
|
||||||
|
+SUBDIRS += examples
|
||||||
|
+
|
||||||
|
+endif
|
||||||
|
diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am
|
||||||
|
index 124f152..5403bcb 100644
|
||||||
|
--- a/bindings/python/Makefile.am
|
||||||
|
+++ b/bindings/python/Makefile.am
|
||||||
|
@@ -6,8 +6,6 @@
|
||||||
|
# Copyright (C) 2017-2018 Bartosz Golaszewski <bartekgola@gmail.com>
|
||||||
|
#
|
||||||
|
|
||||||
|
-SUBDIRS = . examples
|
||||||
|
-
|
||||||
|
pyexec_LTLIBRARIES = gpiod.la
|
||||||
|
|
||||||
|
gpiod_la_SOURCES = gpiodmodule.c
|
||||||
|
@@ -17,8 +15,16 @@ gpiod_la_CFLAGS += -Wall -Wextra -g -std=gnu89 $(PYTHON_CPPFLAGS)
|
||||||
|
gpiod_la_LDFLAGS = -module -avoid-version
|
||||||
|
gpiod_la_LIBADD = $(top_builddir)/lib/libgpiod.la $(PYTHON_LIBS)
|
||||||
|
|
||||||
|
+SUBDIRS = .
|
||||||
|
+
|
||||||
|
if WITH_TESTS
|
||||||
|
|
||||||
|
SUBDIRS += tests
|
||||||
|
|
||||||
|
endif
|
||||||
|
+
|
||||||
|
+if WITH_EXAMPLES
|
||||||
|
+
|
||||||
|
+SUBDIRS += examples
|
||||||
|
+
|
||||||
|
+endif
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 57c99a8..90a6324 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -155,6 +155,12 @@ then
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
+AC_ARG_ENABLE([examples],
|
||||||
|
+ [AS_HELP_STRING([--enable-examples], [enable building code examples[default=no]])],
|
||||||
|
+ [if test "x$enableval" = xyes; then with_examples=true; fi],
|
||||||
|
+ [with_examples=false])
|
||||||
|
+AM_CONDITIONAL([WITH_EXAMPLES], [test "x$with_examples" = xtrue])
|
||||||
|
+
|
||||||
|
AC_ARG_ENABLE([bindings-cxx],
|
||||||
|
[AS_HELP_STRING([--enable-bindings-cxx],[enable C++ bindings [default=no]])],
|
||||||
|
[if test "x$enableval" = xyes; then with_bindings_cxx=true; fi],
|
||||||
|
--
|
||||||
|
cgit 1.2.3-1.el7
|
||||||
|
|
||||||
@@ -5,7 +5,7 @@ config BR2_PACKAGE_LIBGPIOD
|
|||||||
This is a C library that abstracts the GPIO character
|
This is a C library that abstracts the GPIO character
|
||||||
device operations on linux.
|
device operations on linux.
|
||||||
|
|
||||||
https://github.com/brgl/libgpiod
|
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/
|
||||||
|
|
||||||
if BR2_PACKAGE_LIBGPIOD
|
if BR2_PACKAGE_LIBGPIOD
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# From https://www.kernel.org/pub/software/libs/libgpiod/sha256sums.asc
|
# From https://www.kernel.org/pub/software/libs/libgpiod/sha256sums.asc
|
||||||
sha256 21ae8fd1f8dafc2eb2ba50e652390cf533d21351419a7426255895cb52e21b1c libgpiod-1.4.1.tar.xz
|
sha256 841be9d788f00bab08ef22c4be5c39866f0e46cb100a3ae49ed816ac9c5dddc7 libgpiod-1.6.3.tar.xz
|
||||||
# Hash for license file
|
# Hash for license file
|
||||||
sha256 ce64d5f7b49ea6d80fdb6d4cdee6839d1a94274f7493dc797c3b55b65ec8e9ed COPYING
|
sha256 ce64d5f7b49ea6d80fdb6d4cdee6839d1a94274f7493dc797c3b55b65ec8e9ed COPYING
|
||||||
|
|||||||
@@ -4,13 +4,19 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
LIBGPIOD_VERSION = 1.4.1
|
# Be careful when bumping versions.
|
||||||
|
# Dependency on kernel header versions may change.
|
||||||
|
LIBGPIOD_VERSION = 1.6.3
|
||||||
LIBGPIOD_SOURCE = libgpiod-$(LIBGPIOD_VERSION).tar.xz
|
LIBGPIOD_SOURCE = libgpiod-$(LIBGPIOD_VERSION).tar.xz
|
||||||
LIBGPIOD_SITE = https://www.kernel.org/pub/software/libs/libgpiod
|
LIBGPIOD_SITE = https://www.kernel.org/pub/software/libs/libgpiod
|
||||||
LIBGPIOD_LICENSE = LGPL-2.1+
|
LIBGPIOD_LICENSE = LGPL-2.1+
|
||||||
LIBGPIOD_LICENSE_FILES = COPYING
|
LIBGPIOD_LICENSE_FILES = COPYING
|
||||||
LIBGPIOD_INSTALL_STAGING = YES
|
LIBGPIOD_INSTALL_STAGING = YES
|
||||||
LIBGPIOD_DEPENDENCIES = host-pkgconf
|
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)
|
ifeq ($(BR2_PACKAGE_LIBGPIOD_TOOLS),y)
|
||||||
LIBGPIOD_CONF_OPTS += --enable-tools
|
LIBGPIOD_CONF_OPTS += --enable-tools
|
||||||
|
|||||||
Reference in New Issue
Block a user