All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] libgpiod: refactor the recipe
@ 2020-09-25 11:44 Bartosz Golaszewski
  2020-09-26  2:04 ` Khem Raj
  0 siblings, 1 reply; 5+ messages in thread
From: Bartosz Golaszewski @ 2020-09-25 11:44 UTC (permalink / raw)
  To: Khem Raj, Armin Kuster, openembedded-devel; +Cc: Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

After dropping the support for v0.3.x let's refactor the entire recipe.
Let's move most definitions into libgpiod.inc and only leave the hashes
in libgpiod_1.4.4.bb. Let's use ${BPN} in the URL, consolidate certain
variables and add some explanatory comments.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 meta-oe/recipes-support/libgpiod/libgpiod.inc | 21 ++++++++++++++-----
 .../libgpiod/libgpiod_1.4.4.bb                | 15 -------------
 2 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/meta-oe/recipes-support/libgpiod/libgpiod.inc b/meta-oe/recipes-support/libgpiod/libgpiod.inc
index cae3145dd..ec81b3bdd 100644
--- a/meta-oe/recipes-support/libgpiod/libgpiod.inc
+++ b/meta-oe/recipes-support/libgpiod/libgpiod.inc
@@ -3,17 +3,28 @@ SUMMARY = "C library and tools for interacting with the linux GPIO character dev
 LICENSE = "LGPLv2.1+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de"
 
-SRC_URI = "https://www.kernel.org/pub/software/libs/libgpiod/${BP}.tar.xz"
+SRC_URI = "https://www.kernel.org/pub/software/libs/${BPN}/${BP}.tar.xz"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig python3native
 
 PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev"
+PACKAGECONFIG[cxx] = "--enable-bindings-cxx,--disable-bindings-cxx"
+PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3"
 
+# Enable cxx bindings by default.
+PACKAGECONFIG ?= "cxx"
+
+# Always build tools - they don't have any additional
+# requirements over the library.
 EXTRA_OECONF = "--enable-tools"
 
-PACKAGES =+ " ${PN}-tools"
+DEPENDS += "autoconf-archive-native"
 
+PACKAGES =+ "${PN}-tools libgpiodcxx"
 FILES_${PN}-tools = "${bindir}/*"
-
-PACKAGES =+ "libgpiodcxx"
 FILES_libgpiodcxx = "${libdir}/libgpiodcxx.so.*"
+
+PACKAGES =+ "${PN}-python"
+FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
+RRECOMMENDS_PYTHON = "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '',d)}"
+RRECOMMENDS_${PN}-python += "${RRECOMMENDS_PYTHON}"
diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_1.4.4.bb b/meta-oe/recipes-support/libgpiod/libgpiod_1.4.4.bb
index b5a64a554..6cb43f994 100644
--- a/meta-oe/recipes-support/libgpiod/libgpiod_1.4.4.bb
+++ b/meta-oe/recipes-support/libgpiod/libgpiod_1.4.4.bb
@@ -1,19 +1,4 @@
 require libgpiod.inc
 
-DEPENDS += "autoconf-archive-native"
-
 SRC_URI[md5sum] = "064c2627397e6641c52de09a26951112"
 SRC_URI[sha256sum] = "f1cda2789e6a13a92aefc012a76e5a7cc57a1b402d66f71df8719ee314b67699"
-
-# enable cxx bindings
-PACKAGECONFIG ?= "cxx"
-
-PACKAGECONFIG[cxx] = "--enable-bindings-cxx,--disable-bindings-cxx"
-PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3"
-
-inherit python3native
-
-PACKAGES =+ "${PN}-python"
-FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
-RRECOMMENDS_PYTHON = "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '',d)}"
-RRECOMMENDS_${PN}-python += "${RRECOMMENDS_PYTHON}"
-- 
2.26.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-28 11:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-25 11:44 [meta-oe][PATCH] libgpiod: refactor the recipe Bartosz Golaszewski
2020-09-26  2:04 ` Khem Raj
2020-09-26 13:50   ` [oe] " Otavio Salvador
2020-09-28  8:38   ` Bartosz Golaszewski
2020-09-28 11:33     ` [oe] " Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.