diff options
author | Timo Teräs <timo.teras@iki.fi> | 2019-11-22 16:01:05 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2019-11-22 16:14:04 +0200 |
commit | cc60d59176ab62228f57df6cc21a66c8b9674980 (patch) | |
tree | 897c024191ff9184b8cdb5f0dc8677e0ac95de6b /community/flatbuffers | |
parent | eeb2777b45a53e6e3719f79ddc07cea5262f2771 (diff) | |
download | aports-cc60d59176ab62228f57df6cc21a66c8b9674980.tar.bz2 aports-cc60d59176ab62228f57df6cc21a66c8b9674980.tar.xz |
community/flatbuffers: upgrade to 1.11.0
Diffstat (limited to 'community/flatbuffers')
-rw-r--r-- | community/flatbuffers/0001-Add-detection-of-strtoull_l-function.patch | 38 | ||||
-rw-r--r-- | community/flatbuffers/APKBUILD | 8 | ||||
-rw-r--r-- | community/flatbuffers/flatbuffers-fix-nontrivial-memset.patch | 106 |
3 files changed, 42 insertions, 110 deletions
diff --git a/community/flatbuffers/0001-Add-detection-of-strtoull_l-function.patch b/community/flatbuffers/0001-Add-detection-of-strtoull_l-function.patch new file mode 100644 index 0000000000..f3e82101bb --- /dev/null +++ b/community/flatbuffers/0001-Add-detection-of-strtoull_l-function.patch @@ -0,0 +1,38 @@ +From bff7ffbc5130cd46caf33b76b4bb0593fcd15066 Mon Sep 17 00:00:00 2001 +From: Vladimir Glavnyy <31897320+vglavnyy@users.noreply.github.com> +Date: Fri, 10 May 2019 00:15:29 +0700 +Subject: [PATCH] Add detection of strtoull_l function (#5333) (#5337) + +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> +[Retrieved from: +https://github.com/google/flatbuffers/commit/bff7ffbc5130cd46caf33b76b4bb0593fcd15066] +--- + CMakeLists.txt | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0640c37b5..30be238fe 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,12 +42,18 @@ if(DEFINED FLATBUFFERS_MAX_PARSING_DEPTH) + message(STATUS "FLATBUFFERS_MAX_PARSING_DEPTH: ${FLATBUFFERS_MAX_PARSING_DEPTH}") + endif() + +-# Auto-detect locale-narrow 'strtod_l' function. ++# Auto-detect locale-narrow 'strtod_l' and 'strtoull_l' functions. + if(NOT DEFINED FLATBUFFERS_LOCALE_INDEPENDENT) ++ set(FLATBUFFERS_LOCALE_INDEPENDENT 0) + if(MSVC) +- check_cxx_symbol_exists(_strtof_l stdlib.h FLATBUFFERS_LOCALE_INDEPENDENT) ++ check_cxx_symbol_exists(_strtof_l stdlib.h FLATBUFFERS_HAS_STRTOF_L) ++ check_cxx_symbol_exists(_strtoui64_l stdlib.h FLATBUFFERS_HAS_STRTOULL_L) + else() +- check_cxx_symbol_exists(strtof_l stdlib.h FLATBUFFERS_LOCALE_INDEPENDENT) ++ check_cxx_symbol_exists(strtof_l stdlib.h FLATBUFFERS_HAS_STRTOF_L) ++ check_cxx_symbol_exists(strtoull_l stdlib.h FLATBUFFERS_HAS_STRTOULL_L) ++ endif() ++ if(FLATBUFFERS_HAS_STRTOF_L AND FLATBUFFERS_HAS_STRTOULL_L) ++ set(FLATBUFFERS_LOCALE_INDEPENDENT 1) + endif() + endif() + add_definitions(-DFLATBUFFERS_LOCALE_INDEPENDENT=$<BOOL:${FLATBUFFERS_LOCALE_INDEPENDENT}>) diff --git a/community/flatbuffers/APKBUILD b/community/flatbuffers/APKBUILD index 6e34733bd5..7ee6305063 100644 --- a/community/flatbuffers/APKBUILD +++ b/community/flatbuffers/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=flatbuffers -pkgver=1.10.0 +pkgver=1.11.0 pkgrel=0 pkgdesc="Memory Efficient Serialization Library" url="https://google.github.io/flatbuffers/" @@ -12,7 +12,7 @@ makedepends="$depends_dev cmake" install="" subpackages="$pkgname-dev" source="flatbuffers-$pkgver.tar.gz::https://github.com/google/flatbuffers/archive/v$pkgver.tar.gz - flatbuffers-fix-nontrivial-memset.patch" + 0001-Add-detection-of-strtoull_l-function.patch" builddir="$srcdir/flatbuffers-$pkgver" build() { @@ -37,5 +37,5 @@ package() { "$pkgdir"/usr/bin/flatc } -sha512sums="b8382c8e9a45d6aca83270e93704b9ef2938e4ef9bb5165edbd8f286329e86353037ad6e54a99fd3d70b0c893d06cfd8766e00f05497e69be4b9e6c0506133d2 flatbuffers-1.10.0.tar.gz -823c1a2061898fb4c33d70dd5b17dd5102ff8342e83655e2e00a87ee7462d0cc02c37d6c973176ef929eff088a439dc5beb1527c33d0c8d425c7c9a7bfceeaa7 flatbuffers-fix-nontrivial-memset.patch" +sha512sums="cbb2e1e6885255cc950e2fa8248b56a8bc2c6e52f6fc7ed9066e6ae5a1d53f1263594b83f4b944a672cf9d0e1e800e51ce7fa423eff45abf5056269879c286fe flatbuffers-1.11.0.tar.gz +3720593d25fb5769cab5bcf3d0e55709545de04ccc783c7cd7cac8aa99d4e861ccb6d1123073b875f75b98e45ebb8151d9b56df855bae7f28f55cbf4bc36c0b8 0001-Add-detection-of-strtoull_l-function.patch" diff --git a/community/flatbuffers/flatbuffers-fix-nontrivial-memset.patch b/community/flatbuffers/flatbuffers-fix-nontrivial-memset.patch deleted file mode 100644 index 8168342603..0000000000 --- a/community/flatbuffers/flatbuffers-fix-nontrivial-memset.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 2e865f4d4e67a9b628c137aab7da8140dd9339a4 Mon Sep 17 00:00:00 2001 -From: Laurent Stacul <laurent.stacul@gmail.com> -Date: Mon, 4 Mar 2019 20:10:18 +0100 -Subject: [PATCH] [Fix #5112] flatc generates constructors with memset for - non-trivial types (#5222) - ---- - samples/monster_generated.h | 2 +- - src/idl_gen_cpp.cpp | 2 +- - tests/monster_test_generated.h | 6 +++--- - tests/namespace_test/namespace_test1_generated.h | 2 +- - tests/union_vector/union_vector_generated.h | 4 ++-- - 5 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/samples/monster_generated.h b/samples/monster_generated.h -index db79c2e5d..5286ffd80 100644 ---- a/samples/monster_generated.h -+++ b/samples/monster_generated.h -@@ -166,7 +166,7 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Vec3 FLATBUFFERS_FINAL_CLASS { - - public: - Vec3() { -- memset(this, 0, sizeof(Vec3)); -+ memset(static_cast<void *>(this), 0, sizeof(Vec3)); - } - Vec3(float _x, float _y, float _z) - : x_(flatbuffers::EndianScalar(_x)), -diff --git a/src/idl_gen_cpp.cpp b/src/idl_gen_cpp.cpp -index a25dd6f94..efbfe07c6 100644 ---- a/src/idl_gen_cpp.cpp -+++ b/src/idl_gen_cpp.cpp -@@ -2617,7 +2617,7 @@ class CppGenerator : public BaseGenerator { - - // Generate a default constructor. - code_ += " {{STRUCT_NAME}}() {"; -- code_ += " memset(this, 0, sizeof({{STRUCT_NAME}}));"; -+ code_ += " memset(static_cast<void *>(this), 0, sizeof({{STRUCT_NAME}}));"; - code_ += " }"; - - // Generate a constructor that takes all fields as arguments. -diff --git a/tests/monster_test_generated.h b/tests/monster_test_generated.h -index 9154439eb..f8c82f528 100644 ---- a/tests/monster_test_generated.h -+++ b/tests/monster_test_generated.h -@@ -516,7 +516,7 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(2) Test FLATBUFFERS_FINAL_CLASS { - - public: - Test() { -- memset(this, 0, sizeof(Test)); -+ memset(static_cast<void *>(this), 0, sizeof(Test)); - } - Test(int16_t _a, int8_t _b) - : a_(flatbuffers::EndianScalar(_a)), -@@ -559,7 +559,7 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) Vec3 FLATBUFFERS_FINAL_CLASS { - - public: - Vec3() { -- memset(this, 0, sizeof(Vec3)); -+ memset(static_cast<void *>(this), 0, sizeof(Vec3)); - } - Vec3(float _x, float _y, float _z, double _test1, Color _test2, const Test &_test3) - : x_(flatbuffers::EndianScalar(_x)), -@@ -631,7 +631,7 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Ability FLATBUFFERS_FINAL_CLASS { - - public: - Ability() { -- memset(this, 0, sizeof(Ability)); -+ memset(static_cast<void *>(this), 0, sizeof(Ability)); - } - Ability(uint32_t _id, uint32_t _distance) - : id_(flatbuffers::EndianScalar(_id)), -diff --git a/tests/namespace_test/namespace_test1_generated.h b/tests/namespace_test/namespace_test1_generated.h -index 3f964b090..d26bf43e8 100644 ---- a/tests/namespace_test/namespace_test1_generated.h -+++ b/tests/namespace_test/namespace_test1_generated.h -@@ -57,7 +57,7 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) StructInNestedNS FLATBUFFERS_FINAL_CLASS - - public: - StructInNestedNS() { -- memset(this, 0, sizeof(StructInNestedNS)); -+ memset(static_cast<void *>(this), 0, sizeof(StructInNestedNS)); - } - StructInNestedNS(int32_t _a, int32_t _b) - : a_(flatbuffers::EndianScalar(_a)), -diff --git a/tests/union_vector/union_vector_generated.h b/tests/union_vector/union_vector_generated.h -index f085bbcb6..8629d4edf 100644 ---- a/tests/union_vector/union_vector_generated.h -+++ b/tests/union_vector/union_vector_generated.h -@@ -189,7 +189,7 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Rapunzel FLATBUFFERS_FINAL_CLASS { - - public: - Rapunzel() { -- memset(this, 0, sizeof(Rapunzel)); -+ memset(static_cast<void *>(this), 0, sizeof(Rapunzel)); - } - Rapunzel(int32_t _hair_length) - : hair_length_(flatbuffers::EndianScalar(_hair_length)) { -@@ -214,7 +214,7 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) BookReader FLATBUFFERS_FINAL_CLASS { - - public: - BookReader() { -- memset(this, 0, sizeof(BookReader)); -+ memset(static_cast<void *>(this), 0, sizeof(BookReader)); - } - BookReader(int32_t _books_read) - : books_read_(flatbuffers::EndianScalar(_books_read)) { |