2004-03-19 09:32:49 +00:00
|
|
|
# New ports collection makefile for: psi3
|
|
|
|
# Date created: March 17 2004
|
|
|
|
# Whom: NAKATA Maho <maho@FreeBSD.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= psi3
|
2009-04-21 07:45:40 +00:00
|
|
|
PORTVERSION= 3.4.0
|
2009-09-13 00:08:01 +00:00
|
|
|
PORTREVISION= 1
|
2004-03-19 09:32:49 +00:00
|
|
|
CATEGORIES= science
|
2009-08-22 00:35:32 +00:00
|
|
|
MASTER_SITES= SF/psicode/psi/${PORTVERSION} \
|
2008-07-23 09:27:10 +00:00
|
|
|
http://www.psicode.org/doc/:doc
|
2009-08-22 00:35:32 +00:00
|
|
|
|
2004-03-19 09:32:49 +00:00
|
|
|
DISTNAME= psi-${PORTVERSION}
|
2004-03-19 10:02:05 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
2004-05-06 19:49:54 +00:00
|
|
|
DISTFILES+= ${DISTNAME}${EXTRACT_SUFX} installation.pdf:doc userman.pdf:doc progman.pdf:doc
|
2004-03-19 10:02:05 +00:00
|
|
|
.endif
|
|
|
|
DIST_SUBDIR= psi3
|
2004-09-03 02:43:49 +00:00
|
|
|
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
|
2004-03-19 09:32:49 +00:00
|
|
|
|
|
|
|
MAINTAINER= maho@FreeBSD.org
|
|
|
|
COMMENT= An electronic structure programs for high-accuracy computations
|
|
|
|
|
2010-02-16 07:23:49 +00:00
|
|
|
.if exists(${LOCALBASE}/lib/libgoto2.so)
|
2011-11-22 11:14:10 +00:00
|
|
|
WITH_BLAS?= gotoblas
|
|
|
|
.elif exists(${LOCALBASE}/lib/libatlas.so)
|
|
|
|
WITH_BLAS?= atlas
|
|
|
|
.else
|
|
|
|
WITH_BLAS?= reference
|
2007-01-09 15:18:31 +00:00
|
|
|
.endif
|
2008-07-23 09:27:10 +00:00
|
|
|
|
2011-11-22 11:14:10 +00:00
|
|
|
. if ${WITH_BLAS} == reference
|
2007-01-09 15:18:31 +00:00
|
|
|
LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas
|
2009-04-21 07:45:40 +00:00
|
|
|
LIB_DEPENDS+= lapack:${PORTSDIR}/math/lapack
|
2007-01-09 15:18:31 +00:00
|
|
|
BLAS= -lblas
|
|
|
|
LAPACK= -llapack
|
2011-11-22 11:14:10 +00:00
|
|
|
.elif ${WITH_BLAS} == gotoblas
|
2010-02-16 07:23:49 +00:00
|
|
|
LIB_DEPENDS+= goto2:${PORTSDIR}/math/gotoblas
|
2009-04-21 07:45:40 +00:00
|
|
|
LIB_DEPENDS+= lapack:${PORTSDIR}/math/lapack
|
2010-02-16 07:23:49 +00:00
|
|
|
BLAS= -lgoto2p
|
|
|
|
LAPACK= -lgoto2p
|
2011-11-22 11:14:10 +00:00
|
|
|
.elif ${WITH_BLAS} == atlas
|
2008-07-23 09:27:10 +00:00
|
|
|
LIB_DEPENDS+= atlas:${PORTSDIR}/math/atlas
|
2011-11-22 11:14:10 +00:00
|
|
|
BLAS= -lptf77blas
|
|
|
|
LAPACK= -lalapack -lptcblas
|
2007-01-09 15:18:31 +00:00
|
|
|
.endif
|
2004-03-19 09:32:49 +00:00
|
|
|
|
|
|
|
USE_BZIP2= yes
|
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
USE_GMAKE= yes
|
2008-07-23 09:27:10 +00:00
|
|
|
USE_FORTRAN= yes
|
2004-03-19 09:32:49 +00:00
|
|
|
CONFIGURE_ARGS= --with-cc=${CC} \
|
|
|
|
--with-cxx=${CXX} \
|
|
|
|
--with-fc=${FC} \
|
2007-01-09 15:18:31 +00:00
|
|
|
--with-lapack="${LAPACK}" \
|
|
|
|
--with-blas="${BLAS}" \
|
2004-03-19 09:32:49 +00:00
|
|
|
--datadir=${PREFIX}/share/psi3 \
|
2009-04-21 07:45:40 +00:00
|
|
|
--docdir=${WRKSRC}/tmpdoc/ \
|
2004-03-19 09:32:49 +00:00
|
|
|
--with-libdirs="-L${LOCALBASE}/lib" \
|
|
|
|
--with-libs="-lcompat"
|
|
|
|
|
2004-11-23 02:16:19 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2004-03-19 09:32:49 +00:00
|
|
|
.if defined(WITH_OPTIMIZED_FLAGS)
|
2004-05-06 19:49:54 +00:00
|
|
|
FFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -malign-double
|
|
|
|
CFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -malign-double
|
|
|
|
CXXFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -malign-double -Wno-multichar
|
2004-09-03 02:43:49 +00:00
|
|
|
.if (${ARCH} == "i386")
|
2004-05-06 19:49:54 +00:00
|
|
|
FFLAGS+= -mfancy-math-387
|
|
|
|
CFLAGS+= -mfancy-math-387
|
|
|
|
CXXFLAGS+= -mfancy-math-387
|
2004-03-19 09:32:49 +00:00
|
|
|
.endif # i386
|
|
|
|
.endif
|
|
|
|
|
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}
|
|
|
|
MAN1= ccenergy.1 cceom.1 cints.1 clag.1 cscf.1 dboc.1 detcas.1 \
|
2008-07-23 09:27:10 +00:00
|
|
|
detcasman.1 detci.1 geom.1 input.1 intder.1 mocube.1 mp2.1 mp2r12.1 \
|
2009-04-21 07:45:40 +00:00
|
|
|
nonbonded.1 oeprop.1 optking.1 psi3.1 psiclean.1 stable.1 tocprint.1 \
|
|
|
|
transqt.1
|
|
|
|
|
2004-03-19 09:32:49 +00:00
|
|
|
pre-configure:
|
|
|
|
@${ECHO} "You can optimize by setting WITH_OPTIMIZED_FLAGS=yes."
|
|
|
|
@${REINPLACE_CMD} -e 's|%%PTHREAD_CFLAGS%%|${PTREAD_CFLAGS}|g ; \
|
|
|
|
s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g' ${WRKSRC}/src/bin/cints/Makefile.in
|
|
|
|
@${REINPLACE_CMD} -e 's|%%PTHREAD_CFLAGS%%|${PTREAD_CFLAGS}|g ; \
|
|
|
|
s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g' ${WRKSRC}/src/bin/detci/Makefile.in
|
|
|
|
|
|
|
|
MAKE_ENV+= SCRATCH=${WRKSRC}/tmp
|
|
|
|
|
|
|
|
do-build:
|
|
|
|
@(cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} ${GMAKE})
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
@(cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} ${GMAKE} install)
|
2008-07-23 09:27:10 +00:00
|
|
|
@${TAR} cf - -C ${WRKSRC}/tmpdoc/man . | ${TAR} xf - -C ${PREFIX}/man
|
2004-03-19 09:32:49 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@${MKDIR} ${PREFIX}/share/doc/psi3
|
|
|
|
@${TAR} cf - -C ${WRKSRC}/tmpdoc/html . | ${TAR} xf - -C ${PREFIX}/share/doc/psi3
|
|
|
|
@${TAR} cf - -C ${WRKSRC}/tmpdoc/txt . | ${TAR} xf - -C ${PREFIX}/share/doc/psi3
|
2004-03-19 10:02:05 +00:00
|
|
|
@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/installation.pdf ${DOCSDIR}
|
|
|
|
@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/userman.pdf ${DOCSDIR}
|
|
|
|
@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/progman.pdf ${DOCSDIR}
|
2004-03-19 09:32:49 +00:00
|
|
|
.endif
|
2009-04-21 07:45:40 +00:00
|
|
|
.if !defined(NOPORTEXAMPLES)
|
2004-03-19 09:32:49 +00:00
|
|
|
@${MKDIR} ${PREFIX}/share/examples/psi3
|
|
|
|
@${TAR} cf - -C ${WRKSRC}/tests . | ${TAR} xf - -C ${PREFIX}/share/examples/psi3
|
2009-04-21 07:45:40 +00:00
|
|
|
.endif
|
2004-03-19 09:32:49 +00:00
|
|
|
|
2004-11-23 02:16:19 +00:00
|
|
|
.include <bsd.port.post.mk>
|