From 989c1ec1f4aeec9d1f7e133f1fcd1f31ae9aa866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Fri, 23 Aug 2024 10:49:28 -0700 Subject: [PATCH] Fix meson deprecations (#282) --- README.md | 2 +- meson.build | 9 +++++---- po/extra/meson.build | 2 +- po/meson.build | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index bc70388b..e56b82c3 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ You'll need the following dependencies: * libgranite-dev * libgtk-3-dev * libwingpanel-dev -* meson +* meson >= 0.58.0 * valac Run `meson` to configure the build environment and then `ninja` to build diff --git a/meson.build b/meson.build index 06f1ce07..28233347 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,8 @@ project( 'notifications', 'vala', 'c', - version: '7.1.1' + version: '7.1.1', + meson_version: '>= 0.58.0' ) gettext_name = meson.project_name() + '-indicator' @@ -9,7 +10,7 @@ gnome = import('gnome') i18n = import('i18n') prefix = get_option('prefix') -libdir = join_paths(prefix, get_option('libdir')) +libdir = prefix / get_option('libdir') add_global_arguments( '-DGETTEXT_PACKAGE="@0@"'.format(gettext_name), @@ -25,11 +26,11 @@ gresource = gnome.compile_resources( ) wingpanel_dep = dependency('wingpanel') -wingpanel_indicatorsdir = wingpanel_dep.get_pkgconfig_variable('indicatorsdir', define_variable: ['libdir', libdir]) +wingpanel_indicatorsdir = wingpanel_dep.get_variable('indicatorsdir', pkgconfig_define: ['libdir', libdir]) config_data = configuration_data() config_data.set('GETTEXT_PACKAGE', meson.project_name() + '-indicator') -config_data.set('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir'))) +config_data.set('LOCALEDIR', prefix / get_option('localedir')) config_vala = configure_file( input: 'src/Config.vala.in', output: '@BASENAME@', diff --git a/po/extra/meson.build b/po/extra/meson.build index 5388468d..42cb7ead 100644 --- a/po/extra/meson.build +++ b/po/extra/meson.build @@ -1,4 +1,4 @@ i18n.gettext('extra', - args: ['--directory='+meson.source_root(), '--from-code=UTF-8'], + args: ['--directory='+meson.project_source_root(), '--from-code=UTF-8'], install: false, ) diff --git a/po/meson.build b/po/meson.build index 807481fc..4008fb5b 100644 --- a/po/meson.build +++ b/po/meson.build @@ -1,5 +1,5 @@ i18n.gettext(gettext_name, - args: '--directory=' + meson.source_root(), + args: '--directory=' + meson.project_source_root(), preset: 'glib' )