Blame SOURCES/0158-meson-use-.source_root-in-more-places.patch

a3e2b5
From 2eca34cfa911fa7c1aafef5d60b7a2e752ae5b3b Mon Sep 17 00:00:00 2001
a3e2b5
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
a3e2b5
Date: Fri, 10 Aug 2018 16:50:07 +0200
a3e2b5
Subject: [PATCH] meson: use .source_root() in more places
a3e2b5
a3e2b5
In the main meson.build file, .source_root() and .current_source_dir() are
a3e2b5
equivalent, but it seems more appropriate to use .source_root() when we are appending
a3e2b5
a path which is by design relative to repo root.
a3e2b5
a3e2b5
(cherry picked from commit 243e5cecc3a211519544ccba01c44edc827ac517)
a3e2b5
a3e2b5
Resolves: #1696224
a3e2b5
---
a3e2b5
 meson.build | 16 ++++++++--------
a3e2b5
 1 file changed, 8 insertions(+), 8 deletions(-)
a3e2b5
a3e2b5
diff --git a/meson.build b/meson.build
a3e2b5
index f623bcf37d..fe161e5ec5 100644
a3e2b5
--- a/meson.build
a3e2b5
+++ b/meson.build
a3e2b5
@@ -1453,7 +1453,7 @@ foreach tuple : [['myhostname', 'ENABLE_NSS_MYHOSTNAME'],
a3e2b5
                 module = tuple[0]
a3e2b5
 
a3e2b5
                 sym = 'src/nss-@0@/nss-@0@.sym'.format(module)
a3e2b5
-                version_script_arg = join_paths(meson.current_source_dir(), sym)
a3e2b5
+                version_script_arg = join_paths(meson.source_root(), sym)
a3e2b5
 
a3e2b5
                 nss = shared_library(
a3e2b5
                         'nss_' + module,
a3e2b5
@@ -1704,7 +1704,7 @@ if conf.get('ENABLE_LOGIND') == 1
a3e2b5
         public_programs += [exe]
a3e2b5
 
a3e2b5
         if conf.get('HAVE_PAM') == 1
a3e2b5
-                version_script_arg = join_paths(meson.current_source_dir(), pam_systemd_sym)
a3e2b5
+                version_script_arg = join_paths(meson.source_root(), pam_systemd_sym)
a3e2b5
                 pam_systemd = shared_library(
a3e2b5
                         'pam_systemd',
a3e2b5
                         pam_systemd_c,
a3e2b5
@@ -2816,7 +2816,7 @@ endforeach
a3e2b5
 if git.found()
a3e2b5
         all_files = run_command(
a3e2b5
                 git,
a3e2b5
-                ['--git-dir=@0@/.git'.format(meson.current_source_dir()),
a3e2b5
+                ['--git-dir=@0@/.git'.format(meson.source_root()),
a3e2b5
                  'ls-files',
a3e2b5
                  ':/*.[ch]'])
a3e2b5
         all_files = files(all_files.stdout().split())
a3e2b5
@@ -2824,10 +2824,10 @@ if git.found()
a3e2b5
         custom_target(
a3e2b5
                 'tags',
a3e2b5
                 output : 'tags',
a3e2b5
-                command : [env, 'etags', '-o', '@0@/TAGS'.format(meson.current_source_dir())] + all_files)
a3e2b5
+                command : [env, 'etags', '-o', '@0@/TAGS'.format(meson.source_root())] + all_files)
a3e2b5
         run_target(
a3e2b5
                 'ctags',
a3e2b5
-                command : [env, 'ctags', '-o', '@0@/tags'.format(meson.current_source_dir())] + all_files)
a3e2b5
+                command : [env, 'ctags', '-o', '@0@/tags'.format(meson.source_root())] + all_files)
a3e2b5
 endif
a3e2b5
 
a3e2b5
 if git.found()
a3e2b5
@@ -2840,17 +2840,17 @@ endif
a3e2b5
 if git.found()
a3e2b5
         git_head = run_command(
a3e2b5
                 git,
a3e2b5
-                ['--git-dir=@0@/.git'.format(meson.current_source_dir()),
a3e2b5
+                ['--git-dir=@0@/.git'.format(meson.source_root()),
a3e2b5
                  'rev-parse', 'HEAD']).stdout().strip()
a3e2b5
         git_head_short = run_command(
a3e2b5
                 git,
a3e2b5
-                ['--git-dir=@0@/.git'.format(meson.current_source_dir()),
a3e2b5
+                ['--git-dir=@0@/.git'.format(meson.source_root()),
a3e2b5
                  'rev-parse', '--short=7', 'HEAD']).stdout().strip()
a3e2b5
 
a3e2b5
         run_target(
a3e2b5
                 'git-snapshot',
a3e2b5
                 command : ['git', 'archive',
a3e2b5
-                           '-o', '@0@/systemd-@1@.tar.gz'.format(meson.current_source_dir(),
a3e2b5
+                           '-o', '@0@/systemd-@1@.tar.gz'.format(meson.source_root(),
a3e2b5
                                                                  git_head_short),
a3e2b5
                            '--prefix', 'systemd-@0@/'.format(git_head),
a3e2b5
                            'HEAD'])