Merge pull request #46020 from jtojnar/meson-0.47

meson: 0.46.1 → 0.48.2
This commit is contained in:
Jan Tojnar 2018-11-18 22:17:49 +01:00 committed by GitHub
commit 85bd2a7acb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 56 additions and 31 deletions

View File

@ -1,6 +1,6 @@
{ stdenv, fetchurl, gnome3, meson, ninja, pkgconfig, gtk3, intltool, glib
, udev, itstool, libxml2, wrapGAppsHook, libnotify, libcanberra-gtk3, gobjectIntrospection
, gtk-doc, docbook_xsl, docbook_xml_dtd_43 }:
, gtk-doc, docbook_xsl, docbook_xml_dtd_43, python3 }:
let
pname = "gnome-bluetooth";
@ -18,7 +18,7 @@ in stdenv.mkDerivation rec {
nativeBuildInputs = [
meson ninja intltool itstool pkgconfig libxml2 wrapGAppsHook gobjectIntrospection
gtk-doc docbook_xsl docbook_xml_dtd_43
gtk-doc docbook_xsl docbook_xml_dtd_43 python3
];
buildInputs = [
glib gtk3 udev libnotify libcanberra-gtk3

View File

@ -1,5 +1,5 @@
{ fetchurl, stdenv, substituteAll, meson, ninja, pkgconfig, gnome3, glib, gtk, gsettings-desktop-schemas
, gnome-desktop, dbus, json-glib, libICE, xmlto, docbook_xsl, docbook_xml_dtd_412
, gnome-desktop, dbus, json-glib, libICE, xmlto, docbook_xsl, docbook_xml_dtd_412, python3
, libxslt, gettext, makeWrapper, systemd, xorg, epoxy }:
stdenv.mkDerivation rec {
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
meson ninja pkgconfig gettext makeWrapper
xmlto libxslt docbook_xsl docbook_xml_dtd_412
xmlto libxslt docbook_xsl docbook_xml_dtd_412 python3
dbus # for DTD
];

View File

@ -1,7 +1,7 @@
{ fetchurl, substituteAll, stdenv, meson, ninja, pkgconfig, gnome3, perl, gettext, glib, libnotify, lcms2, libXtst
, libxkbfile, libpulseaudio, alsaLib, libcanberra-gtk3, upower, colord, libgweather, polkit
, geoclue2, librsvg, xf86_input_wacom, udev, libgudev, libwacom, libxslt, libxml2, networkmanager
, docbook_xsl, wrapGAppsHook, ibus, xkeyboard_config, tzdata, nss }:
, docbook_xsl, wrapGAppsHook, python3, ibus, xkeyboard_config, tzdata, nss }:
stdenv.mkDerivation rec {
name = "gnome-settings-daemon-${version}";
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
# fatal error: gio/gunixfdlist.h: No such file or directory
NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
nativeBuildInputs = [ meson ninja pkgconfig perl gettext libxml2 libxslt docbook_xsl wrapGAppsHook ];
nativeBuildInputs = [ meson ninja pkgconfig perl gettext libxml2 libxslt docbook_xsl wrapGAppsHook python3 ];
buildInputs = with gnome3; [
ibus gtk glib gsettings-desktop-schemas networkmanager

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, meson, ninja, pkgconfig, glib, gettext, gnutls, p11-kit, libproxy, gnome3
{ stdenv, fetchurl, fetchpatch, meson, ninja, pkgconfig, glib, gettext, python3, gnutls, p11-kit, libproxy, gnome3
, gsettings-desktop-schemas }:
let
@ -30,7 +30,10 @@ stdenv.mkDerivation rec {
patchShebangs meson_post_install.py
'';
nativeBuildInputs = [ meson ninja pkgconfig gettext ];
nativeBuildInputs = [
meson ninja pkgconfig gettext
python3 # install_script
];
propagatedBuildInputs = [ glib gnutls p11-kit libproxy gsettings-desktop-schemas ];
doCheck = false; # tests need to access the certificates (among other things)

View File

@ -29,13 +29,10 @@ stdenv.mkDerivation rec {
(mkFlag documentationSupport "documentation")
(mkFlag eventGUISupport "debug-gui")
(mkFlag testsSupport "tests")
"--libexecdir=${placeholder "bin"}/libexec"
];
preConfigure = ''
mesonFlags="$mesonFlags --libexecdir=$bin/libexec"
'';
nativeBuildInputs = [ pkgconfig meson ninja ]
nativeBuildInputs = [ pkgconfig meson ninja python3Packages.python ]
++ optionals documentationSupport [ doxygen graphviz ]
++ optionals testsSupport [ check valgrind python3Packages.pyparsing ];

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, fetchpatch }:
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)

View File

@ -12,15 +12,14 @@ stdenv.mkDerivation rec {
sha256 = "0cr5skrb7a5mgj7dkm647ib8336hb88bf11blaf6xldafi8b0jlj";
};
# todo: python should be in buildInputs, but right now meson propagates
# its own python. see: https://github.com/NixOS/nixpkgs/pull/46020
nativeBuildInputs = [
(python3.withPackages (ps: with ps; [ evdev pygobject3 ]))
meson ninja pkgconfig gitMinimal swig check valgrind
];
buildInputs = [ glib systemd udev libevdev ];
buildInputs = [
glib systemd udev libevdev
(python3.withPackages (ps: with ps; [ evdev pygobject3 ]))
];
mesonFlags = [
"-Dsystemd-unit-dir=./lib/systemd/system/"