[gnome-autoar/meson-use-old-string-format] meson: Use .format for string formating
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-autoar/meson-use-old-string-format] meson: Use .format for string formating
- Date: Wed, 11 Aug 2021 13:18:46 +0000 (UTC)
commit 36a146419c253d98b2a200c1a7da86eb718029e7
Author: Felipe Borges <felipeborges gnome org>
Date: Wed Aug 11 14:32:53 2021 +0200
meson: Use .format for string formating
Format strings got added in meson 0.58. This allows the meson
dependency to be downgraded to 0.56.
See https://mesonbuild.com/Syntax.html#string-formatting
gnome-autoar/meson.build | 12 ++++++------
meson.build | 6 +++---
2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gnome-autoar/meson.build b/gnome-autoar/meson.build
index 30533a1..e7fd478 100644
--- a/gnome-autoar/meson.build
+++ b/gnome-autoar/meson.build
@@ -3,7 +3,7 @@
src_inc = include_directories('.')
-libname = f'@gnome_autoar_name@-@gnome_autoar_api_version@'
+libname= '@0@-@1@'.format(gnome_autoar_name, gnome_autoar_api_version)
headers = files(
'autoar-compressor.h',
@@ -31,8 +31,8 @@ enum_types = 'autoar-enum-types'
enum_sources = gnome.mkenums(
enum_types,
sources: headers,
- h_template: f'@enum_types@.h.template',
- c_template: f'@enum_types@.c.template',
+ h_template: '@0@.h.template'.format(enum_types),
+ c_template: '@0@.c.template'.format(enum_types),
install_header: true,
install_dir: gnome_autoar_includedir / libname / gnome_autoar_name,
)
@@ -86,7 +86,7 @@ if enable_introspection
namespace: api_ns,
nsversion: gnome_autoar_api_ns_version,
identifier_prefix: gnome_autoar_api_prefix,
- export_packages: f'@api_ns@-@gnome_autoar_api_ns_version@',
+ export_packages: '@0@-@1@'.format(api_ns, gnome_autoar_api_ns_version),
install: true,
)
@@ -104,7 +104,7 @@ if not enable_gtk
subdir_done()
endif
-libname_gtk = f'@gnome_autoar_name@-gtk-@gnome_autoar_api_version@'
+libname_gtk = '@0@-gtk-@1@'.format(gnome_autoar_name, gnome_autoar_api_version)
headers = files(
'autoar-gtk-chooser.h',
@@ -161,7 +161,7 @@ if enable_introspection
namespace: api_ns,
nsversion: gnome_autoar_api_ns_version,
identifier_prefix: 'AutoarGtk',
- export_packages: f'@api_ns@-@gnome_autoar_api_ns_version@',
+ export_packages: '@0@-@g1@'.format(api_ns, gnome_autoar_api_ns_version),
install: true,
)
diff --git a/meson.build b/meson.build
index 00a92d0..ccb8bdd 100644
--- a/meson.build
+++ b/meson.build
@@ -6,7 +6,7 @@ project(
version: '0.4.0',
license: 'LGPL2.1+',
default_options: 'buildtype=debugoptimized',
- meson_version: '>= 0.58.0',
+ meson_version: '>= 0.56.0',
)
gnome_autoar_name = meson.project_name()
@@ -96,7 +96,7 @@ gtk_dep = dependency(
'gtk+-3.0',
version: gtk_req_version,
required: get_option('gtk'),
- not_found_message: f'GTK+ support requested but gtk+-3.0 @gtk_req_version@ could not be found',
+ not_found_message: 'GTK+ support requested but gtk+-3.0 @0@ could not be found'.format(gtk_req_version),
)
enable_gtk = gtk_dep.found()
@@ -106,7 +106,7 @@ enable_vapi = get_option('vapi')
assert(not enable_vapi or enable_introspection, 'GObject introspection support must be enabled to build VALA
bindings')
gio_schemasdir = gio_dep.get_variable(
- 'schemasdir',
+ internal: 'schemasdir',
pkgconfig_define: ['datadir', gnome_autoar_datadir],
default_value: gnome_autoar_datadir / 'glib-2.0/schemas',
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]