Index: head/math/mumps/Makefile =================================================================== --- head/math/mumps/Makefile (revision 538716) +++ head/math/mumps/Makefile (revision 538717) @@ -1,132 +1,122 @@ # Created by: Pedro Giffuni # $FreeBSD$ PORTNAME= mumps DISTVERSION= 5.1.2-aster6 +PORTREVISION= 1 CATEGORIES= math PKGNAMESUFFIX= -edf MAINTAINER= thierry@FreeBSD.org COMMENT= MUltifrontal Massively Parallel sparse direct Solver for Code_Aster LICENSE= CeCILL_C 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 VEM= ${PORTVERSION:R:R:R} 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 .include .include "${.CURDIR}/../../french/aster/bsd.aster.mk" .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 ; \ 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@+${BLAS_LIBS}+ ; \ - s+@LAPACK_LIBS@+${LAPACK_LIBS}+ ; \ + s+@BLAS_LIBS@+${BLASLIB}+ ; \ + s+@LAPACK_LIBS@+${LAPACKLIB}+ ; \ s+@LOCALBASE@+${LOCALBASE}+g;' \ ${WRKSRC}/${MF} .endfor 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 ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/doc/userguide_${MUMPSVERSION}.pdf ${STAGEDIR}${DOCSDIR} ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} . for ex in Makefile README *.c *.F input_simpletest_* ${INSTALL_DATA} ${WRKSRC}/examples/${ex} ${STAGEDIR}${EXAMPLESDIR} . endfor . for ex in c_example *simpletest ${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) @${ECHO_CMD} "MPD_SECRETWORD=change_on_install" > ${HOME}/.mpd.conf ${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 ; \ ${LOCALBASE}/bin/mpirun -np 2 ./csimpletest < input_simpletest_cmplx ; \ ${LOCALBASE}/bin/mpirun -np 2 ./zsimpletest < input_simpletest_cmplx ; \ ${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 ; \ ./dsimpletest < input_simpletest_real ; \ ./csimpletest < input_simpletest_cmplx ; \ ./zsimpletest < input_simpletest_cmplx ; \ ${ECHO_MSG} "The solution should be (1,2,3,4,5)" ; \ ./c_example ; \ ${ECHO_MSG} "The solution should be (1,2)") .endif .include Index: head/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.PAR =================================================================== --- head/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.PAR (revision 538716) +++ head/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.PAR (revision 538717) @@ -1,89 +1,89 @@ ---- 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 @@ # #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,16 +28,16 @@ # 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$(SCOTCHDIR)/lib -lptesmumps -lptscotch -lptscotcherr +#LSCOTCH = -L@LOCALBASE@/lib -lesmumps -lscotch -lscotcherr +LSCOTCH = -L@LOCALBASE@/lib -lptesmumps -lptscotch -lptscotcherr LPORDDIR = $(topdir)/PORD/lib/ IPORD = -I$(topdir)/PORD/include/ LPORD = -L$(LPORDDIR) -lpord -#LMETISDIR = /opt/metis-5.1.0/build/Linux-x86_64/libmetis -#IMETIS = /opt/metis-5.1.0/include +LMETISDIR = @LOCALBASE@/lib/parmetis +IMETIS = @LOCALBASE@/include/parmetis # 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 @@ -46,7 +46,7 @@ LPORD = -L$(LPORDDIR) -lpord # line (remember to add -Dparmetis in the ORDERINGSF variable below) #LMETIS = -L$(LMETISDIR) -lmetis -#LMETIS = -L$(LMETISDIR) -lparmetis -lmetis +LMETIS = -L$(LMETISDIR) -lparmetis -lmetis # 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 -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 -+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 +LIBPAR = -L@LOCALBASE@/lib -lfmpich -lmpich -lmpl $(SCALAP) INCSEQ = -I$(topdir)/libseq LIBSEQ = $(LAPACK) -L$(topdir)/libseq -lmpiseq -LIBBLAS = -lblas -LIBOTHERS = -lpthread +LIBBLAS = -L@LOCALBASE@/lib @LAPACK_LIBS@ @BLAS_LIBS@ +LIBOTHERS = -lpthread @GCCLIBDIR@ @FORTRANLIBS@ #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 +OPTF = @FCFLAGS@ #-fopenmp OPTL = -O #-fopenmp -OPTC = -O -I. #-fopenmp +OPTC = @CFLAGS@ -I. #-fopenmp #End Optimized options - INCS = $(INCPAR) - LIBS = $(LIBPAR) + + Index: head/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.SEQ =================================================================== --- head/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.SEQ (revision 538716) +++ head/math/mumps/files/patch-Make.inc_Makefile.FREEBSD10.SEQ (revision 538717) @@ -1,73 +1,73 @@ ---- 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 @@ # #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 @@ -36,8 +36,8 @@ LPORDDIR = $(topdir)/PORD/lib/ IPORD = -I$(topdir)/PORD/include/ LPORD = -L$(LPORDDIR) -lpord -#LMETISDIR = /opt/metis-5.1.0/build/Linux-x86_64/libmetis -#IMETIS = /opt/metis-5.1.0/include +LMETISDIR = @LOCALBASE@/lib +IMETIS = @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 # 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. -@@ -66,14 +66,14 @@ IORDERINGSC = $(IMETIS) $(IPORD) $(ISCOT +@@ -66,14 +66,14 @@ IORDERINGSC = $(IMETIS) $(IPORD) $(ISCOTCH) PLAT = LIBEXT = .a -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 @@ -81,16 +81,16 @@ LAPACK = -llapack INCSEQ = -I$(topdir)/libseq LIBSEQ = $(LAPACK) -L$(topdir)/libseq -lmpiseq LIBBLAS = -lblas -LIBOTHERS = -lpthread +LIBOTHERS = -lpthread @GCCLIBDIR@ @FORTRANLIBS@ #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 +OPTF = @FCFLAGS@ #-fopenmp OPTL = -O #-fopenmp -OPTC = -O -I. #-fopenmp +OPTC = @CFLAGS@ -I. #-fopenmp #End Optimized options - INCS = $(INCSEQ) - LIBS = $(LIBSEQ) + + Index: head/math/mumps/files/patch-PORD_lib_Makefile =================================================================== --- head/math/mumps/files/patch-PORD_lib_Makefile (revision 538716) +++ head/math/mumps/files/patch-PORD_lib_Makefile (revision 538717) @@ -1,23 +1,22 @@ ---- 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: - $(CC) $(COPTIONS) -c $*.c $(OUTC)$*.o + $(CC) $(COPTIONS) -c $*.c $(OUTC) $*.o -libpord$(LIBEXT):$(OBJS) - $(AR)$@ $(OBJS) +all: libpord$(LIBEXT) libpord.so.@SOVER@ + +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 -