[PATCH spice-gtk v2] build: Replace "join_paths" with "/" operator

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

 



Supported by Meson 0.49 (required by Spice-GTK).
New syntax is shorter and is recommended in
https://mesonbuild.com/Release-notes-for-0-49-0.html
("Joining paths with /").

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 doc/reference/meson.build | 18 +++++++++---------
 man/meson.build           |  2 +-
 meson.build               |  8 ++++----
 src/meson.build           | 10 +++++-----
 vapi/meson.build          |  2 +-
 5 files changed, 20 insertions(+), 20 deletions(-)

Changes since v1:
- extend commit message

diff --git a/doc/reference/meson.build b/doc/reference/meson.build
index e0005f06..61c410f6 100644
--- a/doc/reference/meson.build
+++ b/doc/reference/meson.build
@@ -39,10 +39,10 @@ ignore_headers = [
 spice_gtk_doc_dep = declare_dependency(link_with : [spice_client_gtk_lib, spice_client_glib_lib])
 
 glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
-glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
+glib_docpath = glib_prefix / 'share' / 'gtk-doc' / 'html'
 gtk_prefix = dependency('gtk+-3.0').get_pkgconfig_variable('prefix')
-gtk_docpath = join_paths(gtk_prefix, 'share', 'gtk-doc', 'html')
-docpath = join_paths(spice_gtk_datadir, 'gtk-doc', 'html')
+gtk_docpath = gtk_prefix / 'share' / 'gtk-doc' / 'html'
+docpath = spice_gtk_datadir / 'gtk-doc' / 'html'
 
 gnome.gtkdoc(meson.project_name(),
              dependencies : spice_gtk_doc_dep,
@@ -55,14 +55,14 @@ gnome.gtkdoc(meson.project_name(),
                '--deprecated-guards="SPICE_DISABLE_DEPRECATED"',
                '--ignore-decorators="G_GNUC_INTERNAL"',
                '--rebuild-types',
-               join_paths(meson.build_root(), 'src', 'spice-version.h')
+               meson.build_root() / 'src' / 'spice-version.h'
              ],
-             src_dir : join_paths(meson.source_root(), 'src'),
+             src_dir : meson.source_root() / 'src',
              fixxref_args: [
                '--html-dir=@0@'.format(docpath),
-               '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
-               '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
-               '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
-               '--extra-dir=@0@'.format(join_paths(gtk_docpath, 'gtk3')),
+               '--extra-dir=@0@'.format(glib_docpath / 'glib'),
+               '--extra-dir=@0@'.format(glib_docpath / 'gobject'),
+               '--extra-dir=@0@'.format(glib_docpath / 'gio'),
+               '--extra-dir=@0@'.format(gtk_docpath / 'gtk3'),
              ],
             )
diff --git a/man/meson.build b/man/meson.build
index de07ba44..86c63666 100644
--- a/man/meson.build
+++ b/man/meson.build
@@ -5,7 +5,7 @@ if pod2man.found()
             output : 'spice-client.1',
             input : 'spice-client.pod',
             install : true,
-            install_dir : join_paths(spice_gtk_datadir, 'man', 'man1'),
+            install_dir : spice_gtk_datadir / 'man' / 'man1',
             build_by_default : true,
             command : [pod2man, '-c', 'Spice-GTK Documentation', '@INPUT@', '@OUTPUT@'])
 endif
