mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-26 05:02:18 +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)
124 lines
3.6 KiB
Makefile
124 lines
3.6 KiB
Makefile
# Created by: Pedro Giffuni <giffunip@asme.org>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= superlu_mt
|
|
PORTVERSION= 2.0.20080115
|
|
PORTREVISION= 4
|
|
CATEGORIES= math
|
|
MASTER_SITES= http://crd.lbl.gov/~xiaoye/SuperLU/ \
|
|
http://crd.lbl.gov/~xiaoye/:doc
|
|
DISTNAME= ${PORTNAME}_2.0
|
|
.ifndef NOPORTDOCS
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} simax97.ps.gz:doc
|
|
.endif
|
|
DIST_SUBDIR= superlu2
|
|
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
|
|
|
|
MAINTAINER= bf@FreeBSD.org
|
|
COMMENT= Routines for performing multithreaded sparse factorization
|
|
|
|
USE_FORTRAN= yes
|
|
USE_GMAKE= yes
|
|
|
|
NO_STAGE= yes
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if exists(${LOCALBASE}/lib/libgoto2.so)
|
|
WITH_BLAS?= gotoblas
|
|
.elif exists(${LOCALBASE}/lib/libatlas.so)
|
|
WITH_BLAS?= atlas
|
|
.else
|
|
WITH_BLAS?= reference
|
|
.endif
|
|
|
|
.if ${WITH_BLAS} == reference
|
|
LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas
|
|
BLAS= -lblas
|
|
.elif ${WITH_BLAS} == gotoblas
|
|
LIB_DEPENDS+= goto2:${PORTSDIR}/math/gotoblas
|
|
BLAS= -lgoto2p
|
|
BROKEN= Build stops while testing
|
|
.elif ${WITH_BLAS} == atlas
|
|
LIB_DEPENDS+= atlas:${PORTSDIR}/math/atlas
|
|
BLAS= -lptf77blas
|
|
.endif
|
|
|
|
.if ${ARCH} == "sparc64" || ${ARCH} == "amd64"
|
|
FPIC= -fPIC
|
|
.else
|
|
FPIC= -fpic
|
|
.endif
|
|
|
|
.if ${ARCH} == "sparc64"
|
|
BROKEN= Does not link on sparc64
|
|
.endif
|
|
|
|
USE_LDCONFIG= yes
|
|
WRKSRC= ${WRKDIR}/SuperLU_MT_2.0
|
|
WRKSRC_SHARED= ${WRKDIR}/SuperLU_MT_2.0_shared
|
|
ALL_TARGET= lib
|
|
SVERSION= 1
|
|
|
|
ARCH2FIX= CBLAS/Makefile MAKE_INC/make.openmp MAKE_INC/make.exemplar \
|
|
MAKE_INC/make.pthreads TESTING/MATGEN/Makefile \
|
|
make.inc SRC/Makefile
|
|
|
|
post-patch:
|
|
.for fmk in ${ARCH2FIX}
|
|
@${REINPLACE_CMD} -e 's|^ARCH *.= ar|ARCMD = ar| ; \
|
|
s|\$$(ARCH)|$$(ARCMD)|' ${WRKSRC}/${fmk}
|
|
.endfor
|
|
${CP} -r ${WRKSRC} ${WRKSRC_SHARED}
|
|
@${REINPLACE_CMD} -e 's+%%BLAS%%+-L${LOCALBASE}/lib ${BLAS}+ ; \
|
|
s+%%CC%%+${CC}+; s+%%FC%%+${FC}+; \
|
|
s+%%CFLAGS%%+${CFLAGS}+; \
|
|
s+%%FFLAGS%%+${FFLAGS}+; \
|
|
s+%%FPIC%%++; \
|
|
s+%%PTHREAD_CFLAGS%%+${PTHREAD_CFLAGS}+ ; \
|
|
s+%%PTHREAD_LIBS%%+${PTHREAD_LIBS}+ ' \
|
|
${WRKSRC}/make.inc
|
|
|
|
@${REINPLACE_CMD} -e 's+%%BLAS%%+-L${LOCALBASE}/lib ${BLAS}+ ; \
|
|
s+%%CC%%+${CC}+; s+%%FC%%+${FC}+; \
|
|
s+%%CFLAGS%%+${CFLAGS} ${FPIC}+; \
|
|
s+%%FFLAGS%%+${FFLAGS} ${FPIC}+; \
|
|
s+%%FPIC%%+${FPIC}+; \
|
|
s+%%PTHREAD_CFLAGS%%+${PTHREAD_CFLAGS}+ ; \
|
|
s+%%PTHREAD_LIBS%%+${PTHREAD_LIBS}+ ' \
|
|
${WRKSRC_SHARED}/make.inc
|
|
|
|
do-build:
|
|
cd ${WRKSRC} ; ${GMAKE}
|
|
cd ${WRKSRC_SHARED} ; ${GMAKE}
|
|
${RM} -rf ${WRKDIR}/tmp_static
|
|
${MKDIR} ${WRKDIR}/tmp_static
|
|
cd ${WRKDIR}/tmp_static
|
|
${FIND} ${WRKSRC} -name "*\.a" -exec ${CP} {} ${WRKDIR}/tmp_static \;
|
|
${RM} -rf ${WRKDIR}/tmp_shared
|
|
${MKDIR} ${WRKDIR}/tmp_shared
|
|
${FIND} ${WRKSRC_SHARED} -name "*\.a" -exec ${CP} {} ${WRKDIR}/tmp_shared \;
|
|
@cd ${WRKDIR}/tmp_shared ; for i in `ls *.a | ${SED} 's/\.a//' `; do \
|
|
${RM} -f $${i}.so.* $${i}.so ; \
|
|
ld -Bshareable -o $${i}.so.${SVERSION} -x -soname $${i}.so.${SVERSION} --allow-multiple-definition --whole-archive $${i}.a ;\
|
|
${LN} -s $${i}.so.${SVERSION} $${i}.so ;\
|
|
done
|
|
|
|
do-install:
|
|
${INSTALL_DATA} ${WRKDIR}/tmp_static/libsuperlu_mt.a ${PREFIX}/lib
|
|
${INSTALL_DATA} ${WRKDIR}/tmp_shared/libsuperlu_mt.so.${SVERSION} ${PREFIX}/lib
|
|
cd ${PREFIX}/lib && ${LN} -s -f libsuperlu_mt.so.${SVERSION} libsuperlu_mt.so
|
|
${MKDIR} ${PREFIX}/include/${PORTNAME}
|
|
${INSTALL_DATA} ${WRKSRC}/SRC/*.h ${PREFIX}/include/${PORTNAME}
|
|
.ifndef NOPORTDOCS
|
|
@${MKDIR} ${DOCSDIR}
|
|
# ${INSTALL_DATA} ${WRKSRC}/INSTALL/*.ps ${DOCSDIR}
|
|
# ${GZIP_CMD} ${DOCSDIR}/*.ps
|
|
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/simax97.ps.gz ${DOCSDIR}
|
|
.endif
|
|
|
|
regression-test: do-build
|
|
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} testing)
|
|
@(cd ${WRKSRC_SHARED} && ${SETENV} ${MAKE_ENV} ${GMAKE} testing)
|
|
|
|
.include <bsd.port.post.mk>
|