extra/meson to 0.58.1-2

This commit is contained in:
Kevin Mihelich 2021-07-26 13:49:06 +00:00
parent 6261b4e4c0
commit 9a23031ac7
2 changed files with 48 additions and 1 deletions

View file

@ -0,0 +1,42 @@
From 0000000000000000000000000000000000000000 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

View file

@ -7,7 +7,7 @@
pkgname=meson
pkgver=0.58.1
pkgrel=1
pkgrel=2
pkgdesc='High productivity build system'
url='https://mesonbuild.com/'
arch=('any')
@ -20,10 +20,12 @@ checkdepends=('gcc-objc' 'vala' 'rust' 'gcc-fortran' 'mono' 'boost' 'qt5-base' '
'libwmf' 'valgrind' 'cmake' 'netcdf-fortran' 'openmpi' 'nasm' 'gnustep-base' 'libelf'
'python-pytest-xdist' 'python2-setuptools' 'ldc' 'rust-bindgen' 'cuda' 'hotdoc')
source=(https://github.com/mesonbuild/meson/releases/download/${pkgver/rc/.rc}/meson-${pkgver}.tar.gz{,.asc}
0001-gnome-Always-pass-absolute-L-paths-to-g-ir-scanner.patch
skip-test.diff
arch-meson)
sha512sums=('64ac1a9bcc642fb6d37c4b677d8b7db16d821f852f927a980d3fb1c149d680b7ff2c8d03676c6772666d46a33b6ce8674220433d302fcd92d13d9818558d6453'
'SKIP'
'82b7d3866d327ec05efea2e16097b04a3fd99e0f7de522e4911df3d44f0e6f36c8293d2366fcab2b7a0107eed58ec61c808a87688d2b7d28902f2a355f5c5a91'
'a40e3be7a4ea7048cbbab59d28fb355debdfcdc5e45244aad65ab57fa222f4a2cf3165f28cc7e1dba893a162de9c7563ef0e155fa6a77960c4d02ef622313ace'
'278f5e4de3aa1170d9b4f9f212985d664f44d90ffec727febeeea1ed570046c6469558a5d123a41bf4c2fdf99dbe7832515b06f1ace423c63e2e95ba6d0ef235')
validpgpkeys=('19E2D6D9B46D8DAA6288F877C24E631BABB1FE70') # Jussi Pakkanen <jpakkane@gmail.com>
@ -31,6 +33,9 @@ validpgpkeys=('19E2D6D9B46D8DAA6288F877C24E631BABB1FE70') # Jussi Pakkanen <jpak
prepare() {
cd ${pkgname}-${pkgver}
# Fix introspecting libraries that are also installed
patch -Np1 -i ../0001-gnome-Always-pass-absolute-L-paths-to-g-ir-scanner.patch
# Our containers do not allow sanitizers to run
patch -Np1 -i ../skip-test.diff
}