diff --git a/meson.build b/meson.build
index 7817c732..07dbb701 100644
--- a/meson.build
+++ b/meson.build
@@ -12,10 +12,10 @@ meson.add_dist_script('build-aux/meson-dist', meson.project_version(), meson.sou
 # global C defines
 #
 spice_gtk_prefix = get_option('prefix')
-spice_gtk_bindir = join_paths(spice_gtk_prefix, get_option('bindir'))
-spice_gtk_datadir = join_paths(spice_gtk_prefix, get_option('datadir'))
-spice_gtk_localedir = join_paths(spice_gtk_datadir, 'locale')
-spice_gtk_includedir = join_paths(spice_gtk_prefix, get_option('includedir'))
+spice_gtk_bindir = spice_gtk_prefix / get_option('bindir')
+spice_gtk_datadir = spice_gtk_prefix / get_option('datadir')
+spice_gtk_localedir = spice_gtk_datadir / 'locale'
+spice_gtk_includedir = spice_gtk_prefix / get_option('includedir')
 spice_gtk_global_cflags = ['-DHAVE_CONFIG_H',
                            '-DSPICE_COMPILATION',
                            '-DG_LOG_DOMAIN="GSpice"',
diff --git a/src/meson.build b/src/meson.build
index be3f56c0..ede41c62 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -56,7 +56,7 @@ spice_marshals = gnome.genmarshal('spice-marshal', sources : 'spice-marshal.txt'
 spice_client_glib_enums = gnome.mkenums_simple('spice-glib-enums',
                                                sources : ['spice-channel.h', 'channel-inputs.h', 'spice-session.h'],
                                                install_header : true,
-                                               install_dir : join_paths(spice_gtk_includedir, 'spice-client-glib-2.0'))
+                                               install_dir : spice_gtk_includedir / 'spice-client-glib-2.0')
 
 spice_client_glib_introspection_sources = [
   spice_client_glib_headers,
@@ -175,12 +175,12 @@ endif
 
 # version-script
 spice_client_glib_syms = files('map-file')
-spice_client_glib_syms_path = join_paths(meson.current_source_dir(), 'map-file')
+spice_client_glib_syms_path = meson.current_source_dir() / 'map-file'
 spice_gtk_version_script = '-Wl,--version-script=@0@'.format(spice_client_glib_syms_path)
 spice_gtk_has_version_script = compiler.has_link_argument(spice_gtk_version_script)
 if not spice_gtk_has_version_script
   spice_client_glib_syms = files('spice-glib-sym-file')
-  spice_client_glib_syms_path = join_paths(meson.current_source_dir(), 'spice-glib-sym-file')
+  spice_client_glib_syms_path = meson.current_source_dir() / 'spice-glib-sym-file'
   spice_gtk_version_script = ['-export-symbols', spice_client_glib_syms_path]
 endif
 
@@ -269,7 +269,7 @@ if spice_gtk_has_gtk
   spice_widget_enums = gnome.mkenums_simple('spice-widget-enums',
                                             sources : 'spice-widget.h',
                                             install_header : true,
-                                            install_dir : join_paths(spice_gtk_includedir, 'spice-client-gtk-3.0'))
+                                            install_dir : spice_gtk_includedir / 'spice-client-gtk-3.0')
 
   spice_client_gtk_introspection_sources = [
     spice_client_gtk_headers,
@@ -328,7 +328,7 @@ if spice_gtk_has_gtk
   spice_client_gtk_syms = spice_client_glib_syms
   if not spice_gtk_has_version_script
     spice_client_gtk_syms = files('spice-gtk-sym-file')
-    spice_client_gtk_syms_path = join_paths(meson.current_source_dir(), 'spice-gtk-sym-file')
+    spice_client_gtk_syms_path = meson.current_source_dir() / 'spice-gtk-sym-file'
     spice_gtk_version_script = ['-export-symbols', spice_client_gtk_syms_path]
   endif
 
diff --git a/vapi/meson.build b/vapi/meson.build
index c9fef3dd..aab2f5ad 100644
--- a/vapi/meson.build
+++ b/vapi/meson.build
@@ -8,7 +8,7 @@ if spice_gtk_has_vala
     gnome.generate_vapi('spice-client-gtk-3.0',
                         install : true,
                         packages : ['gtk+-3.0', 'gstreamer-1.0', spice_glib_vapi],
-                        gir_dirs : join_paths(meson.build_root(), 'src'),
+                        gir_dirs : meson.build_root() / 'src',
                         vapi_dirs : meson.current_build_dir(),
                         sources : spice_client_gtk_gir[0])
   endif
-- 
2.20.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]