about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-12-02 18:27:05 +0100
committerGitHub <noreply@github.com>2019-12-02 18:27:05 +0100
commit3a53ef08f1affb8905e50da7602af17cd99594eb (patch)
tree3608e13e285cba29b629b8f77282d61d35348977
parenta33c5c90eb94c0cb7d736d5ecc2d625a47fcc64a (diff)
parentcb7da0944e746e67e39bbec97129beb13ba55501 (diff)
downloadnixlib-3a53ef08f1affb8905e50da7602af17cd99594eb.tar
nixlib-3a53ef08f1affb8905e50da7602af17cd99594eb.tar.gz
nixlib-3a53ef08f1affb8905e50da7602af17cd99594eb.tar.bz2
nixlib-3a53ef08f1affb8905e50da7602af17cd99594eb.tar.lz
nixlib-3a53ef08f1affb8905e50da7602af17cd99594eb.tar.xz
nixlib-3a53ef08f1affb8905e50da7602af17cd99594eb.tar.zst
nixlib-3a53ef08f1affb8905e50da7602af17cd99594eb.zip
Merge pull request #70650 from jtojnar/meson-0.52
meson: 0.51.2 → 0.52.1
-rw-r--r--pkgs/applications/editors/gnome-builder/default.nix13
-rw-r--r--pkgs/development/libraries/dconf/default.nix5
-rw-r--r--pkgs/development/tools/build-managers/meson/default.nix21
-rw-r--r--pkgs/development/tools/build-managers/meson/fix-objc-linking.patch22
-rw-r--r--pkgs/development/tools/build-managers/meson/fix-rpath.patch47
-rw-r--r--pkgs/development/tools/build-managers/meson/gir-fallback-path.patch6
6 files changed, 53 insertions, 61 deletions
diff --git a/pkgs/applications/editors/gnome-builder/default.nix b/pkgs/applications/editors/gnome-builder/default.nix
index 6ac2c6d4964c..bda0552e7529 100644
--- a/pkgs/applications/editors/gnome-builder/default.nix
+++ b/pkgs/applications/editors/gnome-builder/default.nix
@@ -5,6 +5,7 @@
 , docbook_xsl
 , docbook_xml_dtd_43
 , fetchurl
+, fetchpatch
 , flatpak
 , gnome3
 , libgit2-glib
@@ -45,6 +46,18 @@ stdenv.mkDerivation rec {
     sha256 = "19018pq94cxf6fywd7fsmy98x56by5zfmh140pl530gaaw84cvhb";
   };
 
