1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00
freebsd-ports/cad/tochnog/Makefile
Gerald Pfeifer 3be3e90f93 Update to libmpc version 1.0.1 which brings the following fixes:
- 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)
2013-10-26 00:52:33 +00:00

97 lines
2.6 KiB
Makefile

# Created by: Pedro Giffuni <giffunip@asme.org>
# $FreeBSD$
PORTNAME= tochnog
PORTVERSION= 20010211
PORTREVISION= 7
CATEGORIES= cad
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/feb11_2001
DISTNAME= ${PORTNAME}_feb11_2001
MAINTAINER= ports@FreeBSD.org
COMMENT= A free explicit/implicit Finite Element Program
.ifdef WITH_ATLAS
LIB_DEPENDS= atlas:${PORTSDIR}/math/atlas
.else
LIB_DEPENDS= blas:${PORTSDIR}/math/blas
.endif
BUILD_DEPENDS= ${LOCALBASE}/lib/libf2c.a:${PORTSDIR}/lang/f2c
.ifdef WITH_THREADS
BUILD_DEPENDS+= ${LOCALBASE}/lib/libsuperlu_mt.a:${PORTSDIR}/math/superlu_mt
.else
BUILD_DEPENDS+= ${LOCALBASE}/lib/libsuperlu.a:${PORTSDIR}/math/superlu
.endif
WRKSRC= ${WRKDIR}/${PORTNAME}/src
MAKEFILE= makefile
# You can set GIDDIR to share/gid to install the scripts to be used
# with the cad/linux-gid port, otherwise they can be linked to the data
# directory to avoid polluting the port space.
GIDDIR?= share/${PORTNAME}
PLIST_SUB+= GIDDIR=${GIDDIR}
GID_PTYPES= ${PREFIX}/${GIDDIR}/problemtypes
.ifdef WITH_ATLAS
.ifdef WITH_THREADS
BLAS_LIBS= -lptf77blas
.else
BLAS_LIBS= -lf77blas
.endif
.else #BLAS
BLAS_LIBS?= -lblas
.endif
.ifdef WITH_THREADS
SUPERLU= superlu_mt
ALL_TARGET= freebsd_parallel
.else
SUPERLU= superlu
ALL_TARGET= freebsd_old
.endif
USE_FORTRAN= yes
FORTRANLIBS= -lgfortranbegin -lgfortran
GCCLIBDIR= -L`${CAT} ${WRKSRC}/LIBDIR` -L`${CAT} ${WRKSRC}/LIBDIR`/../../..
NO_STAGE= yes
pre-build:
@${DIRNAME} `${FC} -print-libgcc-file-name` > ${WRKSRC}/LIBDIR
@${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},g ; \
s,%%SUPERLU%%,${SUPERLU},g ; \
s,%%FORTRANLIBS%%,${FORTRANLIBS},g ; \
s,%%GCCLIBDIR%%,${GCCLIBDIR},g ; \
s,%%BLAS_LIBS%%,-L${LOCALBASE}/lib ${BLAS_LIBS},g' \
${WRKSRC}/makefile
.ifdef WITH_THREADS
@${REINPLACE_CMD} -e 's,SUPERLU_MT_USE 0,SUPERLU_MT_USE 1,' \
${WRKSRC}/tnsuplu.h
.else # Serial
@${REINPLACE_CMD} -e 's,SUPERLU_USE 0,SUPERLU_USE 1,' \
${WRKSRC}/tnsuplu.h
.endif
post-build:
@(cd ${WRKDIR}/tochnog/tools; ${CXX} ${CXXFLAGS} -o aba2tn aba2tn.cc)
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/tochnog ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKDIR}/tochnog/tools/aba2tn ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKDIR}/tochnog/tools/*.awk ${PREFIX}/bin
${MKDIR} ${GID_PTYPES}/tochnog.gid
${INSTALL_DATA} ${WRKDIR}/tochnog/gid/tochnog.gid/tochnog.cnd \
${GID_PTYPES}/tochnog.gid
${INSTALL_DATA} ${WRKDIR}/tochnog/gid/tochnog.gid/tochnog.mat \
${GID_PTYPES}/tochnog.gid
${INSTALL_SCRIPT} ${WRKDIR}/tochnog/gid/tochnog.gid/tochnog.ba* \
${GID_PTYPES}/tochnog.gid
.if !defined(NOPORTDOCS)
${MKDIR} ${EXAMPLESDIR}
@${RM} -f ${WRKDIR}/tochnog/test/*.orig
${INSTALL_DATA} ${WRKDIR}/tochnog/test/* ${EXAMPLESDIR}
.endif
.include <bsd.port.mk>