[PATCH 0/3] meson: Don't pass 'method' to dependency()

Andrea Bolognani posted 3 patches 2 years, 2 months ago
Failed in applying to current master (apply log)
docs/devel/build-system.rst |  1 -
meson.build                 | 75 +++++++++++++++----------------------
tcg/meson.build             |  2 +-
3 files changed, 31 insertions(+), 47 deletions(-)
[PATCH 0/3] meson: Don't pass 'method' to dependency()
Posted by Andrea Bolognani 2 years, 2 months ago
See [1] for recent discussion about libgcrypt specifically, which the
first patch is about.

After writing that one, I realized that there is no point in
explicitly passing 'method' to dependency() because Meson will do the
right thing by default - hence the next two patches.

[1] https://lists.gnu.org/archive/html/qemu-devel/2022-01/msg01224.html

Andrea Bolognani (3):
  meson: Don't force use of libgcrypt-config
  meson: Don't pass 'method' to dependency()
  docs: Don't recommend passing 'method' to dependency()

 docs/devel/build-system.rst |  1 -
 meson.build                 | 75 +++++++++++++++----------------------
 tcg/meson.build             |  2 +-
 3 files changed, 31 insertions(+), 47 deletions(-)

-- 
2.34.1



Re: [PATCH 0/3] meson: Don't pass 'method' to dependency()
Posted by Daniel P. Berrangé 2 years, 2 months ago
On Wed, Jan 19, 2022 at 06:17:57PM +0100, Andrea Bolognani wrote:
> See [1] for recent discussion about libgcrypt specifically, which the
> first patch is about.
> 
> After writing that one, I realized that there is no point in
> explicitly passing 'method' to dependency() because Meson will do the
> right thing by default - hence the next two patches.

This whole series is effectively reverting

  commit 1a94933fcc3d641bda9988244cde61769baae2e5
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   Mon Aug 31 06:27:00 2020 -0400

    meson: use pkg-config method to find dependencies
    
    We do not need to ask cmake for the dependencies, so just use the
    pkg-config mechanism.  Keep "auto" for SDL so that it tries using
    sdl-config too.
    
    The documentation is adjusted to use SDL2_image as the example,
    rather than SDL which does not use the "pkg-config" method.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

which IIRC was done to get rid of mesons' confusing/misleading
attempts to probe for things via cmake when the pkg-config file
is not present.

> 
> [1] https://lists.gnu.org/archive/html/qemu-devel/2022-01/msg01224.html
> 
> Andrea Bolognani (3):
>   meson: Don't force use of libgcrypt-config
>   meson: Don't pass 'method' to dependency()
>   docs: Don't recommend passing 'method' to dependency()
> 
>  docs/devel/build-system.rst |  1 -
>  meson.build                 | 75 +++++++++++++++----------------------
>  tcg/meson.build             |  2 +-
>  3 files changed, 31 insertions(+), 47 deletions(-)
> 
> -- 
> 2.34.1
> 
> 

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Re: [PATCH 0/3] meson: Don't pass 'method' to dependency()
Posted by Andrea Bolognani 2 years, 2 months ago
On Wed, Jan 19, 2022 at 05:38:38PM +0000, Daniel P. Berrangé wrote:
> On Wed, Jan 19, 2022 at 06:17:57PM +0100, Andrea Bolognani wrote:
> > See [1] for recent discussion about libgcrypt specifically, which the
> > first patch is about.
> >
> > After writing that one, I realized that there is no point in
> > explicitly passing 'method' to dependency() because Meson will do the
> > right thing by default - hence the next two patches.
>
> This whole series is effectively reverting
>
>   commit 1a94933fcc3d641bda9988244cde61769baae2e5
>   Author: Paolo Bonzini <pbonzini@redhat.com>
>   Date:   Mon Aug 31 06:27:00 2020 -0400
>
>     meson: use pkg-config method to find dependencies
>
>     We do not need to ask cmake for the dependencies, so just use the
>     pkg-config mechanism.  Keep "auto" for SDL so that it tries using
>     sdl-config too.
>
>     The documentation is adjusted to use SDL2_image as the example,
>     rather than SDL which does not use the "pkg-config" method.
>
>     Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>
> which IIRC was done to get rid of mesons' confusing/misleading
> attempts to probe for things via cmake when the pkg-config file
> is not present.

I guess I stand corrected on Meson doing the right thing by default
then :)

The first patch should still makes sense though: libgcrypt is like
SDL in that Meson implements special handling for it, and we should
allow the pkg-config file to be used if available.

-- 
Andrea Bolognani / Red Hat / Virtualization