From 775c761fd8cb59a2af52ad79a50ec2a4e1f2db78 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 1 Jan 2024 19:20:17 +0000 Subject: gmsh: pull `gcc-13` build fix from upstream Without the change `gmsh` build fails in `staging-next` as: /build/gmsh-4.11.1-source/src/mesh/meshGFacePack.cpp:209:7: error: 'uint32_t' was not declared in this scope 209 | for(uint32_t j = 0; j < 6; j++) { | ^~~~~~~~ /build/gmsh-4.11.1-source/src/mesh/meshGFacePack.cpp:16:1: note: 'uint32_t' is defined in header ''; did you forget to '#include '? 15 | #include "robustPredicates.h" +++ |+#include --- pkgs/applications/science/math/gmsh/default.nix | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/math/gmsh/default.nix b/pkgs/applications/science/math/gmsh/default.nix index 4d9b3afe31ca..62a0c3c405df 100644 --- a/pkgs/applications/science/math/gmsh/default.nix +++ b/pkgs/applications/science/math/gmsh/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, cmake, blas, lapack, gfortran, gmm, fltk, libjpeg +{ lib, stdenv, fetchurl, fetchpatch, cmake, blas, lapack, gfortran, gmm, fltk, libjpeg , zlib, libGL, libGLU, xorg, opencascade-occt , python ? null, enablePython ? false }: @@ -24,7 +24,22 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - patches = [ ./fix-python.patch ]; + patches = [ + ./fix-python.patch + + # Pull upstream fix git gcc-13: + # https://gitlab.onelab.info/gmsh/gmsh/-/issues/2416 + (fetchpatch { + name = "gcc-13-p1.patch"; + url = "https://gitlab.onelab.info/gmsh/gmsh/-/commit/fb81a9c9026700e078de947b4522cb39e543a86b.patch"; + hash = "sha256-1GInFqQZvOgflC3eQTjmZ9uBGFASRNCpCwDACN3yTQ4="; + }) + (fetchpatch { + name = "gcc-13-p2.patch"; + url = "https://gitlab.onelab.info/gmsh/gmsh/-/commit/aceb09c807b78ea26555f99fcb16c4f87c31fb5a.patch"; + hash = "sha256-6FI0hIvj8hglCvxoKV0GzT2/F/Wz+ddkxV/TLzzJBLU="; + }) + ]; postPatch = '' substituteInPlace api/gmsh.py --subst-var-by LIBPATH ${placeholder "out"}/lib/libgmsh.so -- cgit 1.4.1