gmsh: fix find_library for Darwin platform

This commit is contained in:
qbisi
2025-04-13 14:09:11 +08:00
parent 5de66298aa
commit c2de8ffc88
2 changed files with 2 additions and 15 deletions
-13
View File
@@ -1,13 +0,0 @@
diff --git a/api/gmsh.py b/api/gmsh.py
index f525284..a225c85 100644
--- a/api/gmsh.py
+++ b/api/gmsh.py
@@ -78,6 +78,8 @@ if not libpath:
else:
libpath = find_library("gmsh")
+libpath = "@LIBPATH@"
+
# ... and print a warning if everything failed
if not libpath:
print("Warning: could not find Gmsh shared library " + libname +
+2 -2
View File
@@ -59,7 +59,6 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
patches = [
./fix-python.patch
(fetchpatch {
url = "https://gitlab.onelab.info/gmsh/gmsh/-/commit/7d5094fb0a5245cb435afd3f3e8c35e2ecfe70fd.patch";
hash = "sha256-3atm1NGsMI4KEct2xakRG6EasRpF6YRI4raoVYxBV4g=";
@@ -67,7 +66,8 @@ stdenv.mkDerivation rec {
];
postPatch = ''
substituteInPlace api/gmsh.py --subst-var-by LIBPATH ${placeholder "out"}/lib/libgmsh.so
substituteInPlace api/gmsh.py \
--replace-fail 'find_library("gmsh")' \"$out/lib/libgmsh${stdenv.hostPlatform.extensions.sharedLibrary}\"
'';
# N.B. the shared object is used by bindings