diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-01-26 20:50:32 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-01-27 17:08:03 -0800 |
commit | a0261da7b9f3c351a1cc4c298bdd77bee60f277e (patch) | |
tree | df20335d1927a581fef67ea4977cdc280e2f9f3c /meta-oe | |
parent | ea63f13846f47636b5caac7c5c38b6f7fcd66536 (diff) | |
download | meta-openembedded-contrib-a0261da7b9f3c351a1cc4c298bdd77bee60f277e.tar.gz |
rwmem: Update to latest
- Switch to using meson
- Fix build with gcc13
- Use packageconfig for enabling python support and static libs
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem/0001-include-missing-cstdint.patch | 32 | ||||
-rw-r--r-- | meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem_1.2.bb | 26 |
2 files changed, 45 insertions, 13 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem/0001-include-missing-cstdint.patch b/meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem/0001-include-missing-cstdint.patch new file mode 100644 index 0000000000..0560daa4c2 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem/0001-include-missing-cstdint.patch @@ -0,0 +1,32 @@ +From 84e884f99e581515b49d8973538bb17e1e6c0dc0 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 26 Jan 2023 20:45:57 -0800 +Subject: [PATCH] include missing <cstdint> + +gcc 13 moved some includes around and as a result <cstdint> is no +longer transitively included [1]. Explicitly include it for +uint{32,64}_t. + +[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes + +Upstream-Status: Submitted [https://github.com/tomba/rwmem/pull/7] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + librwmem/helpers.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/librwmem/helpers.h b/librwmem/helpers.h +index a0a738b..8d02c9c 100644 +--- a/librwmem/helpers.h ++++ b/librwmem/helpers.h +@@ -1,6 +1,7 @@ + #pragma once + + #include <cerrno> ++#include <cstdint> + #include <string> + #include <vector> + #include <string.h> +-- +2.39.1 + diff --git a/meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem_1.2.bb b/meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem_1.2.bb index 7bca24cc0a..8ccdc27a8e 100644 --- a/meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem_1.2.bb +++ b/meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem_1.2.bb @@ -11,25 +11,25 @@ In i2c mode rwmem accesses an i2c peripheral by sending i2c messages to it." LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" -DEPENDS += "python3 python3-pybind11" +DEPENDS += "fmt libinih" PV .= "+git${SRCPV}" -SRCREV_rwmem = "3ec3e421211b58e766651c2e3a3a21acf14a1906" -SRCREV_inih = "4b10c654051a86556dfdb634c891b6c3224c4109" +SRCREV = "8416326777b2aada0706539b8f9f6acefa476b16" -SRCREV_FORMAT = "rwmem_inih" - -SRC_URI = " \ - git://github.com/tomba/rwmem.git;protocol=https;name=rwmem;branch=master \ - git://github.com/benhoyt/inih.git;protocol=https;name=inih;nobranch=1;destsuffix=git/ext/inih \ -" +SRC_URI = "git://github.com/tomba/rwmem.git;protocol=https;name=rwmem;branch=master \ + file://0001-include-missing-cstdint.patch" S = "${WORKDIR}/git" -inherit cmake pkgconfig +inherit meson pkgconfig python3native + +PACKAGECONFIG ?= "python static" +PACKAGECONFIG[python] = "-Dpyrwmem=enabled,-Dpyrwmem=disabled,cmake-native python3 python3-pybind11" +PACKAGECONFIG[static] = "-Dstatic-libc=true,-Dstatic-libc=false," -do_install() { - install -D -m 0755 ${B}/bin/rwmem ${D}${bindir}/rwmem - install -D -m 0644 ${B}/lib/librwmem.a ${D}${libdir}/librwmem.a +do_install:append() { + install -D -m 0644 ${B}/librwmem/librwmem.a ${D}${libdir}/librwmem.a } + +FILES:${PN} += "${libdir}/python3.11/site-packages/pyrwmem" |