Skip to contentSkip to conversation

libgpiod: put gpio utils into an actual separate package

PATCH In review Bartosz Golaszewski 2 participants 2 messages Jul 27, 2019 – Jul 29, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libgpiod: put gpio utils into an actual separate package

From: Bartosz Golaszewski <[email protected]>

Currently tools are built conditionally depending on whether the corresponding PACKAGECONFIG option has been set and, although they live in a separate libgpiod-tools package, the user cannot simply select it - he has to additionally extend PACKAGECONFIG. While this makes sense for python and C++ bindings, the tools don't have any dependencies other the libgpiod. Make libgpiod-tools an actual stand-alone package: always build them but install them only if user selected libgpiod-tools.

---
 meta-oe/recipes-support/libgpiod/libgpiod.inc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
meta-oe/recipes-support/libgpiod/libgpiod.inc +2 -4
index 89679cb91..07ce35a7f 100644
@@ -8,11 +8,9 @@ SRC_URI = "https://www.kernel.org/pub/software/libs/libgpiod/${BP}.tar.xz"
 inherit autotools pkgconfig
 
 PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev"
-PACKAGECONFIG[tools] = "--enable-tools,--disable-tools,"
+
+EXTRA_OECONF = "--enable-tools"
 
 PACKAGES =+ " ${PN}-tools"
 
 FILES_${PN}-tools = "${bindir}/*"
-
-RRECOMMENDS_TOOLS = "${@bb.utils.contains('PACKAGECONFIG', 'tools', '${PN}-tools', '',d)}"
-RRECOMMENDS_${PN} += "${RRECOMMENDS_TOOLS}"
Signature · 1 line
2.21.0
#1 lore raw

Fails to build

https://errors.yoctoproject.org/Errors/Details/255488/

Quoted 38 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Currently tools are built conditionally depending on whether the corresponding PACKAGECONFIG option has been set and, although they live in a separate libgpiod-tools package, the user cannot simply select it - he has to additionally extend PACKAGECONFIG. While this makes sense for python and C++ bindings, the tools don't have any dependencies other the libgpiod. Make libgpiod-tools an actual stand-alone package: always build them but install them only if user selected libgpiod-tools.

---
 meta-oe/recipes-support/libgpiod/libgpiod.inc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
meta-oe/recipes-support/libgpiod/libgpiod.inc +2 -5
index 89679cb91..07ce35a7f 100644
@@ -8,11 +8,9 @@ SRC_URI = "https://www.kernel.org/pub/software/libs/libgpiod/${BP}.tar.xz"
 inherit autotools pkgconfig
 
 PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev"
-PACKAGECONFIG[tools] = "--enable-tools,--disable-tools,"
+
+EXTRA_OECONF = "--enable-tools"
 
 PACKAGES =+ " ${PN}-tools"
 
 FILES_${PN}-tools = "${bindir}/*"
-
-RRECOMMENDS_TOOLS = "${@bb.utils.contains('PACKAGECONFIG', 'tools', '${PN}-tools', '',d)}"
-RRECOMMENDS_${PN} += "${RRECOMMENDS_TOOLS}"
--

2.21.0