OpenVoiceOS/buildroot-patches/0019-Bump-flatbuffers.patch

89 lines
4.0 KiB
Diff

From 6647d7c66e63fb7b498679e967a2900c74628819 Mon Sep 17 00:00:00 2001
From: j1nx <p.steenbergen@j1nx.nl>
Date: Tue, 29 Nov 2022 17:02:20 +0100
Subject: [PATCH 1/1] Bump flatbuffers
---
...flatbuffers-base.h-fix-build-on-musl.patch | 20 +++++++++++--------
package/flatbuffers/flatbuffers.hash | 2 +-
package/flatbuffers/flatbuffers.mk | 6 ++++--
3 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/package/flatbuffers/0001-include-flatbuffers-base.h-fix-build-on-musl.patch b/package/flatbuffers/0001-include-flatbuffers-base.h-fix-build-on-musl.patch
index b4bc0e12de..82feca3e39 100644
--- a/package/flatbuffers/0001-include-flatbuffers-base.h-fix-build-on-musl.patch
+++ b/package/flatbuffers/0001-include-flatbuffers-base.h-fix-build-on-musl.patch
@@ -28,7 +28,10 @@ Fixes:
- http://autobuild.buildroot.org/results/68045b83e94f8caa337b1af7ed5f493ac1a55c47
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-[Upstream status: https://github.com/google/flatbuffers/pull/6773]
+[Upstream status: Rejected:
+ https://github.com/google/flatbuffers/pull/6773]
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+(rebased and added fix for uClibc-build)
---
include/flatbuffers/base.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -37,15 +40,16 @@ diff --git a/include/flatbuffers/base.h b/include/flatbuffers/base.h
index de7898dc..101c7598 100644
--- a/include/flatbuffers/base.h
+++ b/include/flatbuffers/base.h
-@@ -266,7 +266,7 @@ namespace flatbuffers {
- #ifndef FLATBUFFERS_LOCALE_INDEPENDENT
- // Enable locale independent functions {strtof_l, strtod_l,strtoll_l, strtoull_l}.
- #if ((defined(_MSC_VER) && _MSC_VER >= 1800) || \
-- (defined(_XOPEN_VERSION) && (_XOPEN_VERSION>=700)) && (!defined(__ANDROID_API__) || (defined(__ANDROID_API__) && (__ANDROID_API__>=21))))
-+ (defined(__GLIBC__) && defined(_XOPEN_VERSION) && (_XOPEN_VERSION>=700)) && (!defined(__ANDROID_API__) || (defined(__ANDROID_API__) && (__ANDROID_API__>=21))))
+@@ -264,7 +264,8 @@ namespace flatbuffers {
+ // strtoull_l}.
+ #if (defined(_MSC_VER) && _MSC_VER >= 1800) || \
+ (defined(__ANDROID_API__) && __ANDROID_API__>= 21) || \
+- (defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 700)) && \
++ (defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 700) && \
++ defined(__GLIBC__) && !defined(__UCLIBC__)) && \
+ (!defined(__Fuchsia__) && !defined(__ANDROID_API__))
#define FLATBUFFERS_LOCALE_INDEPENDENT 1
#else
- #define FLATBUFFERS_LOCALE_INDEPENDENT 0
--
2.30.2
diff --git a/package/flatbuffers/flatbuffers.hash b/package/flatbuffers/flatbuffers.hash
index b05b9e7b4b..6382b86f1b 100644
--- a/package/flatbuffers/flatbuffers.hash
+++ b/package/flatbuffers/flatbuffers.hash
@@ -1,3 +1,3 @@
# Locally computed:
-sha256 9ddb9031798f4f8754d00fca2f1a68ecf9d0f83dfac7239af1311e4fd9a565c4 flatbuffers-2.0.0.tar.gz
+sha256 f97965a727d26386afaefff950badef2db3ab6af9afe23ed6d94bfb65f95f37e flatbuffers-2.0.8.tar.gz
sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE.txt
diff --git a/package/flatbuffers/flatbuffers.mk b/package/flatbuffers/flatbuffers.mk
index 280834c2d4..9d286bf9e1 100644
--- a/package/flatbuffers/flatbuffers.mk
+++ b/package/flatbuffers/flatbuffers.mk
@@ -4,16 +4,18 @@
#
################################################################################
-FLATBUFFERS_VERSION = 2.0.0
+FLATBUFFERS_VERSION = 2.0.8
FLATBUFFERS_SITE = $(call github,google,flatbuffers,v$(FLATBUFFERS_VERSION))
FLATBUFFERS_LICENSE = Apache-2.0
FLATBUFFERS_LICENSE_FILES = LICENSE.txt
FLATBUFFERS_CPE_ID_VENDOR = google
FLATBUFFERS_INSTALL_STAGING = YES
+FLATBUFFERS_DEPENDENCIES = host-flatbuffers
FLATBUFFERS_CONF_OPTS += \
-DCMAKE_CXX_FLAGS="-std=c++11" \
- -DFLATBUFFERS_BUILD_TESTS=OFF
+ -DFLATBUFFERS_BUILD_TESTS=OFF \
+ -DFLATBUFFERS_FLATC_EXECUTABLE=$(HOST_DIR)/bin/flatc
ifeq ($(BR2_STATIC_LIBS),y)
FLATBUFFERS_CONF_OPTS += -DFLATBUFFERS_BUILD_SHAREDLIB=OFF
--
2.34.1