mumps: remove unnecessary patch from coin-or-mumps

The coin-or project ipopt use a thirdparty-mumps, this variant renames `libseq/mpi.h`
to `libseq/mumps_mpi.h` to avoid conflicts when building in a MPI environment.
See https://github.com/coin-or/Ipopt/blob/stable/3.14/ChangeLog.md?plain=1#L582.
Nix packagers don't need to worry about this cause we build in a sandbox environment.
For parrallel version of mumps built with mpi support, libseq is not needed and there will be no conflicts.
This commit is contained in:
qbisi
2024-10-27 22:14:56 +08:00
parent 66d928e812
commit c9997c4e36
+6 -20
View File
@@ -18,25 +18,11 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-ZnIfAuvOBJDYqCtKGlWs0r39nG6X2lAVRuUmeIJenZw=";
};
patches = [
# Compatibility with coin-or-mumps version
(fetchpatch {
url = "https://raw.githubusercontent.com/coin-or-tools/ThirdParty-Mumps/bd0bdf9baa3f3677bd34fb36ce63b2b32cc6cc7d/mumps_mpi.patch";
hash = "sha256-70qZUKBVBpJOSRxYxng5Y6ct1fdCUQUGur3chDhGabQ=";
})
];
postPatch =
''
# Compatibility with coin-or-mumps version
# https://github.com/coin-or-tools/ThirdParty-Mumps/blob/stable/3.0/get.Mumps#L66
cp libseq/mpi.h libseq/mumps_mpi.h
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace src/Makefile --replace-fail \
"-Wl,\''$(SONAME),libmumps_common" \
"-Wl,-install_name,$out/lib/libmumps_common"
'';
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace src/Makefile --replace-fail \
"-Wl,\''$(SONAME),libmumps_common" \
"-Wl,-install_name,$out/lib/libmumps_common"
'';
configurePhase = ''
cp Make.inc/Makefile.debian.SEQ ./Makefile.inc
@@ -63,7 +49,7 @@ stdenv.mkDerivation (finalAttrs: {
# Add some compatibility with coin-or-mumps
ln -s $out/include $out/include/mumps
cp libseq/mumps_mpi.h $out/include
cp libseq/mpi.h $out/include/mumps_mpi.h
'';
nativeBuildInputs = [ gfortran ];