[meld: 2/10] build: Use / instead of join_paths




commit 6adaef6f25835e1fd6578956f2093374741148ab
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Sun Feb 14 20:28:57 2021 +0100

    build: Use / instead of join_paths
    
    Since meson 0.49, the `/` character can be used to join paths[0], so
    all the instances of `join_paths` have been replaced.
    
    [0] http://mesonbuild.com/Release-notes-for-0-49-0.html#joining-paths-with-

 data/meson.build | 16 ++++++++--------
 meld/meson.build |  2 +-
 meson.build      | 30 +++++++++++++++---------------
 3 files changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index c9d7e0d8..2d59b3ed 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -2,7 +2,7 @@
 # Install man page
 install_data(
   'meld.1',
-  install_dir: join_paths(mandir, 'man1')
+  install_dir: mandir / 'man1'
 )
 
 # Install schema file
@@ -70,7 +70,7 @@ endif
 
 # Install mimetypes
 mimetype_file = i18n.merge_file(
-  input: join_paths('mime', '@0  xml in'.format(resource_base_id)),
+  input: 'mime' / '@0  xml in'.format(resource_base_id),
   output: '@0@.xml'.format(application_id),
   po_dir: podir,
   data_dirs: itsdir,
@@ -96,12 +96,12 @@ styles = [
 
 foreach style : styles
   i18n.merge_file(
-    input: join_paths('styles', style + '.in'),
+    input: 'styles' / style + '.in',
     output: style,
     po_dir: podir,
     data_dirs: itsdir,
     install: true,
-    install_dir: join_paths(pkgdatadir, 'styles')
+    install_dir: pkgdatadir / 'styles',
   )
 endforeach
 
@@ -110,15 +110,15 @@ icon_sizes = ['scalable']
 
 foreach i : icon_sizes
   install_data(
-    join_paths('icons/hicolor', i , 'apps', application_id + '.svg'),
-    install_dir: join_paths(icondir, 'hicolor', i , 'apps'),
+    'icons/hicolor' / i / 'apps' / application_id + '.svg',
+    install_dir: icondir / 'hicolor' / i / 'apps',
     rename: '@0@.svg'.format(application_id)
   )
 endforeach
 
 # Install the symbolic icon
 install_data(
-    join_paths('icons/hicolor/symbolic/apps', application_id_no_profile + '-symbolic.svg'),
-    install_dir: join_paths(icondir, 'hicolor', 'symbolic', 'apps'),
+    'icons/hicolor/symbolic/apps' / application_id_no_profile + '-symbolic.svg',
+    install_dir: icondir / 'hicolor/symbolic/apps',
     rename: '@0 -symbolic svg'.format(application_id)
 )
diff --git a/meld/meson.build b/meld/meson.build
index 1c7107f3..bf2f0621 100644
--- a/meld/meson.build
+++ b/meld/meson.build
@@ -78,7 +78,7 @@ folders = {
 }
 
 foreach folder_name, sources : folders
-  pkgdir = join_paths(meson.project_name(), folder_name)
+  pkgdir = meson.project_name() / folder_name
   python3.install_sources(sources, pure: true, subdir: pkgdir)
 endforeach
 
diff --git a/meson.build b/meson.build
index 1846d54f..387aa133 100644
--- a/meson.build
+++ b/meson.build
@@ -32,21 +32,21 @@ application_id = 'org.gnome.Meld@0@'.format(profile)
 
 prefix = get_option('prefix')
 
-bindir = join_paths(prefix, get_option('bindir'))
-datadir = join_paths(prefix, get_option('datadir'))
-libexecdir = join_paths(prefix, get_option('libexecdir'))
-localedir = join_paths(prefix, get_option('localedir'))
-mandir = join_paths(prefix, get_option('mandir'))
-
-appdatadir = join_paths(datadir, 'metainfo')
-desktopdir = join_paths(datadir, 'applications')
-icondir = join_paths(datadir, 'icons')
-mimedatadir = join_paths(datadir, 'mime', 'packages')
-pkgdatadir = join_paths(datadir, meson.project_name())
-schemadir = join_paths(datadir, 'glib-2.0', 'schemas')
-
-itsdir = join_paths(meson.current_source_dir(), 'gettext')
-podir = join_paths(meson.current_source_dir(), 'po')
+bindir = prefix / get_option('bindir')
+datadir = prefix / get_option('datadir')
+libexecdir = prefix / get_option('libexecdir')
+localedir = prefix / get_option('localedir')
+mandir = prefix / get_option('mandir')
+
+appdatadir = datadir / 'metainfo'
+desktopdir = datadir / 'applications'
+icondir = datadir / 'icons'
+mimedatadir = datadir / 'mime/packages'
+pkgdatadir = datadir / meson.project_name()
+schemadir = datadir / 'glib-2.0/schemas'
+
+itsdir = meson.current_source_dir() / 'gettext'
+podir = meson.current_source_dir() / 'po'
 
 subdir('meld')
 subdir('data')


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