diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2018-09-26 17:35:46 +1200 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2018-09-26 18:51:25 -0700 |
commit | bf02ea81dc48bfe743ad242650c0b62e08bdfa2b (patch) | |
tree | e0ebb4cb2505fe89d1e802efa3160892cb19f0d9 | |
parent | ca2870ff8e96c3e82ed2c0cc5607b35fbf8c4b4c (diff) | |
download | meta-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.bb | 7 |
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" | |||
12 | DEPENDS_append_class-target = " protobuf-native" | 12 | DEPENDS_append_class-target = " protobuf-native" |
13 | RDEPENDS_${PN}-compiler = "${PN}" | 13 | RDEPENDS_${PN}-compiler = "${PN}" |
14 | RDEPENDS_${PN}-dev += "${PN}-compiler" | 14 | RDEPENDS_${PN}-dev += "${PN}-compiler" |
15 | RDEPENDS_${PN}-ptest = "bash python-protobuf" | 15 | RDEPENDS_${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python-protobuf', '', d)}" |
16 | 16 | ||
17 | LIC_FILES_CHKSUM = "file://LICENSE;md5=35953c752efc9299b184f91bef540095" | 17 | LIC_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 | ||
27 | PACKAGECONFIG ??= "" | ||
28 | PACKAGECONFIG[python] = ",," | ||
29 | |||
27 | EXTRA_OECONF += " --with-protoc=echo" | 30 | EXTRA_OECONF += " --with-protoc=echo" |
28 | 31 | ||
29 | inherit autotools-brokensep pkgconfig ptest | 32 | inherit autotools-brokensep pkgconfig ptest |
30 | 33 | ||
31 | S = "${WORKDIR}/git" | 34 | S = "${WORKDIR}/git" |
32 | TEST_SRC_DIR="examples" | 35 | TEST_SRC_DIR="examples" |
33 | LANG_SUPPORT="cpp python" | 36 | LANG_SUPPORT = "cpp ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" |
34 | 37 | ||
35 | do_compile_ptest() { | 38 | do_compile_ptest() { |
36 | # Modify makefile to use the cross-compiler | 39 | # Modify makefile to use the cross-compiler |