[oe] [meta-oe][master][sumo][PATCH] rapidjson: Allow empty package

Joshua Watt jpewhacker at gmail.com
Tue Oct 23 19:00:16 UTC 2018


On Tue, 2018-10-23 at 19:28 +0200, Martin Jansa wrote:
> Why is installing useless empty packages sane?

The development packages that get installed in the SDK are picked up
grabbing the -dev that corresponds to each ${PN} being installed.
However, you can't do that with RapidJSON as there is no ${PN} package
because it is empty and therefore culled. Adding the empty ${PN}
package seems to be a pretty low-risk way of making RapidJSON behave
like all the other packages when it comes to building into an SDK;
effectively, IMAGE_INSTALL += "rapidjson" is now sufficient to get it
in the SDK.
You could of course manually add "rapidjson-dev" to
TOOLCHAIN_HOST_TASK, but that doesn't seem to be the precedent. This
change is similar to those found in other header-only and staticdev-
only recipes like libatomic-ops, gtest, libsrtp, tclap, ceres-solver,
asio, and libinih.
> On Tue, Oct 23, 2018 at 6:05 PM Joshua Watt <jpewhacker at gmail.com>
> wrote:
> > Causes the empty base package to be created so that RapidJSON can
> > be
> > 
> > sanely included in an SDK via IMAGE_INSTALL, RDEPENDS, and the
> > like.
> > 
> > 
> > 
> > Signed-off-by: Joshua Watt <JPEWhacker at gmail.com>
> > 
> > ---
> > 
> >  meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb | 1 +
> > 
> >  1 file changed, 1 insertion(+)
> > 
> > 
> > 
> > diff --git a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
> > b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
> > 
> > index 8ab35d224..76e01f824 100644
> > 
> > --- a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
> > 
> > +++ b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
> > 
> > @@ -19,6 +19,7 @@ inherit cmake
> > 
> >  EXTRA_OECMAKE += "-DRAPIDJSON_BUILD_DOC=OFF
> > -DRAPIDJSON_BUILD_TESTS=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF"
> > 
> > 
> > 
> >  # RapidJSON is a header-only C++ library, so the main package will
> > be empty.
> > 
> > +ALLOW_EMPTY_${PN} = "1"
> > 
> > 
> > 
> >  FILES_${PN}-dev += "${libdir}/cmake"
> > 
> >  RDEPENDS_${PN}-dev = ""
> > 
> > -- 
> > 
> > 2.17.1
> > 
> > 
> > 
-- 
Joshua Watt <JPEWhacker at gmail.com>


More information about the Openembedded-devel mailing list