aboutsummaryrefslogtreecommitdiff
path: root/math/mumps
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2020-06-14 09:14:21 +0000
committerThierry Thomas <thierry@FreeBSD.org>2020-06-14 09:14:21 +0000
commitf37ee436a9d3d0c095e433ec40dfffbd8b9d9430 (patch)
treed0f9ccaf57e021bbf990cddf887bfb2c93e096ff /math/mumps
parentd7625a0297e48549f1ec398409a18aeaf7fa2a3b (diff)
downloadports-f37ee436a9d3d0c095e433ec40dfffbd8b9d9430.tar.gz
ports-f37ee436a9d3d0c095e433ec40dfffbd8b9d9430.zip
Switch from mpich2 to mpich.
Notes
Notes: svn path=/head/; revision=538717
Diffstat (limited to 'math/mumps')
-rw-r--r--math/mumps/Makefile58
-rw-r--r--math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.PAR10
-rw-r--r--math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.SEQ8
-rw-r--r--math/mumps/files/patch-PORD_lib_Makefile9
4 files changed, 37 insertions, 48 deletions
diff --git a/math/mumps/Makefile b/math/mumps/Makefile
index 6887f624d0d8..425ce7773f50 100644
--- a/math/mumps/Makefile
+++ b/math/mumps/Makefile
@@ -3,6 +3,7 @@
PORTNAME= mumps
DISTVERSION= 5.1.2-aster6
+PORTREVISION= 1
CATEGORIES= math
PKGNAMESUFFIX= -edf
@@ -14,15 +15,11 @@ LICENSE_NAME= CeCILL-C
LICENSE_FILE= ${WRKSRC}/LICENSE
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
-LIB_DEPENDS= libblas.so:math/blas \
- liblapack.so:math/lapack \
- libmetis.so:math/metis
+LIB_DEPENDS= libmetis.so:math/metis
-USES= fortran
+USES= blaslapack fortran
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}
-BLAS_LIBS= -lblas
-LAPACK_LIBS= -llapack
FORTRANLIBS= -lgfortran
GCCLIBDIR= ${LDFLAGS}
USE_LDCONFIG= yes
@@ -31,7 +28,16 @@ MUMPSVERSION= ${PORTVERSION:R}
LIBS= cmumps dmumps mumps_common pord smumps zmumps
PLIST_SUB= VE=${VEM} MUMPSVERSION=${MUMPSVERSION}
-OPTIONS_DEFINE= DOCS EXAMPLES
+OPTIONS_DEFINE= DOCS EXAMPLES MPI
+
+MPI_BUILD_DEPENDS_OFF= ${LOCALBASE}/lib/libscotch.a:cad/scotch
+MPI_BUILD_DEPENDS= ${LOCALBASE}/lib/libptscotch.a:cad/scotch
+MPI_LIB_DEPENDS= libmpi.so:net/mpich \
+ libparmetis.so:math/parmetis \
+ libscalapack.so:math/scalapack
+MPI_PLIST_SUB= WITH_LIBSEQ="@comment "
+MPI_PLIST_SUB_OFF= WITH_LIBSEQ=""
+MPI_LIBS_OFF= mpiseq
MAKE_JOBS_UNSAFE=yes
@@ -40,31 +46,17 @@ MAKE_JOBS_UNSAFE=yes
.ifdef WITH_MPI
PKGNAMESUFFIX+= -mpich
-BUILD_DEPENDS+= ${LOCALBASE}/include/mpif.h:net/mpich2 \
- ${LOCALBASE}/lib/libblacs.a:math/blacs \
- ${LOCALBASE}/lib/libptscotch.a:cad/scotch \
- ${LOCALBASE}/lib/libscalapack.a:math/scalapack \
- ${LOCALBASE}/lib/parmetis/libmetis.a:math/parmetis
-LIB_DEPENDS+= liblapack.so:math/lapack
-# Note: -l?mumps still requires to be linked with -lblacs + -lscalapack
-RUN_DEPENDS+= ${LOCALBASE}/bin/mpirun:net/mpich2 \
- ${LOCALBASE}/lib/libblacs.a:math/blacs \
- ${LOCALBASE}/lib/libscalapack.a:math/scalapack
-PLIST_SUB+= WITH_LIBSEQ="@comment "
-.else
-BUILD_DEPENDS+= ${LOCALBASE}/lib/libscotch.a:cad/scotch
-PLIST_SUB+= WITH_LIBSEQ=""
-LIBS+= mpiseq
.endif
-pre-configure:
-.ifdef WITH_MPI
+post-patch-MPI-on:
${INSTALL_DATA} ${WRKSRC}/Make.inc/Makefile.FREEBSD10.PAR \
${WRKSRC}/Makefile.inc
-.else
+
+post-patch-MPI-off:
${INSTALL_DATA} ${WRKSRC}/Make.inc/Makefile.FREEBSD10.SEQ \
${WRKSRC}/Makefile.inc
-.endif
+
+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 ; \
@@ -74,8 +66,8 @@ pre-configure:
s+@SOVER@+${VEM}+g; \
s+@GCCLIBDIR@+${GCCLIBDIR}+g; \
s+@FORTRANLIBS@+${FORTRANLIBS}+g; \
- s+@BLAS_LIBS@+${BLAS_LIBS}+ ; \
- s+@LAPACK_LIBS@+${LAPACK_LIBS}+ ; \
+ s+@BLAS_LIBS@+${BLASLIB}+ ; \
+ s+@LAPACK_LIBS@+${LAPACKLIB}+ ; \
s+@LOCALBASE@+${LOCALBASE}+g;' \
${WRKSRC}/${MF}
.endfor
@@ -84,10 +76,6 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/include/*.h ${STAGEDIR}${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/lib/lib*.a ${STAGEDIR}${PREFIX}/lib
${INSTALL_LIB} ${WRKSRC}/lib/lib*.so.${VEM} ${STAGEDIR}${PREFIX}/lib
-.ifndef WITH_MPI
- ${INSTALL_DATA} ${WRKSRC}/libseq/libmpiseq.a ${STAGEDIR}${PREFIX}/lib
- ${INSTALL_LIB} ${WRKSRC}/libseq/libmpiseq*.so.${VEM} ${STAGEDIR}${PREFIX}/lib
-.endif
.for lib in ${LIBS}
(cd ${STAGEDIR}${PREFIX}/lib && ${LN} -sf lib${lib}.so.${VEM} ${STAGEDIR}${PREFIX}/lib/lib${lib}.so)
. endfor
@@ -101,6 +89,10 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/examples/${ex} ${STAGEDIR}${EXAMPLESDIR}
. endfor
+do-install-MPI-off:
+ ${INSTALL_DATA} ${WRKSRC}/libseq/libmpiseq.a ${STAGEDIR}${PREFIX}/lib
+ ${INSTALL_LIB} ${WRKSRC}/libseq/libmpiseq*.so.${VEM} ${STAGEDIR}${PREFIX}/lib
+
regression-test: install
.if defined (WITH_MPI) && defined(MAINTAINER_MODE)
. if !exists(${HOME}/.mpd.conf)
@@ -108,7 +100,6 @@ regression-test: install
${CHMOD} go-r ${HOME}/.mpd.conf
@${ECHO_MSG} "${HOME}/.mpd.conf has been generated - please change the secret word!"
. endif
- ${LOCALBASE}/bin/mpd &
(cd ${WRKSRC}/examples && \
${LOCALBASE}/bin/mpirun -np 2 ./ssimpletest < input_simpletest_real ; \
${LOCALBASE}/bin/mpirun -np 2 ./dsimpletest < input_simpletest_real ; \
@@ -117,7 +108,6 @@ regression-test: install
${ECHO_MSG} "The solution should be (1,2,3,4,5)" ; \
${LOCALBASE}/bin/mpirun -np 3 ./c_example ; \
${ECHO_MSG} "The solution should be (1,2)")
- ${LOCALBASE}/bin/mpdallexit
.else
(cd ${WRKSRC}/examples && \
./ssimpletest < input_simpletest_real ; \
diff --git a/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.PAR b/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.PAR
index a42435038545..d846883600fc 100644
--- a/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.PAR
+++ b/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.PAR
@@ -1,4 +1,4 @@
---- Make.inc/Makefile.FREEBSD10.PAR.orig 2017-08-08 07:32:58 UTC
+--- Make.inc/Makefile.FREEBSD10.PAR.orig 2019-04-03 14:40:12 UTC
+++ Make.inc/Makefile.FREEBSD10.PAR
@@ -20,7 +20,7 @@
#
@@ -39,7 +39,7 @@
# The following variables will be used in the compilation process.
# Please note that -Dptscotch and -Dparmetis imply -Dscotch and -Dmetis respectively.
-@@ -66,34 +66,34 @@ IORDERINGSC = $(IMETIS) $(IPORD) $(ISCOT
+@@ -66,34 +66,34 @@ IORDERINGSC = $(IMETIS) $(IPORD) $(ISCOTCH)
PLAT =
LIBEXT = .a
@@ -60,7 +60,7 @@
RANLIB = ranlib
LAPACK = -llapack
-SCALAP = -lscalapack -lblacs
-+SCALAP = -L@LOCALBASE@/lib -lblacs -lblacsc -lblacsf77 -lscalapack
++SCALAP = -L@LOCALBASE@/lib -lscalapack -lexecinfo
INCPAR = -I/usr/local/include
-LIBPAR = $(SCALAP) $(LAPACK) -L/usr/local/lib -lmpi
@@ -85,5 +85,5 @@
-OPTC = -O -I. #-fopenmp
+OPTC = @CFLAGS@ -I. #-fopenmp
#End Optimized options
- INCS = $(INCPAR)
- LIBS = $(LIBPAR)
+
+
diff --git a/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.SEQ b/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.SEQ
index a1ac8868dd67..64027c40df1c 100644
--- a/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.SEQ
+++ b/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.SEQ
@@ -1,4 +1,4 @@
---- Make.inc/Makefile.FREEBSD10.SEQ.orig 2017-08-08 07:32:58 UTC
+--- Make.inc/Makefile.FREEBSD10.SEQ.orig 2019-04-03 14:40:12 UTC
+++ Make.inc/Makefile.FREEBSD10.SEQ
@@ -20,7 +20,7 @@
#
@@ -29,7 +29,7 @@
#LMETIS = -L$(LMETISDIR) -lparmetis -lmetis
# The following variables will be used in the compilation process.
-@@ -66,14 +66,14 @@ IORDERINGSC = $(IMETIS) $(IPORD) $(ISCOT
+@@ -66,14 +66,14 @@ IORDERINGSC = $(IMETIS) $(IPORD) $(ISCOTCH)
PLAT =
LIBEXT = .a
@@ -69,5 +69,5 @@
-OPTC = -O -I. #-fopenmp
+OPTC = @CFLAGS@ -I. #-fopenmp
#End Optimized options
- INCS = $(INCSEQ)
- LIBS = $(LIBSEQ)
+
+
diff --git a/math/mumps/files/patch-PORD_lib_Makefile b/math/mumps/files/patch-PORD_lib_Makefile
index b13ad0eea785..8190a1cf3ecd 100644
--- a/math/mumps/files/patch-PORD_lib_Makefile
+++ b/math/mumps/files/patch-PORD_lib_Makefile
@@ -1,6 +1,6 @@
---- PORD/lib/Makefile.orig 2017-08-08 07:32:58 UTC
+--- PORD/lib/Makefile.orig 2019-04-03 14:40:12 UTC
+++ PORD/lib/Makefile
-@@ -22,12 +22,17 @@ OBJS = graph.o gbipart.o gbisect.o ddcre
+@@ -22,11 +22,16 @@ OBJS = graph.o gbipart.o gbisect.o ddcreate.o ddbisect
# OUTC = -o
.c.o:
@@ -14,10 +14,9 @@
+libpord$(LIBEXT): $(OBJS)
+ $(AR) $@ $(OBJS)
$(RANLIB) $@
-
++
+libpord.so.@SOVER@: $(OBJS)
+ $(CC) -shared $(OBJS) -Wl,-soname,libpord$(PLAT).so.@SOVER@ -o libpord$(PLAT).so.@SOVER@
-+
+
clean:
rm -f *.o
-