Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Seiderer <ps.report@gmx.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] meson: add entry for libgcrypt-config in cross file
Date: Tue, 23 Apr 2019 23:29:44 +0200	[thread overview]
Message-ID: <20190423232944.70aeddba@gmx.net> (raw)
In-Reply-To: <20190413182422.7e8f5f22@windsurf>

Hello J?rg, Thomas,

On Sat, 13 Apr 2019 18:24:22 +0200, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> Hello J?rg,
> 
> +Peter Seiderer in Cc.
> 
> On Wed,  3 Apr 2019 20:32:01 +0200
> J?rg Krause <joerg.krause@embedded.rocks> wrote:
> 
> > Since version 0.49.0 the Meson build system has native support for
> > looking for `libgcrypt-config` if no pkg-config file is found. As the
> > latest version 1.8.4 of libgcrypt does not provide a .pc file, using
> > `libgcrypt-config` is the only way for detecting the required libraries
> > when linking agains libgrypt.
> > 
> > The `libgcrypt-config` entry is necessary for updating package mpd,
> > which switched from the Autotools to the Meson build system when bumping
> > from version 0.20 to 0.21.
> > 
> > Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>  
> 
> As I said in my previous reply, I'm not too happy with this
> libgcrypt-config variable creeping into the global cross-compilation
> file. Can we instead look at extending what Peter Seiderer is doing in
> http://patchwork.ozlabs.org/patch/1081486/ and allow some per-package
> additions to the per-package cross-compilation file ? Peter's patch
> does it for CFLAGS/CXXFLAGS/LDFLAGS, we could perhaps do the same with
> arbitrary program paths ?

Something like the following (draft) should work:

diff --git a/package/meson/cross-compilation.conf.in b/package/meson/cross-compilation.conf.in
index 4056c2b2f4..7cd372128e 100644
--- a/package/meson/cross-compilation.conf.in
+++ b/package/meson/cross-compilation.conf.in
@@ -9,6 +9,7 @@ cpp = '@TARGET_CROSS at g++'
 ar = '@TARGET_CROSS at ar'
 strip = '@TARGET_CROSS at strip'
 pkgconfig = '@HOST_DIR@/usr/bin/pkg-config'
+ at PKG_TARGET_BINARIES@
 
 [properties]
 needs_exe_wrapper = true
diff --git a/package/meson/meson.mk b/package/meson/meson.mk
index 70128f6bad..e550c80c9d 100644
--- a/package/meson/meson.mk
+++ b/package/meson/meson.mk
@@ -60,6 +60,7 @@ define HOST_MESON_INSTALL_CROSS_CONF
            -e "s%@TARGET_CFLAGS@%$(HOST_MESON_SED_CFLAGS)%g" \
            -e "s%@TARGET_LDFLAGS@%$(HOST_MESON_SED_LDFLAGS)%g" \
            -e "s%@TARGET_CXXFLAGS@%$(HOST_MESON_SED_CXXFLAGS)%g" \
+           -e "s%@PKG_TARGET_BINARIES@%%g" \
            -e "s%@PKG_TARGET_CFLAGS@%%g" \
            -e "s%@PKG_TARGET_LDFLAGS@%%g" \
            -e "s%@PKG_TARGET_CXXFLAGS@%%g" \
diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
index 9974b1e513..93df43fe3e 100644
--- a/package/pkg-meson.mk
+++ b/package/pkg-meson.mk
@@ -74,6 +74,7 @@ define $(2)_CONFIGURE_CMDS
            -e "s%@TARGET_CFLAGS@%$$(HOST_MESON_SED_CFLAGS)%g" \
            -e "s%@TARGET_LDFLAGS@%$$(HOST_MESON_SED_LDFLAGS)%g" \
            -e "s%@TARGET_CXXFLAGS@%$$(HOST_MESON_SED_CXXFLAGS)%g" \
+           -e "s%@PKG_TARGET_BINARIES@%$$($$(PKG)_MESON_BINARIES)%g" \
            -e "s%@PKG_TARGET_CFLAGS@%$$($$(PKG)_MESON_SED_CFLAGS)%g" \
            -e "s%@PKG_TARGET_LDFLAGS@%$$($$(PKG)_MESON_SED_LDFLAGS)%g" \
            -e "s%@PKG_TARGET_CXXFLAGS@%$$($$(PKG)_MESON_SED_CXXFLAGS)%g" \


and with: 

MPD_MESON_BINARIES = libgcrypt-config = '$(STAGING_DIR)/usr/bin/libgcrypt-config'

Regards,
Peter

> 
> Thanks!
> 
> Thomas

  reply	other threads:[~2019-04-23 21:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03 18:32 [Buildroot] [PATCH 1/2] meson: add entry for libgcrypt-config in cross file Jörg Krause
2019-04-03 18:32 ` [Buildroot] [PATCH 2/2] package/mpd: bump to version 0.21.7 Jörg Krause
2019-04-03 19:33 ` [Buildroot] [PATCH 1/2] meson: add entry for libgcrypt-config in cross file Thomas Petazzoni
2019-04-05  6:58   ` Jörg Krause
2019-04-13 16:24 ` Thomas Petazzoni
2019-04-23 21:29   ` Peter Seiderer [this message]
2019-04-24 11:09     ` Jörg Krause
2019-04-30  8:11     ` Jörg Krause
2019-04-30  8:27       ` Peter Seiderer
2019-04-30 11:04         ` Jörg Krause
2019-05-01 11:13           ` Arnout Vandecappelle
2019-05-01 19:04             ` Peter Seiderer
2019-05-02 12:17               ` Arnout Vandecappelle
2019-05-02 20:02                 ` Peter Seiderer
2019-05-03  9:21                   ` Arnout Vandecappelle
2019-05-23 22:51                 ` Jörg Krause
2019-05-24  8:18                   ` Arnout Vandecappelle
2019-05-26  9:17                     ` Jörg Krause
2019-05-01 19:23             ` Peter Seiderer
2019-05-01 19:36             ` Thomas Petazzoni
2019-05-02 12:20               ` Arnout Vandecappelle

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=20190423232944.70aeddba@gmx.net \
    --to=ps.report@gmx.net \
    --cc=buildroot@busybox.net \
    /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