commit:     570426fe82945ddc21c15971e3c33024fa12f869
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 27 12:02:22 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Oct 27 12:02:22 2025 +0000
URL:        
https://gitweb.gentoo.org/proj/blas-lapack-aux-wrapper.git/commit/?id=570426fe

Fix combining sysroot paths

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 meson.build | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/meson.build b/meson.build
index ed0e7cd..196a8a6 100644
--- a/meson.build
+++ b/meson.build
@@ -21,14 +21,15 @@ sysroot = run_command(
   [cc, '--print-sysroot'],
   capture : true,
   check : true,
-).stdout()
-prefix = get_option('prefix')
-libdir = get_option('libdir')
-if fs.is_absolute(libdir)
-  sys_libs = sysroot / libdir
-else
-  sys_libs = sysroot / prefix / libdir
+).stdout().strip('\n')
+sys_libs = get_option('libdir')
+if not fs.is_absolute(sys_libs)
+  sys_libs = get_option('prefix') / sys_libs
 endif
+if sysroot != ''
+  sys_libs = sysroot / sys_libs.strip('/')
+endif
+message(sys_libs)
 
 dummy_obj = configure_file(
   output : 'dummy.o',

Reply via email to