diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-12-31 19:32:42 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-12-31 19:33:19 -0800 |
commit | 107614cd20a20a11a98c67d7e04b261311dab991 (patch) | |
tree | 0ddeca6435456e67f68cce94734bd29cf76f02cd /meta-oe/recipes-extended | |
parent | 26385a54b0958186b8be6a3cd660d32bbda9a8e9 (diff) | |
download | meta-openembedded-contrib-107614cd20a20a11a98c67d7e04b261311dab991.tar.gz |
mraa: Update to latest tip of trunk
Drop already applied patch.
Fix build with latest musl while here.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended')
5 files changed, 80 insertions, 34 deletions
diff --git a/meta-oe/recipes-extended/mraa/mraa/0001-cmake-Use-a-regular-expression-to-match-x86-architec.patch b/meta-oe/recipes-extended/mraa/mraa/0001-cmake-Use-a-regular-expression-to-match-x86-architec.patch index dedb4adf9b..bd8f5be05d 100644 --- a/meta-oe/recipes-extended/mraa/mraa/0001-cmake-Use-a-regular-expression-to-match-x86-architec.patch +++ b/meta-oe/recipes-extended/mraa/mraa/0001-cmake-Use-a-regular-expression-to-match-x86-architec.patch @@ -13,7 +13,7 @@ So using a wildcard helps in using any x86 arch Signed-off-by: Khem Raj <raj.khem@gmail.com> --- -Upstream-Status: Pending +Upstream-Status: Submitted [https://github.com/eclipse/mraa/pull/1125] CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meta-oe/recipes-extended/mraa/mraa/0001-include-Declare-gVERSION-global-as-extern.patch b/meta-oe/recipes-extended/mraa/mraa/0001-include-Declare-gVERSION-global-as-extern.patch deleted file mode 100644 index d1152ed641..0000000000 --- a/meta-oe/recipes-extended/mraa/mraa/0001-include-Declare-gVERSION-global-as-extern.patch +++ /dev/null @@ -1,31 +0,0 @@ -From dbb5961f106ec42cd70689d933674c9c37aedfe1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org> -Date: Mon, 13 Apr 2020 20:12:11 +0200 -Subject: include: Declare gVERSION global as 'extern'. - -Fixes build with '-fno-common'. - -Upstream-Status: Submitted [https://github.com/eclipse/mraa/pull/1012] -Signed-off-by: Adrian Bunk <bunk@stusta.de> ---- - include/version.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/include/version.h b/include/version.h -index 47366ef..3a567a1 100644 ---- a/include/version.h -+++ b/include/version.h -@@ -11,8 +11,8 @@ - extern "C" { - #endif - --const char* gVERSION; --const char* gVERSION_SHORT; -+extern const char* gVERSION; -+extern const char* gVERSION_SHORT; - - #ifdef __cplusplus - } --- -2.17.1 - diff --git a/meta-oe/recipes-extended/mraa/mraa/0001-mraa-Use-posix-basename.patch b/meta-oe/recipes-extended/mraa/mraa/0001-mraa-Use-posix-basename.patch new file mode 100644 index 0000000000..4f07eae631 --- /dev/null +++ b/meta-oe/recipes-extended/mraa/mraa/0001-mraa-Use-posix-basename.patch @@ -0,0 +1,46 @@ +From 30f78cb2775358dacd10b02c0ba2ec0c3ba2945d Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 31 Dec 2023 19:16:35 -0800 +Subject: [PATCH 1/2] mraa: Use posix basename + +Musl has removed the declaration from string.h [1] which exposes the +problem especially with clang-17+ compiler where implicit function +declaration is flagged as error. Use posix basename and make a copy of +string to operate on to emulate GNU basename behaviour. + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Submitted [https://github.com/eclipse/mraa/pull/1125] + src/mraa.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/mraa.c b/src/mraa.c +index 653ea1fa..b556d045 100644 +--- a/src/mraa.c ++++ b/src/mraa.c +@@ -12,6 +12,7 @@ + #endif + + #include <dlfcn.h> ++#include <libgen.h> + #include <pwd.h> + #include <sched.h> + #include <stddef.h> +@@ -341,9 +342,11 @@ static int + mraa_count_iio_devices(const char* path, const struct stat* sb, int flag, struct FTW* ftwb) + { + // we are only interested in files with specific names +- if (fnmatch(IIO_DEVICE_WILDCARD, basename(path), 0) == 0) { ++ char* tmp = strdup(path); ++ if (fnmatch(IIO_DEVICE_WILDCARD, basename(tmp), 0) == 0) { + num_iio_devices++; + } ++ free(tmp); + return 0; + } + +-- +2.43.0 + diff --git a/meta-oe/recipes-extended/mraa/mraa/0002-gpio-Include-limits.h-for-PATH_MAX.patch b/meta-oe/recipes-extended/mraa/mraa/0002-gpio-Include-limits.h-for-PATH_MAX.patch new file mode 100644 index 0000000000..0e472255a9 --- /dev/null +++ b/meta-oe/recipes-extended/mraa/mraa/0002-gpio-Include-limits.h-for-PATH_MAX.patch @@ -0,0 +1,30 @@ +From ffa6f1254066b1d5d99192002043be945ff64297 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 31 Dec 2023 19:18:42 -0800 +Subject: [PATCH 2/2] gpio: Include limits.h for PATH_MAX + +Musl exposes this problem where PATH_MAX is used but limits.h is not +included, it works with glibc perhaps due to limits.h being indirectly +included by another system header. + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Submitted [https://github.com/eclipse/mraa/pull/1125] + src/gpio/gpio_chardev.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/gpio/gpio_chardev.c b/src/gpio/gpio_chardev.c +index 2cd15968..9f727de7 100644 +--- a/src/gpio/gpio_chardev.c ++++ b/src/gpio/gpio_chardev.c +@@ -12,6 +12,7 @@ + #include <dirent.h> + #include <errno.h> + #include <fcntl.h> ++#include <limits.h> + #include <poll.h> + #include <pthread.h> + #include <signal.h> +-- +2.43.0 + diff --git a/meta-oe/recipes-extended/mraa/mraa_git.bb b/meta-oe/recipes-extended/mraa/mraa_git.bb index f1cdf66fc2..61f36d724d 100644 --- a/meta-oe/recipes-extended/mraa/mraa_git.bb +++ b/meta-oe/recipes-extended/mraa/mraa_git.bb @@ -5,12 +5,13 @@ SECTION = "libs" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=91e7de50a8d3cf01057f318d72460acd" -SRCREV = "7786c7ded5c9ce7773890d0e3dc27632898fc6b1" +SRCREV = "3c288a09109969eef9c2da7d92d3c62f92a015cc" PV = "2.2.0+git${SRCPV}" SRC_URI = "git://github.com/eclipse/${BPN}.git;protocol=https;branch=master \ file://0001-cmake-Use-a-regular-expression-to-match-x86-architec.patch \ - file://0001-include-Declare-gVERSION-global-as-extern.patch \ + file://0001-mraa-Use-posix-basename.patch \ + file://0002-gpio-Include-limits.h-for-PATH_MAX.patch \ " S = "${WORKDIR}/git" |