1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

1. A build fix.

2. Now recognize ATLAS/BLAS automatically.
3. Do not activate -mpich for default.
This commit is contained in:
Maho Nakata 2007-03-15 06:04:09 +00:00
parent d7d85038af
commit 71954f402b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=187425
3 changed files with 19 additions and 16 deletions

View File

@ -41,17 +41,6 @@ GCCLIBDIR= -L`${CAT} ${WRKSRC}/LIBDIR` -L`${CAT} ${WRKSRC}/LIBDIR`/../../..
FFLAGS+= -O3 -ffast-math
.endif
.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
.else
LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas
BLAS_LIBS= -lblas
.endif
.ifdef WITH_METIS
BUILD_DEPENDS+= ${LOCALBASE}/lib/libmetis.a:${PORTSDIR}/math/metis
MAKE_ENV+= ORDERINGSF=-Dmetis
@ -61,14 +50,25 @@ PLIST_SUB+= MUMPSVERSION=${PORTVERSION}
.include <bsd.port.pre.mk>
.if exists(${LOCALBASE}/mpich2/bin/mpicc) && !defined(WITHOUT_MPI)
WITH_MPI= yes
.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_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

View File

@ -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

View File

@ -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: