On Fri, Dec 14, 2018 at 04:20:08PM +0100, Clemens Gruber wrote:
> On Tue, Dec 11, 2018 at 05:14:00PM +0100, Roland Hieber wrote:
> > On Mon, Dec 10, 2018 at 02:56:51PM +0100, Clemens Gruber wrote:
> > > The grpc cmake build process does not produce .pc files.
> > > To ease reuse of grpc from other packages, patch them in.
> > > 
> > > The pkg-config files are based on those created by the grpc Makefile
> > > build. (gpr.pc merged into grpc.pc to avoid adding a third .pc file)
> > > The library version numbers are extracted from the Makefile.
> > > 
> > > Signed-off-by: Clemens Gruber <[email protected]>
> > > ---
> > >  .../0002-Add-pkg-config-files.patch           | 47 +++++++++++++++++++
> > >  patches/grpc-1.17.0/series                    |  3 +-
> > >  rules/grpc.make                               | 18 +++++++
> > >  3 files changed, 67 insertions(+), 1 deletion(-)
> > >  create mode 100644 patches/grpc-1.17.0/0002-Add-pkg-config-files.patch
> > > 
> > [...]
> > > --- a/rules/grpc.make
> > > +++ b/rules/grpc.make
> > > @@ -49,6 +49,24 @@ GRPC_CONF_OPT  := \
> > >   -DgRPC_NATIVE_CPP_PLUGIN=$(PTXDIST_SYSROOT_HOST)/bin/grpc_cpp_plugin \
> > >   -DPROTOBUF_PROTOC_EXECUTABLE=$(PTXDIST_SYSROOT_HOST)/bin/protoc
> > >  
> > > +# 
> > > ----------------------------------------------------------------------------
> > > +# Install
> > > +# 
> > > ----------------------------------------------------------------------------
> > > +
> > > +$(STATEDIR)/grpc.install:
> > > + @$(call targetinfo)
> > > + @$(call world/install, GRPC)
> > > +
> > > + @install -d $(GRPC_PKGDIR)/usr/lib/pkgconfig/
> > > + VERSION=$$(grep "CORE_VERSION =" $(GRPC_DIR)/Makefile | sed 
> > > 's/.*=\s*//') \
> > 
> > Patch looks okay to me, but just a small FYI: sed understands patterns
> > too, so you can save yourself a process :-)
> > 
> >     $ (echo irrelevant text; echo 'CORE_VERSION = 2.55.3foobar') | sed -n 
> > '/CORE_VERSION =/ s/.*=\s*//p'
> >     2.55.3foobar
> > 
> > -n and s///p make sed only print the matching lines after substitution.
> 
> Thanks, yes, would be cleaner that way. Do you want to send a follow-up
> patch or should I send a v2?

I've fixed this locally. No need for a v2. I'm currently running build
tests for this and other stuff.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
[email protected]

Reply via email to