Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Aug 2019 03:27:32 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r509983 - in head/math/mumps4: . files
Message-ID:  <201908270327.x7R3RWuO076770@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Tue Aug 27 03:27:32 2019
New Revision: 509983
URL: https://svnweb.freebsd.org/changeset/ports/509983

Log:
  math/mumps4: modernize the port.
  
  - Make the blas naming more conistent with blaslapack (this doesn't use
    lapack though).
  - Adopt more standard FFLAGs.
  - Turn Metis4 into an option (was broken).
  
  Approved by:	thierry (mentor)

Modified:
  head/math/mumps4/Makefile
  head/math/mumps4/files/patch-Make.inc_Makefile.inc.generic.SEQ
  head/math/mumps4/files/patch-PORD_lib_Makefile
  head/math/mumps4/files/patch-src_Makefile

Modified: head/math/mumps4/Makefile
==============================================================================
--- head/math/mumps4/Makefile	Tue Aug 27 03:24:31 2019	(r509982)
+++ head/math/mumps4/Makefile	Tue Aug 27 03:27:32 2019	(r509983)
@@ -3,7 +3,7 @@
 
 PORTNAME=	mumps4
 PORTVERSION=	4.10.0	# Please do not upgrade to 5+: use math/mumps
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	math
 MASTER_SITES=	http://mumps.enseeiht.fr/		\
 		http://graal.ens-lyon.fr/MUMPS/		\
@@ -17,60 +17,58 @@ COMMENT=	MUltifrontal Massively Parallel sparse direct
 LICENSE=	PD
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-#-----------------------------------------------------------------------
-
-# WARNING: Non-serviceable parts inside, can break other ports
-# You may define these options/knobs:
-#
-# FFLAGS: Fortran compiler flags for gfortran
-# WITH_OPTIMIZED_FLAGS:Try to use agressive (non-CPU) FFLAGS
-# BLAS_LIBS: specify other version of BLAS
-# WITH_ATLAS: Use ATLAS instead of the regular BLAS
-# WITH_METIS: Add METIS ordering
-#-----------------------------------------------------------------------
-
 USES=		fortran
 
 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
 
-.if defined(WITH_OPTIMIZED_FLAGS)
-FFLAGS+=	-O3 -ffast-math
-.endif
+CONFLICTS+=	mumps-mpich-4*
 
-.ifdef WITH_METIS
-BUILD_DEPENDS+=	${LOCALBASE}/bin/oemetis:math/metis4
-MAKE_ENV+=	ORDERINGSF=-Dmetis
-.endif
+OPTIONS_DEFINE=	METIS4 DOCS EXAMPLES
 
+METIS4_DESCR=	Use math/metis4 for Ordering
+
+METIS4_LIB_DEPENDS+=	libmetis.so.1:math/metis4
+
+LIBS+=		mpiseq
+
 PLIST_SUB+=	MUMPSVERSION=${PORTVERSION} MUMPSV=${VEM}
 
-OPTIONS_DEFINE=	DOCS EXAMPLES
+#-----------------------------------------------------------------------
+# 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
+#-----------------------------------------------------------------------
 
 .include <bsd.port.pre.mk>
 
+.if ${PORT_OPTIONS:MMETIS4}
+MAKE_ENV+=	ORDERINGSF=-Dmetis
+.endif
+
+# 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
-BLAS_LIBS=	-lf77blas
-LAPACK_LIBS=	-lalapack -lcblas
+BLASLIB=	-lf77blas
+#LAPACKLIB=	-lalapack -lcblas
 .else
 LIB_DEPENDS+=	libblas.so:math/blas
-BLAS_LIBS=	-lblas
-LAPACK_LIBS=	-llapack
+BLASLIB=	-lblas
+#LAPACKLIB=	-llapack
 .endif
 
-CONFLICTS+=	mumps-mpich-4*
-
-LIBS+=		mpiseq
-
 pre-configure:
 	${INSTALL_DATA} ${WRKSRC}/Make.inc/Makefile.inc.generic.SEQ \
 		${WRKSRC}/Makefile.inc
@@ -85,11 +83,11 @@ pre-build:
 	s+@SOVER@+${VEM}+g; \
 	s+@GCCLIBDIR@+${GCCLIBDIR}+g; \
 	s+@FORTRANLIBS@+${FORTRANLIBS}+g; \
