From: "Bartosz Golaszewski" <brgl@bgdev.pl>
To: Khem Raj <raj.khem@gmail.com>,
Armin Kuster <akuster808@gmail.com>,
openembedded-devel@lists.openembedded.org
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: [meta-oe][PATCH] libgpiod: refactor the recipe
Date: Fri, 25 Sep 2020 13:44:41 +0200 [thread overview]
Message-ID: <20200925114441.13905-1-brgl@bgdev.pl> (raw)
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
next reply other threads:[~2020-09-25 11:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-25 11:44 Bartosz Golaszewski [this message]
2020-09-26 2:04 ` [meta-oe][PATCH] libgpiod: refactor the recipe 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200925114441.13905-1-brgl@bgdev.pl \
--to=brgl@bgdev.pl \
--cc=akuster808@gmail.com \
--cc=bgolaszewski@baylibre.com \
--cc=openembedded-devel@lists.openembedded.org \
--cc=raj.khem@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.