c-capnproto: add package
authorJoel Carlson <joelsoncarl@gmail.com>
Thu, 1 Aug 2019 09:44:40 +0000 (11:44 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Thu, 1 Aug 2019 09:47:04 +0000 (11:47 +0200)
Adds the c-capnproto package. This creates a C plugin for the regular
capnproto capnpc compiler. It supports only serialization (no RPC).

Since it depends on capnproto, the package selects capnproto and has the
same requirements as capnproto.

The host version is always needed for the code generator, which is what
gets called by packages using it. The target version is also always
needed for the library. Therefore, no Config.in.host option is needed.

We need to use the git download method because the package has
submodules. The submodule is gtest, which is not really needed, but it's
complicated to remove the dependency.

The version is the latest upstream git hash. It is version 0.3 with just
two patches applied: one to the README file, and a fix submitted by us.

Signed-off-by: Joel Carlson <JoelsonCarl@gmail.com>
[Arnout:
 - use latest upstream version which has patch already applied;
 - mark in Config.in that dependencies come from capnproto;
 - add some newlines to .mk file;
 - updated commit message.]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
DEVELOPERS
package/Config.in
package/c-capnproto/Config.in [new file with mode: 0644]
package/c-capnproto/c-capnproto.hash [new file with mode: 0644]
package/c-capnproto/c-capnproto.mk [new file with mode: 0644]

index 05711ba678e3ff616cad228df2b0a356dace81f9..78cdae8f3d6526535ae7007765ce00b69c672c0a 100644 (file)
@@ -1139,6 +1139,7 @@ F:        package/x11r7/xdriver_xf86-video-imx/
 F:     package/x11r7/xdriver_xf86-video-imx-viv/
 
 N:     Joel Carlson <JoelsonCarl@gmail.com>
+F:     package/c-capnproto/
 F:     package/capnproto/
 F:     package/cmocka/
 F:     package/flatcc/
index 9b2cc7522d864fe25747f356f453e92ba3e5a017..6e0ddfd8d9c5e87557960428d54cddf756b3a3c6 100644 (file)
@@ -1662,6 +1662,7 @@ menu "Other"
        source "package/bctoolbox/Config.in"
        source "package/bdwgc/Config.in"
        source "package/boost/Config.in"
+       source "package/c-capnproto/Config.in"
        source "package/capnproto/Config.in"
        source "package/clang/Config.in"
        source "package/clapack/Config.in"
diff --git a/package/c-capnproto/Config.in b/package/c-capnproto/Config.in
new file mode 100644 (file)
index 0000000..acad5a6
--- /dev/null
@@ -0,0 +1,21 @@
+config BR2_PACKAGE_C_CAPNPROTO
+       bool "c-capnproto"
+       depends on BR2_USE_MMU # capnproto
+       depends on BR2_HOST_GCC_AT_LEAST_4_8 # capnproto
+       depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # capnproto
+       depends on BR2_INSTALL_LIBSTDCPP # capnproto
+       depends on BR2_TOOLCHAIN_HAS_THREADS # capnproto
+       depends on BR2_TOOLCHAIN_HAS_ATOMIC # capnproto
+       select BR2_PACKAGE_CAPNPROTO
+       help
+         A C plugin for Cap'n Proto. Generates the code generator
+         plugin for C. Requires regular Cap'n Proto and only
+         provides serialization (no RPC).
+
+comment "c-capnproto needs host and target gcc >= 4.8 w/ C++, threads, atomic"
+       depends on BR2_USE_MMU
+       depends on!BR2_HOST_GCC_AT_LEAST_4_8 || \
+               !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || \
+               !BR2_INSTALL_LIBSTDCPP || \
+               !BR2_TOOLCHAIN_HAS_THREADS || \
+               !BR2_TOOLCHAIN_HAS_ATOMIC
diff --git a/package/c-capnproto/c-capnproto.hash b/package/c-capnproto/c-capnproto.hash
new file mode 100644 (file)
index 0000000..75edaeb
--- /dev/null
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  88c454f4f4bad87c9b60cd739c7da5605c1085c0e92b317dd72d547bbb804279  c-capnproto-9053ebe6eeb2ae762655b982e27c341cb568366d.tar.gz
+sha256  27797e6c7dce96675d79ed250584d157b7a86405db6eb6fba9644e6d96d42c57  COPYING
diff --git a/package/c-capnproto/c-capnproto.mk b/package/c-capnproto/c-capnproto.mk
new file mode 100644 (file)
index 0000000..c144a4b
--- /dev/null
@@ -0,0 +1,24 @@
+################################################################################
+#
+# c-capnproto
+#
+################################################################################
+
+C_CAPNPROTO_VERSION = 9053ebe6eeb2ae762655b982e27c341cb568366d
+C_CAPNPROTO_SITE = https://github.com/opensourcerouting/c-capnproto.git
+C_CAPNPROTO_SITE_METHOD = git
+C_CAPNPROTO_GIT_SUBMODULES = YES
+C_CAPNPROTO_LICENSE = MIT
+C_CAPNPROTO_LICENSE_FILES = COPYING
+C_CAPNPROTO_INSTALL_STAGING = YES
+
+# Fetched from git with no configure script
+C_CAPNPROTO_AUTORECONF = YES
+
+# As a plugin for capnproto's capnpc, requires capnproto. Needs to be on the
+# host to generate C code from message definitions.
+C_CAPNPROTO_DEPENDENCIES = host-c-capnproto capnproto
+HOST_C_CAPNPROTO_DEPENDENCIES = host-capnproto
+
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))