+  patches = [
+    # Fix build with Meson 0.52
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/gnome-builder/commit/c8b862b491cfbbb4f79b24d7cd90e4fb1f37cb9f.patch";
+      sha256 = "0n8kg7nnjqmbnyag1ps6dvrlqrxc94djjncqx10d6y7ijwdxf4w8";
+    })
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/gnome-builder/commit/da26dfbf78468f5ed724e022b300a07862a95833.patch";
+      sha256 = "0psa65bzjpjj7vc5rknv2w2dz3p50jjv10s6j2fd6lpw8j2800k4";
+    })
+  ];
+
   nativeBuildInputs = [
     appstream-glib
     desktop-file-utils
diff --git a/pkgs/development/libraries/dconf/default.nix b/pkgs/development/libraries/dconf/default.nix
index 7ce498da9f30..5b37088cd95f 100644
--- a/pkgs/development/libraries/dconf/default.nix
+++ b/pkgs/development/libraries/dconf/default.nix
@@ -14,6 +14,11 @@ stdenv.mkDerivation rec {
   };
 
   patches = [
+    # Fix build with Meson 0.52
+    (fetchpatch {
+      url = "https://gitlab.gnome.org/GNOME/dconf/commit/cc32667c5d7d9ff95e65cc21f59905d8f9218394.patch";
+      sha256 = "02gfadn34bg818a7vb3crhsiahskiflcvx9l6iqwf1v269q93mr8";
+    })
   ];
 
   postPatch = ''
diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix
index 6633d101ce40..49d7287087fd 100644
--- a/pkgs/development/tools/build-managers/meson/default.nix
+++ b/pkgs/development/tools/build-managers/meson/default.nix
@@ -19,11 +19,11 @@ let
 in
 python3Packages.buildPythonApplication rec {
   pname = "meson";
-  version = "0.51.2";
+  version = "0.52.1";
 
   src = python3Packages.fetchPypi {
     inherit pname version;
-    sha256 = "0cqhkjbab1mbvxmbjvyfrbjfkm7bh436svqpjapca36c2k9h1vwr";
+    sha256 = "02fnrk1fjf3yiix0ak0m9vgbpl4h97fafii5pmw7phmvnlv9fyan";
   };
 
   postFixup = ''
@@ -69,23 +69,6 @@ python3Packages.buildPythonApplication rec {
       url = "https://github.com/mesonbuild/meson/commit/972ede1d14fdf17fe5bb8fb99be220f9395c2392.patch";
       sha256 = "19bfsylhpy0b2xv3ks8ac9x3q6vvvyj1wjcy971v9d5f1455xhbb";
     })
-  ] ++ lib.optionals stdenv.isDarwin [
-    # We use custom Clang, which makes Meson think *not Apple*, while still
-    # relying on system linker. When it detects standard Clang, Meson will
-    # pass it `-Wl,-O1` flag but optimizations are not recognized by
-    # Mac linker.
-    # https://github.com/mesonbuild/meson/issues/4784
-    # Should be fixed in 0.52
-    ./fix-objc-linking.patch
-
-    # Fixes error finding some frameworks
-    # https://github.com/NixOS/nixpkgs/pull/70690#issuecomment-553704175
-    # https://github.com/mesonbuild/meson/pull/5980
-    # Should be fixed in 0.52
-    (fetchpatch {
-      url = "https://github.com/mesonbuild/meson/commit/8d3fcb3dc4d7204a4646807f8b5191d79fb291e5.patch";
-      sha256 = "0g95gl662mribnnz5jcyn1jaaw8w7r1vgbg2jbm91dcrr5zji5ng";
-    })
   ];
 
   setupHook = ./setup-hook.sh;
