calculation program calculates energy, molecular structure, vibrational frequencies from the basic principle of quantum mechanics. A site license for GAMESS is available at no cost to both academic and industrial users. Please refer http://wwwmsg.fi.ameslab.gov/GAMESS/dist.menu.html for details. We also included simple launcher called `gamess' for your convenience. You don't set any environment variable to run gamess. Just type % gamess <somefile.inp> is enough. WWW: http://wwwmsg.fi.ameslab.gov/GAMESS/ I also recived an e-mail from Mike Schmidt <mike@si.fi.ameslab.gov> as my inquery. > I'm maintaining gamess port for FreeBSD only for myself, > but I'd like to maintain this program at ports tree so that > everyone can install gamess for FreeBSD very easily like following: > obtain gamess-current.tar.gz then, put it to some directory, then: > > % mkdir /usr/ports/distfiles/gamess.20060907.4 > % cp gamess-current.tar.gz /usr/ports/distfiles/gamess.20060907.4/ > % cd /usr/ports/science/gamess > % make > % sudo make install > ... > will finish the compilation and installation. > > So I'd like to ask you about it. > > Can I put port such a skeleton, which is merely an installation > instruction for FreeBSD ports tree like MPQC? > http://www.freebsd.org/cgi/cvsweb.cgi/ports/science/mpqc/ > Everyone can access this instruction publically. > Of course, I don't expose gamess archive for public, and if gamess =20 > archive > is not found, make stops like: > >> % make >> =3D=3D=3D> gamess-20060907.4 You must manually get the source =20 >> distribution from master site. http://www.msg.ameslab.gov/GAMESS/=20 >> dist.menu.html. Please selsect "Source code distribution", and =20 >> check on "running on Intel compatible PC running Linux". You must =20 >> have license, but freely obtainable.. >> *** Error code 1 > Mike Schmidt <mike@si.fi.ameslab.gov> replied as: > I do not really object to your idea about "make" for BSD, since > you don't include source code with it. but don't really understand > why it would be necessary. :)
133 lines
4.7 KiB
Makefile
133 lines
4.7 KiB
Makefile
# New ports collection makefile for: gamess
|
|
# Date created: 2007-3-13
|
|
# Whom: NAKATA Maho <maho@FreeBSD.org>
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PORTNAME= gamess
|
|
PORTVERSION= ${SNAPDATE}.4
|
|
CATEGORIES= science
|
|
MASTER_SITES= #http://www.msg.ameslab.gov/GAMESS/GAMESS.html
|
|
DISTNAME= gamess-current
|
|
DIST_SUBDIR= ${PORTNAME}.${PORTVERSION}
|
|
|
|
MAINTAINER= maho@FreeBSD.org
|
|
COMMENT= A freely obtainable ab-initio molecular orbital calculation program
|
|
|
|
USE_GMAKE= yes
|
|
WRKSRC= ${WRKDIR}/gamess
|
|
SNAPDATE= 20060907
|
|
|
|
WANT_FORTRAN= yes
|
|
BUILD_DEPENDS+= gfortran42:${PORTSDIR}/lang/gcc42
|
|
FC= gfortran42
|
|
F77= gfortran42
|
|
|
|
RESTRICTED= NOT DISTRIBUTED FREELY. BUT YOU CAN OBTAIN SOURCE CODE FREELY.
|
|
NO_CDROM= ${RESTRICTED}
|
|
|
|
.if !exists(${DISTDIR}/${DISTFILES})
|
|
IGNORE=You must manually get the source distribution from master site. http://www.msg.ameslab.gov/GAMESS/dist.menu.html. Please selsect "Source code distribution", and check on "running on Intel compatible PC running Linux". You must have license, and freely obtainable.
|
|
.endif
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.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= -lf77blas -latlas
|
|
.else
|
|
LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas
|
|
BLAS= -lblas
|
|
.endif
|
|
|
|
.if defined(WITH_OPTIMIZED_FLAGS)
|
|
.if ${ARCH} == "amd64"
|
|
CFLAGS+= -pipe -O3 -ffast-math -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time
|
|
FFLAGS+= -pipe -O3 -ffast-math -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time
|
|
.elif ${ARCH} == "i386"
|
|
CFLAGS+= -pipe -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -malign-double -mcpu=i686 -march=i686 -mfancy-math-387
|
|
FFLAGS+= -pipe -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -malign-double -mcpu=i686 -march=i686 -mfancy-math-387
|
|
.endif
|
|
.endif
|
|
|
|
#WITH_IFC= yes #currently building with ifc is broken
|
|
.if defined(WITH_IFC)
|
|
FC= ${LOCALBASE}/intel_fc_80/bin/ifort
|
|
F77= ${LOCALBASE}/intel_fc_80/bin/ifort
|
|
CC= ${LOCALBASE}/intel_cc_80/bin/icc
|
|
FFLAGS= -axP -xW -ipo -O3 -Vaxlib
|
|
CFLAGS= -axP -xW -ipo -O3 -Vaxlib
|
|
LIBSVM= -lsvml
|
|
LIBG2C= -lg2c
|
|
.else
|
|
LIBG2C=
|
|
LIBSVM=
|
|
.endif
|
|
|
|
.if defined(WITH_IFC)
|
|
FORTRAN= ifort
|
|
.else
|
|
FORTRAN= gfortran
|
|
.endif
|
|
|
|
pre-build:
|
|
.if ${ARCH} == "amd64"
|
|
@${REINPLACE_CMD} -e 's+%%ARCH%%+freebsd-amd64+g' ${WRKSRC}/comp
|
|
@${REINPLACE_CMD} -e 's+%%ARCH%%+freebsd-amd64+g' ${WRKSRC}/compall
|
|
@${REINPLACE_CMD} -e 's+%%ARCH%%+freebsd-amd64+g' ${WRKSRC}/ddi/compddi
|
|
@${REINPLACE_CMD} -e 's+%%ARCH%%+freebsd-amd64+g' ${WRKSRC}/lked
|
|
.elif ${ARCH} == "i386"
|
|
@${REINPLACE_CMD} -e 's+%%ARCH%%+freebsd-i386+g' ${WRKSRC}/comp
|
|
@${REINPLACE_CMD} -e 's+%%ARCH%%+freebsd-i386+g' ${WRKSRC}/compall
|
|
@${REINPLACE_CMD} -e 's+%%ARCH%%+freebsd-i386+g' ${WRKSRC}/ddi/compddi
|
|
@${REINPLACE_CMD} -e 's+%%ARCH%%+freebsd-i386+g' ${WRKSRC}/lked
|
|
.endif
|
|
@${REINPLACE_CMD} -e 's+%%FC%%+${FC}+g ; \
|
|
s+%%PREFIX%%+${PREFIX}+g ; \
|
|
s+%%LIBSVM%%+${LIBSVM}+g ; \
|
|
s+%%LIBG2C%%+${LIBG2C}+g ; \
|
|
s+%%BLAS%%+${BLAS}+g ; \
|
|
s+%%PTHREAD_LIBS%%+${PTHREAD_LIBS}+g' \
|
|
${WRKSRC}/lked
|
|
@${REINPLACE_CMD} -e 's+%%FC%%+${FC}+g ; \
|
|
s+%%PREFIX%%+${PREFIX}+g ; \
|
|
s+%%FFLAGS%%+${FFLAGS}+g ; \
|
|
s+%%FORTRAN%%+${FORTRAN}+g' \
|
|
${WRKSRC}/comp
|
|
@${REINPLACE_CMD} -e 's+%%CC%%+${CC}+g' \
|
|
${WRKSRC}/compall
|
|
@${REINPLACE_CMD} -e 's+%%PREFIX%%+${PREFIX}+g' \
|
|
${WRKSRC}/rungms
|
|
@${REINPLACE_CMD} -e 's+%%PTHREAD_CFLAGS%%+${PTHREAD_CFLAGS}+g ; \
|
|
s+%%PTHREAD_LIBS%%+${PTHREAD_LIBS}+g ; \
|
|
s+%%UNDERSCORES%%+${UNDERSCORES}+g ; \
|
|
s+%%FORTRAN%%+${FORTRAN}+g ; \
|
|
s+%%CC%%+${CC}+g' \
|
|
${WRKSRC}/ddi/compddi
|
|
|
|
${CP} ${FILESDIR}/Makefile.top ${WRKSRC}/Makefile
|
|
${CP} ${FILESDIR}/Makefile.tools ${WRKSRC}/tools/Makefile
|
|
@${REINPLACE_CMD} -e 's+%%FC%%+${FC}+g ; \
|
|
s+%%FFLAGS%%+${FFLAGS}+g' \
|
|
${WRKSRC}/tools/Makefile
|
|
do-build:
|
|
(cd ${WRKSRC}; ${GMAKE})
|
|
|
|
do-install:
|
|
${MKDIR} ${PREFIX}/bin/gms
|
|
${MKDIR} ${PREFIX}/share/gamess
|
|
${MKDIR} ${PREFIX}/share/doc/gamess
|
|
${MKDIR} ${PREFIX}/share/examples/gamess
|
|
${INSTALL_SCRIPT} ${WRKDIR}/gamess/rungms ${PREFIX}/bin/gamess
|
|
${CHMOD} 555 ${PREFIX}/bin/gamess
|
|
${INSTALL_PROGRAM} ${WRKDIR}/gamess/gamess.00.x ${PREFIX}/bin/gms
|
|
${INSTALL_PROGRAM} ${WRKDIR}/gamess/ddi/ddikick.x ${PREFIX}/bin/gms
|
|
${INSTALL_DATA} ${WRKDIR}/gamess/*.DOC ${PREFIX}/share/doc/gamess/
|
|
${INSTALL_DATA} ${WRKDIR}/gamess/tests/*.inp ${PREFIX}/share/examples/gamess/
|
|
${INSTALL_DATA} ${WRKDIR}/gamess/ericfmt.dat ${PREFIX}/share/gamess/
|
|
|
|
.include <bsd.port.post.mk>
|