diff options
| author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2018-09-26 13:53:09 +1200 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2018-09-25 22:24:15 -0700 |
| commit | 6c0509539be40040a15d4768e2d6de4189e79382 (patch) | |
| tree | 1a0cf6e4f7f594bc874ec4b2ec93e45b46509999 | |
| parent | 3709fa6124c2d34a8066d7defbea8cb481813b2b (diff) | |
| download | meta-openembedded-6c0509539be40040a15d4768e2d6de4189e79382.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: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-devtools/protobuf/protobuf_3.6.1.bb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_3.6.1.bb b/meta-oe/recipes-devtools/protobuf/protobuf_3.6.1.bb index f8498c4c88..cf72d9ca7f 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf_3.6.1.bb +++ b/meta-oe/recipes-devtools/protobuf/protobuf_3.6.1.bb | |||
| @@ -22,10 +22,13 @@ S = "${WORKDIR}/git" | |||
| 22 | 22 | ||
| 23 | inherit autotools-brokensep pkgconfig ptest | 23 | inherit autotools-brokensep pkgconfig ptest |
| 24 | 24 | ||
| 25 | PACKAGECONFIG ??= "" | ||
| 26 | PACKAGECONFIG[python] = ",," | ||
| 27 | |||
| 25 | EXTRA_OECONF += "--with-protoc=echo" | 28 | EXTRA_OECONF += "--with-protoc=echo" |
| 26 | 29 | ||
| 27 | TEST_SRC_DIR = "examples" | 30 | TEST_SRC_DIR = "examples" |
| 28 | LANG_SUPPORT = "cpp python" | 31 | LANG_SUPPORT = "cpp ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" |
| 29 | 32 | ||
| 30 | do_compile_ptest() { | 33 | do_compile_ptest() { |
| 31 | # Modify makefile to use the cross-compiler | 34 | # Modify makefile to use the cross-compiler |
| @@ -78,7 +81,7 @@ FILES_${PN}-lite = "${libdir}/libprotobuf-lite${SOLIBS}" | |||
| 78 | 81 | ||
| 79 | RDEPENDS_${PN}-compiler = "${PN}" | 82 | RDEPENDS_${PN}-compiler = "${PN}" |
| 80 | RDEPENDS_${PN}-dev += "${PN}-compiler" | 83 | RDEPENDS_${PN}-dev += "${PN}-compiler" |
| 81 | RDEPENDS_${PN}-ptest = "bash python-protobuf" | 84 | RDEPENDS_${PN}-ptest = "bash ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python-protobuf', '', d)}" |
| 82 | 85 | ||
| 83 | MIPS_INSTRUCTION_SET = "mips" | 86 | MIPS_INSTRUCTION_SET = "mips" |
| 84 | 87 | ||
