mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-14 07:43:06 +00:00
3be3e90f93
- Switched to automake 1.11.6, see CVE-2012-3386. - #14669: Fixed extraction of CC from gmp.h. - Fixed case of intermediate zero real or imaginary part in mpc_fma, found by hydra with GMP_CHECK_RANDOMIZE=1346362345. This is on top of the following changes from version 1.0 - Licence change towards LGPLv3+ for the code and GFDLv1.3+ (with no invariant sections) for the documentation. - 100% of all lines are covered by tests - Renamed functions . mpc_mul_2exp to mpc_mul_2ui . mpc_div_2exp to mpc_div_2ui - 0^0, which returned (NaN,NaN) previously, now returns (1,+0). - Removed compatibility with K&R compilers, which was untestable due to lack of such compilers. - New functions . mpc_log10 . mpc_mul_2si, mpc_div_2si - Speed-ups . mpc_fma - Bug fixes . mpc_div and mpc_norm now return a value indicating the effective rounding direction, as the other functions. . mpc_mul, mpc_sqr and mpc_norm now return correct results even if there are over- or underflows during the computation. . mpc_asin, mpc_proj, mpc_sqr: Wrong result when input variable has infinite part and equals output variable is corrected. . mpc_fr_sub: Wrong return value for imaginary part is corrected. Convert to the new LIB_DEPENDS standard and remove hard-coded .so versions from a couple of dependent ports. Bump PORTREVISIONS of all dependent ports. PR: 183141 Approved by: portmgr (bdrewery)
164 lines
5.0 KiB
Makefile
164 lines
5.0 KiB
Makefile
# Created by: Pedro Giffuni
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= mumps
|
|
PORTVERSION= 4.8.4
|
|
PORTREVISION= 3
|
|
CATEGORIES= math
|
|
MASTER_SITES= http://mumps.enseeiht.fr/ \
|
|
http://graal.ens-lyon.fr/MUMPS/ \
|
|
http://www.enseeiht.fr/apo/MUMPS/ \
|
|
http://www.enseeiht.fr/irit/apo/MUMPS/
|
|
DISTNAME= MUMPS_${PORTVERSION}
|
|
|
|
MAINTAINER= bf@FreeBSD.org
|
|
COMMENT= MUltifrontal Massively Parallel sparse direct Solver
|
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
# WARNING: Non-serviceable parts inside, can break other ports
|
|
NO_STAGE= yes
|
|
# 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
|
|
# WITH_MPI: Use mpich for the parallel version
|
|
#-----------------------------------------------------------------------
|
|
|
|
SLAVEDIRS= math/mumps-mpich
|
|
|
|
USE_FORTRAN= yes
|
|
|
|
FORTRANLIBS= -lgfortran
|
|
GCCLIBDIR= -L`${CAT} ${WRKSRC}/LIBDIR` -L`${CAT} ${WRKSRC}/LIBDIR`/../../..
|
|
|
|
.if defined(WITH_OPTIMIZED_FLAGS)
|
|
FFLAGS+= -O3 -ffast-math
|
|
.endif
|
|
|
|
.ifdef WITH_METIS
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/oemetis:${PORTSDIR}/math/metis4
|
|
MAKE_ENV+= ORDERINGSF=-Dmetis
|
|
.endif
|
|
|
|
PLIST_SUB+= MUMPSVERSION=${PORTVERSION}
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if exists(${LOCALBASE}/lib/libatlas.so) && !defined(WITH_BLAS)
|
|
WITH_ATLAS= yes
|
|
.endif
|
|
.if defined(WITH_ATLAS)
|
|
LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas
|
|
BLAS_LIBS= -lf77blas
|
|
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}/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}/bin/mpirun:${PORTSDIR}/net/mpich2 \
|
|
${LOCALBASE}/lib/libblacs.a:${PORTSDIR}/math/blacs \
|
|
${LOCALBASE}/lib/libscalapack.a:${PORTSDIR}/math/scalapack
|
|
CONFLICTS= mumps-4*
|
|
.else
|
|
CONFLICTS= mumps-mpich-4*
|
|
.endif
|
|
|
|
.ifndef WITH_MPI
|
|
PLIST_SUB+= WITH_LIBSEQ=""
|
|
.else
|
|
PLIST_SUB+= WITH_LIBSEQ="@comment "
|
|
.endif
|
|
|
|
post-patch:
|
|
.ifdef WITH_MPI
|
|
@${INSTALL_DATA} ${WRKSRC}/Make.inc/Makefile.inc.generic \
|
|
${WRKSRC}/Makefile.inc
|
|
.else
|
|
@${INSTALL_DATA} ${WRKSRC}/Make.inc/Makefile.inc.generic.SEQ \
|
|
${WRKSRC}/Makefile.inc
|
|
.endif
|
|
|
|
pre-build:
|
|
${DIRNAME} `${FC} -print-libgcc-file-name` > ${WRKSRC}/LIBDIR
|
|
${REINPLACE_CMD} -e 's+@CC@+${CC}+g ; s+@FC@+${FC}+g ; \
|
|
s+@CFLAGS@+${CFLAGS}+g; \
|
|
s+@FCFLAGS@+${FCFLAGS}+g; \
|
|
s+@GCCLIBDIR@+${GCCLIBDIR}+g; \
|
|
s+@FORTRANLIBS@+${FORTRANLIBS}+g; \
|
|
s+@PTHREAD_LIBS@+${PTHREAD_LIBS}+g; \
|
|
s+@BLAS_LIBS@+${BLAS_LIBS}+ ; \
|
|
s+../PORD+${WRKSRC}/PORD+; \
|
|
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
|
|
|
|
do-install:
|
|
${INSTALL_DATA} ${WRKSRC}/include/*.h ${PREFIX}/include
|
|
${INSTALL_DATA} ${WRKSRC}/lib/lib*.a ${PREFIX}/lib
|
|
.ifndef WITH_MPI
|
|
${INSTALL_DATA} ${WRKSRC}/libseq/libmpiseq.a ${PREFIX}/lib
|
|
.endif
|
|
.ifndef NOPORTDOCS
|
|
@${MKDIR} ${DOCSDIR}
|
|
${INSTALL_DATA} ${WRKSRC}/doc/userguide_${PORTVERSION}.pdf ${DOCSDIR}
|
|
${INSTALL_DATA} ${WRKSRC}/doc/userguide_${PORTVERSION}.ps ${DOCSDIR}
|
|
${GZIP_CMD} ${DOCSDIR}/userguide_${PORTVERSION}.ps
|
|
.endif
|
|
.ifndef NOPORTEXAMPLES
|
|
@${MKDIR} ${EXAMPLESDIR}
|
|
. for ex in Makefile README *.c *.F input_simpletest_*
|
|
${INSTALL_DATA} ${WRKSRC}/examples/${ex} ${EXAMPLESDIR}
|
|
. endfor
|
|
. for ex in c_example *simpletest
|
|
${INSTALL_PROGRAM} ${WRKSRC}/examples/${ex} ${EXAMPLESDIR}
|
|
. endfor
|
|
.endif
|
|
|
|
regression-test:
|
|
.if defined (WITH_MPI) && defined(MAINTAINER_MODE)
|
|
. if !exists(${HOME}/.mpd.conf)
|
|
@${ECHO_CMD} "MPD_SECRETWORD=change_on_install" > ${HOME}/.mpd.conf
|
|
${CHMOD} go-r ${HOME}/.mpd.conf
|
|
@${ECHO_MSG} "${HOME}/.mpd.conf has been generated - please change the secret word!"
|
|
. endif
|
|
${LOCALBASE}/bin/mpd &
|
|
(cd ${WRKSRC}/examples && \
|
|
${LOCALBASE}/bin/mpirun -np 2 ./ssimpletest < input_simpletest_real ; \
|
|
${LOCALBASE}/bin/mpirun -np 2 ./dsimpletest < input_simpletest_real ; \
|
|
${LOCALBASE}/bin/mpirun -np 2 ./csimpletest < input_simpletest_cmplx ; \
|
|
${LOCALBASE}/bin/mpirun -np 2 ./zsimpletest < input_simpletest_cmplx ; \
|
|
${ECHO_MSG} "The solution should be (1,2,3,4,5)" ; \
|
|
${LOCALBASE}/bin/mpirun -np 3 ./c_example ; \
|
|
${ECHO_MSG} "The solution should be (1,2)")
|
|
${LOCALBASE}/bin/mpdallexit
|
|
.else
|
|
(cd ${WRKSRC}/examples && \
|
|
./ssimpletest < input_simpletest_real ; \
|
|
./dsimpletest < input_simpletest_real ; \
|
|
./csimpletest < input_simpletest_cmplx ; \
|
|
./zsimpletest < input_simpletest_cmplx ; \
|
|
${ECHO_MSG} "The solution should be (1,2,3,4,5)" ; \
|
|
./c_example ; \
|
|
${ECHO_MSG} "The solution should be (1,2)")
|
|
.endif
|
|
|
|
.include <bsd.port.post.mk>
|