-	s+@BLAS_LIBS@+${BLAS_LIBS}+ ; \
+	s+@BLAS_LIBS@+${BLASLIB}+ ; \
 	s+@LOCALBASE@+${LOCALBASE}+g;' \
 		${WRKSRC}/${MF}
 .endfor
-.ifdef WITH_METIS
+.if ${PORT_OPTIONS:MMETIS4}
 	${REINPLACE_CMD} -e 's+#LMETIS+LMETIS+' ${WRKSRC}/Makefile.inc
 .endif
 

Modified: head/math/mumps4/files/patch-Make.inc_Makefile.inc.generic.SEQ
==============================================================================
--- head/math/mumps4/files/patch-Make.inc_Makefile.inc.generic.SEQ	Tue Aug 27 03:24:31 2019	(r509982)
+++ head/math/mumps4/files/patch-Make.inc_Makefile.inc.generic.SEQ	Tue Aug 27 03:27:32 2019	(r509983)
@@ -14,11 +14,16 @@
  LPORD    = -L$(LPORDDIR) -lpord
  
 -#LMETISDIR = /local/metis/
-+#LMETISDIR = @LOCALBASE@/lib
++LMETISDIR = @LOCALBASE@/lib
  #IMETIS    = # Should be provided if you use parmetis
  
  # You have to choose one among the following two lines depending on
-@@ -72,7 +72,7 @@ LPORD    = -L$(LPORDDIR) -lpord
+@@ -67,12 +67,11 @@ LPORD    = -L$(LPORDDIR) -lpord
+ # line (remember to add -Dparmetis in the ORDERINGSF variable below)
+ 
+ #LMETIS    = -L$(LMETISDIR) -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.
  #ORDERINGSF = -Dscotch -Dmetis -Dpord -Dptscotch -Dparmetis
@@ -27,7 +32,7 @@
  ORDERINGSC  = $(ORDERINGSF)
  
  LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH)
-@@ -95,11 +95,11 @@ OUTF    = -o 
+@@ -95,11 +94,11 @@ OUTF    = -o 
  # RM : remove files
  RM      = /bin/rm -f
  # CC : C compiler
@@ -42,7 +47,7 @@
  # 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
+@@ -112,14 +111,14 @@ RANLIB  = ranlib
  # the sequential library provided by MUMPS, to use instead
  # of ScaLAPACK and MPI.
  INCSEQ  = -I$(topdir)/libseq
@@ -60,7 +65,7 @@
  
  # FORTRAN/C COMPATIBILITY:
  #  Use:
-@@ -132,12 +132,12 @@ LIBOTHERS = -lpthread
+@@ -132,12 +131,12 @@ LIBOTHERS = -lpthread
  #     leave empty if your Fortran compiler does not change the symbols.
  #
  

Modified: head/math/mumps4/files/patch-PORD_lib_Makefile
==============================================================================
--- head/math/mumps4/files/patch-PORD_lib_Makefile	Tue Aug 27 03:24:31 2019	(r509982)
+++ head/math/mumps4/files/patch-PORD_lib_Makefile	Tue Aug 27 03:27:32 2019	(r509983)
@@ -1,6 +1,6 @@
 --- PORD/lib/Makefile.orig	2011-05-10 12:56:32 UTC
 +++ PORD/lib/Makefile
-@@ -21,10 +21,15 @@ OBJS = graph.o gbipart.o gbisect.o ddcre
+@@ -21,9 +21,14 @@ OBJS = graph.o gbipart.o gbisect.o ddcreate.o ddbisect
  .c.o:
  	$(CC) $(COPTIONS) -c $*.c $(OUTC)$*.o
  
@@ -11,10 +11,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@ -Wl,-z,defs
-+
+ 
  clean:
  	rm -f *.o
- 

Modified: head/math/mumps4/files/patch-src_Makefile
==============================================================================
--- head/math/mumps4/files/patch-src_Makefile	Tue Aug 27 03:24:31 2019	(r509982)
+++ head/math/mumps4/files/patch-src_Makefile	Tue Aug 27 03:27:32 2019	(r509983)
@@ -11,7 +11,7 @@
  
  OBJS_COMMON = \
          mumps_part9.o\
-@@ -53,13 +55,19 @@ OBJS = 	$(ARITH)mumps_part1.o\
+@@ -53,12 +55,18 @@ OBJS = 	$(ARITH)mumps_part1.o\
  
  
  $(libdir)/libmumps_common$(PLAT)$(LIBEXT):	$(OBJS_COMMON)
@@ -26,10 +26,9 @@
 -	$(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
- 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908270327.x7R3RWuO076770>