* [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
* Re: [meta-oe][PATCH] libgpiod: refactor the recipe
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
0 siblings, 2 replies; 5+ messages in thread
From: Khem Raj @ 2020-09-26 2:04 UTC (permalink / raw)
To: Bartosz Golaszewski; +Cc: Armin Kuster, openembeded-devel, Bartosz Golaszewski
Usually, the recipes are moving otherway. include files are useful
only when there should be multiple recipes sharing common stuff. For a
single recipe it would be an overkill IMO
On Fri, Sep 25, 2020 at 4:44 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> 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 [flat|nested] 5+ messages in thread
* Re: [oe] [meta-oe][PATCH] libgpiod: refactor the recipe
2020-09-26 2:04 ` Khem Raj
@ 2020-09-26 13:50 ` Otavio Salvador
2020-09-28 8:38 ` Bartosz Golaszewski
1 sibling, 0 replies; 5+ messages in thread
From: Otavio Salvador @ 2020-09-26 13:50 UTC (permalink / raw)
To: Khem Raj
Cc: Bartosz Golaszewski, Armin Kuster, openembeded-devel,
Bartosz Golaszewski
Em sex., 25 de set. de 2020 às 23:04, Khem Raj <raj.khem@gmail.com> escreveu:
>
> Usually, the recipes are moving otherway. include files are useful
> only when there should be multiple recipes sharing common stuff. For a
> single recipe it would be an overkill IMO
Agreed; it adds an extra indirection for no good reason.
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [meta-oe][PATCH] libgpiod: refactor the recipe
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
1 sibling, 1 reply; 5+ messages in thread
From: Bartosz Golaszewski @ 2020-09-28 8:38 UTC (permalink / raw)
To: Khem Raj; +Cc: Armin Kuster, openembeded-devel, Bartosz Golaszewski
On Sat, Sep 26, 2020 at 4:04 AM Khem Raj <raj.khem@gmail.com> wrote:
>
> Usually, the recipes are moving otherway. include files are useful
> only when there should be multiple recipes sharing common stuff. For a
> single recipe it would be an overkill IMO
>
I considered pulling everything into libgpiod_1.4.4.bb but we're
currently in the process of developing v2 of the GPIO user API in the
kernel and libgpiod will get a new major, non compatible release after
that's upstream. That means: even if we pull everything into .bb now,
we'll revert back to having an .inc later.
What do you think is the best way to go about this?
Bartosz
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [oe] [meta-oe][PATCH] libgpiod: refactor the recipe
2020-09-28 8:38 ` Bartosz Golaszewski
@ 2020-09-28 11:33 ` Otavio Salvador
0 siblings, 0 replies; 5+ messages in thread
From: Otavio Salvador @ 2020-09-28 11:33 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Khem Raj, Armin Kuster, openembeded-devel, Bartosz Golaszewski
Em seg., 28 de set. de 2020 às 05:38, Bartosz Golaszewski
<brgl@bgdev.pl> escreveu:
> On Sat, Sep 26, 2020 at 4:04 AM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > Usually, the recipes are moving otherway. include files are useful
> > only when there should be multiple recipes sharing common stuff. For a
> > single recipe it would be an overkill IMO
> >
>
> I considered pulling everything into libgpiod_1.4.4.bb but we're
> currently in the process of developing v2 of the GPIO user API in the
> kernel and libgpiod will get a new major, non compatible release after
> that's upstream. That means: even if we pull everything into .bb now,
> we'll revert back to having an .inc later.
>
> What do you think is the best way to go about this?
If in future it makes sense to split it we can do. It is hard to
predict what the v2 will be as for example the build options might end
being different and then the .inc makes no sense.
I'd say let's consolidate it and whenever the v2 is out, we consider
the best option depending on how it ends being done.
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [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.