gmsh: 4.11.1 -> 4.12.2
This commit is contained in:
parent
817a592c92
commit
2b075b0a2b
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, fetchurl, fetchpatch, cmake, blas, lapack, gfortran, gmm, fltk, libjpeg
|
{ lib, stdenv, fetchurl, cmake, blas, lapack, gfortran, gmm, fltk, libjpeg
|
||||||
, zlib, libGL, libGLU, xorg, opencascade-occt
|
, zlib, libGL, libGLU, xorg, opencascade-occt
|
||||||
, python ? null, enablePython ? false }:
|
, python ? null, enablePython ? false }:
|
||||||
|
|
||||||
|
@ -7,11 +7,11 @@ assert enablePython -> (python != null);
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "gmsh";
|
pname = "gmsh";
|
||||||
version = "4.11.1";
|
version = "4.12.2";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://gmsh.info/src/gmsh-${version}-source.tgz";
|
url = "https://gmsh.info/src/gmsh-${version}-source.tgz";
|
||||||
sha256 = "sha256-xf4bfL1AOIioFJKfL9D11p4nYAIioYx4bbW3boAFs2U=";
|
hash = "sha256-E+CdnKgQLlxAFx1u4VDGaHQrmMOmylf4N/e2Th4q9I8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
@ -26,19 +26,6 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./fix-python.patch
|
./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 = ''
|
postPatch = ''
|
||||||
|
|
|
@ -1,50 +1,13 @@
|
||||||
diff --git a/api/gmsh.py b/api/gmsh.py
|
diff --git a/api/gmsh.py b/api/gmsh.py
|
||||||
index 747acb203..02004da5d 100644
|
index f525284..a225c85 100644
|
||||||
--- a/api/gmsh.py
|
--- a/api/gmsh.py
|
||||||
+++ b/api/gmsh.py
|
+++ b/api/gmsh.py
|
||||||
@@ -44,44 +44,7 @@ moduledir = os.path.dirname(os.path.realpath(__file__))
|
@@ -78,6 +78,8 @@ if not libpath:
|
||||||
parentdir1 = os.path.dirname(moduledir)
|
else:
|
||||||
parentdir2 = os.path.dirname(parentdir1)
|
libpath = find_library("gmsh")
|
||||||
|
|
||||||
-if platform.system() == "Windows":
|
|
||||||
- libname = "gmsh-4.11.dll"
|
|
||||||
-elif platform.system() == "Darwin":
|
|
||||||
- libname = "libgmsh.4.11.dylib"
|
|
||||||
-else:
|
|
||||||
- libname = "libgmsh.so.4.11"
|
|
||||||
-
|
|
||||||
-# check if the library is in the same directory as the module...
|
|
||||||
-libpath = os.path.join(moduledir, libname)
|
|
||||||
-
|
|
||||||
-# ... or in the parent directory or its lib or Lib subdirectory
|
|
||||||
-if not os.path.exists(libpath):
|
|
||||||
- libpath = os.path.join(parentdir1, libname)
|
|
||||||
-if not os.path.exists(libpath):
|
|
||||||
- libpath = os.path.join(parentdir1, "lib", libname)
|
|
||||||
-if not os.path.exists(libpath):
|
|
||||||
- libpath = os.path.join(parentdir1, "Lib", libname)
|
|
||||||
-
|
|
||||||
-# ... or in the parent of the parent directory or its lib or Lib subdirectory
|
|
||||||
-if not os.path.exists(libpath):
|
|
||||||
- libpath = os.path.join(parentdir2, libname)
|
|
||||||
-if not os.path.exists(libpath):
|
|
||||||
- libpath = os.path.join(parentdir2, "lib", libname)
|
|
||||||
-if not os.path.exists(libpath):
|
|
||||||
- libpath = os.path.join(parentdir2, "Lib", libname)
|
|
||||||
-
|
|
||||||
-# if we couldn't find it, use ctype's find_library utility...
|
|
||||||
-if not os.path.exists(libpath):
|
|
||||||
- if platform.system() == "Windows":
|
|
||||||
- libpath = find_library("gmsh-4.11")
|
|
||||||
- if not libpath:
|
|
||||||
- libpath = find_library("gmsh")
|
|
||||||
- else:
|
|
||||||
- libpath = find_library("gmsh")
|
|
||||||
-
|
|
||||||
-# ... and print a warning if everything failed
|
|
||||||
-if not os.path.exists(libpath):
|
|
||||||
- print("Warning: could not find Gmsh shared library " + libname)
|
|
||||||
+libpath = "@LIBPATH@"
|
+libpath = "@LIBPATH@"
|
||||||
|
+
|
||||||
lib = CDLL(libpath)
|
# ... and print a warning if everything failed
|
||||||
|
if not libpath:
|
||||||
|
print("Warning: could not find Gmsh shared library " + libname +
|
||||||
|
|
Loading…
Reference in New Issue
Block a user