summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2021-07-14 17:44:36 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2021-07-14 18:28:01 +0530
commit4383951b654f7873d128a358be000643d824feb6 (patch)
treec0666018f6ff7de04cadfd3a5b73f39cdfc29d80
parenta6d6711eb98341ab51a942c6d5288ff1185b414e (diff)
meson: Bump to 0.58.1
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/716>
-rw-r--r--recipes/build-tools/meson.recipe11
-rw-r--r--recipes/build-tools/meson/0001-gnome-Always-pass-absolute-L-paths-to-g-ir-scanner.patch45
-rw-r--r--recipes/build-tools/meson/0001-meson-Allow-cross-compile-without-a-native-compiler.patch39
3 files changed, 50 insertions, 45 deletions
diff --git a/recipes/build-tools/meson.recipe b/recipes/build-tools/meson.recipe
index f5c15407..b6c136c2 100644
--- a/recipes/build-tools/meson.recipe
+++ b/recipes/build-tools/meson.recipe
@@ -5,16 +5,15 @@ from pathlib import PurePath, Path
class Recipe(recipe.Recipe):
name = 'meson'
- version = '0.55.3'
+ version = '0.58.1'
licenses = [License.Apachev2]
btype = BuildType.CUSTOM
stype = SourceType.TARBALL
url = 'https://github.com/mesonbuild/meson/releases/download/%(version)s/meson-%(version)s.tar.gz'
- tarball_checksum = '6bed2a25a128bbabe97cf40f63165ebe800e4fcb46db8ab7ef5c2b5789f092a5'
- patches = [
- # Remove on bump to 0.56, https://github.com/mesonbuild/meson/pull/7021
- 'meson/0001-meson-Allow-cross-compile-without-a-native-compiler.patch',
- ]
+ tarball_checksum = '3144a3da662fcf79f1e5602fa929f2821cba4eba28c2c923fe0a7d3e3db04d5d'
+
+ # https://github.com/mesonbuild/meson/pull/8993
+ patches = [name + '/0001-gnome-Always-pass-absolute-L-paths-to-g-ir-scanner.patch']
deps = ['ninja']
diff --git a/recipes/build-tools/meson/0001-gnome-Always-pass-absolute-L-paths-to-g-ir-scanner.patch b/recipes/build-tools/meson/0001-gnome-Always-pass-absolute-L-paths-to-g-ir-scanner.patch
new file mode 100644
index 00000000..a1697af6
--- /dev/null
+++ b/recipes/build-tools/meson/0001-gnome-Always-pass-absolute-L-paths-to-g-ir-scanner.patch
@@ -0,0 +1,45 @@
+From 7747a4bb8867aa87dff82584289495a52c3b38c4 Mon Sep 17 00:00:00 2001
+From: Nirbheek Chauhan <nirbheek@centricular.com>
+Date: Wed, 14 Jul 2021 17:37:39 +0530
+Subject: [PATCH] gnome: Always pass absolute -L paths to g-ir-scanner
+
+g-ir-scanner does not convert relative -L paths to runtime paths which
+are added to -Wl,-rpath and LD_LIBRARY_PATH / DYLD_LIBRARY_PATH
+/ PATH. This means that the local library will either not be found at
+runtime (while building introspection data), or the system-wide
+library will be picked instead.
+
+See: giscanner/ccompiler.py:get_internal_link_flags() in
+gobject-introspection for more details.
+---
+ mesonbuild/modules/gnome.py | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
+index 1b68f6ccd..3cc8ebdc8 100644
+--- a/mesonbuild/modules/gnome.py
++++ b/mesonbuild/modules/gnome.py
+@@ -640,14 +640,18 @@ class GnomeModule(ExtensionModule):
+ # Because of https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/72
+ # we can't use the full path until this is merged.
+ libpath = os.path.join(girtarget.get_subdir(), girtarget.get_filename())
++ # Must use absolute paths here because g-ir-scanner will not
++ # add them to the runtime path list if they're relative. This
++ # means we cannot use @BUILD_ROOT@
++ build_root = state.environment.get_build_dir()
+ if isinstance(girtarget, build.SharedLibrary):
+ # need to put our output directory first as we need to use the
+ # generated libraries instead of any possibly installed system/prefix
+ # ones.
+- ret += ["-L@BUILD_ROOT@/{}".format(os.path.dirname(libpath))]
++ ret += ["-L{}/{}".format(build_root, os.path.dirname(libpath))]
+ libname = girtarget.get_basename()
+ else:
+- libname = os.path.join(f"@BUILD_ROOT@/{libpath}")
++ libname = os.path.join(f"{build_root}/{libpath}")
+ ret += ['--library', libname]
+ # Needed for the following binutils bug:
+ # https://github.com/mesonbuild/meson/issues/1911
+--
+2.31.1
+
diff --git a/recipes/build-tools/meson/0001-meson-Allow-cross-compile-without-a-native-compiler.patch b/recipes/build-tools/meson/0001-meson-Allow-cross-compile-without-a-native-compiler.patch
deleted file mode 100644
index 584fc097..00000000
--- a/recipes/build-tools/meson/0001-meson-Allow-cross-compile-without-a-native-compiler.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From a6aa905f2c580a34e6bb1c547b20ec6ecd4011d0 Mon Sep 17 00:00:00 2001
-From: Nirbheek Chauhan <nirbheek@centricular.com>
-Date: Thu, 23 Apr 2020 08:32:15 +0530
-Subject: Allow cross-compile without a native compiler
-
----
- mesonbuild/backend/ninjabackend.py | 2 +-
- mesonbuild/interpreter.py | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
-index 03ccd196..aeffc80a 100644
---- a/mesonbuild/backend/ninjabackend.py
-+++ b/mesonbuild/backend/ninjabackend.py
-@@ -1539,7 +1539,7 @@ int dummy;
- for for_machine in MachineChoice:
- static_linker = self.build.static_linker[for_machine]
- if static_linker is None:
-- return
-+ continue
- rule = 'STATIC_LINKER{}'.format(self.get_rule_suffix(for_machine))
- cmdlist = []
- args = ['$in']
-diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
-index 214b1eb5..c8473cb6 100644
---- a/mesonbuild/interpreter.py
-+++ b/mesonbuild/interpreter.py
-@@ -2954,7 +2954,7 @@ external dependencies (including libraries) must go to "dependencies".''')
- self.build.projects[self.subproject] = proj_name
- mlog.log('Project name:', mlog.bold(proj_name))
- mlog.log('Project version:', mlog.bold(self.project_version))
-- self.add_languages(proj_langs, True, MachineChoice.BUILD)
-+ self.add_languages(proj_langs, False, MachineChoice.BUILD)
- self.add_languages(proj_langs, True, MachineChoice.HOST)
- self.set_backend()
- if not self.is_subproject():
---
-2.26.1.windows.1
-