aboutsummaryrefslogtreecommitdiffstats
path: root/math/mumps
diff options
context:
space:
mode:
authormaho <maho@FreeBSD.org>2007-03-15 14:04:09 +0800
committermaho <maho@FreeBSD.org>2007-03-15 14:04:09 +0800
commit804c9ffbbdcbca881466fe29ae0dd780d4443cdb (patch)
tree9d99ff0b1e67c76fb48b7e4e83b574ed83a099b4 /math/mumps
parent4eef145c33d568228b9ef432eed3930cc27a2d26 (diff)
downloadfreebsd-ports-gnome-804c9ffbbdcbca881466fe29ae0dd780d4443cdb.tar.gz
freebsd-ports-gnome-804c9ffbbdcbca881466fe29ae0dd780d4443cdb.tar.zst
freebsd-ports-gnome-804c9ffbbdcbca881466fe29ae0dd780d4443cdb.zip
1. A build fix.
2. Now recognize ATLAS/BLAS automatically. 3. Do not activate -mpich for default.
Diffstat (limited to 'math/mumps')
-rw-r--r--math/mumps/Makefile27
-rw-r--r--math/mumps/files/patch-Make.inc+Makefile.inc.generic2
-rw-r--r--math/mumps/files/patch-Make.inc+Makefile.inc.generic.SEQ4
3 files changed, 18 insertions, 15 deletions
diff --git a/math/mumps/Makefile b/math/mumps/Makefile
index 9163becbd263..0a43069db021 100644
--- a/math/mumps/Makefile
+++ b/math/mumps/Makefile
@@ -41,34 +41,34 @@ GCCLIBDIR= -L`${CAT} ${WRKSRC}/LIBDIR` -L`${CAT} ${WRKSRC}/LIBDIR`/../../..
FFLAGS+= -O3 -ffast-math
.endif
+.ifdef WITH_METIS
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libmetis.a:${PORTSDIR}/math/metis
+MAKE_ENV+= ORDERINGSF=-Dmetis
+.endif
+
+PLIST_SUB+= MUMPSVERSION=${PORTVERSION}
+
+.include <bsd.port.pre.mk>
+
.if exists(${LOCALBASE}/lib/libatlas_r.so) && !defined(WITH_BLAS)
WITH_ATLAS= yes
.endif
.if defined(WITH_ATLAS)
LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas
BLAS_LIBS= -lf77blas -latlas
+LAPACK_LIBS= -lalapack -lcblas
.else
LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas
BLAS_LIBS= -lblas
+LAPACK_LIBS= -llapack
.endif
-.ifdef WITH_METIS
-BUILD_DEPENDS+= ${LOCALBASE}/lib/libmetis.a:${PORTSDIR}/math/metis
-MAKE_ENV+= ORDERINGSF=-Dmetis
-.endif
-
-PLIST_SUB+= MUMPSVERSION=${PORTVERSION}
-
-.include <bsd.port.pre.mk>
-
-.if exists(${LOCALBASE}/mpich2/bin/mpicc) && !defined(WITHOUT_MPI)
-WITH_MPI= yes
-.endif
.ifdef WITH_MPI
PKGNAMESUFFIX+= -mpich
BUILD_DEPENDS+= ${LOCALBASE}/mpich2/include/mpif.h:${PORTSDIR}/net/mpich2 \
${LOCALBASE}/lib/libblacs.a:${PORTSDIR}/math/blacs \
${LOCALBASE}/lib/libscalapack.a:${PORTSDIR}/math/scalapack
+LIB_DEPENDS+= lapack:${PORTSDIR}/math/lapack
# Note: -l?mumps still requires to be linked with -lblacs + -lscalapack
RUN_DEPENDS+= ${LOCALBASE}/mpich2/bin/mpirun:${PORTSDIR}/net/mpich2 \
${LOCALBASE}/lib/libblacs.a:${PORTSDIR}/math/blacs \
@@ -104,6 +104,9 @@ pre-build:
s+@BLAS_LIBS@+${BLAS_LIBS}+ ; \
s+@LOCALBASE@+${LOCALBASE}+g;' \
${WRKSRC}/Makefile.inc
+.ifdef WITH_MPI
+ @${REINPLACE_CMD} -e 's+@LAPACK_LIBS@+${LAPACK_LIBS}+g;' ${WRKSRC}/Makefile.inc
+.endif
.ifdef WITH_METIS
@${REINPLACE_CMD} -e 's+#LMETIS+LMETIS+' ${WRKSRC}/Makefile.inc
.endif
diff --git a/math/mumps/files/patch-Make.inc+Makefile.inc.generic b/math/mumps/files/patch-Make.inc+Makefile.inc.generic
index ea086f94f75d..30cfaa21b5f3 100644
--- a/math/mumps/files/patch-Make.inc+Makefile.inc.generic
+++ b/math/mumps/files/patch-Make.inc+Makefile.inc.generic
@@ -61,7 +61,7 @@
# DEFINE HERE YOUR BLAS LIBRARY
-LIBBLAS = -lblas
-+LIBBLAS = -L@LOCALBASE@/lib @BLAS_LIBS@
++LIBBLAS = -L@LOCALBASE@/lib @LAPACK_LIBS@ @BLAS_LIBS@
# DEFINE YOUR PTHREAD LIBRARY
-LIBOTHERS = -lpthread
diff --git a/math/mumps/files/patch-Make.inc+Makefile.inc.generic.SEQ b/math/mumps/files/patch-Make.inc+Makefile.inc.generic.SEQ
index fd894fd4def5..1a712c8e7898 100644
--- a/math/mumps/files/patch-Make.inc+Makefile.inc.generic.SEQ
+++ b/math/mumps/files/patch-Make.inc+Makefile.inc.generic.SEQ
@@ -44,11 +44,11 @@
# DEFINE HERE YOUR BLAS LIBRARY
-LIBBLAS = -lblas
-+LIBBLAS = -L@LOCALBASE@/lib @BLAS_LIBS@
++LIBBLAS = -L@LOCALBASE@/lib @BLAS_LIBS@
# DEFINE HERE YOUR PTHREAD LIBRARY
-LIBOTHERS = -lpthread
-+LIBOTHERS = @PTHREAD_LIBS@ -lg2c
++LIBOTHERS = @PTHREAD_LIBS@ @FORTRANLIBS@
# FORTRAN/C COMPATIBILITY:
# Use: