meson: 0.46.1 → 0.48.2

This commit is contained in:
Jan Tojnar 2018-09-02 19:28:49 +02:00
parent 6141939d6e
commit 340dd80175
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4
4 changed files with 39 additions and 13 deletions

View file

@ -1,6 +1,6 @@
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -282,18 +282,13 @@
@@ -298,18 +298,13 @@
'''
if option.endswith('dir') and os.path.isabs(value) and \
option not in builtin_dir_noprefix_options:
@ -22,4 +22,4 @@
+ value = value[skip:]
return value
def init_builtins(self, options):
def init_builtins(self):

View file

@ -1,12 +1,12 @@
{ lib, python3Packages, stdenv, writeTextDir, substituteAll, targetPackages }:
python3Packages.buildPythonApplication rec {
version = "0.46.1";
version = "0.48.2";
pname = "meson";
src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "1jdxs2mkniy1hpdjc4b4jb95axsjp6j5fzphmm6d4gqmqyykjvqc";
sha256 = "1shfbr0mf8gmwpw5ivrmwp8282qw9mfhxmccd7fsgidp4x3nslby";
};
postFixup = ''
@ -16,6 +16,9 @@ python3Packages.buildPythonApplication rec {
mv ".$i-wrapped" "$i"
done
popd
# Do not propagate Python
rm $out/nix-support/propagated-build-inputs
'';
patches = [

View file

@ -1,6 +1,15 @@
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -846,8 +848,10 @@
@@ -1112,6 +1112,8 @@
for p in rpath_paths:
if p == from_dir:
relative = '' # relpath errors out in this case
+ elif os.path.isabs(p):
+ relative = p # These can be outside of build dir.
else:
relative = os.path.relpath(os.path.join(build_dir, p), os.path.join(build_dir, from_dir))
rel_rpaths.append(relative)
@@ -1121,8 +1123,10 @@
if paths != '':
paths += ':'
paths += build_rpath
@ -15,7 +24,7 @@
else:
--- a/mesonbuild/scripts/depfixer.py
+++ b/mesonbuild/scripts/depfixer.py
@@ -300,6 +300,14 @@
@@ -303,6 +303,14 @@
return
self.bf.seek(rp_off)
old_rpath = self.read_str()
@ -30,3 +39,14 @@
if len(old_rpath) < len(new_rpath):
sys.exit("New rpath must not be longer than the old one.")
# The linker does read-only string deduplication. If there is a
@@ -316,6 +324,10 @@
if not new_rpath:
self.remove_rpath_entry(entrynum)
else:
+ # clean old rpath to avoid stale references
+ # (see https://github.com/NixOS/nixpkgs/pull/46020)
+ self.bf.seek(rp_off)
+ self.bf.write(b'\0'*len(old_rpath))
self.bf.seek(rp_off)
self.bf.write(new_rpath)
self.bf.write(b'\0')

View file

@ -1,13 +1,16 @@
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -427,6 +427,10 @@
scan_command += ['--no-libtool', '--namespace=' + ns, '--nsversion=' + nsversion, '--warn-all',
'--output', '@OUTPUT@']
@@ -780,6 +780,13 @@
scan_command += self._scan_langs(state, [lc[0] for lc in langs_compilers])
scan_command += list(external_ldflags)
+ fallback_libpath = girtarget.get_custom_install_dir()[0]
+ if len(set([girtarget.get_custom_install_dir()[0] for girtarget in girtargets])) > 1:
+ raise MesonException('generate_gir tries to build multiple libraries with different install_dir at once: {}'.format(','.join([str(girtarget) for girtarget in girtargets])))
+
+ fallback_libpath = girtargets[0].get_custom_install_dir()[0]
+ if fallback_libpath is not None and isinstance(fallback_libpath, str) and len(fallback_libpath) > 0 and fallback_libpath[0] == "/":
+ scan_command += ['--fallback-library-path=' + fallback_libpath]
+
header = kwargs.pop('header', None)
if header:
if not isinstance(header, str):
scan_target = self._make_gir_target(state, girfile, scan_command, depends, kwargs)
typelib_output = '%s-%s.typelib' % (ns, nsversion)