aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openembedded-layer/recipes-support/libgpiod/files/build-set-c-as-language-for-c-bindings-tests.patch30
-rw-r--r--openembedded-layer/recipes-support/libgpiod/libgpiod.inc21
-rw-r--r--openembedded-layer/recipes-support/libgpiod/libgpiod_1.2.bb18
3 files changed, 69 insertions, 0 deletions
diff --git a/openembedded-layer/recipes-support/libgpiod/files/build-set-c-as-language-for-c-bindings-tests.patch b/openembedded-layer/recipes-support/libgpiod/files/build-set-c-as-language-for-c-bindings-tests.patch
new file mode 100644
index 0000000..49ce743
--- /dev/null
+++ b/openembedded-layer/recipes-support/libgpiod/files/build-set-c-as-language-for-c-bindings-tests.patch
@@ -0,0 +1,30 @@
+From 63ef77de806c377af8eaf53774d2850c43009d5e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <yosoy@danieldiaz.org>
+Date: Fri, 15 Mar 2019 17:58:55 -0600
+Subject: [PATCH] build: Set C++ as language for C++ bindings tests
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Daniel Díaz <yosoy@danieldiaz.org>
+Upstream-Status: Pending
+
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 4adff7b..701fbbf 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -136,6 +136,7 @@ AM_CONDITIONAL([WITH_BINDINGS_CXX], [test "x$with_bindings_cxx" = xtrue])
+ if test "x$with_bindings_cxx" = xtrue
+ then
+ AC_LIBTOOL_CXX
++ AC_LANG([C++])
+ # This needs autoconf-archive
+ AX_CXX_COMPILE_STDCXX_11([ext], [mandatory])
+ fi
+--
+2.17.1
+
diff --git a/openembedded-layer/recipes-support/libgpiod/libgpiod.inc b/openembedded-layer/recipes-support/libgpiod/libgpiod.inc
new file mode 100644
index 0000000..cd77506
--- /dev/null
+++ b/openembedded-layer/recipes-support/libgpiod/libgpiod.inc
@@ -0,0 +1,21 @@
+SUMMARY = "C library and tools for interacting with the linux GPIO character device"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de"
+
+SRC_URI = "https://www.kernel.org/pub/software/libs/libgpiod/${BP}.tar.xz"
+
+inherit autotools pkgconfig
+
+# enable tools
+PACKAGECONFIG ?= "tools"
+
+PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev"
+PACKAGECONFIG[tools] = "--enable-tools,--disable-tools,"
+
+PACKAGES =+ " ${PN}-tools"
+
+FILES_${PN}-tools = "${bindir}/*"
+
+RRECOMMENDS_TOOLS = "${@bb.utils.contains('PACKAGECONFIG', 'tools', '${PN}-tools', '',d)}"
+RRECOMMENDS_${PN} += "${RRECOMMENDS_TOOLS}"
diff --git a/openembedded-layer/recipes-support/libgpiod/libgpiod_1.2.bb b/openembedded-layer/recipes-support/libgpiod/libgpiod_1.2.bb
new file mode 100644
index 0000000..1a4457c
--- /dev/null
+++ b/openembedded-layer/recipes-support/libgpiod/libgpiod_1.2.bb
@@ -0,0 +1,18 @@
+require libgpiod.inc
+
+DEPENDS += "autoconf-archive-native"
+
+SRC_URI += "file://build-set-c-as-language-for-c-bindings-tests.patch"
+
+SRC_URI[md5sum] = "34a9972f2f4e9c32fa940301301b007d"
+SRC_URI[sha256sum] = "b6b9079c933f7c8524815437937dda6b795a16141bca202a9eec70ba5844b5ba"
+
+PACKAGECONFIG[cxx] = "--enable-bindings-cxx,--disable-bindings-cxx"
+
+PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3"
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}
+
+PACKAGES =+ "${PN}-python"
+FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
+RRECOMMENDS_PYTHON = "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '',d)}"
+RRECOMMENDS_${PN}-python += "${RRECOMMENDS_PYTHON}"