diff --git a/pkgs/development/tools/build-managers/meson/fix-objc-linking.patch b/pkgs/development/tools/build-managers/meson/fix-objc-linking.patch
deleted file mode 100644
index 996e0c3420e2..000000000000
--- a/pkgs/development/tools/build-managers/meson/fix-objc-linking.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index dc8f099b..d8581fcf 100644
---- a/mesonbuild/environment.py
-+++ b/mesonbuild/environment.py
-@@ -944,7 +944,7 @@
-                 compiler_type = self.get_gnu_compiler_type(defines)
-                 version = self.get_gnu_version_from_defines(defines)
-                 return GnuObjCCompiler(ccache + compiler, version, compiler_type, for_machine, is_cross, exe_wrap, defines)
--            if out.startswith('Apple LLVM') or out.startswith('Apple clang'):
-+            if out.startswith('Apple LLVM') or out.startswith('Apple clang') or self.machines.build.is_darwin():
-                 return ClangObjCCompiler(ccache + compiler, version, CompilerType.CLANG_OSX, for_machine, is_cross, exe_wrap)
-             if 'windows' in out:
-                 return ClangObjCCompiler(ccache + compiler, version, CompilerType.CLANG_MINGW, for_machine, is_cross, exe_wrap)
-@@ -974,7 +974,7 @@
-                 compiler_type = self.get_gnu_compiler_type(defines)
-                 version = self.get_gnu_version_from_defines(defines)
-                 return GnuObjCPPCompiler(ccache + compiler, version, compiler_type, for_machine, is_cross, exe_wrap, defines)
--            if out.startswith('Apple LLVM') or out.startswith('Apple clang'):
-+            if out.startswith('Apple LLVM') or out.startswith('Apple clang') or self.machines.build.is_darwin():
-                 return ClangObjCPPCompiler(ccache + compiler, version, CompilerType.CLANG_OSX, for_machine, is_cross, exe_wrap)
-             if 'windows' in out:
-                 return ClangObjCPPCompiler(ccache + compiler, version, CompilerType.CLANG_MINGW, for_machine, is_cross, exe_wrap)
diff --git a/pkgs/development/tools/build-managers/meson/fix-rpath.patch b/pkgs/development/tools/build-managers/meson/fix-rpath.patch
index 1a5f8cb89dce..6cf7afc2bdf3 100644
--- a/pkgs/development/tools/build-managers/meson/fix-rpath.patch
+++ b/pkgs/development/tools/build-managers/meson/fix-rpath.patch
@@ -1,21 +1,34 @@
---- a/mesonbuild/compilers/compilers.py
-+++ b/mesonbuild/compilers/compilers.py
-@@ -1202,8 +1202,10 @@
-             # In order to avoid relinking for RPATH removal, the binary needs to contain just
-             # enough space in the ELF header to hold the final installation RPATH.
-             paths = ':'.join(all_paths)
--            if len(paths) < len(install_rpath):
--                padding = 'X' * (len(install_rpath) - len(paths))
-+            store_paths = ':'.join(filter(lambda path: path.startswith('@storeDir@'), all_paths))
-+            extra_space_needed = len(install_rpath + (':' if install_rpath and store_paths else '') + store_paths) - len(paths)
-+            if extra_space_needed > 0:
-+                padding = 'X' * extra_space_needed
-                 if not paths:
-                     paths = padding
-                 else:
+--- a/mesonbuild/linkers.py
++++ b/mesonbuild/linkers.py
+@@ -527,8 +527,10 @@ class GnuLikeDynamicLinkerMixin:
+         # In order to avoid relinking for RPATH removal, the binary needs to contain just
+         # enough space in the ELF header to hold the final installation RPATH.
+         paths = ':'.join(all_paths)
+-        if len(paths) < len(install_rpath):
+-            padding = 'X' * (len(install_rpath) - len(paths))
++        store_paths = ':'.join(filter(lambda path: path.startswith('@storeDir@'), all_paths))
++        extra_space_needed = len(install_rpath + (':' if install_rpath and store_paths else '') + store_paths) - len(paths)
++        if extra_space_needed > 0:
++            padding = 'X' * extra_space_needed
+             if not paths:
+                 paths = padding
+             else:
+@@ -902,8 +904,10 @@ class SolarisDynamicLinker(PosixDynamicLinkerMixin, DynamicLinker):
+         # In order to avoid relinking for RPATH removal, the binary needs to contain just
+         # enough space in the ELF header to hold the final installation RPATH.
+         paths = ':'.join(all_paths)
+-        if len(paths) < len(install_rpath):
+-            padding = 'X' * (len(install_rpath) - len(paths))
++        store_paths = ':'.join(filter(lambda path: path.startswith('@storeDir@'), all_paths))
++        extra_space_needed = len(install_rpath + (':' if install_rpath and store_paths else '') + store_paths) - len(paths)
++        if extra_space_needed > 0:
++            padding = 'X' * extra_space_needed
+             if not paths:
+                 paths = padding
+             else:
 --- a/mesonbuild/scripts/depfixer.py
 +++ b/mesonbuild/scripts/depfixer.py
-@@ -303,6 +303,14 @@
+@@ -303,6 +303,14 @@ class Elf(DataSizes):
              return
          self.bf.seek(rp_off)
          old_rpath = self.read_str()
@@ -30,7 +43,7 @@
          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 @@
+@@ -316,6 +324,10 @@ class Elf(DataSizes):
          if not new_rpath:
              self.remove_rpath_entry(entrynum)
          else:
diff --git a/pkgs/development/tools/build-managers/meson/gir-fallback-path.patch b/pkgs/development/tools/build-managers/meson/gir-fallback-path.patch
index 7a33d4127fae..e59795486aa8 100644
--- a/pkgs/development/tools/build-managers/meson/gir-fallback-path.patch
+++ b/pkgs/development/tools/build-managers/meson/gir-fallback-path.patch
@@ -1,8 +1,8 @@
 --- a/mesonbuild/modules/gnome.py
 +++ b/mesonbuild/modules/gnome.py
-@@ -805,6 +805,13 @@
-         scan_command += self._scan_langs(state, [lc[0] for lc in langs_compilers])
-         scan_command += list(external_ldflags)
+@@ -801,6 +801,13 @@ class GnomeModule(ExtensionModule):
+             scan_command += ['--sources-top-dirs', os.path.join(state.environment.get_source_dir(), self.interpreter.subproject_dir, state.subproject)]
+             scan_command += ['--sources-top-dirs', os.path.join(state.environment.get_build_dir(), self.interpreter.subproject_dir, state.subproject)]
  
 +        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])))