[folks/wip/jtojnar/post-install: 2/4] build: Raise Meson version to 0.57




commit 01b87066431ff96374fba67f4de5cc79f4af8c45
Author: Jan Tojnar <jtojnar gmail com>
Date:   Thu Sep 8 14:38:51 2022 +0200

    build: Raise Meson version to 0.57
    
    Will be needed for gnome.post_install().
    
    Also fix deprecations.

 docs/gtkdoc/meson.build |  2 +-
 docs/meson.build        |  6 +++---
 folks/meson.build       |  2 +-
 meson.build             | 12 ++++++------
 4 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/docs/gtkdoc/meson.build b/docs/gtkdoc/meson.build
index f2ccdb87..a215e498 100644
--- a/docs/gtkdoc/meson.build
+++ b/docs/gtkdoc/meson.build
@@ -19,7 +19,7 @@ foreach doc_target : valadoc_targets
       docs_common_valadoc_flags,
       docs_common_valadoc_deps,
       doc_target.get('dependencies'),
-      '-X', meson.build_root() / 'folks' / 'folks' / 'folks.h',
+      '-X', meson.project_build_root() / 'folks' / 'folks' / 'folks.h',
       '@INPUT@',
     ],
     depends: doc_target.get('library'),
diff --git a/docs/meson.build b/docs/meson.build
index 05264f94..67c66451 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -3,7 +3,7 @@ docs_common_valadoc_flags = [
   '--force',
   '--package-version', meson.project_version(),
   '--no-protected',
-  '-X', meson.build_root() / 'folks' / 'folks' / 'folks.h',
+  '-X', meson.project_build_root() / 'folks' / 'folks' / 'folks.h',
 ]
 
 docs_common_valadoc_deps = [
@@ -11,9 +11,9 @@ docs_common_valadoc_deps = [
   '--pkg', 'glib-2.0',
   '--pkg', 'gio-2.0',
   '--pkg', 'gee-0.8',
-  '--vapidir', meson.build_root() / 'folks',
+  '--vapidir', meson.project_build_root() / 'folks',
   '--pkg', 'folks-internal',
-  '--vapidir', meson.source_root() / 'folks',
+  '--vapidir', meson.project_source_root() / 'folks',
   '--pkg', 'folks-generics',
   '--pkg', 'build-conf',
 ]
diff --git a/folks/meson.build b/folks/meson.build
index c87446bd..821a3099 100644
--- a/folks/meson.build
+++ b/folks/meson.build
@@ -28,7 +28,7 @@ libfolks_internal = static_library('folks-internal',
 
 libfolks_internal_dep = declare_dependency(
   link_with: libfolks_internal,
-  dependencies: valac.find_library('folks-generics', dirs: meson.source_root() / 'folks'),
+  dependencies: valac.find_library('folks-generics', dirs: meson.project_source_root() / 'folks'),
 )
 
 # Core library
diff --git a/meson.build b/meson.build
index 785e965f..003e516f 100644
--- a/meson.build
+++ b/meson.build
@@ -1,7 +1,7 @@
 project('folks', [ 'vala', 'c' ],
   version: '0.15.6',
   license: 'LGPL2.1+',
-  meson_version: '>= 0.51',
+  meson_version: '>= 0.57',
 )
 
 gnome = import('gnome')
@@ -98,8 +98,8 @@ if eds_backend_enabled
   libxml_dep = dependency('libxml-2.0')
 
   eds_dep = dependency('evolution-data-server-1.2', version: '>=' + min_eds_version)
-  eds_sources_service_name = eds_dep.get_pkgconfig_variable('sourcesdbusservicename')
-  eds_address_book_service_name = eds_dep.get_pkgconfig_variable('addressbookdbusservicename')
+  eds_sources_service_name = eds_dep.get_variable(pkgconfig: 'sourcesdbusservicename')
+  eds_address_book_service_name = eds_dep.get_variable(pkgconfig: 'addressbookdbusservicename')
 
   message('Building E-D-S with Sources service "@0@" AddressBook service "@1@"'.format(
     eds_sources_service_name, eds_address_book_service_name))
@@ -143,8 +143,8 @@ conf.set_quoted('LOCALE_DIR', folks_prefix / get_option('localedir'))
 conf.set_quoted('PACKAGE_NAME', meson.project_name())
 conf.set_quoted('PACKAGE_STRING', meson.project_name())
 conf.set_quoted('PACKAGE_VERSION', meson.project_version())
-conf.set_quoted('ABS_TOP_SRCDIR', meson.source_root())
-conf.set_quoted('ABS_TOP_BUILDDIR', meson.build_root())
+conf.set_quoted('ABS_TOP_SRCDIR', meson.project_source_root())
+conf.set_quoted('ABS_TOP_BUILDDIR', meson.project_build_root())
 conf.set_quoted('INSTALLED_TESTS_DIR', installed_tests_dir)
 conf.set_quoted('INSTALLED_TESTS_META_DIR', folks_prefix / installed_tests_meta_dir)
 conf.set_quoted('BACKEND_DIR', folks_prefix / folks_backend_dir)
@@ -164,7 +164,7 @@ build_conf_dep = valac.find_library('build-conf', dirs: meson.current_source_dir
 # Vala args
 add_project_arguments([
     # Make sure the targets find the build-conf and folks-internal VAPI
-    '--vapidir', meson.source_root() / 'folks',
+    '--vapidir', meson.project_source_root() / 'folks',
     # within the libfolks tree, select inline code paths
     '-D', 'FOLKS_COMPILATION',
   ],


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]