Skip to contentSkip to conversation

libgpiod: support for v1.0 series

PATCH Superseded Bartosz Golaszewski 1 participant 4 messages Mar 23, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover libgpiod: support for v1.0 series

I recently released a new major version of libgpiod in which the initial API was heavily reworked. Since it's no longer compatible with v0.3.2 but I know there are users of the latter and I also intend on supporting it for some time, I thought we should have both versions in recipes-support.

This series adds a new recipe for libgpiod v1.0 that can live next to v0.3.2.

Bartosz Golaszewski (3):
libgpiod: include the version in the recipe filename
libgpiod: split recipe into .inc and .bb files
libgpiod: add support for v1.x series

 meta-oe/recipes-support/libgpiod/{libgpiod.bb => libgpiod.inc} | 5 -----
 meta-oe/recipes-support/libgpiod/libgpiod_0.3.2.bb             | 4 ++++
 meta-oe/recipes-support/libgpiod/libgpiod_1.0.bb               | 4 ++++
 3 files changed, 8 insertions(+), 5 deletions(-)
 rename meta-oe/recipes-support/libgpiod/{libgpiod.bb => libgpiod.inc} (80%)
 create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod_0.3.2.bb
 create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod_1.0.bb
Signature · 1 line
2.16.1
#1 lore raw

PATCH 1/3 libgpiod: include the version in the recipe filename

As the first step in supporting both v0.x and v1.x series: include the version in the recipe filename.

---
 meta-oe/recipes-support/libgpiod/{libgpiod.bb => libgpiod_0.3.2.bb} | 2 --
 1 file changed, 2 deletions(-)
 rename meta-oe/recipes-support/libgpiod/{libgpiod.bb => libgpiod_0.3.2.bb} (98%)
meta-oe/recipes-support/libgpiod/libgpiod_0.3.2.bb renamed from meta-oe/recipes-support/libgpiod/libgpiod.bb +0 -2
similarity index 98%
rename from meta-oe/recipes-support/libgpiod/libgpiod.bb
rename to meta-oe/recipes-support/libgpiod/libgpiod_0.3.2.bb
index b2e3bae69..20068894e 100644
@@ -8,8 +8,6 @@ SRC_URI = "https://www.kernel.org/pub/software/libs/libgpiod/${BP}.tar.xz"
 SRC_URI[md5sum] = "9c1966bea7dffd59bd099a8b2930e2ea"
 SRC_URI[sha256sum] = "50c7862428ca90b58672e2475aea66d33a6fc86c6bab1928c0660f3aedf44a37"
 
-PV = "0.3.2"
-
 inherit autotools pkgconfig
 
 # enable tools
Signature · 1 line
2.16.1
#2 lore raw

PATCH 2/3 libgpiod: split recipe into .inc and .bb files

In reply to Bartosz Golaszewski

The build works the same for v0.x and v1.x series - leave only the hashes in the .bb file and put everything else into .inc.

---
 meta-oe/recipes-support/libgpiod/libgpiod.inc      | 21 +++++++++++++++++++++
 meta-oe/recipes-support/libgpiod/libgpiod_0.3.2.bb | 22 +---------------------
 2 files changed, 22 insertions(+), 21 deletions(-)
 create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod.inc
meta-oe/recipes-support/libgpiod/libgpiod.inc new file +21 -0
new file mode 100644
index 000000000..cd7750623
@@ -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}"
meta-oe/recipes-support/libgpiod/libgpiod_0.3.2.bb +1 -21
index 20068894e..ea785ad0c 100644
@@ -1,24 +1,4 @@
-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"
+require libgpiod.inc
 
 SRC_URI[md5sum] = "9c1966bea7dffd59bd099a8b2930e2ea"
 SRC_URI[sha256sum] = "50c7862428ca90b58672e2475aea66d33a6fc86c6bab1928c0660f3aedf44a37"
-
-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}"
Signature · 1 line
2.16.1
#3 lore raw

PATCH 3/3 libgpiod: add support for v1.x series

In reply to Bartosz Golaszewski

Add a recipe for libgpiod v1.0. It can live next to the one for v0.3.2.

---
 meta-oe/recipes-support/libgpiod/libgpiod_1.0.bb | 4 ++++
 1 file changed, 4 insertions(+)
 create mode 100644 meta-oe/recipes-support/libgpiod/libgpiod_1.0.bb
meta-oe/recipes-support/libgpiod/libgpiod_1.0.bb new file +4 -0
new file mode 100644
index 000000000..06d7efeb0
@@ -0,0 +1,4 @@
+require libgpiod.inc
+
+SRC_URI[md5sum] = "e38a67d01964f727703da9f698bfa53e"
+SRC_URI[sha256sum] = "34c76b3730b9d4a1159bcb14000f78b1e890251b8a3823b794fa930654eabdd0"
Signature · 1 line
2.16.1