Patchwork [1/2] protobuf-c: new package

login
register
mail settings
Submitter Gustavo Zacarias
Date April 11, 2013, 2:41 p.m.
Message ID <1365691296-16042-1-git-send-email-gustavo@zacarias.com.ar>
Download mbox | patch
Permalink /patch/235770/
State Accepted
Commit 23e5b60fdef5548fa7e5a4285ad22d08a32e8d3a
Headers show

Comments

Gustavo Zacarias - April 11, 2013, 2:41 p.m.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/Config.in                |  1 +
 package/protobuf-c/Config.in     | 12 ++++++++++++
 package/protobuf-c/protobuf-c.mk | 16 ++++++++++++++++
 3 files changed, 29 insertions(+)
 create mode 100644 package/protobuf-c/Config.in
 create mode 100644 package/protobuf-c/protobuf-c.mk
Peter Korsgaard - April 14, 2013, 9:59 p.m.
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 Gustavo> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
 Gustavo> ---
 Gustavo>  package/Config.in                |  1 +
 Gustavo>  package/protobuf-c/Config.in     | 12 ++++++++++++
 Gustavo>  package/protobuf-c/protobuf-c.mk | 16 ++++++++++++++++
 Gustavo>  3 files changed, 29 insertions(+)
 Gustavo>  create mode 100644 package/protobuf-c/Config.in
 Gustavo>  create mode 100644 package/protobuf-c/protobuf-c.mk

 Gustavo> diff --git a/package/Config.in b/package/Config.in
 Gustavo> index 0537ffa..826310c 100644
 Gustavo> --- a/package/Config.in
 Gustavo> +++ b/package/Config.in
 Gustavo> @@ -585,6 +585,7 @@ source "package/mtdev2tuio/Config.in"
 Gustavo>  source "package/orc/Config.in"
 Gustavo>  source "package/poco/Config.in"
 Gustavo>  source "package/protobuf/Config.in"
 Gustavo> +source "package/protobuf-c/Config.in"
 Gustavo>  source "package/schifra/Config.in"
 Gustavo>  source "package/startup-notification/Config.in"
 Gustavo>  source "package/liblog4c-localtime/Config.in"
 Gustavo> diff --git a/package/protobuf-c/Config.in b/package/protobuf-c/Config.in
 Gustavo> new file mode 100644
 Gustavo> index 0000000..9aff6e2
 Gustavo> --- /dev/null
 Gustavo> +++ b/package/protobuf-c/Config.in
 Gustavo> @@ -0,0 +1,12 @@
 Gustavo> +config BR2_PACKAGE_PROTOBUF_C
 Gustavo> +	bool "protobuf-c"
 Gustavo> +	depends on BR2_INSTALL_LIBSTDCPP
 Gustavo> +	select BR2_PACKAGE_PROTOBUF
 Gustavo> +	help
 Gustavo> +	  Code generator and runtime libraries to use Protocol Buffers
 Gustavo> +	  from pure C (not C++).
 Gustavo> +
 Gustavo> +	  http://code.google.com/p/protobuf-c/
 Gustavo> +
 Gustavo> +comment "protobuf-c requires a toolchain with C++ support enabled"
 Gustavo> +	depends on !BR2_INSTALL_LIBSTDCPP

A bit stupid for a 'pure C' library, but ok - Committed both, thanks.
Gustavo Zacarias - April 14, 2013, 11:20 p.m.
On 04/14/2013 06:59 PM, Peter Korsgaard wrote:
> A bit stupid for a 'pure C' library, but ok - Committed both, thanks.

Heh, yes, the problem is that it depends on protobuf which is C++

Patch

diff --git a/package/Config.in b/package/Config.in
index 0537ffa..826310c 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -585,6 +585,7 @@  source "package/mtdev2tuio/Config.in"
 source "package/orc/Config.in"
 source "package/poco/Config.in"
 source "package/protobuf/Config.in"
+source "package/protobuf-c/Config.in"
 source "package/schifra/Config.in"
 source "package/startup-notification/Config.in"
 source "package/liblog4c-localtime/Config.in"
diff --git a/package/protobuf-c/Config.in b/package/protobuf-c/Config.in
new file mode 100644
index 0000000..9aff6e2
--- /dev/null
+++ b/package/protobuf-c/Config.in
@@ -0,0 +1,12 @@ 
+config BR2_PACKAGE_PROTOBUF_C
+	bool "protobuf-c"
+	depends on BR2_INSTALL_LIBSTDCPP
+	select BR2_PACKAGE_PROTOBUF
+	help
+	  Code generator and runtime libraries to use Protocol Buffers
+	  from pure C (not C++).
+
+	  http://code.google.com/p/protobuf-c/
+
+comment "protobuf-c requires a toolchain with C++ support enabled"
+	depends on !BR2_INSTALL_LIBSTDCPP
diff --git a/package/protobuf-c/protobuf-c.mk b/package/protobuf-c/protobuf-c.mk
new file mode 100644
index 0000000..eb0047a
--- /dev/null
+++ b/package/protobuf-c/protobuf-c.mk
@@ -0,0 +1,16 @@ 
+#############################################################
+#
+# protobuf-c
+#
+#############################################################
+
+PROTOBUF_C_VERSION = 0.15
+PROTOBUF_C_SITE = http://protobuf-c.googlecode.com/files
+PROTOBUF_C_DEPENDENCIES = protobuf host-protobuf-c
+HOST_PROTOBUF_C_DEPENDENCIES = host-protobuf
+PROTOBUF_C_CONF_OPT = --disable-protoc
+PROTOBUF_C_INSTALL_STAGING = YES
+PROTOBUF_C_LICENSE = BSD-3c
+
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))