Skip to contentSkip to conversation

Protobuf recipes update

PATCH New Felipe F. Tonello 1 participant 3 messages May 3, 2016

lore
Share & tools
lore
#0 lore raw

cover Protobuf recipes update

Added protobuf-c recipe which is the protobuf implementation in C. Also split protobuf package into two packages, one for the run-time libraries and other for the compiler.

Felipe F. Tonello (2):
protobuf: add protobuf-c recipe
protobuf: split package to main and compiler packages

 .../recipes-devtools/protobuf/protobuf-c_1.2.1.bb  | 28 ++++++++++++++++++++++
 .../recipes-devtools/protobuf/protobuf_2.6.1.bb    |  6 +++++
 2 files changed, 34 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/protobuf/protobuf-c_1.2.1.bb
Signature · 1 line
2.8.0
#1 lore raw

PATCH 1/2 protobuf: add protobuf-c recipe

replaces/obsoletes: commit 0d31f8448412 [Added protobuf-c criu dependency] in meta-virtualization

This version of the recipe also adds a separated package for the compiler.

---
 .../recipes-devtools/protobuf/protobuf-c_1.2.1.bb  | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/protobuf/protobuf-c_1.2.1.bb
meta-oe/recipes-devtools/protobuf/protobuf-c_1.2.1.bb new file +28 -0
new file mode 100644
index 000000000000..40fb96cf47bb
@@ -0,0 +1,28 @@
+SUMMARY = "Protocol Buffers - structured data serialisation mechanism"
+DESCRIPTION = "This is protobuf-c, a C implementation of the Google Protocol Buffers data \
+serialization format. It includes libprotobuf-c, a pure C library that \
+implements protobuf encoding and decoding, and protoc-c, a code generator that \
+converts Protocol Buffer .proto files to C descriptor code, based on the \
+original protoc. protobuf-c formerly included an RPC implementation; that code \
+has been split out into the protobuf-c-rpc project."
+HOMEPAGE = "https://github.com/protobuf-c/protobuf-c"
+SECTION = "console/tools"
+LICENSE = "BSD-2-Clause"
+
+DEPENDS = "protobuf-native protobuf"
+
+PACKAGE_BEFORE_PN = "${PN}-compiler"
+RDEPENDS_${PN}-compiler = "protobuf-compiler"
+RDEPENDS_${PN}-dev += "${PN}-compiler"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=235c3195a3968524dc1524b4ebea0c0e"
+SRC_URI = "https://github.com/protobuf-c/protobuf-c/archive/v${PV}.tar.gz"
+
+SRC_URI[md5sum] = "b884aeba4283309445a8e3b6e7322dd6"
+SRC_URI[sha256sum] = "2d708fb3c024b9e6e86df141faff802194f5db90a4b79e6d4aa6bd61dd983dd6"
+
+inherit autotools pkgconfig
+
+FILES_${PN}-compiler = "${bindir}"
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.8.0
#2 lore raw

PATCH 2/2 protobuf: split package to main and compiler packages

In reply to Felipe F. Tonello

Protobuf has two main features, a compiler and a library. Run-time applications only need the libraries to run.

---
 meta-oe/recipes-devtools/protobuf/protobuf_2.6.1.bb | 6 ++++++
 1 file changed, 6 insertions(+)
meta-oe/recipes-devtools/protobuf/protobuf_2.6.1.bb +6 -0
index 049f9d4e8f18..2977c59c4bf1 100644
@@ -6,7 +6,11 @@ HOMEPAGE = "https://github.com/google/protobuf"
 SECTION = "console/tools"
 LICENSE = "BSD-3-Clause"
 
+PACKAGE_BEFORE_PN = "${PN}-compiler"
+
 DEPENDS = "zlib"
+RDEPENDS_${PN}-compiler = "${PN}"
+RDEPENDS_${PN}-dev += "${PN}-compiler"
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=af6809583bfde9a31595a58bb4a24514"
 
@@ -22,4 +26,6 @@ inherit autotools
 
 S = "${WORKDIR}/git"
 
+FILES_${PN}-compiler = "${bindir} ${libdir}/libprotoc${SOLIBS}"
+
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.8.0