git: 19e65b569a84 - main - math/mumps: upgrade to 5.9.1
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 07 Oct 2026 10:26:16 UTC
The branch main has been updated by thierry:
URL: https://cgit.FreeBSD.org/ports/commit/?id=19e65b569a84bce848525241cd2c5c49d5706e1f
commit 19e65b569a84bce848525241cd2c5c49d5706e1f
Author: Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2026-10-04 17:33:16 +0000
Commit: Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2026-10-07 10:26:02 +0000
math/mumps: upgrade to 5.9.1
PR: 299097
---
math/mumps/Makefile | 164 +++++++++++----------
math/mumps/distinfo | 6 +-
.../files/patch-Make.inc_Makefile.FREEBSD10.PAR | 99 +++++++++++++
.../files/patch-Make.inc_Makefile.FREEBSD10.SEQ | 94 ++++++++++++
.../files/patch-Make.inc_Makefile.inc.generic | 71 ---------
.../files/patch-Make.inc_Makefile.inc.generic.SEQ | 69 ---------
math/mumps/files/patch-Makefile | 20 ---
math/mumps/files/patch-PORD_lib_Makefile | 19 +--
math/mumps/files/patch-examples_Makefile | 15 ++
math/mumps/files/patch-libseq_Makefile | 33 +++--
math/mumps/files/patch-src_Makefile | 34 -----
math/mumps/pkg-descr | 2 +-
math/mumps/pkg-plist | 96 +++++++-----
13 files changed, 387 insertions(+), 335 deletions(-)
diff --git a/math/mumps/Makefile b/math/mumps/Makefile
index d519ac452426..e7ff787b5db8 100644
--- a/math/mumps/Makefile
+++ b/math/mumps/Makefile
@@ -1,113 +1,120 @@
-PORTNAME= mumps4
-PORTVERSION= 4.10.0 # Please do not upgrade to 5+: use math/mumps
-PORTREVISION= 6
+PORTNAME= mumps
+PORTVERSION= 5.9.1
CATEGORIES= math
-MASTER_SITES= http://mumps.enseeiht.fr/ \
- http://graal.ens-lyon.fr/MUMPS/ \
- http://www.enseeiht.fr/apo/MUMPS/ \
- http://www.enseeiht.fr/irit/apo/MUMPS/
+MASTER_SITES= https://mumps-solver.org/
DISTNAME= MUMPS_${PORTVERSION}
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= thierry@FreeBSD.org
COMMENT= MUltifrontal Massively Parallel sparse direct Solver
WWW= https://mumps-solver.org/
-LICENSE= PD
+LICENSE= CeCILL_C
+LICENSE_NAME= CeCILL-C
LICENSE_FILE= ${WRKSRC}/LICENSE
+LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
-USES= fortran:gfortran
+LIB_DEPENDS= libmetis.so:math/metis
-MAKE_JOBS_UNSAFE=yes
-
-FFLAGS+= -ffast-math
-FORTRANLIBS= -lgfortran
-GCCLIBDIR= ${LDFLAGS}
-USE_LDCONFIG= yes
-VEM= ${PORTVERSION:R:R}
-LIBS= cmumps dmumps mumps_common pord smumps zmumps
-
-CONFLICTS+= mumps-mpich-4*
-
-OPTIONS_DEFINE= DOCS EXAMPLES
-
-LIBS+= mpiseq
-
-PLIST_SUB+= MUMPSVERSION=${PORTVERSION} MUMPSV=${VEM}
-
-#-----------------------------------------------------------------------
-# WARNING: Non-serviceable parts inside, can break other ports
-# You may define these options/knobs:
-#
-# FFLAGS: Fortran compiler flags for gfortran
-# BLASLIB: specify other version of BLAS
-# WITH_ATLAS: Use ATLAS instead of the regular BLAS
-#-----------------------------------------------------------------------
+USES= blaslapack:openblas fortran gmake
+BINARY_ALIAS= make=${GMAKE}
-.include <bsd.port.pre.mk>
+CONFLICTS+= mumps-edf
-# This is like blaslapack, except we don't use lapack at all
-.if exists(${LOCALBASE}/lib/libatlas.so) && !defined(WITH_BLAS)
-WITH_ATLAS= yes
-.endif
-.if defined(WITH_ATLAS)
-LIB_DEPENDS+= libatlas.so:math/atlas
-BLASLIB= -lf77blas
-#LAPACKLIB= -lalapack -lcblas
-.else
-LIB_DEPENDS+= libblas.so:math/blas
-BLASLIB= -lblas
-#LAPACKLIB= -llapack
-.endif
-
-.if ${GCC_DEFAULT} >= 10
+ALL_TARGET= all allshared
+FORTRANLIBS= -L${LOCALBASE}/lib/gcc${_GCC_VER} -lgfortran
+FCFLAGS+= -O2
# workaround for Type mismatch in argument 's' at (1); passed INTEGER(4) to LOGICAL(4)
FCFLAGS+= -fallow-argument-mismatch
-.endif
+GCCLIBDIR= ${LDFLAGS}
+USE_LDCONFIG= yes
+VEM= ${PORTVERSION:R:R:R}
+MUMPSVERSION= ${PORTVERSION:R:R}
+LIBRS= cmumps dmumps mumps_common pord smumps zmumps
+PLIST_SUB= VE=${MUMPSVERSION} MUMPSVERSION=${DISTVERSION}
+
+# TODO: flavorize with MPICH / OMPI / NOMPI
+OPTIONS_DEFINE= DOCS EXAMPLES MPICH
+OPTIONS_DEFAULT=MPICH
+
+MPICH_USES= mpi:mpich
+MPICH_LIB_DEPENDS_OFF= libscotch.so:cad/scotch
+MPICH_LIB_DEPENDS= libblacs.so:math/blacs \
+ libptscotch.so:cad/scotch \
+ libscalapack.so:math/scalapack
+MPICH_PLIST_SUB= WITH_LIBSEQ="@comment "
+MPICH_PLIST_SUB_OFF= WITH_LIBSEQ=""
+MPICH_VARS_OFF= LIBRS+=mpiseq
-pre-configure:
- ${INSTALL_DATA} ${WRKSRC}/Make.inc/Makefile.inc.generic.SEQ \
- ${WRKSRC}/Makefile.inc
- ${REINPLACE_CMD} -e 's+LIBPAR+LIBSEQ+' ${WRKSRC}/src/Makefile
+MAKE_JOBS_UNSAFE=yes
-pre-build:
+pre-configure:
${DIRNAME} `${FC} -print-libgcc-file-name` > ${WRKSRC}/LIBDIR
-.for MF in Makefile Makefile.inc PORD/lib/Makefile libseq/Makefile src/Makefile
- ${REINPLACE_CMD} -e 's+@CC@+${CC}+g ; s+@FC@+${FC}+g ; \
+.for MF in Makefile PORD/lib/Makefile libseq/Makefile src/Makefile \
+ Make.inc/Makefile.FREEBSD10.PAR Make.inc/Makefile.FREEBSD10.SEQ
+ ${REINPLACE_CMD} -e 's+/usr/local+${LOCALBASE}+; \
s+@CFLAGS@+${CFLAGS} -fPIC+g; \
s+@FCFLAGS@+${FCFLAGS} -fPIC+g; \
s+@SOVER@+${VEM}+g; \
s+@GCCLIBDIR@+${GCCLIBDIR}+g; \
s+@FORTRANLIBS@+${FORTRANLIBS}+g; \
- s+@BLAS_LIBS@+${BLASLIB}+ ; \
+ s+@BLASLIB@+${BLASLIB}+ ; \
+ s+@LAPACKLIB@+${LAPACKLIB}+ ; \
+ s+@MPI_CFLAGS@+${MPI_CFLAGS}+ ; \
+ s+@MPI_LIBS@+${MPI_LIBS}+ ; \
s+@LOCALBASE@+${LOCALBASE}+g;' \
${WRKSRC}/${MF}
.endfor
+pre-configure-MPICH-on:
+ ${REINPLACE_CMD} -e 's+@CC@+${MPICC}+g ; s+@FC@+${MPIF90}+' \
+ ${WRKSRC}/Make.inc/Makefile.FREEBSD10.PAR
+ ${INSTALL_DATA} ${WRKSRC}/Make.inc/Makefile.FREEBSD10.PAR \
+ ${WRKSRC}/Makefile.inc
+
+pre-configure-MPICH-off:
+ ${REINPLACE_CMD} -e 's+@CC@+${CC}+g ; s+@FC@+${FC}+' \
+ ${WRKSRC}/Make.inc/Makefile.FREEBSD10.SEQ
+ ${INSTALL_DATA} ${WRKSRC}/Make.inc/Makefile.FREEBSD10.SEQ \
+ ${WRKSRC}/Makefile.inc
+
do-install:
- ${MKDIR} ${STAGEDIR}${PREFIX}/include/${PORTNAME}
- ${INSTALL_DATA} ${WRKSRC}/include/*.h ${STAGEDIR}${PREFIX}/include/${PORTNAME}
- ${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
- ${INSTALL_DATA} ${WRKSRC}/lib/lib*.a ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
- ${INSTALL_LIB} ${WRKSRC}/lib/lib*.so.${VEM} ${STAGEDIR}${PREFIX}/lib
- ${INSTALL_DATA} ${WRKSRC}/libseq/libmpiseq.a ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
- ${INSTALL_LIB} ${WRKSRC}/libseq/libmpiseq*.so.${VEM} ${STAGEDIR}${PREFIX}/lib
-.for lib in ${LIBS}
+ ${INSTALL_DATA} ${WRKSRC}/include/*.h ${STAGEDIR}${PREFIX}/include
+ ${INSTALL_DATA} ${WRKSRC}/lib/lib*.a ${STAGEDIR}${PREFIX}/lib
+ ${INSTALL_LIB} ${WRKSRC}/lib/lib*.so ${STAGEDIR}${PREFIX}/lib
+.for lib in ${LIBRS}
(cd ${STAGEDIR}${PREFIX}/lib && \
- ${LN} -sf lib${lib}.so.${VEM} ${STAGEDIR}${PREFIX}/lib/lib${lib}4.so)
-. endfor
+ ${LN} -sf lib${lib}.so ${STAGEDIR}${PREFIX}/lib/lib${lib}.so.${VEM})
+.endfor
+
+do-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/doc/userguide_${PORTVERSION}.pdf ${STAGEDIR}${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/doc/userguide_${PORTVERSION}.ps ${STAGEDIR}${DOCSDIR}
- ${GZIP_CMD} ${STAGEDIR}${DOCSDIR}/userguide_${PORTVERSION}.ps
+ ${INSTALL_DATA} ${WRKSRC}/doc/userguide_${DISTVERSION}.pdf ${STAGEDIR}${DOCSDIR}
+
+do-install-DOCS-on:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
-. for ex in Makefile README *.c *.F input_simpletest_*
+.for ex in Makefile README *.c *.F input_simpletest_*
${INSTALL_DATA} ${WRKSRC}/examples/${ex} ${STAGEDIR}${EXAMPLESDIR}
-. endfor
-. for ex in c_example *simpletest
+.endfor
+.for ex in c_example *simpletest
${INSTALL_PROGRAM} ${WRKSRC}/examples/${ex} ${STAGEDIR}${EXAMPLESDIR}
+.endfor
+
+do-install-MPICH-off:
+ ${MKDIR} ${STAGEDIR}${PREFIX}/include/mumps_seq
+ ${INSTALL_DATA} ${WRKSRC}/libseq/mpi.h ${STAGEDIR}${PREFIX}/include/mumps_seq/mpi.h
+ ${INSTALL_DATA} ${WRKSRC}/libseq/libmpiseq.a ${STAGEDIR}${PREFIX}/lib
+ ${INSTALL_LIB} ${WRKSRC}/libseq/libmpiseq*.so ${STAGEDIR}${PREFIX}/lib
+ (cd ${STAGEDIR}${PREFIX}/lib && \
+ ${LN} -sf libmpiseq.so ${STAGEDIR}${PREFIX}/lib/libmpiseq.so.5)
+.for lib in ${LIBRS} mpiseq
+. for ext in a so so.5
+ (cd ${STAGEDIR}${PREFIX}/lib && \
+ ${LN} -sf lib${lib}.${ext} ${STAGEDIR}${PREFIX}/lib/lib${lib}_seq.${ext})
. endfor
+.endfor
-regression-test: install
+.if defined(MAINTAINER_MODE)
+do-test: install
(cd ${WRKSRC}/examples && \
./ssimpletest < input_simpletest_real ; \
./dsimpletest < input_simpletest_real ; \
@@ -116,5 +123,6 @@ regression-test: install
${ECHO_MSG} "The solution should be (1,2,3,4,5)" ; \
./c_example ; \
${ECHO_MSG} "The solution should be (1,2)")
+.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/math/mumps/distinfo b/math/mumps/distinfo
index de5032bf7f6b..284f348a629d 100644
--- a/math/mumps/distinfo
+++ b/math/mumps/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1791367248
-SHA256 (MUMPS_4.10.0.tar.gz) = d0f86f91a74c51a17a2ff1be9c9cee2338976f13a6d00896ba5b43a5ca05d933
-SIZE (MUMPS_4.10.0.tar.gz) = 2481516
+TIMESTAMP = 1791036775
+SHA256 (MUMPS_5.9.1.tar.gz) = 659c9b57646b5a003ac618baa1faf9dd2044e46c732b3daaccbc7158003e1b46
+SIZE (MUMPS_5.9.1.tar.gz) = 4983937
diff --git a/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.PAR b/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.PAR
new file mode 100644
index 000000000000..3974729e3606
--- /dev/null
+++ b/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.PAR
@@ -0,0 +1,99 @@
+--- Make.inc/Makefile.FREEBSD10.PAR.orig 2026-07-20 09:00:43 UTC
++++ Make.inc/Makefile.FREEBSD10.PAR
+@@ -20,7 +20,7 @@
+ #
+
+ #SCOTCHDIR = ${HOME}/scotch_6.0
+-#ISCOTCH = -I$(SCOTCHDIR)/include
++ISCOTCH = -I@LOCALBASE@/include
+ #
+ # You have to choose one among the following two lines depending on
+ # the type of analysis you want to perform. If you want to perform only
+@@ -29,15 +29,15 @@
+ # line (remember to add -Dptscotch in the ORDERINGSF variable below)
+
+ #LSCOTCH = -L$(SCOTCHDIR)/lib -lesmumps -lscotch -lscotcherr
+-#LSCOTCH = -L$(SCOTCHDIR)/lib -lptesmumps -lptscotch -lptscotcherr
++LSCOTCH = -L@LOCALBASE@/lib -lesmumps -lscotch -lscotcherr -lptesmumps -lptscotch -lptscotcherr -lz
+
+
+ LPORDDIR = $(topdir)/PORD/lib/
+ IPORD = -I$(topdir)/PORD/include/
+ LPORD = -L$(LPORDDIR) -lpord$(PLAT)
+
+-#LMETISDIR = /opt/metis-5.1.0/build/Linux-x86_64/libmetis
+-#IMETIS = /opt/metis-5.1.0/include
++LMETISDIR = @LOCALBASE@/lib
++IMETIS = -I@LOCALBASE@/include
+
+ # You have to choose one among the following two lines depending on
+ # the type of analysis you want to perform. If you want to perform only
+@@ -45,7 +45,8 @@ LPORD = -L$(LPORDDIR) -lpord$(PLAT)
+ # variable below); for both parallel and sequential analysis choose the second
+ # line (remember to add -Dparmetis in the ORDERINGSF variable below)
+
+-#LMETIS = -L$(LMETISDIR) -lmetis
++# FreeBSD note: Parmetis is not free, we use pt-scotch
++LMETIS = -L$(LMETISDIR) -lmetis
+ #LMETIS = -L$(LMETISDIR) -lparmetis -lmetis
+
+ # The following variables will be used in the compilation process.
+@@ -53,7 +54,7 @@ LPORD = -L$(LPORDDIR) -lpord$(PLAT)
+ # If you want to use Metis 4.X or an older version, you should use -Dmetis4 instead of -Dmetis
+ # or in addition with -Dparmetis (if you are using parmetis 3.X or older).
+ #ORDERINGSF = -Dscotch -Dmetis -Dpord -Dptscotch -Dparmetis
+-ORDERINGSF = -Dpord
++ORDERINGSF = -Dpord -Dmetis -Dscotch -Dptscotch
+ ORDERINGSC = $(ORDERINGSF)
+
+ LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH)
+@@ -73,34 +74,34 @@ FPIC_OPT = -fPIC
+ # Adapt/uncomment RPATH_OPT to avoid modifying
+ # LD_LIBRARY_PATH in case of shared libraries
+ # RPATH_OPT = -Wl,-rpath,/path/to/MUMPS_x.y.z/lib/
+-OUTC = -o ""
+-OUTF = -o ""
++OUTC = -o
++OUTF = -o
+ RM = /bin/rm -f
+-CC = cc
+-FC = gfortran48
+-FL = gfortran48
++CC = @CC@
++FC = @FC@
++FL = @FC@
+ # keep a space at the end if options have to be separated from lib name
+-AR = ar -vr ""
++AR = ar -vr
+ RANLIB = ranlib
+-LAPACK = -llapack
+-SCALAP = -lscalapack -lblacs
++LAPACK = @LAPACKLIB@
++SCALAP = -L@LOCALBASE@/lib -lscalapack -lblacs -lblacsc -lblacsf77 -lexecinfo
+
+-INCPAR = -I/usr/local/include
+-LIBPAR = $(SCALAP) $(LAPACK) -L/usr/local/lib -lmpi
++INCPAR = @MPI_CFLAGS@
++LIBPAR = $(SCALAP) @MPI_LIBS@
+
+ INCSEQ = -I$(topdir)/libseq
+ LIBSEQ = $(LAPACK) -L$(topdir)/libseq -lmpiseq$(PLAT)
+-LIBBLAS = -lblas
+-LIBOTHERS = -lpthread
++LIBBLAS = @BLASLIB@
++LIBOTHERS = -lz -pthread
+
+ #Preprocessor defs for calling Fortran from C (-DAdd_ or -DAdd__ or -DUPPER)
+ CDEFS = -DAdd_
+
+ #Begin Optimized options
+ # uncomment -fopenmp in lines below to benefit from OpenMP
+-OPTF = -O #-fopenmp
+-OPTL = -O #-fopenmp
+-OPTC = -O -I. #-fopenmp
++OPTF = @FCFLAGS@ -fopenmp
++OPTL = -O -fopenmp
++OPTC = @CFLAGS@ -I. -fopenmp
+ #End Optimized options
+
+
diff --git a/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.SEQ b/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.SEQ
new file mode 100644
index 000000000000..4c7266ec5ada
--- /dev/null
+++ b/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.SEQ
@@ -0,0 +1,94 @@
+--- Make.inc/Makefile.FREEBSD10.SEQ.orig 2026-07-20 09:00:43 UTC
++++ Make.inc/Makefile.FREEBSD10.SEQ
+@@ -20,7 +20,7 @@
+ #
+
+ #SCOTCHDIR = ${HOME}/scotch_6.0
+-#ISCOTCH = -I$(SCOTCHDIR)/include
++ISCOTCH = -I@LOCALBASE@/include
+ #
+ # You have to choose one among the following two lines depending on
+ # the type of analysis you want to perform. If you want to perform only
+@@ -28,7 +28,7 @@
+ # variable below); for both parallel and sequential analysis choose the second
+ # line (remember to add -Dptscotch in the ORDERINGSF variable below)
+
+-#LSCOTCH = -L$(SCOTCHDIR)/lib -lesmumps -lscotch -lscotcherr
++LSCOTCH = -L@LOCALBASE@/lib -lesmumps -lscotch -lscotcherr
+ #LSCOTCH = -L$(SCOTCHDIR)/lib -lptesmumps -lptscotch -lptscotcherr
+
+
+@@ -36,8 +36,8 @@ LPORD = -L$(LPORDDIR) -lpord$(PLAT)
+ IPORD = -I$(topdir)/PORD/include/
+ LPORD = -L$(LPORDDIR) -lpord$(PLAT)
+
+-#LMETISDIR = /opt/metis-5.1.0/build/Linux-x86_64/libmetis
+-#IMETIS = /opt/metis-5.1.0/include
++LMETISDIR = @LOCALBASE@/lib
++IMETIS = -I@LOCALBASE@/include
+
+ # You have to choose one among the following two lines depending on
+ # the type of analysis you want to perform. If you want to perform only
+@@ -45,7 +45,7 @@ LPORD = -L$(LPORDDIR) -lpord$(PLAT)
+ # variable below); for both parallel and sequential analysis choose the second
+ # line (remember to add -Dparmetis in the ORDERINGSF variable below)
+
+-#LMETIS = -L$(LMETISDIR) -lmetis
++LMETIS = -L$(LMETISDIR) -lmetis
+ #LMETIS = -L$(LMETISDIR) -lparmetis -lmetis
+
+ # The following variables will be used in the compilation process.
+@@ -53,7 +53,7 @@ LPORD = -L$(LPORDDIR) -lpord$(PLAT)
+ # If you want to use Metis 4.X or an older version, you should use -Dmetis4 instead of -Dmetis
+ # or in addition with -Dparmetis (if you are using parmetis 3.X or older).
+ #ORDERINGSF = -Dscotch -Dmetis -Dpord -Dptscotch -Dparmetis
+-ORDERINGSF = -Dpord
++ORDERINGSF = -Dscotch -Dmetis -Dpord
+ ORDERINGSC = $(ORDERINGSF)
+
+ LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH)
+@@ -73,31 +73,31 @@ FPIC_OPT = -fPIC
+ # Adapt/uncomment RPATH_OPT to avoid modifying
+ # LD_LIBRARY_PATH in case of shared libraries
+ # RPATH_OPT = -Wl,-rpath,/path/to/MUMPS_x.y.z/lib/
+-OUTC = -o ""
+-OUTF = -o ""
++OUTC = -o
++OUTF = -o
+ RM = /bin/rm -f
+-CC = cc
+-FC = gfortran48
+-FL = gfortran48
++CC = @CC@
++FC = @FC@
++FL = @FC@
+ # keep a space at the end if options have to be separated from lib name
+-AR = ar -vr ""
++AR = ar -vr
+ RANLIB = ranlib
+-LAPACK = -llapack
++LAPACK = @LAPACKLIB@
+
+
+ INCSEQ = -I$(topdir)/libseq
+ LIBSEQ = $(LAPACK) -L$(topdir)/libseq -lmpiseq$(PLAT)
+-LIBBLAS = -lblas
+-LIBOTHERS = -lpthread
++LIBBLAS = @BLASLIB@
++LIBOTHERS = @GCCLIBDIR@ @FORTRANLIBS@ -lz -pthread
+
+ #Preprocessor defs for calling Fortran from C (-DAdd_ or -DAdd__ or -DUPPER)
+-CDEFS = -DAdd_
++CDEFS ?= -DAdd_
+
+ #Begin Optimized options
+ # uncomment -fopenmp in lines below to benefit from OpenMP
+-OPTF = -O #-fopenmp
+-OPTL = -O #-fopenmp
+-OPTC = -O -I. #-fopenmp
++OPTF = @FCFLAGS@ -fopenmp
++OPTL = -O -fopenmp
++OPTC = @CFLAGS@ -I. -fopenmp
+ #End Optimized options
+
+
diff --git a/math/mumps/files/patch-Make.inc_Makefile.inc.generic b/math/mumps/files/patch-Make.inc_Makefile.inc.generic
deleted file mode 100644
index 552d81466181..000000000000
--- a/math/mumps/files/patch-Make.inc_Makefile.inc.generic
+++ /dev/null
@@ -1,71 +0,0 @@
---- Make.inc/Makefile.inc.generic.orig 2011-05-10 12:56:32 UTC
-+++ Make.inc/Makefile.inc.generic
-@@ -70,7 +70,7 @@ LPORD = -L$(LPORDDIR) -lpord
- # The following variables will be used in the compilation process.
- # Please note that -Dptscotch and -Dparmetis imply -Dscotch and -Dmetis respectively.
- #ORDERINGSF = -Dscotch -Dmetis -Dpord -Dptscotch -Dparmetis
--ORDERINGSF = -Dpord
-+ORDERINGSF += -Dpord
- ORDERINGSC = $(ORDERINGSF)
-
- LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH)
-@@ -91,11 +91,11 @@ OUTF = -o
- # RM : remove files
- RM = /bin/rm -f
- # CC : C compiler
--CC = cc
-+CC = @CC@
- # FC : Fortran 90 compiler
--FC = f90
-+FC = @FC@
- # FL : Fortran linker
--FL = f90
-+FL = @FC@
- # AR : Archive object in a library
- # keep a space at the end if options have to be separated from lib name
- AR = ar vr
-@@ -105,13 +105,13 @@ RANLIB = ranlib
- #RANLIB = echo
-
- # SCALAP should define the SCALAPACK and BLACS libraries.
--SCALAP = -lscalapack -lblacs
-+SCALAP = -L@LOCALBASE@/lib -lblacs -lblacsc -lblacsf77 -lscalapack
-
- # INCLUDE DIRECTORY FOR MPI
--INCPAR = -I/usr/include
-+INCPAR = -I@LOCALBASE@/include
-
- # LIBRARIES USED BY THE PARALLEL VERSION OF MUMPS: $(SCALAP) and MPI
--LIBPAR = $(SCALAP) -L/usr/lib -lmpi
-+LIBPAR = -L@LOCALBASE@/lib -lfmpich -lmpich -lmpl $(SCALAP)
-
- # The parallel version is not concerned by the next two lines.
- # They are related to the sequential library provided by MUMPS,
-@@ -121,10 +121,10 @@ LIBSEQ = -Llibseq -lmpiseq
-
- # DEFINE HERE YOUR BLAS LIBRARY
-
--LIBBLAS = -lblas
-+LIBBLAS = -L@LOCALBASE@/lib @LAPACK_LIBS@ @BLAS_LIBS@
-
- # DEFINE YOUR PTHREAD LIBRARY
--LIBOTHERS = -lpthread
-+LIBOTHERS = -lpthread @GCCLIBDIR@ @FORTRANLIBS@
-
- # FORTRAN/C COMPATIBILITY:
- # Use:
-@@ -137,11 +137,11 @@ LIBOTHERS = -lpthread
- # leave empty if your Fortran compiler does not change the symbols.
- #
-
--CDEFS = -DAdd_
-+CDEFS ?= -DAdd_
-
- #COMPILER OPTIONS
--OPTF = -O
--OPTC = -O -I.
-+OPTF = @FCFLAGS@
-+OPTC = @CFLAGS@
- OPTL = -O
-
- # CHOOSE BETWEEN USING THE SEQUENTIAL OR THE PARALLEL VERSION.
diff --git a/math/mumps/files/patch-Make.inc_Makefile.inc.generic.SEQ b/math/mumps/files/patch-Make.inc_Makefile.inc.generic.SEQ
deleted file mode 100644
index a9bb16fde288..000000000000
--- a/math/mumps/files/patch-Make.inc_Makefile.inc.generic.SEQ
+++ /dev/null
@@ -1,69 +0,0 @@
---- Make.inc/Makefile.inc.generic.SEQ.orig 2011-05-10 12:56:32 UTC
-+++ Make.inc/Makefile.inc.generic.SEQ
-@@ -41,7 +41,7 @@
- # Metis/ParMetis and SCOTCH/PT-SCOTCH (ver 5.1 and later) orderings are now available for MUMPS.
- #
-
--#SCOTCHDIR = ${HOME}/scotch_5.1_esmumps
-+#SCOTCHDIR = @LOCALBASE@
- #ISCOTCH = -I$(SCOTCHDIR)/include
- # You have to choose one among the following two lines depending on
- # the type of analysis you want to perform. If you want to perform only
-@@ -72,7 +72,7 @@ LPORD = -L$(LPORDDIR) -lpord
- # The following variables will be used in the compilation process.
- # Please note that -Dptscotch and -Dparmetis imply -Dscotch and -Dmetis respectively.
- #ORDERINGSF = -Dscotch -Dmetis -Dpord -Dptscotch -Dparmetis
--ORDERINGSF = -Dpord
-+ORDERINGSF += -Dpord
- ORDERINGSC = $(ORDERINGSF)
-
- LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH)
-@@ -95,11 +95,11 @@ OUTF = -o
- # RM : remove files
- RM = /bin/rm -f
- # CC : C compiler
--CC = cc
-+CC = @CC@
- # FC : Fortran 90 compiler
--FC = f90
-+FC = @FC@
- # FL : Fortran linker
--FL = f90
-+FL = @FC@
- # AR : Archive object in a library
- # keep a space at the end if options have to be separated from lib name
- AR = ar vr
-@@ -112,14 +112,14 @@ RANLIB = ranlib
- # the sequential library provided by MUMPS, to use instead
- # of ScaLAPACK and MPI.
- INCSEQ = -I$(topdir)/libseq
--LIBSEQ = -Llibseq -lmpiseq
-+LIBSEQ = -L$(topdir)/libseq -lmpiseq
-
- # DEFINE HERE YOUR BLAS LIBRARY
-
--LIBBLAS = -lblas
-+LIBBLAS = -L@LOCALBASE@/lib @BLAS_LIBS@
-
- # DEFINE HERE YOUR PTHREAD LIBRARY
--LIBOTHERS = -lpthread
-+LIBOTHERS = -lpthread @GCCLIBDIR@ @FORTRANLIBS@
-
- # FORTRAN/C COMPATIBILITY:
- # Use:
-@@ -132,12 +132,12 @@ LIBOTHERS = -lpthread
- # leave empty if your Fortran compiler does not change the symbols.
- #
-
--CDEFS = -DAdd_
-+CDEFS ?= -DAdd_
-
- #COMPILER OPTIONS
-
--OPTF = -O
--OPTC = -O -I.
-+OPTF = @FCFLAGS@
-+OPTC = @CFLAGS@
- OPTL = -O
-
- #Sequential:
diff --git a/math/mumps/files/patch-Makefile b/math/mumps/files/patch-Makefile
deleted file mode 100644
index b8022b5fa8f8..000000000000
--- a/math/mumps/files/patch-Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
---- Makefile.orig 2011-05-10 12:56:32 UTC
-+++ Makefile
-@@ -51,7 +51,7 @@ zexamples: z
- (cd examples ; $(MAKE) z)
-
-
--requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT)
-+requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT) $(libdir)/libpord$(PLAT).so.@SOVER@
-
- # dummy MPI library (sequential version)
-
-@@ -65,7 +65,7 @@ $(libdir)/libpord$(PLAT)$(LIBEXT):
- $(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" OUTC=$(OUTC) LIBEXT=$(LIBEXT); \
- fi;
- if [ "$(LPORDDIR)" != "" ] ; then \
-- cp $(LPORDDIR)/libpord$(LIBEXT) $@; \
-+ cp $(LPORDDIR)/libpord* $(libdir)/; \
- fi;
-
- clean:
diff --git a/math/mumps/files/patch-PORD_lib_Makefile b/math/mumps/files/patch-PORD_lib_Makefile
index a5383845d4d8..175c98f6bf77 100644
--- a/math/mumps/files/patch-PORD_lib_Makefile
+++ b/math/mumps/files/patch-PORD_lib_Makefile
@@ -1,19 +1,20 @@
---- PORD/lib/Makefile.orig 2011-05-10 12:56:32 UTC
+--- PORD/lib/Makefile.orig 2026-07-20 09:00:43 UTC
+++ PORD/lib/Makefile
-@@ -21,9 +21,14 @@ OBJS = graph.o gbipart.o gbisect.o ddcreate.o ddbisect
+@@ -26,12 +26,14 @@ OBJS = graph.o gbipart.o gbisect.o ddcreate.o ddbisect
.c.o:
$(CC) $(COPTIONS) -c $*.c $(OUTC)$*.o
--libpord$(LIBEXT):$(OBJS)
-- $(AR)$@ $(OBJS)
-+all: libpord$(LIBEXT) libpord.so.@SOVER@
++all: libpord$(LIBEXT) libpord$(PLAT)$(LIBEXT_SHARED)
+
-+libpord$(LIBEXT): $(OBJS)
+ libpord$(PLAT)$(LIBEXT):$(OBJS)
+- $(AR)$@ $(OBJS)
+ $(AR) $@ $(OBJS)
$(RANLIB) $@
-+
-+libpord.so.@SOVER@: $(OBJS)
-+ $(CC) -shared $(OBJS) -Wl,-soname,libpord$(PLAT).so.@SOVER@ -o libpord$(PLAT).so.@SOVER@ -Wl,-z,defs
+
+-libpord$(PLAT)$(LIBEXT_SHARED):$(OBJS)
+- $(CC) -shared $(OBJS) -o libpord$(PLAT)$(LIBEXT_SHARED)
++libpord$(PLAT)$(LIBEXT_SHARED): $(OBJS)
++ $(CC) -shared $(OBJS) -Wl,-soname,libpord$(PLAT)$(LIBEXT_SHARED) -o libpord$(PLAT)$(LIBEXT_SHARED)
clean:
rm -f *.o
diff --git a/math/mumps/files/patch-examples_Makefile b/math/mumps/files/patch-examples_Makefile
new file mode 100644
index 000000000000..c0b66444a885
--- /dev/null
+++ b/math/mumps/files/patch-examples_Makefile
@@ -0,0 +1,15 @@
+--- examples/Makefile.orig 2022-12-16 15:54:16 UTC
++++ examples/Makefile
+@@ -64,9 +64,10 @@ c_example_save_restore: $$@.o
+
+ .SUFFIXES: .c .F .o
+ .F.o:
+- $(FC) $(OPTF) -I. -I$(topdir)/include -I$(topdir)/src $(INCS) -c $*.F $(OUTF)$*.o
++ $(FC) $(OPTF) -I. -I$(topdir)/include -I$(topdir)/src $(INCS) -c $*.F $(OUTF) $*.o
++
+ .c.o:
+- $(CC) $(OPTC) $(CDEFS) -I. -I$(topdir)/include -I$(topdir)/src $(INCS) -c $*.c $(OUTC)$*.o
++ $(CC) $(OPTC) $(CDEFS) -I. -I$(topdir)/include -I$(topdir)/src $(INCS) -c $*.c $(OUTC) $*.o
+
+ clean:
+ $(RM) *.o [sdcz]simpletest c_example multiple_arithmetics_example ssimpletest_save_restore dsimpletest_save_restore csimpletest_save_restore zsimpletest_save_restore c_example_save_restore
diff --git a/math/mumps/files/patch-libseq_Makefile b/math/mumps/files/patch-libseq_Makefile
index 200f519fa80e..97eabb8134b9 100644
--- a/math/mumps/files/patch-libseq_Makefile
+++ b/math/mumps/files/patch-libseq_Makefile
@@ -1,23 +1,28 @@
---- libseq/Makefile.orig 2011-05-10 12:56:39 UTC
+--- libseq/Makefile.orig 2026-07-20 09:00:46 UTC
+++ libseq/Makefile
-@@ -7,13 +7,18 @@ all: libmpiseq
+@@ -2,7 +2,7 @@
+ # This file is part of MUMPS 5.9.1, released
+ # on Mon Jul 20 09:00:43 UTC 2026
+ #
+-all: staticlibmpiseq
++all: staticlibmpiseq sharedlibmpiseq
- include ../Makefile.inc
+ .PHONY: all staticlibmpiseq sharedlibmpiseq clean
--libmpiseq: libmpiseq$(PLAT)$(LIBEXT)
-+libmpiseq: libmpiseq$(PLAT)$(LIBEXT) libmpiseq$(PLAT).so.@SOVER@
+@@ -12,14 +12,14 @@ libmpiseq$(PLAT)$(LIBEXT): mpi.o mpic.o elapse.o
+ staticlibmpiseq: libmpiseq$(PLAT)$(LIBEXT)
libmpiseq$(PLAT)$(LIBEXT): mpi.o mpic.o elapse.o
- $(AR)$@ mpi.o mpic.o elapse.o
+ $(AR) $@ mpi.o mpic.o elapse.o
$(RANLIB) $@
-+
-+libmpiseq$(PLAT).so.@SOVER@: mpi.o mpic.o elapse.o
-+ $(FC) -shared ${.ALLSRC} -Wl,-soname,libmpiseq$(PLAT).so.@SOVER@ -o libmpiseq$(PLAT).so.@SOVER@ -Wl,-z,defs
-+
- .f.o:
- $(FC) $(OPTF) -c $*.f $(OUTF)$*.o
-+
- .c.o:
- $(CC) $(OPTC) $(CDEFS) -I. -c $*.c $(OUTC)$*.o
+ sharedlibmpiseq:
+ $(MAKE) FPIC="$(FPIC_OPT)" libmpiseq$(PLAT)$(LIBEXT_SHARED)
+
+ libmpiseq$(PLAT)$(LIBEXT_SHARED): mpi.o mpic.o elapse.o
+- $(FC) $(SHARED_OPT) mpi.o mpic.o elapse.o -o libmpiseq$(PLAT)$(LIBEXT_SHARED)
++ $(FC) -shared mpi.o mpic.o elapse.o -Wl,-soname,libmpiseq$(PLAT).so.@SOVER@ -o libmpiseq$(PLAT)$(LIBEXT_SHARED)
+
+ .f.o:
+ $(FC) $(OPTF) $(FPIC) -c $*.f $(OUTF)$*.o
diff --git a/math/mumps/files/patch-src_Makefile b/math/mumps/files/patch-src_Makefile
deleted file mode 100644
index cf8c0346d351..000000000000
--- a/math/mumps/files/patch-src_Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
---- src/Makefile.orig 2011-05-10 12:56:32 UTC
-+++ src/Makefile
-@@ -20,7 +20,9 @@ z:
- include $(topdir)/Makefile.inc
-
- mumps_lib: $(libdir)/libmumps_common$(PLAT)$(LIBEXT) \
-- $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT)
-+ $(libdir)/libmumps_common$(PLAT).so.@SOVER@ \
-+ $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT) \
-+ $(libdir)/lib$(ARITH)mumps$(PLAT).so.@SOVER@
-
- OBJS_COMMON = \
- mumps_part9.o\
-@@ -53,12 +55,18 @@ OBJS = $(ARITH)mumps_part1.o\
-
-
- $(libdir)/libmumps_common$(PLAT)$(LIBEXT): $(OBJS_COMMON)
-- $(AR)$@ $?
-+ $(AR) $@ $?
- $(RANLIB) $@
-
-+$(libdir)/libmumps_common$(PLAT).so.@SOVER@: $(OBJS_COMMON)
-+ $(FC) -shared ${.ALLSRC} -Wl,-soname,libmumps_common$(PLAT).so.@SOVER@ -L$(libdir) $(LORDERINGS) $(LIBPAR) $(LIBOTHERS) -o $(libdir)/libmumps_common$(PLAT).so.@SOVER@ -Wl,-z,defs
-+
- $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT): $(OBJS)
-- $(AR)$@ $?
-+ $(AR) $@ $?
- $(RANLIB) $@
-+
-+$(libdir)/lib$(ARITH)mumps$(PLAT).so.@SOVER@: $(OBJS)
-+ $(FC) -shared ${.ALLSRC} -Wl,-soname,lib$(ARITH)mumps$(PLAT).so.@SOVER@ -L$(libdir) -lmumps_common$(PLAT) $(LORDERINGS) $(LIBPAR) -lblas $(SCALAP) $(LIBOTHERS) -o $(libdir)/lib$(ARITH)mumps$(PLAT).so.@SOVER@ -Wl,-z,defs
-
- $(ARITH)mumps_load.o: $(ARITH)mumps_comm_buffer.o \
- $(ARITH)mumps_struc_def.o
diff --git a/math/mumps/pkg-descr b/math/mumps/pkg-descr
index 3e06b7e0a5c3..4e35d7661714 100644
--- a/math/mumps/pkg-descr
+++ b/math/mumps/pkg-descr
@@ -13,4 +13,4 @@ format; elemental format.
- Partial factorization and Schur complement matrix.
- Several orderings interfaced : AMD, AMF, PORD
-Note: This is the last version released under Public Domain.
+Note: math/mumps is a pre-requisite for Code_Aster.
diff --git a/math/mumps/pkg-plist b/math/mumps/pkg-plist
index 38a59af1e7b0..5ec2f08cc844 100644
--- a/math/mumps/pkg-plist
+++ b/math/mumps/pkg-plist
@@ -1,51 +1,75 @@
-include/mumps4/cmumps_c.h
-include/mumps4/cmumps_root.h
-include/mumps4/cmumps_struc.h
-include/mumps4/dmumps_c.h
-include/mumps4/dmumps_root.h
-include/mumps4/dmumps_struc.h
-include/mumps4/mumps_c_types.h
-include/mumps4/mumps_compat.h
-include/mumps4/smumps_c.h
-include/mumps4/smumps_root.h
-include/mumps4/smumps_struc.h
-include/mumps4/zmumps_c.h
-include/mumps4/zmumps_root.h
-include/mumps4/zmumps_struc.h
-lib/libcmumps4.so
-lib/libcmumps.so.4
-lib/libdmumps4.so
-lib/libdmumps.so.4
-lib/libmpiseq4.so
-lib/libmpiseq.so.4
-lib/libmumps_common4.so
-lib/libmumps_common.so.4
-lib/libpord4.so
-lib/libpord.so.4
-lib/libsmumps4.so
-lib/libsmumps.so.4
-lib/libzmumps4.so
-lib/libzmumps.so.4
-lib/mumps4/libcmumps.a
-lib/mumps4/libdmumps.a
-lib/mumps4/libmpiseq.a
-lib/mumps4/libmumps_common.a
-lib/mumps4/libpord.a
-lib/mumps4/libsmumps.a
-lib/mumps4/libzmumps.a
+include/cmumps_c.h
+include/cmumps_struc.h
+include/dmumps_c.h
+include/dmumps_struc.h
+include/mumps_c_types.h
+include/mumps_compat.h
+include/mumps_int_def.h
+%%WITH_LIBSEQ%%include/mumps_seq/mpi.h
+include/smumps_c.h
+include/smumps_struc.h
+include/zmumps_c.h
+include/zmumps_struc.h
+lib/libcmumps.a
+lib/libcmumps.so
+lib/libcmumps.so.%%VE%%
+%%WITH_LIBSEQ%%lib/libcmumps_seq.a
+%%WITH_LIBSEQ%%lib/libcmumps_seq.so
+%%WITH_LIBSEQ%%lib/libcmumps_seq.so.%%VE%%
+lib/libdmumps.a
+lib/libdmumps.so
+lib/libdmumps.so.%%VE%%
+%%WITH_LIBSEQ%%lib/libdmumps_seq.a
+%%WITH_LIBSEQ%%lib/libdmumps_seq.so
+%%WITH_LIBSEQ%%lib/libdmumps_seq.so.%%VE%%
+%%WITH_LIBSEQ%%lib/libmpiseq.a
+%%WITH_LIBSEQ%%lib/libmpiseq.so
+%%WITH_LIBSEQ%%lib/libmpiseq.so.%%VE%%
+%%WITH_LIBSEQ%%lib/libmpiseq_seq.a
+%%WITH_LIBSEQ%%lib/libmpiseq_seq.so
+%%WITH_LIBSEQ%%lib/libmpiseq_seq.so.%%VE%%
+lib/libmumps_common.a
+lib/libmumps_common.so
+lib/libmumps_common.so.%%VE%%
+%%WITH_LIBSEQ%%lib/libmumps_common_seq.a
+%%WITH_LIBSEQ%%lib/libmumps_common_seq.so
+%%WITH_LIBSEQ%%lib/libmumps_common_seq.so.%%VE%%
+lib/libpord.a
+lib/libpord.so
+lib/libpord.so.%%VE%%
+%%WITH_LIBSEQ%%lib/libpord_seq.a
+%%WITH_LIBSEQ%%lib/libpord_seq.so
+%%WITH_LIBSEQ%%lib/libpord_seq.so.%%VE%%
+lib/libsmumps.a
+lib/libsmumps.so
+lib/libsmumps.so.%%VE%%
+%%WITH_LIBSEQ%%lib/libsmumps_seq.a
+%%WITH_LIBSEQ%%lib/libsmumps_seq.so
+%%WITH_LIBSEQ%%lib/libsmumps_seq.so.%%VE%%
+lib/libzmumps.a
+lib/libzmumps.so
+lib/libzmumps.so.%%VE%%
+%%WITH_LIBSEQ%%lib/libzmumps_seq.a
+%%WITH_LIBSEQ%%lib/libzmumps_seq.so
+%%WITH_LIBSEQ%%lib/libzmumps_seq.so.%%VE%%
%%PORTDOCS%%%%DOCSDIR%%/userguide_%%MUMPSVERSION%%.pdf
-%%PORTDOCS%%%%DOCSDIR%%/userguide_%%MUMPSVERSION%%.ps.gz
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/c_example
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/c_example.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/c_example_save_restore.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/csimpletest
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/csimpletest.F
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/csimpletest_save_restore.F
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dsimpletest
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dsimpletest.F
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dsimpletest_save_restore.F
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/input_simpletest_cmplx
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/input_simpletest_real
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/multiple_arithmetics_example.F
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ssimpletest
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ssimpletest.F
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ssimpletest_save_restore.F
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/zsimpletest
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/zsimpletest.F
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/zsimpletest_save_restore.F