flatcc: new package
authorJoel Carlson <joel.carlson@cosmicaes.com>
Thu, 31 May 2018 17:04:29 +0000 (11:04 -0600)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 5 Jun 2018 17:00:10 +0000 (19:00 +0200)
This adds flatcc as a new package, pulling v0.5.1 from github. flatcc
has both a host tool (the compiler), and libraries for the target.

Signed-off-by: Steve deRosier <steve.derosier@lairdtech.com>
Signed-off-by: Joel Carlson <joel.carlson@cosmicaes.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Thomas: add entry in DEVELOPERS file.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
DEVELOPERS
package/Config.in
package/flatcc/Config.in [new file with mode: 0644]
package/flatcc/flatcc.hash [new file with mode: 0644]
package/flatcc/flatcc.mk [new file with mode: 0644]

index 1ad3edcd788d82c7672baf7ef83fc34b1b07a903..e5d5a26e1f9b22fc733ab97e639bc675c0e4e0d9 100644 (file)
@@ -949,6 +949,9 @@ F:  package/batctl/
 N:     Jeremy Rosen <jeremy.rosen@openwide.fr>
 F:     package/fxload/
 
+N:     Joel Carlson <joel.carlson@cosmicaes.com>
+F:     package/flatcc/
+
 N:     Joel Stanley <joel@jms.id.au>
 F:     package/pdbg/
 F:     board/qemu/ppc64le-pseries/
index 1730201bf306bf047d155db5ae21807346e58b14..9640ab2d4e870cf7b008258ec22b985e81e3ca6b 100644 (file)
@@ -1508,6 +1508,7 @@ menu "Other"
        source "package/fftw/Config.in"
        source "package/flann/Config.in"
        source "package/flatbuffers/Config.in"
+       source "package/flatcc/Config.in"
        source "package/gconf/Config.in"
        source "package/gflags/Config.in"
        source "package/glibmm/Config.in"
diff --git a/package/flatcc/Config.in b/package/flatcc/Config.in
new file mode 100644 (file)
index 0000000..6273f2b
--- /dev/null
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_FLATCC
+       bool "flatcc"
+       help
+         flatcc is C language implementation of Google Flatbuffers. It
+         consists of both a library for the target as well as a
+         flatbuffer compiler tool for the host.
+
+         https://github.com/dvidelabs/flatcc
diff --git a/package/flatcc/flatcc.hash b/package/flatcc/flatcc.hash
new file mode 100644 (file)
index 0000000..357d8b7
--- /dev/null
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 8c4560ca32e3c555716d9363bed469e2c60e0f443ec32bc08e7abfe681e25ca9  flatcc-v0.5.1.tar.gz
diff --git a/package/flatcc/flatcc.mk b/package/flatcc/flatcc.mk
new file mode 100644 (file)
index 0000000..5535644
--- /dev/null
@@ -0,0 +1,29 @@
+################################################################################
+#
+# FLATCC
+#
+################################################################################
+
+FLATCC_VERSION = v0.5.1
+FLATCC_SITE = $(call github,dvidelabs,flatcc,$(FLATCC_VERSION))
+FLATCC_LICENSE = Apache-2.0
+FLATCC_LICENSE_FILES = LICENSE
+FLATCC_INSTALL_STAGING = YES
+FLATCC_DEPENDENCIES = host-flatcc
+
+# Disable build of tests and samples
+FLATCC_CONF_OPTS += -DFLATCC_TEST=OFF
+HOST_FLATCC_CONF_OPTS += -DFLATCC_TEST=OFF
+
+# Enable install targets
+FLATCC_CONF_OPTS += -DFLATCC_INSTALL=ON
+HOST_FLATCC_CONF_OPTS += -DFLATCC_INSTALL=ON
+
+define FLATCC_TARGET_REMOVE_FLATCC_COMPILER
+       rm $(TARGET_DIR)/usr/bin/flatcc
+endef
+
+FLATCC_POST_INSTALL_TARGET_HOOKS += FLATCC_TARGET_REMOVE_FLATCC_COMPILER
+
+$(eval $(cmake-package))
+$(eval $(host-cmake-package))