summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/protobuf/protobuf_3.5.1.bb
diff options
context:
space:
mode:
authorDerek Straka <derek@asterius.io>2018-01-03 09:24:24 -0500
committerArmin Kuster <akuster808@gmail.com>2018-01-16 21:33:04 -0800
commit01e54eb2fa5fb3e528781f51c85e79eb8c9b74d1 (patch)
tree1e017e4e2e945535b8a3e2bc6237c0819be4b8bc /meta-oe/recipes-devtools/protobuf/protobuf_3.5.1.bb
parentd18b3c8ef04b323b0ec2764e61f670f5f4a42147 (diff)
downloadmeta-openembedded-01e54eb2fa5fb3e528781f51c85e79eb8c9b74d1.tar.gz
protobuf: update to version 3.5.1
Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/protobuf/protobuf_3.5.1.bb')
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf_3.5.1.bb84
1 files changed, 84 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_3.5.1.bb b/meta-oe/recipes-devtools/protobuf/protobuf_3.5.1.bb
new file mode 100644
index 000000000..1ffb79da7
--- /dev/null
+++ b/meta-oe/recipes-devtools/protobuf/protobuf_3.5.1.bb
@@ -0,0 +1,84 @@
1SUMMARY = "Protocol Buffers - structured data serialisation mechanism"
2DESCRIPTION = "Protocol Buffers are a way of encoding structured data in an \
3efficient yet extensible format. Google uses Protocol Buffers for almost \
4all of its internal RPC protocols and file formats."
5HOMEPAGE = "https://github.com/google/protobuf"
6SECTION = "console/tools"
7LICENSE = "BSD-3-Clause"
8
9PACKAGE_BEFORE_PN = "${PN}-compiler ${PN}-lite"
10
11DEPENDS = "zlib"
12DEPENDS_append_class-target = " protobuf-native"
13RDEPENDS_${PN}-compiler = "${PN}"
14RDEPENDS_${PN}-dev += "${PN}-compiler"
15RDEPENDS_${PN}-ptest = "bash python-protobuf"
16
17LIC_FILES_CHKSUM = "file://LICENSE;md5=35953c752efc9299b184f91bef540095"
18
19SRCREV = "106ffc04be1abf3ff3399f54ccf149815b287dd9"
20
21PV = "3.5.1+git${SRCPV}"
22
23SRC_URI = "git://github.com/google/protobuf.git;branch=3.5.x \
24 file://run-ptest \
25 "
26
27EXTRA_OECONF += " --with-protoc=echo"
28
29inherit autotools-brokensep pkgconfig ptest
30
31S = "${WORKDIR}/git"
32TEST_SRC_DIR="examples"
33LANG_SUPPORT="cpp python"
34
35do_compile_ptest() {
36 # Modify makefile to use the cross-compiler
37 sed -e "s|c++|${CXX} \$(LDFLAGS)|g" -i "${S}/${TEST_SRC_DIR}/Makefile"
38
39 mkdir -p "${B}/${TEST_SRC_DIR}"
40
41 # Add the location of the cross-compiled header and library files
42 # which haven't been installed yet.
43 cp "${B}/protobuf.pc" "${B}/${TEST_SRC_DIR}/protobuf.pc"
44 sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
45 sed -e 's|Cflags:|Cflags: -I${S}/src|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
46 sed -e 's|Libs:|Libs: -L${B}/src/.libs|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
47 export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}"
48
49 # Save the pkgcfg sysroot variable, and update it to nothing so
50 # that it doesn't append the sysroot to the beginning of paths.
51 # The header and library files aren't installed to the target
52 # system yet. So the absolute paths were specified above.
53 save_pkg_config_sysroot_dir=$PKG_CONFIG_SYSROOT_DIR
54 export PKG_CONFIG_SYSROOT_DIR=
55
56 # Compile the tests
57 for lang in ${LANG_SUPPORT}; do
58 oe_runmake -C "${S}/${TEST_SRC_DIR}" ${lang}
59 done
60
61 # Restore the pkgconfig sysroot variable
62 export PKG_CONFIG_SYSROOT_DIR=$save_pkg_config_sysroot_dir
63}
64
65do_install_ptest() {
66 local olddir=`pwd`
67
68 cd "${S}/${TEST_SRC_DIR}"
69 install -d "${D}/${PTEST_PATH}"
70 for i in add_person* list_people*; do
71 if [ -x "$i" ]; then
72 install "$i" "${D}/${PTEST_PATH}"
73 fi
74 done
75 cp "${S}/${TEST_SRC_DIR}/addressbook_pb2.py" "${D}/${PTEST_PATH}"
76 cd "$olddir"
77}
78
79FILES_${PN}-compiler = "${bindir} ${libdir}/libprotoc${SOLIBS}"
80FILES_${PN}-lite = "${bindir} ${libdir}/libprotobuf-lite${SOLIBS}"
81
82MIPS_INSTRUCTION_SET = "mips"
83
84BBCLASSEXTEND = "native nativesdk"