summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2018-09-26 17:35:46 +1200
committerArmin Kuster <akuster808@gmail.com>2018-09-26 18:51:25 -0700
commitbf02ea81dc48bfe743ad242650c0b62e08bdfa2b (patch)
treee0ebb4cb2505fe89d1e802efa3160892cb19f0d9
parentca2870ff8e96c3e82ed2c0cc5607b35fbf8c4b4c (diff)
downloadmeta-openembedded-bf02ea81dc48bfe743ad242650c0b62e08bdfa2b.tar.gz
protobuf: make python-protobuf dependency optional and default to off
A dependency on python-protobuf was added in commit 5f6fcfd36272768a3ff9078c07c572cf5dc01ccd for the sole purpose of providing a ptest, however python-protobuf is in meta-python and thus this means that meta-oe would depend on meta-python by default (assuming your distro enables ptest by default), and we don't want that - meta-oe isn't supposed to depend upon any layer other than openembedded-core. Luckily we can still have a ptest even without the python support, so add a PACKAGECONFIG and leave it disabled by default. Note: the PACKAGECONFIG here is not particularly useful since it's only about what goes into the -ptest package and thus also the dependency. I contemplated just using LANG_SUPPORT instead, but PACKAGECONFIG does have the advantage that it's introspectable and fairly well understood so in the end I went with it. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf_3.5.1.bb7
1 files changed, 5 insertions, 2 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
index 1ffb79da7..073dfaef0 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf_3.5.1.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf_3.5.1.bb
@@ -12,7 +12,7 @@ DEPENDS = "zlib"
12DEPENDS_append_class-target = " protobuf-native" 12DEPENDS_append_class-target = " protobuf-native"
13RDEPENDS_${PN}-compiler = "${PN}" 13RDEPENDS_${PN}-compiler = "${PN}"
14RDEPENDS_${PN}-dev += "${PN}-compiler" 14RDEPENDS_${PN}-dev += "${PN}-compiler"
15RDEPENDS_${PN}-ptest = "bash python-protobuf" 15RDEPENDS_${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python-protobuf', '', d)}"
16 16
17LIC_FILES_CHKSUM = "file://LICENSE;md5=35953c752efc9299b184f91bef540095" 17LIC_FILES_CHKSUM = "file://LICENSE;md5=35953c752efc9299b184f91bef540095"
18 18
@@ -24,13 +24,16 @@ SRC_URI = "git://github.com/google/protobuf.git;branch=3.5.x \
24 file://run-ptest \ 24 file://run-ptest \
25 " 25 "
26 26
27PACKAGECONFIG ??= ""
28PACKAGECONFIG[python] = ",,"
29
27EXTRA_OECONF += " --with-protoc=echo" 30EXTRA_OECONF += " --with-protoc=echo"
28 31
29inherit autotools-brokensep pkgconfig ptest 32inherit autotools-brokensep pkgconfig ptest
30 33
31S = "${WORKDIR}/git" 34S = "${WORKDIR}/git"
32TEST_SRC_DIR="examples" 35TEST_SRC_DIR="examples"
33LANG_SUPPORT="cpp python" 36LANG_SUPPORT = "cpp ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}"
34 37
35do_compile_ptest() { 38do_compile_ptest() {
36 # Modify makefile to use the cross-compiler 39 # Modify makefile to use the cross-compiler