diff options
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 | |||
| 13 | 13 | ||
| 14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 15 | --- | 15 | --- |
| 16 | Upstream-Status: Pending | 16 | Upstream-Status: Submitted [https://github.com/eclipse/mraa/pull/1125] |
| 17 | 17 | ||
| 18 | CMakeLists.txt | 3 +-- | 18 | CMakeLists.txt | 3 +-- |
| 19 | 1 file changed, 1 insertion(+), 2 deletions(-) | 19 | 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 @@ | |||
| 1 | From dbb5961f106ec42cd70689d933674c9c37aedfe1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org> | ||
| 3 | Date: Mon, 13 Apr 2020 20:12:11 +0200 | ||
| 4 | Subject: include: Declare gVERSION global as 'extern'. | ||
| 5 | |||
| 6 | Fixes build with '-fno-common'. | ||
| 7 | |||
| 8 | Upstream-Status: Submitted [https://github.com/eclipse/mraa/pull/1012] | ||
| 9 | Signed-off-by: Adrian Bunk <bunk@stusta.de> | ||
| 10 | --- | ||
| 11 | include/version.h | 4 ++-- | ||
| 12 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/include/version.h b/include/version.h | ||
| 15 | index 47366ef..3a567a1 100644 | ||
| 16 | --- a/include/version.h | ||
| 17 | +++ b/include/version.h | ||
| 18 | @@ -11,8 +11,8 @@ | ||
| 19 | extern "C" { | ||
| 20 | #endif | ||
| 21 | |||
| 22 | -const char* gVERSION; | ||
| 23 | -const char* gVERSION_SHORT; | ||
| 24 | +extern const char* gVERSION; | ||
| 25 | +extern const char* gVERSION_SHORT; | ||
| 26 | |||
| 27 | #ifdef __cplusplus | ||
| 28 | } | ||
| 29 | -- | ||
| 30 | 2.17.1 | ||
| 31 | |||
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 @@ | |||
| 1 | From 30f78cb2775358dacd10b02c0ba2ec0c3ba2945d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sun, 31 Dec 2023 19:16:35 -0800 | ||
| 4 | Subject: [PATCH 1/2] mraa: Use posix basename | ||
| 5 | |||
| 6 | Musl has removed the declaration from string.h [1] which exposes the | ||
| 7 | problem especially with clang-17+ compiler where implicit function | ||
| 8 | declaration is flagged as error. Use posix basename and make a copy of | ||
| 9 | string to operate on to emulate GNU basename behaviour. | ||
| 10 | |||
| 11 | [1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 | ||
| 12 | |||
| 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 14 | --- | ||
| 15 | Upstream-Status: Submitted [https://github.com/eclipse/mraa/pull/1125] | ||
| 16 | src/mraa.c | 5 ++++- | ||
| 17 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
| 18 | |||
| 19 | diff --git a/src/mraa.c b/src/mraa.c | ||
| 20 | index 653ea1fa..b556d045 100644 | ||
| 21 | --- a/src/mraa.c | ||
| 22 | +++ b/src/mraa.c | ||
| 23 | @@ -12,6 +12,7 @@ | ||
| 24 | #endif | ||
| 25 | |||
| 26 | #include <dlfcn.h> | ||
| 27 | +#include <libgen.h> | ||
| 28 | #include <pwd.h> | ||
| 29 | #include <sched.h> | ||
| 30 | #include <stddef.h> | ||
| 31 | @@ -341,9 +342,11 @@ static int | ||
| 32 | mraa_count_iio_devices(const char* path, const struct stat* sb, int flag, struct FTW* ftwb) | ||
| 33 | { | ||
| 34 | // we are only interested in files with specific names | ||
| 35 | - if (fnmatch(IIO_DEVICE_WILDCARD, basename(path), 0) == 0) { | ||
| 36 | + char* tmp = strdup(path); | ||
| 37 | + if (fnmatch(IIO_DEVICE_WILDCARD, basename(tmp), 0) == 0) { | ||
| 38 | num_iio_devices++; | ||
| 39 | } | ||
| 40 | + free(tmp); | ||
| 41 | return 0; | ||
| 42 | } | ||
| 43 | |||
| 44 | -- | ||
| 45 | 2.43.0 | ||
| 46 | |||
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 @@ | |||
| 1 | From ffa6f1254066b1d5d99192002043be945ff64297 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sun, 31 Dec 2023 19:18:42 -0800 | ||
| 4 | Subject: [PATCH 2/2] gpio: Include limits.h for PATH_MAX | ||
| 5 | |||
| 6 | Musl exposes this problem where PATH_MAX is used but limits.h is not | ||
| 7 | included, it works with glibc perhaps due to limits.h being indirectly | ||
| 8 | included by another system header. | ||
| 9 | |||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | --- | ||
| 12 | Upstream-Status: Submitted [https://github.com/eclipse/mraa/pull/1125] | ||
| 13 | src/gpio/gpio_chardev.c | 1 + | ||
| 14 | 1 file changed, 1 insertion(+) | ||
| 15 | |||
| 16 | diff --git a/src/gpio/gpio_chardev.c b/src/gpio/gpio_chardev.c | ||
| 17 | index 2cd15968..9f727de7 100644 | ||
| 18 | --- a/src/gpio/gpio_chardev.c | ||
| 19 | +++ b/src/gpio/gpio_chardev.c | ||
| 20 | @@ -12,6 +12,7 @@ | ||
| 21 | #include <dirent.h> | ||
| 22 | #include <errno.h> | ||
| 23 | #include <fcntl.h> | ||
| 24 | +#include <limits.h> | ||
| 25 | #include <poll.h> | ||
| 26 | #include <pthread.h> | ||
| 27 | #include <signal.h> | ||
| 28 | -- | ||
| 29 | 2.43.0 | ||
| 30 | |||
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" | |||
| 5 | LICENSE = "MIT" | 5 | LICENSE = "MIT" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=91e7de50a8d3cf01057f318d72460acd" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=91e7de50a8d3cf01057f318d72460acd" |
| 7 | 7 | ||
| 8 | SRCREV = "7786c7ded5c9ce7773890d0e3dc27632898fc6b1" | 8 | SRCREV = "3c288a09109969eef9c2da7d92d3c62f92a015cc" |
| 9 | PV = "2.2.0+git${SRCPV}" | 9 | PV = "2.2.0+git${SRCPV}" |
| 10 | 10 | ||
| 11 | SRC_URI = "git://github.com/eclipse/${BPN}.git;protocol=https;branch=master \ | 11 | SRC_URI = "git://github.com/eclipse/${BPN}.git;protocol=https;branch=master \ |
| 12 | file://0001-cmake-Use-a-regular-expression-to-match-x86-architec.patch \ | 12 | file://0001-cmake-Use-a-regular-expression-to-match-x86-architec.patch \ |
| 13 | file://0001-include-Declare-gVERSION-global-as-extern.patch \ | 13 | file://0001-mraa-Use-posix-basename.patch \ |
| 14 | file://0002-gpio-Include-limits.h-for-PATH_MAX.patch \ | ||
| 14 | " | 15 | " |
| 15 | 16 | ||
| 16 | S = "${WORKDIR}/git" | 17 | S = "${WORKDIR}/git" |
