mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <r.hieber@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Clemens Gruber <clemens.gruber@pqgruber.com>
Subject: Re: [ptxdist] [PATCH 3/3] grpc: add pkg-config files
Date: Tue, 11 Dec 2018 17:14:00 +0100	[thread overview]
Message-ID: <20181211161400.j4oeokdnwz6vumng@pengutronix.de> (raw)
In-Reply-To: <20181210135651.6254-4-clemens.gruber@pqgruber.com>

Hi,

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 <clemens.gruber@pqgruber.com>
> ---
>  .../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.

 - Roland

> +		ptxd_replace_magic $(GRPC_DIR)/grpc.pc.in > \
> +		$(GRPC_PKGDIR)/usr/lib/pkgconfig/grpc.pc
> +	VERSION=$$(grep "CPP_VERSION =" $(GRPC_DIR)/Makefile | sed 's/.*=\s*//') \
> +		ptxd_replace_magic $(GRPC_DIR)/grpc++.pc.in > \
> +		$(GRPC_PKGDIR)/usr/lib/pkgconfig/grpc++.pc
> +
> +	@$(call touch)
> +
>  # ----------------------------------------------------------------------------
>  # Target-Install
>  # ----------------------------------------------------------------------------
> -- 
> 2.19.2
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Roland Hieber                     | r.hieber@pengutronix.de     |
Pengutronix e.K.                  | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2018-12-11 16:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-10 13:56 [ptxdist] [PATCH 0/3] grpc Clemens Gruber
2018-12-10 13:56 ` [ptxdist] [PATCH 1/3] host-c-ares: new package Clemens Gruber
2018-12-10 13:56 ` [ptxdist] [PATCH 2/3] grpc: " Clemens Gruber
2018-12-10 13:56 ` [ptxdist] [PATCH 3/3] grpc: add pkg-config files Clemens Gruber
2018-12-11 16:14   ` Roland Hieber [this message]
2018-12-14 15:20     ` Clemens Gruber
2018-12-14 15:40       ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181211161400.j4oeokdnwz6vumng@pengutronix.de \
    --to=r.hieber@pengutronix.de \
    --cc=clemens.gruber@pqgruber.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox