flatbuffers: new package
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Mon, 18 Dec 2017 21:10:39 +0000 (22:10 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 15 Jan 2018 21:41:37 +0000 (22:41 +0100)
FlatBuffers is an efficient cross platform serialization
library for C++, C#, C, Go, Java, JavaScript, PHP, and
Python. It was originally created at Google for game
development and other performance-critical applications.

http://google.github.io/flatbuffers/

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
DEVELOPERS
package/Config.in
package/flatbuffers/Config.in [new file with mode: 0644]
package/flatbuffers/flatbuffers.hash [new file with mode: 0644]
package/flatbuffers/flatbuffers.mk [new file with mode: 0644]

index 1c777630552a1561dd5083703ce9e1ee175df3a4..5589e85c4fa14bc6b038292a3cd249519cadd925 100644 (file)
@@ -622,6 +622,7 @@ F:  package/alljoyn-base/
 F:     package/alljoyn-tcl/
 F:     package/alljoyn-tcl-base/
 F:     package/boinc/
+F:     package/flatbuffers/
 F:     package/gtksourceview/
 F:     package/gssdp/
 F:     package/gupnp/
index 9625dae121d3d98fff6f2435c40f1bd3720c76f0..c3a2e38b8e01cff605ef25cec605fa19110065f3 100644 (file)
@@ -1458,6 +1458,7 @@ menu "Other"
        source "package/elfutils/Config.in"
        source "package/fftw/Config.in"
        source "package/flann/Config.in"
+       source "package/flatbuffers/Config.in"
        source "package/gconf/Config.in"
        source "package/gflags/Config.in"
        source "package/glibmm/Config.in"
diff --git a/package/flatbuffers/Config.in b/package/flatbuffers/Config.in
new file mode 100644 (file)
index 0000000..9927382
--- /dev/null
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_FLATBUFFERS
+       bool "flatbuffers"
+       depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11
+       depends on BR2_INSTALL_LIBSTDCPP
+       help
+         FlatBuffers is an efficient cross platform serialization
+         library for C++, C#, C, Go, Java, JavaScript, PHP, and
+         Python. It was originally created at Google for game
+         development and other performance-critical applications.
+
+         http://google.github.io/flatbuffers/
+
+comment "flatbuffers needs a toolchain w/ C++, gcc >= 4.7"
+       depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
diff --git a/package/flatbuffers/flatbuffers.hash b/package/flatbuffers/flatbuffers.hash
new file mode 100644 (file)
index 0000000..bd39ca3
--- /dev/null
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256 c45029c0a0f1a88d416af143e34de96b3091642722aa2d8c090916c6d1498c2e        flatbuffers-v1.8.0.tar.gz
+sha256 7ec9661a8afafab1eee3523d6f1a193eff76314a5ab10b4ce96aefd87621b0c3        LICENSE.txt
diff --git a/package/flatbuffers/flatbuffers.mk b/package/flatbuffers/flatbuffers.mk
new file mode 100644 (file)
index 0000000..2b640ec
--- /dev/null
@@ -0,0 +1,23 @@
+################################################################################
+#
+# flatbuffers
+#
+################################################################################
+
+FLATBUFFERS_VERSION = v1.8.0
+FLATBUFFERS_SITE = $(call github,google,flatbuffers,$(FLATBUFFERS_VERSION))
+FLATBUFFERS_LICENSE = Apache-2.0
+FLATBUFFERS_LICENSE_FILES = LICENSE.txt
+FLATBUFFERS_INSTALL_STAGING = YES
+
+FLATBUFFERS_CONF_OPTS += \
+       -DCMAKE_CXX_FLAGS="-std=c++11" \
+       -DFLATBUFFERS_BUILD_TESTS=OFF
+
+ifeq ($(BR2_STATIC_LIBS),y)
+FLATBUFFERS_CONF_OPTS += -DFLATBUFFERS_BUILD_SHAREDLIB=OFF
+else
+FLATBUFFERS_CONF_OPTS += -DFLATBUFFERS_BUILD_SHAREDLIB=ON
+endif
+
+$(eval $(cmake-package))