1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-16 07:58:04 +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 FFLAGS+= -O3 -ffast-math
.endif .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 .ifdef WITH_METIS
BUILD_DEPENDS+= ${LOCALBASE}/lib/libmetis.a:${PORTSDIR}/math/metis BUILD_DEPENDS+= ${LOCALBASE}/lib/libmetis.a:${PORTSDIR}/math/metis
MAKE_ENV+= ORDERINGSF=-Dmetis MAKE_ENV+= ORDERINGSF=-Dmetis
@ -61,14 +50,25 @@ PLIST_SUB+= MUMPSVERSION=${PORTVERSION}
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
.if exists(${LOCALBASE}/mpich2/bin/mpicc) && !defined(WITHOUT_MPI) .if exists(${LOCALBASE}/lib/libatlas_r.so) && !defined(WITH_BLAS)
WITH_MPI= yes WITH_ATLAS= yes
.endif .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 .ifdef WITH_MPI
PKGNAMESUFFIX+= -mpich PKGNAMESUFFIX+= -mpich
BUILD_DEPENDS+= ${LOCALBASE}/mpich2/include/mpif.h:${PORTSDIR}/net/mpich2 \ BUILD_DEPENDS+= ${LOCALBASE}/mpich2/include/mpif.h:${PORTSDIR}/net/mpich2 \
${LOCALBASE}/lib/libblacs.a:${PORTSDIR}/math/blacs \ ${LOCALBASE}/lib/libblacs.a:${PORTSDIR}/math/blacs \
${LOCALBASE}/lib/libscalapack.a:${PORTSDIR}/math/scalapack ${LOCALBASE}/lib/libscalapack.a:${PORTSDIR}/math/scalapack
LIB_DEPENDS+= lapack:${PORTSDIR}/math/lapack
# Note: -l?mumps still requires to be linked with -lblacs + -lscalapack # Note: -l?mumps still requires to be linked with -lblacs + -lscalapack
RUN_DEPENDS+= ${LOCALBASE}/mpich2/bin/mpirun:${PORTSDIR}/net/mpich2 \ RUN_DEPENDS+= ${LOCALBASE}/mpich2/bin/mpirun:${PORTSDIR}/net/mpich2 \
${LOCALBASE}/lib/libblacs.a:${PORTSDIR}/math/blacs \ ${LOCALBASE}/lib/libblacs.a:${PORTSDIR}/math/blacs \
@ -104,6 +104,9 @@ pre-build:
s+@BLAS_LIBS@+${BLAS_LIBS}+ ; \ s+@BLAS_LIBS@+${BLAS_LIBS}+ ; \
s+@LOCALBASE@+${LOCALBASE}+g;' \ s+@LOCALBASE@+${LOCALBASE}+g;' \
${WRKSRC}/Makefile.inc ${WRKSRC}/Makefile.inc
.ifdef WITH_MPI
@${REINPLACE_CMD} -e 's+@LAPACK_LIBS@+${LAPACK_LIBS}+g;' ${WRKSRC}/Makefile.inc
.endif
.ifdef WITH_METIS .ifdef WITH_METIS
@${REINPLACE_CMD} -e 's+#LMETIS+LMETIS+' ${WRKSRC}/Makefile.inc @${REINPLACE_CMD} -e 's+#LMETIS+LMETIS+' ${WRKSRC}/Makefile.inc
.endif .endif

View File

@ -61,7 +61,7 @@
# DEFINE HERE YOUR BLAS LIBRARY # DEFINE HERE YOUR BLAS LIBRARY
-LIBBLAS = -lblas -LIBBLAS = -lblas
+LIBBLAS = -L@LOCALBASE@/lib @BLAS_LIBS@ +LIBBLAS = -L@LOCALBASE@/lib @LAPACK_LIBS@ @BLAS_LIBS@
# DEFINE YOUR PTHREAD LIBRARY # DEFINE YOUR PTHREAD LIBRARY
-LIBOTHERS = -lpthread -LIBOTHERS = -lpthread

View File

@ -44,11 +44,11 @@
# DEFINE HERE YOUR BLAS LIBRARY # DEFINE HERE YOUR BLAS LIBRARY
-LIBBLAS = -lblas -LIBBLAS = -lblas
+LIBBLAS = -L@LOCALBASE@/lib @BLAS_LIBS@ +LIBBLAS = -L@LOCALBASE@/lib @BLAS_LIBS@
# DEFINE HERE YOUR PTHREAD LIBRARY # DEFINE HERE YOUR PTHREAD LIBRARY
-LIBOTHERS = -lpthread -LIBOTHERS = -lpthread
+LIBOTHERS = @PTHREAD_LIBS@ -lg2c +LIBOTHERS = @PTHREAD_LIBS@ @FORTRANLIBS@
# FORTRAN/C COMPATIBILITY: # FORTRAN/C COMPATIBILITY:
# Use: # Use: