Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 May 2006 21:40:44 GMT
From:      "Pedro F. Giffuni" <giffunip@asme.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/98109: Cleanup the math/elmer-mathlibs port
Message-ID:  <200605292140.k4TLeigK050661@www.freebsd.org>
Resent-Message-ID: <200605292150.k4TLoCtR084621@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         98109
>Category:       ports
>Synopsis:       Cleanup the math/elmer-mathlibs port
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 29 21:50:12 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Pedro F. Giffuni
>Release:        6.1-Release (amd64)
>Organization:
>Environment:
FreeBSD etoile.cable.net.co 6.1-RELEASE FreeBSD 6.1-RELEASE #1: Fri May 12 00:18:58 COT 2006     root@etoile.cable.net.co:/usr/src/sys/amd64/compile/DIMENSION  amd64

>Description:
elmer-mathlibs is a port of blas, lapack and arpack built with F90 (gfortran). It is actually an interim port provided because libraries generated with g77 are not  ABI compatible the rest of Elmer.
This updates adds preliminary support for a WITH_MPI knob and fixes a minor issue by properly sending FFLAGS to configure. There should be no functional change.
>How-To-Repeat:

>Fix:
diff -ruN elmer-mathlibs.orig/Makefile elmer-mathlibs/Makefile
--- elmer-mathlibs.orig/Makefile	Mon May 29 12:27:32 2006
+++ elmer-mathlibs/Makefile	Mon May 29 16:38:42 2006
@@ -15,25 +15,35 @@
 COMMENT=	Math libraries build with F90 for used in ELMER FEM
 
 BUILD_DEPENDS=	${FC}:${PORTSDIR}/lang/gfortran
+.ifdef WITH_MPI
+BUILD_DEPENDS+= ${LOCALBASE}/mpich/include/mpif.h:${PORTSDIR}/net/mpich
+.endif
 
-CONFLICTS=	atlas-[0-9]* blas-[0-9]* arpack-[0-9]* lapack-[0-9]* scalapack-[0-9]*
+CONFLICTS=	atlas-[0-9]* blas-[0-9]* arpack-[0-9]* lapack-[0-9]*
+.ifdef WITH_MPI
+CONFLICTS+=	scalapack-[0-9]*
+.endif
 
 USE_GCC=	4.1+
 WITH_FORTRAN=	yes
 FC=	${LOCALBASE}/bin/gfortran41
 F77=	${FC}
 
-CONFIGURE_ENV+=	F77=${FC}
+.ifdef WITH_OPTIMIZED_FLAGS
+FFLAGS+=	-O3 -ffast-math -funroll-loops
+.endif
 
+CONFIGURE_ENV+=	F77=${FC} FFLAGS="${FFLAGS}"
 GNU_CONFIGURE=	yes
+.ifdef WITH_MPI
+CONFIGURE_ARGS+= --with-mpi=yes --with-mpi-dir=${LOCALBASE}/mpich
+.endif
+
 ALL_TARGET=
 
 PLIST_FILES=	lib/libarpack.a lib/libblas.a lib/liblapack.a
-
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
-FFLAGS+=	-fPIC
+.ifdef WITH_MPI
+PLIST_FILES+=	lib/libparpack.a
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

>Release-Note:
>Audit-Trail:
>Unformatted:



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