Commit 7a3e6198 authored by Ting-Wei Lan's avatar Ting-Wei Lan
Browse files

core-deps-latest: Update meson to 0.58.1

parent 1372a55c
Pipeline #289815 passed with stage
in 15 minutes and 53 seconds
......@@ -1825,10 +1825,10 @@
<distutils id="meson" python3="1">
<branch repo="github-tar"
version="0.57.2"
version="0.58.1"
module="mesonbuild/meson/releases/download/${version}/meson-${version}.tar.gz"
checkoutdir="meson-${version}"
hash="sha256:3a83e7b1c5de94fa991ec34d9b198d94f38ed699d3524cb0fdf3b99fd23d4cc5">
hash="sha256:3144a3da662fcf79f1e5602fa929f2821cba4eba28c2c923fe0a7d3e3db04d5d">
<patch file="meson-dont-use-rpath-on-pkg-config-deps.patch" strip="1"/>
<patch file="meson-revert-change-pkgconfig-directory-freebsd.patch" strip="1"/>
</branch>
......
From 34685678f91ab89f74820c0fb58cc3c2a46cf8cc Mon Sep 17 00:00:00 2001
From dbc06d6ce90a7eb3ee21b24a028291798724bd80 Mon Sep 17 00:00:00 2001
From: Ting-Wei Lan <lantw@src.gnome.org>
Date: Thu, 4 Oct 2018 23:03:30 +0800
Subject: [PATCH] backends: Use raw_link_args to check for the need of RPATH
......@@ -26,15 +26,19 @@ by the method.
Works around https://github.com/mesonbuild/meson/issues/4270.
---
mesonbuild/backend/backends.py | 2 +-
run_unittests.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
mesonbuild/backend/backends.py | 2 +-
run_unittests.py | 18 +++++++++++-------
test cases/unit/80 global-rpath/meson.build | 4 +++-
.../unit/80 global-rpath/meson_options.txt | 1 +
.../unit/80 global-rpath/yonder/meson.build | 2 --
5 files changed, 16 insertions(+), 11 deletions(-)
create mode 100644 test cases/unit/80 global-rpath/meson_options.txt
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 2a07058a..564ceb3e 100644
index 4c61abf6a..eb76c06a8 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -403,7 +403,7 @@ class Backend:
@@ -612,7 +612,7 @@ class Backend:
for dep in target.external_deps:
if not isinstance(dep, (dependencies.ExternalLibrary, dependencies.PkgConfigDependency)):
continue
......@@ -44,18 +48,94 @@ index 2a07058a..564ceb3e 100644
continue
# The only link argument is an absolute path to a library file.
diff --git a/run_unittests.py b/run_unittests.py
index 676604f4..17cb94ff 100755
index b2b7367b0..48487a70e 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -5910,7 +5910,7 @@ c = ['{0}']
@@ -6809,13 +6809,15 @@ class LinuxlikeTests(BasePlatformTests):
self.init(testdir)
self.build()
+ libdir = self.builddir
os.environ['PKG_CONFIG_LIBDIR'] = os.path.join(self.builddir, 'meson-uninstalled')
if is_cygwin():
- os.environ['PATH'] += os.pathsep + self.builddir
+ os.environ['PATH'] += os.pathsep + libdir
self.new_builddir()
+ meson_args = [f'-Dc_link_args=-Wl,-rpath,{libdir}']
testdir = os.path.join(self.common_test_dir, '44 pkgconfig-gen', 'dependencies')
- self.init(testdir)
+ self.init(testdir, extra_args=meson_args)
self.build()
self.run_tests()
@@ -7475,9 +7477,9 @@ class LinuxlikeTests(BasePlatformTests):
oldinstalldir = self.installdir
# Build and install an external library without DESTDIR.
- # The external library generates a .pc file without an rpath.
yonder_dir = os.path.join(testdir, 'yonder')
yonder_prefix = os.path.join(oldinstalldir, 'yonder')
+ yonder_includedir = os.path.join(yonder_prefix, 'include')
yonder_libdir = os.path.join(yonder_prefix, self.libdir)
self.prefix = yonder_prefix
self.installdir = yonder_prefix
@@ -7501,13 +7503,15 @@ class LinuxlikeTests(BasePlatformTests):
# (as systems like buildroot and guix are wont to do)
# and verify install preserves that rpath.
self.new_builddir()
- env = {'LDFLAGS': rpath_format + yonder_libdir,
+ meson_args = [f'-Dyonder_libdir={yonder_libdir}']
+ env = {'CPPFLAGS': '-I' + yonder_includedir,
+ 'LDFLAGS': rpath_format + yonder_libdir,
'PKG_CONFIG_PATH': os.path.join(yonder_libdir, 'pkgconfig')}
if exception:
with self.assertRaises(subprocess.CalledProcessError):
- self.init(testdir, override_envvars=env)
+ self.init(testdir, extra_args=meson_args, override_envvars=env)
continue
- self.init(testdir, override_envvars=env)
+ self.init(testdir, extra_args=meson_args, override_envvars=env)
self.build()
self.install(use_destdir=False)
got_rpath = get_rpath(os.path.join(yonder_prefix, 'bin/rpathified'))
@@ -8029,7 +8033,7 @@ class LinuxlikeTests(BasePlatformTests):
# Test that installed libraries works
self.new_builddir()
self.prefix = oldprefix
- meson_args = ['-Dc_link_args=-L{}'.format(libdir),
+ meson_args = ['-Dc_link_args=-L{} -Wl,-rpath,{}'.format(libdir, libdir),
- meson_args = [f'-Dc_link_args=-L{libdir}',
+ meson_args = [f'-Dc_link_args=-L{libdir} -Wl,-rpath,{libdir}',
'--fatal-meson-warnings']
testdir = os.path.join(self.unit_test_dir, '69 static link')
testdir = os.path.join(self.unit_test_dir, '67 static link')
env = {'PKG_CONFIG_LIBDIR': os.path.join(libdir, 'pkgconfig')}
diff --git a/test cases/unit/80 global-rpath/meson.build b/test cases/unit/80 global-rpath/meson.build
index c67d9e08b..267e7edd8 100644
--- a/test cases/unit/80 global-rpath/meson.build
+++ b/test cases/unit/80 global-rpath/meson.build
@@ -1,3 +1,5 @@
project('global-rpath', 'cpp')
-yonder_dep = dependency('yonder')
+cpp = meson.get_compiler('cpp')
+yonder_libdir = get_option('yonder_libdir')
+yonder_dep = cpp.find_library('yonder', dirs: [yonder_libdir])
executable('rpathified', 'rpathified.cpp', dependencies: [yonder_dep], install: true)
diff --git a/test cases/unit/80 global-rpath/meson_options.txt b/test cases/unit/80 global-rpath/meson_options.txt
new file mode 100644
index 000000000..19bf25569
--- /dev/null
+++ b/test cases/unit/80 global-rpath/meson_options.txt
@@ -0,0 +1 @@
+option('yonder_libdir', type: 'string')
diff --git a/test cases/unit/80 global-rpath/yonder/meson.build b/test cases/unit/80 global-rpath/yonder/meson.build
index e32f38330..a3ee7f595 100644
--- a/test cases/unit/80 global-rpath/yonder/meson.build
+++ b/test cases/unit/80 global-rpath/yonder/meson.build
@@ -1,5 +1,3 @@
project('yonder', 'cpp')
yonder = shared_library('yonder', 'yonder.cpp', install: true)
install_headers('yonder.h')
-pkgconfig = import('pkgconfig')
-pkgconfig.generate(yonder)
--
2.25.0
2.31.1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment