From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Fri, 9 Mar 2012 09:16:23 +0100 Subject: [Buildroot] New package protobuf In-Reply-To: References: <20120307202304.19ec2f11@skate> Message-ID: <20120309091623.64bac36d@skate> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Hello Simon, Le Wed, 7 Mar 2012 21:14:13 +0000, Simon Dawson a ?crit : > Thanks for your comments; re-worked patch attached below. Please do not include "personal" comments before the "---", because everything before "---" will end up as the commit log in the Git history of Buildroot. So everything before "---" should be a nice commit message, and should not contain any sort of discussion about the patch. If you want to put some discussion about the patch, put it between the --- delimiter and the beginning of the patch itself. > Both a utility (/usr/bin/protoc, the protocol buffers compiler) and a > set of libraries (/usr/lib/libproto*.so) are installed on the target. My guess is that the protocol buffer compiler is useless on the target, no? Normally, you would : * Write a protocol buffer description file * Generate some code from it, using protoc on the host * Compile your application (which includes the generated code) for the target And the libraries, are they useful on the target? I.e, does the code generated by protoc depends on the libraries? If so, you should set PROTOBUF_INSTALL_STAGING = YES in your package. Can you clarify a bit the usage of the compiler vs. the libraries? > diff --git a/package/protobuf/protobuf.mk > b/package/protobuf/protobuf.mk new file mode 100644 > index 0000000..f4d82cb > --- /dev/null > +++ b/package/protobuf/protobuf.mk > @@ -0,0 +1,15 @@ > +############################################################# > +# > +# protobuf > +# > +############################################################# > +PROTOBUF_VERSION := 2.4.1 > +PROTOBUF_SOURCE := protobuf-$(PROTOBUF_VERSION).tar.gz > +PROTOBUF_SITE := http://protobuf.googlecode.com/files/ > + > +# N.B. Need to use host protoc during cross compilation. > +PROTOBUF_DEPENDENCIES := host-protobuf > +PROTOBUF_CONF_OPT := --with-protoc=$(HOST_DIR)/usr/bin/protoc Please use = instead of := everywhere. Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com