meson: replace deprecated get_pkgconfig_variable()

Message ID 20220728053611.3786-1-pedanticdm@gmx.us
State Accepted, archived
Headers show
Series meson: replace deprecated get_pkgconfig_variable() | expand

Commit Message

Joe Baldino July 28, 2022, 5:36 a.m. UTC
Apparently that function was deprecated in 0.56, so use the generic
getter introduced in 0.51 instead. This squashes a warning.

Signed-off-by: Joe Baldino <pedanticdm@gmx.us>
---

Notes:
    WARNING: Deprecated features used:
     * 0.56.0: {'dependency.get_pkgconfig_variable'}

    See: https://mesonbuild.com/Reference-manual_returned_dep.html#depget_variable

 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.37.1

Comments

Allan McRae July 28, 2022, 11:42 p.m. UTC | #1
On 28/7/22 15:36, Joe Baldino wrote:
> Apparently that function was deprecated in 0.56, so use the generic
> getter introduced in 0.51 instead. This squashes a warning.
> 
> Signed-off-by: Joe Baldino <pedanticdm@gmx.us>
> ---
> 
> Notes:
>      WARNING: Deprecated features used:
>       * 0.56.0: {'dependency.get_pkgconfig_variable'}
> 

Not sure why I don't see this warning...  but the manual does indeed say 
this is deprecated.  Thanks!

>      See: https://mesonbuild.com/Reference-manual_returned_dep.html#depget_variable
> 
>   meson.build | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index 1519a2bbb4ef..6ea97672e33d 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -43,7 +43,7 @@ endif
> 
>   bashcompletion = dependency('bash-completion', required : false)
>   if bashcompletion.found()
> -  BASHCOMPDIR = bashcompletion.get_pkgconfig_variable('completionsdir')
> +  BASHCOMPDIR = bashcompletion.get_variable(pkgconfig: 'completionsdir')
>   else
>     BASHCOMPDIR = join_paths(DATAROOTDIR, 'bash-completion/completions')
>   endif
> --
> 2.37.1
> 
> .

Patch

diff --git a/meson.build b/meson.build
index 1519a2bbb4ef..6ea97672e33d 100644
--- a/meson.build
+++ b/meson.build
@@ -43,7 +43,7 @@  endif

 bashcompletion = dependency('bash-completion', required : false)
 if bashcompletion.found()
-  BASHCOMPDIR = bashcompletion.get_pkgconfig_variable('completionsdir')
+  BASHCOMPDIR = bashcompletion.get_variable(pkgconfig: 'completionsdir')
 else
   BASHCOMPDIR = join_paths(DATAROOTDIR, 'bash-completion/completions')
 endif