Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Mar 2013 11:43:18 +0000 (UTC)
From:      Maho Nakata <maho@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r313450 - in head/science/gamess: . files
Message-ID:  <201303051143.r25BhIHD056554@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: maho
Date: Tue Mar  5 11:43:18 2013
New Revision: 313450
URL: http://svnweb.freebsd.org/changeset/ports/313450

Log:
  update to 2012/5/1 R2 version.

Added:
  head/science/gamess/files/install.info   (contents, props changed)
  head/science/gamess/files/patch-gms-files.csh   (contents, props changed)
Modified:
  head/science/gamess/Makefile
  head/science/gamess/distinfo
  head/science/gamess/files/Makefile.top
  head/science/gamess/files/patch-comp
  head/science/gamess/files/patch-compall
  head/science/gamess/files/patch-compddi
  head/science/gamess/files/patch-lked
  head/science/gamess/files/patch-rungms
  head/science/gamess/pkg-message
  head/science/gamess/pkg-plist

Modified: head/science/gamess/Makefile
==============================================================================
--- head/science/gamess/Makefile	Tue Mar  5 11:26:54 2013	(r313449)
+++ head/science/gamess/Makefile	Tue Mar  5 11:43:18 2013	(r313450)
@@ -7,7 +7,6 @@
 
 PORTNAME=	gamess
 PORTVERSION=    ${SNAPDATE}
-PORTREVISION=	2
 CATEGORIES=	science
 MASTER_SITES=   #http://www.msg.ameslab.gov/GAMESS/License_Agreement.html
 DISTNAME=	gamess-current
@@ -18,7 +17,7 @@ COMMENT=	A freely obtainable ab-initio m
 
 USE_GMAKE=	yes
 WRKSRC=         ${WRKDIR}/gamess
-SNAPDATE=	20090112.3
+SNAPDATE=	20120501.2
 
 USE_FORTRAN=   yes
 
@@ -55,8 +54,6 @@ BLAS=		-lptf77blas
 LAPACK=		-lalapack -lptcblas
 .endif
 
-MAKE_ENV+=	LANG="C"
-
 .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
@@ -88,18 +85,31 @@ FORTRAN=	gfortran
 .endif
 
 pre-build:
+	${CP} ${FILESDIR}/install.info ${WRKSRC}
+	${CP} ${FILESDIR}/Makefile.top ${WRKSRC}/Makefile
+	@${REINPLACE_CMD} -e 's+%%PREFIX%%+${PREFIX}+g' ${WRKSRC}/gms-files.csh
 .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
+	@${REINPLACE_CMD} -e 's+%%ARCH%%+freebsd64+g' ${WRKSRC}/comp
+	@${REINPLACE_CMD} -e 's+%%ARCH%%+freebsd64+g' ${WRKSRC}/compall
+	@${REINPLACE_CMD} -e 's+%%ARCH%%+freebsd64+g' ${WRKSRC}/ddi/compddi
+	@${REINPLACE_CMD} -e 's+%%ARCH%%+freebsd64+g' ${WRKSRC}/lked
+	@${REINPLACE_CMD} -e 's+%%GMS_TARGET%%+freebsd64+g' ${WRKSRC}/install.info
 .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 ; \
+	@${REINPLACE_CMD} -e 's+%%ARCH%%+freebsd32+g' ${WRKSRC}/comp
+	@${REINPLACE_CMD} -e 's+%%ARCH%%+freebsd32+g' ${WRKSRC}/compall
+	@${REINPLACE_CMD} -e 's+%%ARCH%%+freebsd32+g' ${WRKSRC}/ddi/compddi
+	@${REINPLACE_CMD} -e 's+%%ARCH%%+freebsd32+g' ${WRKSRC}/lked
+	@${REINPLACE_CMD} -e 's+%%GMS_TARGET%%+freebsd32+g' ${WRKSRC}/install.info
+.endif
+	@${REINPLACE_CMD} -e 's+%%GMS_PATH%%+${WRKSRC}+g ; \
+			     s+%%GMS_BUILD_DIR%%+${WRKSRC}+g ; \
+				s+%%GMS_FORTRAN%%+${FORTRAN}+g ; \
+				s+%%FC%%+${FC}+g ; \
+				s+%%GMS_GFORTRAN_VERNO%%+${GCC_DEFAULT_VERSION}+g ; \
+				s+%%GMS_DDI_COMM%%+sockets+g ; \
+				s+%%GMS_MATHLIB%%+none+g ; \
+				s+%%GMS_MATHLIB_PATH%%+${LOCALBASE}/lib+g' ${WRKSRC}/install.info
+	${REINPLACE_CMD} -e 's+%%FC%%+${FC}+g ; \
 			      s+%%LDFLAGS%%+${LDFLAGS}+g ; \
 			      s+%%LOCALBASE%%+${LOCALBASE}+g ; \
 			      s+%%LIBSVM%%+${LIBSVM}+g ; \
@@ -107,26 +117,26 @@ pre-build:
 			      s+%%BLAS%%+${BLAS}+g ; \
 			      s+%%PTHREAD_LIBS%%+${PTHREAD_LIBS}+g' \
 			 ${WRKSRC}/lked
-	@${REINPLACE_CMD} -e 's+%%FC%%+${FC}+g ; \
-			      s+%%FFLAGS%%+${FFLAGS}+g ; \
-			      s+%%FORTRAN%%+${FORTRAN}+g' \
+	${REINPLACE_CMD} -e 's+%%FC%%+${FC}+g ; \
+			      s+%%FFLAGS%%+${FFLAGS}+g' \
 			 ${WRKSRC}/comp
-	@${REINPLACE_CMD} -e 's+%%CC%%+${CC}+g' \
+	${REINPLACE_CMD} -e 's+%%CC%%+${CC}+g' \
 			 ${WRKSRC}/compall
-	@${REINPLACE_CMD} -e 's+%%PREFIX%%+${PREFIX}+g' \
+	${REINPLACE_CMD} -e 's+%%PREFIX%%+${PREFIX}+g' \
 			 ${WRKSRC}/rungms
-	@${REINPLACE_CMD} -e 's+%%PTHREAD_CFLAGS%%+${PTHREAD_CFLAGS}+g ; \
+	${REINPLACE_CMD} -e  's+%%FC%%+${FC}+g ; \
+		   	      s+%%GMS_FORTRAN%%+${FORTRAN}+g ; \
+			      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 ; \
+	${REINPLACE_CMD} -e 's+%%FC%%+${FC}+g ; \
 			      s+%%FFLAGS%%+${FFLAGS}+g' \
 		${WRKSRC}/tools/Makefile
+
 do-build:
 	(cd ${WRKSRC}; ${GMAKE})
 
@@ -138,12 +148,21 @@ do-install:
 	${MKDIR} ${PREFIX}/share/examples/gamess
 	${INSTALL_SCRIPT}  ${WRKDIR}/gamess/rungms		${PREFIX}/bin/gamess
 	${CHMOD} 555 ${PREFIX}/bin/gamess
+	${INSTALL_SCRIPT} ${WRKDIR}/gamess/gms-files.csh          ${PREFIX}/bin/gms
 	${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/
-	${INSTALL_DATA}    ${WRKDIR}/gamess/mcpdata/*            ${PREFIX}/share/gamess/mcpdata/
+	${INSTALL_DATA}    ${WRKDIR}/gamess/tests/standard/*.inp          ${PREFIX}/share/examples/gamess/
+	${MKDIR} ${PREFIX}/share/gamess/auxdata
+	${MKDIR} ${PREFIX}/share/gamess/auxdata/BASES
+	${MKDIR} ${PREFIX}/share/gamess/auxdata/EFP
+	${MKDIR} ${PREFIX}/share/gamess/auxdata/MCP
+	${MKDIR} ${PREFIX}/share/gamess/auxdata/QUANPOL
+	${INSTALL_DATA}    ${WRKDIR}/gamess/auxdata/ericfmt.dat	${PREFIX}/share/gamess/auxdata/
+	${INSTALL_DATA}    ${WRKDIR}/gamess/auxdata/BASES/*	${PREFIX}/share/gamess/auxdata/BASES
+	${INSTALL_DATA}    ${WRKDIR}/gamess/auxdata/EFP/*	${PREFIX}/share/gamess/auxdata/EFP
+	${INSTALL_DATA}    ${WRKDIR}/gamess/auxdata/MCP/*	${PREFIX}/share/gamess/auxdata/MCP
+	${INSTALL_DATA}    ${WRKDIR}/gamess/auxdata/QUANPOL/*	${PREFIX}/share/gamess/auxdata/QUANPOL
 	${INSTALL_DATA}    ${WRKDIR}/gamess/ddi/readme.ddi       ${PREFIX}/share/doc/gamess/
 
 .include <bsd.port.post.mk>

Modified: head/science/gamess/distinfo
==============================================================================
--- head/science/gamess/distinfo	Tue Mar  5 11:26:54 2013	(r313449)
+++ head/science/gamess/distinfo	Tue Mar  5 11:43:18 2013	(r313450)
@@ -1,2 +1,2 @@
-SHA256 (gamess/20090112.3/gamess-current.tar.gz) = 0502c216c792a1c0fcebd6d3955f0feaeb4f9295b75cf0cb3af04c3516cec0bd
-SIZE (gamess/20090112.3/gamess-current.tar.gz) = 11000803
+SHA256 (gamess/20120501.2/gamess-current.tar.gz) = 8004bcc09e7a18252144b54934668786eeb02ff382b9762186568844e4b749c1
+SIZE (gamess/20120501.2/gamess-current.tar.gz) = 28353096

Modified: head/science/gamess/files/Makefile.top
==============================================================================
--- head/science/gamess/files/Makefile.top	Tue Mar  5 11:26:54 2013	(r313449)
+++ head/science/gamess/files/Makefile.top	Tue Mar  5 11:43:18 2013	(r313450)
@@ -2,7 +2,7 @@
 all: gamess_exe
 
 gamess_exe: 
-	(cd tools ; make )
+	(cd tools ; ${MAKE} )
 	(cd ddi ; ./compddi )
 	./compall
 	csh lked

Added: head/science/gamess/files/install.info
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/gamess/files/install.info	Tue Mar  5 11:43:18 2013	(r313450)
@@ -0,0 +1,15 @@
+#!/bin/csh
+# $FreeBSD$
+#   compilation configuration for GAMESS
+setenv GMS_PATH            %%GMS_PATH%%
+setenv GMS_BUILD_DIR       %%GMS_BUILD_DIR%%
+#         machine type
+setenv GMS_TARGET          %%GMS_TARGET%%
+#         FORTRAN compiler setup
+setenv GMS_FORTRAN         %%GMS_FORTRAN%%
+setenv GMS_GFORTRAN_VERNO  %%GMS_GFORTRAN_VERNO%%
+#         mathematical library setup
+setenv GMS_MATHLIB         %%GMS_MATHLIB%%
+setenv GMS_MATHLIB_PATH    %%GMS_MATHLIB_PATH%%
+#         parallel message passing model setup
+setenv GMS_DDI_COMM        %%GMS_DDI_COMM%%

Modified: head/science/gamess/files/patch-comp
==============================================================================
--- head/science/gamess/files/patch-comp	Tue Mar  5 11:26:54 2013	(r313449)
+++ head/science/gamess/files/patch-comp	Tue Mar  5 11:43:18 2013	(r313450)
@@ -1,292 +1,322 @@
---- comp.orig	2009-01-11 00:10:02.000000000 +0900
-+++ comp	2009-05-08 12:12:09.000000000 +0900
-@@ -9,11 +9,11 @@
- #        axp64,compaq-sc,cray-pvp,cray-t3e,cray-x1,cray-xd1,cray-xt3,
- #        fuji-pp32,fuji-pp64,hpux32,hpux64,ibm32,ibm64,ibm64-sp,ibm-bg,
- #        linux32,linux64,linux-ia64,mac32,mac64,macG5,necsx,
--#        sgi32,sgi64,sun32,sun64
-+#        sgi32,sgi64,sun32,sun64,freebsd-amd64,freebsd-i386
- #  2. Choose your GAMESS directory tree.
- #
--set TARGET=ibm64
--chdir /u1/mike/gamess
-+set TARGET=%%ARCH%%
-+#chdir /u1/mike/gamess
- #
- #    ---- and now the script begins...
- #
-@@ -49,6 +49,8 @@
+--- comp.orig	2012-12-05 05:49:41.000000000 +0900
++++ comp	2013-02-27 15:56:56.000000000 +0900
+@@ -97,6 +97,8 @@
+ if ($TARGET == ibm-bg)     set OK=true
  if ($TARGET == linux32)    set OK=true
  if ($TARGET == linux64)    set OK=true
- if ($TARGET == linux-ia64) set OK=true
-+if ($TARGET == freebsd-amd64) set OK=true
-+if ($TARGET == freebsd-i386)  set OK=true
++if ($TARGET == freebsd32)    set OK=true
++if ($TARGET == freebsd64)    set OK=true
  if ($TARGET == mac32)      set OK=true
  if ($TARGET == mac64)      set OK=true
- if ($TARGET == macG5)      set OK=true
-@@ -110,6 +112,8 @@
+ if ($TARGET == necsx)      set OK=true
+@@ -149,6 +151,8 @@
+ if  ($TARGET == ibm-bg)       set BLAS3=true
+ if (($TARGET == linux32) && ($GMS_MATHLIB != none)) set BLAS3=true
+ if (($TARGET == linux64) && ($GMS_MATHLIB != none)) set BLAS3=true
++if (($TARGET == freebsd32) && ($GMS_MATHLIB != none)) set BLAS3=true
++if (($TARGET == freebsd64) && ($GMS_MATHLIB != none)) set BLAS3=true
  if  ($TARGET == mac32)        set BLAS3=true
  if  ($TARGET == mac64)        set BLAS3=true
- if  ($TARGET == macG5)        set BLAS3=true
-+if  ($TARGET == freebsd-i386) set BLAS3=true
-+if  ($TARGET == freebsd-amd64) set BLAS3=true
  if  ($TARGET == sgi32)        set BLAS3=true
- if  ($TARGET == sgi64)        set BLAS3=true
- if (($TARGET == sun32) && (-e /opt/SUNWspro/lib/libsunperf.so)) set BLAS3=true
-@@ -493,6 +497,19 @@
-    if ($MODULE == iolib)  setenv MACHIN '*UNX'
-    if ($MODULE == unport) setenv MACHIN '*INT'
+@@ -579,6 +583,26 @@
+    endif
  endif
-+if ($TARGET == freebsd-amd64) then
-+                          setenv MACHIN '*I64'
+ #
++if ($TARGET == freebsd32) then
++                          setenv MACHIN '*I32'
 +   if ($MODULE == ddi)    setenv MACHIN '*SOC'
 +   if ($MODULE == iolib)  setenv MACHIN '*UNX'
-+   if ($MODULE == unport) setenv MACHIN '*L64'
++   if ($MODULE == unport) setenv MACHIN '*L32'
 +endif
-+if ($TARGET == freebsd-i386) then
-+                          setenv MACHIN '*I32'
++#
++if ($TARGET == freebsd64) then
++                          setenv MACHIN '*I64'
 +   if ($MODULE == ddi)    setenv MACHIN '*SOC'
 +   if ($MODULE == iolib)  setenv MACHIN '*UNX'
-+   if ($MODULE == unport) setenv MACHIN '*L32'
++   if ($MODULE == unport) then
++      if ($GMS_FORTRAN == ifort) then
++         setenv MACHIN '*INT'
++      else
++         setenv MACHIN '*L64'
++      endif
++   endif
 +endif
 +
- if (($TARGET == mac32) || ($TARGET == macG5)) then
+ if ($TARGET == mac32) then
                            setenv MACHIN '*I32'
     if ($MODULE == ddi)    setenv MACHIN '*SOC'
-@@ -1832,6 +1849,236 @@
- #--   f77 -c $OPT -stackvar $MODULE.f
- #--   unset echo
- #--endif
-+
-+#
-+#  FreeBSD (i386)
-+#      
-+if ($TARGET == freebsd-i386) then
+@@ -1640,6 +1664,137 @@
+    endsw
+ #                     ... end of Linux on 32 bit processors.
+ endif
++if ($TARGET == freebsd32) then
 +#
-+#   The target of freebsd-i386 requires that you select a FORTRAN compiler.
-+#   There are five choices,
++#  there are three supported 32 bit compilers: g77, gfortran, ifort
 +#          g77,
-+#             the default, because it is on our PCs at Iowa State!
++#             the gnu FORTRAN being included in older Linux distributions
 +#             lacks support for unit numbers over 99, or REAL*16
 +#          gfortran,
-+#             the gnu FORTRAN being included in recent Linux distributions
++#             the gnu FORTRAN being included in newer Linux distributions
 +#             this allows unit numbers over 99, but not REAL*16
 +#          Intel's commercial ifort,
-+#             this is usually a bit faster, and supports both unit
-+#             numbers above 99 and REAL*16 (i.e. runs all of GAMESS)
-+#          Portland's commercial pgf77, 
-+#             lacks support for REAL*16
-+#          the obsolete combination of f2c/gcc.  
-+#             lacks support for unit numbers over 99, or REAL*16
-+#
-+#   Note that the source code is the same for any of the possibilities, so
-+#   something missing means only that you can't run that particular thing:
-+#      Use of RUNTYP=TDHFX requires file numbers over 99.
-+#      Use of quadruple precision (MODEQR) in relativity requires REAL*16.
-+#
-+#   The only thing you need to change is the next line.
-+#   Note: you must make the analogous choice in compddi and lked, as well.
-+#
-+    set FORTRAN=%%FORTRAN%%       # choose from g77, gfortran, ifort, pgf77, f2c
-+#
-+    switch ($FORTRAN)
-+#
-+#   1. Using g77 compiler.     compiler version query: rpm -q gcc-g77
-+#   If your RedHat is older than 6.0, see the f2c/gcc clause below.
++#             supports unit numbers above 99 and REAL*16 (runs all of GAMESS)
++
++    switch ($GMS_FORTRAN)
 +#
 +#   The meaning of g77's flags are
 +#      -O0, -O1, -O2, -O3 are the optimization levels, -O means -O1
 +#      -Wno-globals -fno-globals together suppress argument type checking.
 +#      -fautomatic defeats use of static storage
 +#      -malign-double uses 64 bit data alignment
-+#   Tests on a representative GAMESS test suite (executing energy, gradient
-+#   hessian code, as well as various SCF, MCSCF, MP2 runs, show that each
-+#   of the more aggressive optimizations -ffast-math, -march=i586, and -O3
-+#   gave speedups of less than 1% each.  (-march=i686 slows a Celeron type
-+#   Pentium II fractionally).  None of these optimizations are used below.
++#   g77 does not support FORTRAN logical units above 99, or 128 bit math.
 +#
 +   case g77:
 +   set OPT = '-O2'
 +   if ($MODULE == ormas1) set OPT='-O2 -fno-move-all-movables' # RH9, g77 3.3
 +   if ($MODULE == zheev)  set OPT='-O0'  # defensive compiling
-+#
-+#   g77 does not support FORTRAN logical units above 99, or 128 bit math.
-+#
 +   if (($MODULE == qeigen) || ($MODULE == int2c)) then
-+      mv $MODULE.f $MODULE.junk
++      mv -f $MODULE_F $MODULE.junk
 +      sed -e "s/Q-/D-/g" \
 +          -e "s/Q+00/D+00/g" \
-+          -e "s/REAL\*16/DOUBLE PRECISION/" $MODULE.junk > $MODULE.f
++          -e "s/REAL\*16/DOUBLE PRECISION/" $MODULE.junk > $MODULE_F
 +      rm -f $MODULE.junk
 +   endif
-+   if (($MODULE == iolib) || ($MODULE == inputa)) then
-+      mv $MODULE.f $MODULE.junk
-+      sed -e "s/MXUNIT=299/MXUNIT=99/g" $MODULE.junk > $MODULE.f
++   if (($MODULE == iolib) || ($MODULE == inputa) || \
++       ($MODULE == gamess) || ($MODULE == mp2ims)) then
++      mv -f $MODULE_F $MODULE.junk
++      sed -e "s/MXUNIT=299/MXUNIT=99/g" $MODULE.junk > $MODULE_F
 +      rm -f $MODULE.junk
 +   endif
 +   set echo
-+   %%FC%% -c %%FFLAGS%% $OPT -malign-double -fautomatic \
-+           -Wno-globals -fno-globals $MODULE.f
++   g77 -c $OPT -malign-double -fautomatic \
++           -Wno-globals -fno-globals $MODULE_F
 +   unset echo
 +   breaksw
 +#
-+#   2. Using gfortran compiler.     Tested with gfortran 4.1.1 on FC5.
 +#   gfortran was included with Fedora Core distributions starting around FC4.
-+#   compiler version query: rpm -q gcc-gfortran
-+#
 +#   This is a 32 bit version, i.e. not using -fdefault-integer-8!
 +#   Unlike g77, gfortran allows for unit numbers above 100.
 +#   Like g77, gfortran does not support quadruple precision.
-+#
 +#      -Ox optimization level is from the gcc back end, x can be 0,1,2,3
 +#      -std=legacy  suppresses warnings about use of f77 constructs.
 +#
 +   case gfortran:
 +   set OPT='-O2'
 +   if ($MODULE == zheev)  set OPT='-O0'  # defensive compiling
-+   if (($MODULE == qeigen) || ($MODULE == int2c)) then
-+      mv $MODULE.f $MODULE.junk
-+      sed -e "s/Q-/D-/g" \
-+          -e "s/Q+00/D+00/g" \
-+          -e "s/REAL\*16/DOUBLE PRECISION/" $MODULE.junk > $MODULE.f
-+      rm -f $MODULE.junk
++   if ($MODULE == pcmcv2) set OPT='-O1'  # EFP+CPCM, ala Francois, v4.1.2
++   if ($GMS_GFORTRAN_VERNO == 4.6) then
++      if ($MODULE == cosmo)  set OPT='-O0'   # this issue seen in 4.6.x
++      if ($MODULE == tddgrd) set OPT='-O0'   # this issue seen in 4.6.1
++   endif
++   if ($GMS_GFORTRAN_VERNO == 4.7) then
++      if ($MODULE == cosmo)  set OPT='-O0'
++      if ($MODULE == dcscf)  set OPT='-O0'
++      if ($MODULE == rohfcc) set OPT='-O0'
++      if ($MODULE == tddgrd) set OPT='-O0'
 +   endif
++#        as of 4.6 tested in late 2011, gfortran can do q.p.!
++   switch ($GMS_GFORTRAN_VERNO)
++      case 4.0:
++      case 4.1:
++      case 4.2:
++      case 4.3:
++      case 4.4:
++      case 4.5:
++         set extraflags=''
++         if (($MODULE == qeigen) || ($MODULE == int2c)) then
++            mv -f $MODULE_F $MODULE.junk
++            sed -e "s/Q-/D-/g" \
++                -e "s/Q+00/D+00/g" \
++                -e "s/REAL\*16/DOUBLE PRECISION/" $MODULE.junk > $MODULE_F
++            rm -f $MODULE.junk
++         endif
++         breaksw
++      case 4.6:
++      case 4.7:
++         set extraflags='-fno-whole-file'
++         breaksw
++      default:
++         echo Unrecognized gfortran version
++         exit 4
++         breaksw
++   endsw
++#
 +   set echo
-+   %%FC%% -c $OPT %%FFLAGS%% -std=legacy $MODULE.f
++   %%FC%% -c $OPT -std=legacy $MODULE_F
 +   unset echo
 +   breaksw
 +#
 +#    3. Intel Fortran Compiler for Linux
-+#    Please see the 64 bit Linux target for more details as to where
-+#    to get this compiler, and its cost, and for an explanation of
-+#    the command line arguments.
 +#
 +#    Note that this is more agressive (-O3 compared to -O2) than the
-+#    other two places in this file where ifort is used.  If some
-+#    version gives you problems, drop this back to -O2.
-+#
++#    64 bit compile below.  If an ifort version gives you problems,
++#    drop the optimization back to -O2.
 +#    Dmitri likes to use "-O3 -xN -ssp -unroll8 -ip -pad -opt_report",
 +#    but that may cause certain ifort versions to fail on some files.
++#    See http://staff.aist.go.jp/d.g.fedorov/compgms.html for aggressive
++#    optimizations in 32 bit mode, as a function of the ifort version.
 +#
 +   case ifort:
 +   set OPT = '-O3'
 +   if ($MODULE == delocl) set OPT='-O0'  # from Cheol
++   if ($MODULE == prpamm) set OPT='-O0'  # for exam13
 +   if ($MODULE == zheev)  set OPT='-O0'
++   set EXTRAOPT=" "
++   if ($GMS_IFORT_VERNO >=  8) set EXTRAOPT="$EXTRAOPT -assume byterecl"
++   if ($GMS_IFORT_VERNO >= 10) set EXTRAOPT="$EXTRAOPT -vec-report0"
++   if ($GMS_IFORT_VERNO  < 12) set EXTRAOPT="$EXTRAOPT -w95 -cm"
++   if ($GMS_IFORT_VERNO >= 12) set EXTRAOPT="$EXTRAOPT -warn nousage -inline-level=0"
 +   set echo
-+   %%FC%% -c -i4 $OPT -auto -assume byterecl -w95 -cm $MODULE.f
-+   unset echo
-+   breaksw
-+#
-+#    4. Portland Group compiler.
-+#    This is a synthesis of recommendations from Fred Arnold and Brian
-+#    Salter-Duke.  -fast means -O2 -Munroll -Mnoframe, the latter option
-+#    seems to be the source of several incorrect results.  It is said that
-+#    "-Munroll" and "-tp p6" gives no significant improvement in run times.
-+#    The -Mlfs flag is supposed to cure the 2 GB file size limit.
-+#    exam19 may hang when using this compiler.  -Mlfs at link-time
-+#    enables large file support.  Your login script must set
-+#    up the use of this compiler, along the lines of
-+#          setenv PATH $PATH\:/usr/pgi/linux86/bin
-+#          setenv PGI /usr/pgi
-+#
-+   case pgf77:
-+   if (($MODULE == qfmm) || ($MODULE == solib) || ($MODULE == zheev)) then
-+       mv $MODULE.f $MODULE.junk
-+       sed -e s/DREAL/DBLE/g $MODULE.junk > $MODULE.f
-+       rm -f $MODULE.junk
-+   endif
-+   if (($MODULE == qeigen) || ($MODULE == int2c)) then
-+      mv $MODULE.f $MODULE.junk
-+      sed -e "s/Q-/D-/g" \
-+          -e "s/Q+00/D+00/g" \
-+          -e "s/REAL\*16/DOUBLE PRECISION/" $MODULE.junk > $MODULE.f
-+      rm -f $MODULE.junk
-+   endif
-+   set OPT = '-O2'
-+   if ($MODULE == zheev)  set OPT = '-O2 -Kieee'
-+   if ($MODULE == bassto) set OPT = '-O0'  # Takako
-+   set echo
-+   pgf77 -c $OPT -Msecond_underscore $MODULE.f
-+   unset echo
-+   breaksw
-+#
-+#   5. RedHat 4.x and 5.x's FORTRAN compiler was f2c/gcc.
-+#   This is a totally obsolete option, actually.
-+#
-+   case f2c:
-+   if (($MODULE == qfmm) || ($MODULE == solib) || ($MODULE == zheev)) then
-+       mv $MODULE.f $MODULE.junk
-+       sed -e s/DREAL/DBLE/g $MODULE.junk > $MODULE.f
-+       rm -f $MODULE.junk
-+   endif
-+   if (($MODULE == qeigen) || ($MODULE == int2c)) then
-+      mv $MODULE.f $MODULE.junk
-+      sed -e "s/Q-/D-/g" \
-+          -e "s/Q+00/D+00/g" \
-+          -e "s/REAL\*16/DOUBLE PRECISION/" $MODULE.junk > $MODULE.f
-+      rm -f $MODULE.junk
-+   endif
-+   if (($MODULE == iolib) || ($MODULE == inputa)) then
-+      mv $MODULE.f $MODULE.junk
-+      sed -e "s/MXUNIT=299/MXUNIT=99/g" $MODULE.junk > $MODULE.f
-+      rm -f $MODULE.junk
-+   endif
-+   set OPT = '-O3 -malign-double'
-+   set echo
-+   f2c -w66 -a -Nn1604 -Nx800 $MODULE.f
-+   gcc -c $OPT $MODULE.c
-+   rm -f $MODULE.c
++   ifort -c -i4 $OPT -ftz -auto $EXTRAOPT $MODULE_F
 +   unset echo
 +   breaksw
 +#
 +   default:
-+      echo Please spell your ia32 compiler correctly.
++      echo "Please spell your Linux 32 bit FORTRAN compiler name correctly."
 +      exit 4
 +      breaksw
 +   endsw
-+#                     ... end of FreeBSD on 32 bit PC compiler choices.
++#                     ... end of FreeBSD on 32 bit processors.
 +endif
-+if ($TARGET == freebsd-amd64) then
-+#
-+#   The only thing you need to change is the next line.
-+#   Note: you must make the analogous choice in compddi and lked, as well.
++
++
+ #
+ #   ------ Linux on 64 bit chips ------
+ #   This should work on any 64 bit Linux release, for any type of
+@@ -1897,6 +2052,136 @@
+    endsw
+ #                     ... end of Linux on 64 bit processors.
+ endif
++
++if ($TARGET == freebsd64) then
 +#
-+   set FORTRAN=%%FORTRAN%%      # choose from gfortran, ifort
++#  there are two supported 64 bit compilers: gfortran, ifort
 +#
-+   switch ($FORTRAN)
++   switch ($GMS_FORTRAN)
 +
 +   case gfortran:
++#           -finit-real=<zero|inf|-inf|nan>  could be interesting debug opt
++#           -fno-automatic forces static storage of all local variables
++#           -fno-whole-file suppresses argument's data type checking
 +      set OPT='-O2'
++      if (".$GMS_DEBUG_FLAGS" != .) set OPT="$GMS_DEBUG_FLAGS"
++
++      if ($GMS_GFORTRAN_VERNO == 4.6) then
++         if ($MODULE == cosmo)  set OPT='-O0'   # this issue seen in 4.6.1
++         if ($MODULE == tddgrd) set OPT='-O0'   # exam41, seen in 4.6.1
++      endif
++      if ($GMS_GFORTRAN_VERNO == 4.7) then
++         if ($MODULE == cosmo)  set OPT='-O0'
++         if ($MODULE == dcscf)  set OPT='-O0'   # exam44, seen in 4.7 only
++         if ($MODULE == rohfcc) set OPT='-O0'   # exam47, seen in 4.7 only
++         if ($MODULE == tddgrd) set OPT='-O0'
++      endif
 +      if ($MODULE == zheev)  set OPT='-O0'  # defensive compiling
-+      if (($MODULE == qeigen) || ($MODULE == int2c)) then
-+         mv -f $MODULE.f $MODULE.junk
-+         sed -e "s/Q-/D-/g" \
-+             -e "s/Q+00/D+00/g" \
-+             -e "s/REAL\*16/DOUBLE PRECISION/" $MODULE.junk > $MODULE.f
-+         rm -f $MODULE.junk
++
++      set EXTRAOPT=" "
++
++      if (($MODULE == cchem) || ($MODULE == ga)) then
++         mv $MODULE.f $MODULE.F
++         set MODULE_F=$MODULE.F
++         if ($GMS_LIBCCHEM == true) then
++            if ($MODULE == cchem) set EXTRAOPT="-DHAVE_CCHEM $extraflags"
++            if ($MODULE == ga)    set EXTRAOPT="-I$GMS_PATH/libcchem/ga/include"
++         endif
 +      endif
++#
++#        as of 4.6 tested in late 2011, gfortran can do q.p.!
++      switch ($GMS_GFORTRAN_VERNO)
++         case 4.0:
++         case 4.1:
++         case 4.2:
++         case 4.3:
++         case 4.4:
++         case 4.5:
++            if (($MODULE == qeigen) || ($MODULE == int2c)) then
++               mv -f $MODULE_F $MODULE.junk
++               sed -e "s/Q-/D-/g" \
++                   -e "s/Q+00/D+00/g" \
++                   -e "s/REAL\*16/DOUBLE PRECISION/" $MODULE.junk > $MODULE_F
++               rm -f $MODULE.junk
++            endif
++            breaksw
++         case 4.6:
++         case 4.7:
++            set EXTRAOPT="$EXTRAOPT -fno-whole-file"
++            breaksw
++         default:
++            echo Unrecognized gfortran version
++            exit 4
++            breaksw
++      endsw
++
 +      set echo
-+      %%FC%% -c %%FFLAGS%% -fdefault-integer-8 $OPT -std=legacy $MODULE.f
++      %%FC%% -c -fdefault-integer-8 $OPT -std=legacy $EXTRAOPT $MODULE_F
 +      unset echo
 +      breaksw
 +
 +   case ifort:
++#     -i4/-i8 set default integer length
++#     -On can have n=1,2,3.  Use of 3 caused problems with earlier
++#          compilers, so it isn't being used here.  Try it if you like.
++#     stack storage for locals is governed by -auto versus -save.
++#     -assume byterecl was introduced at ifort 8.0 (older versions will
++#        print a message saying this flag is ignored).  Newer versions
++#        need this so that direct access file opens are measured in
++#        bytes rather than the new default in v8.0, namely 4-byte units.
++#     -vec-report0 suppresses loop vectorization messages (new in 10.0)
++#     -w95 suppresses Hollerith initialization and other f90-like warnings
++#     -cm  means suppress comments about programming practices,
++#          these two options spelled '-warn nousage' at version 12.
++#     -WB means warn but don't fail on out-of-bounds array references
++#     -ftz flushes underflow results to zero
++#
 +      set OPT = '-O2'
-+      if ($MODULE == delocl) set OPT='-O0'
-+      if ($MODULE == zheev)  set OPT='-O0'
++      if (".$GMS_DEBUG_FLAGS" != .) set OPT="$GMS_DEBUG_FLAGS"
++#       alas, I'm so tired of hearing about so many versions failing to
++#       diagonalize, that this time critical code is run w/o optimization.
++#       Very many (all?) ifort versions have problems with eigen.src.
++      if ($MODULE == eigen)  set OPT='-O0' # read note just above.
++      if ($MODULE == fmo)    set OPT='-O1' # 12.0.4, exam37
++      if ($MODULE == guess)  set OPT='-O0' # 10.0, exam39
++      if ($MODULE == locpol) set OPT='-O1' # 10.0, makefp/gmres
++      if ($MODULE == morokm) set OPT='-O0' # Jan Fredin
++      if ($MODULE == prpel)  set OPT='-O1' # 10.0, exam13
++      if (($MODULE == rohfcc) && ($GMS_IFORT_VERNO == 12)) \
++                             set OPT='-O0' # exam42+exam47 (op.sh.CC,IP-EOM)
++      if ($MODULE == tdxitr) set OPT='-O1' # 10.0, exam39
++      if ($MODULE == vscf)   set OPT='-O0' # intensities for combinations
++      if ($MODULE == zheev)  set OPT='-O0' # defensive compiling
++
++      set EXTRAOPT=" "
++
++      if (($MODULE == cchem) || ($MODULE == ga)) then
++         mv $MODULE.f $MODULE.F
++         set MODULE_F=$MODULE.F
++         if ($GMS_LIBCCHEM == true) then
++            if ($MODULE == cchem) set EXTRAOPT="-DHAVE_CCHEM"
++            if ($MODULE == ga)    set EXTRAOPT="-I$GMS_PATH/libcchem/ga/include"
++         endif
++      endif
++
++      if ($GMS_IFORT_VERNO >=  8) set EXTRAOPT="$EXTRAOPT -assume byterecl"
++      if ($GMS_IFORT_VERNO >= 10) set EXTRAOPT="$EXTRAOPT -vec-report0"
++      if ($GMS_IFORT_VERNO  < 12) set EXTRAOPT="$EXTRAOPT -w95 -cm"
++      if ($GMS_IFORT_VERNO >= 12) set EXTRAOPT="$EXTRAOPT -warn nousage -inline-level=0"
 +      set echo
-+      %%FC%% -c -i8 %%FFLAGS%% $OPT -auto -assume byterecl -w95 -cm $MODULE.f
++      ifort -c -i8 $OPT -ftz -auto $EXTRAOPT $MODULE_F
 +      unset echo
 +      breaksw
 +#
 +   default:
-+      echo "Please spell your AMD64's FORTRAN compiler name correctly."
++      echo "Please spell your FreeBSD 64 bit FORTRAN compiler name correctly."
 +      exit 4
 +      breaksw
 +   endsw
-+#                     ... end of FreeBSD on 64 bit AMD processors.
++#                     ... end of FreeBSD on 64 bit processors.
 +endif
 +
++
  #
- #  Store the generated object code, clean up, and quit
- #
+ #   Apple Macintosh system using OS X
+ #    jargon: 10.0=cheetah, 10.1=puma,     10.2=jaguar,   10.3=panther,

Modified: head/science/gamess/files/patch-compall
==============================================================================
--- head/science/gamess/files/patch-compall	Tue Mar  5 11:26:54 2013	(r313449)
+++ head/science/gamess/files/patch-compall	Tue Mar  5 11:43:18 2013	(r313450)
@@ -1,35 +1,38 @@
---- compall.orig	2009-01-07 06:20:46.000000000 +0900
-+++ compall	2009-05-08 12:14:14.000000000 +0900
-@@ -10,11 +10,11 @@
- #      axp64,compaq-sc,cray-pvp,cray-t3e,cray-x1,cray-xd1,cray-xt3,
- #      fuji-pp32,fuji-pp64,hpux32,hpux64,ibm32,ibm64,ibm64-sp,ibm-bg,
- #      linux32,linux64,linux-ia64,mac32,mac64,macG5,necsx,
--#      sgi32,sgi64,sun32,sun64
-+#      sgi32,sgi64,sun32,sun64,freebsd-i386,freebsd-amd64
- #  2. Choose your GAMESS directory tree.
- #
--set TARGET=ibm64
--chdir /u1/mike/gamess
-+set TARGET=%%ARCH%%
-+#chdir /u1/mike/gamess
- #
- #  ----- and now the script begins...
- #
-@@ -69,6 +69,8 @@
- if  ($TARGET == linux64)    set CCOMP='gcc'
- if  ($TARGET == linux-ia64) set CCOMP='gcc'
- if  ($TARGET == necsx)      set CCOMP='c++'
-+if  ($TARGET == freebsd-amd64) set CCOMP=%%CC%%
-+if  ($TARGET == freebsd-i386)  set CCOMP=%%CC%%
+--- compall.orig	2012-09-07 22:32:57.000000000 +0900
++++ compall	2013-02-27 15:59:37.000000000 +0900
+@@ -58,6 +58,8 @@
+ if (($TARGET == ibm-bg) && ($GMS_BG_MODEL == P))  set CCOMP='bgxlc_r'
+ if  ($TARGET == linux32)                          set CCOMP='gcc'
+ if  ($TARGET == linux64)                          set CCOMP='gcc'
++if  ($TARGET == freebsd32)                          set CCOMP='%%CC%%'
++if  ($TARGET == freebsd64)                          set CCOMP='%%CC%%'
+ if  ($TARGET == necsx)                            set CCOMP='c++'
  #
  unset extraflags
- if ($TARGET == axp64)        set extraflags='-DCOMPAQ'
-@@ -99,6 +101,8 @@
-    if (`uname -p` == x86_64) set extraflags='-DLINUX64 -m64'
-    if (`uname -p` == ia64)   set extraflags='-DLINUX64'  # its always 64 bits
+@@ -96,6 +98,8 @@
+    if ($chip == x86_64) set extraflags='-DLINUX64 -m64'
+    if ($chip == ia64)   set extraflags='-DLINUX64'  # this always 64 bits
  endif
-+if ($TARGET == freebsd-amd64) set extraflags='-DLINUX64 -m64'
-+if ($TARGET == freebsd-i386)  set extraflags='-DLINUX32'
++if ($TARGET == freebsd32) set extraflags='-DLINUX32'
++if ($TARGET == freebsd64) set extraflags='-DLINUX64 -m64'
  if ($TARGET == mac32)        set extraflags='-DLINUX32'
  if ($TARGET == mac64)    set extraflags='-DLINUX64 -m64 -I/usr/include/malloc'
- if ($TARGET == macG5)        set extraflags='-DLINUX32'
+ if ($TARGET == necsx)        set extraflags='-DNECSX -size_t64'
+@@ -211,6 +215,8 @@
+ if ($TARGET == ibm-bg)     ./comp blas
+ if ($TARGET == linux32)    ./comp blas
+ if ($TARGET == linux64)    ./comp blas
++if ($TARGET == freebsd32)  ./comp blas
++if ($TARGET == freebsd64)  ./comp blas
+ if ($TARGET == mac64)      ./comp blas
+ if ($TARGET == sun32)      ./comp blas
+ if ($TARGET == sun64)      ./comp blas
+@@ -547,6 +553,8 @@
+                          set VB2000=false
+ if ($TARGET == linux64)  set VB2000=true
+ if ($TARGET == linux32)  set VB2000=true
++if ($TARGET == freebsd64) set VB2000=true
++if ($TARGET == freebsd32) set VB2000=true
+ if ($TARGET == mac64)    set VB2000=true
+ if ($VB2000 == true) then
+    ./comp vb2000

Modified: head/science/gamess/files/patch-compddi
==============================================================================
--- head/science/gamess/files/patch-compddi	Tue Mar  5 11:26:54 2013	(r313449)
+++ head/science/gamess/files/patch-compddi	Tue Mar  5 11:43:18 2013	(r313450)
@@ -1,28 +1,16 @@
---- ddi/compddi.orig	2008-12-04 01:22:29.000000000 +0900
-+++ ddi/compddi	2009-05-08 12:15:46.000000000 +0900
-@@ -13,9 +13,9 @@
- #      axp64,compaq-sc,cray-pvp,cray-t3e,cray-x1,cray-xd1,cray-xt3,
- #      fuji-pp32,fuji-pp64,hpux32,hpux64,ibm32,ibm64,ibm64-sp,ibm-bg,
- #      linux32,linux64,linux-ia64,mac32,mac64,macG5,necsx,
--#      sgi32,sgi64,sun32,sun64
-+#      sgi32,sgi64,sun32,sun64,freebsd-i386,freebsd-amd64
- #
--         set TARGET = ibm64
-+         set TARGET = %%ARCH%%
- 
- #  2. Choose DDI communication layer, the only legal values are
- #                   sockets,mixed,mpi,shmem,lapi,armci
-@@ -639,7 +639,77 @@
-      set RANLIB_FLAGS = ' '
- 
+--- ddi/compddi.orig	2013-03-05 12:39:40.000000000 +0900
++++ ddi/compddi	2013-03-05 12:40:52.000000000 +0900
+@@ -630,7 +630,79 @@
+      set FORT_FLAGS = '-O2 -qarch=440  -qflag=W:W -qhalt=W -qnosave '
+      set FORT_LIBS  = ''
    endif
 +# --------------------------------------- #
 +# FreeBSD for x86 PCs                     #
 +# --------------------------------------- #
  
-+  if($TARGET == freebsd-i386) then
++  if($TARGET == freebsd32) then
 +
-+     set FORTRAN=%%FORTRAN%%      # choose from g77, gfortran, ifort, pgf77, f2c
++     set FORTRAN=%%GMS_FORTRAN%%      # choose from g77, gfortran, ifort, pgf77, f2c
 +
 +     set CC = %%CC%%
 +     set CFLAGS = "-DLINUX -O3 -fstrict-aliasing -I./include"
@@ -48,20 +36,21 @@
 +
 +     set CLIBS  = "%%PTHREAD_LIBS%%"
 +     set F77_OPTS = "-DINT_SIZE=int -D_UNDERSCORES=$NumUS"
++     set FORT_FLAGS = '-O2'
 +     set AR_FLAGS     = 'cr'
 +     set RANLIB_FLAGS = ' '
-+
++     set FORT_LIBS = ' '
 +  endif
 +
 +# ------------- #
 +# FreeBSD amd64 #
 +# ------------- #
-+  if($TARGET == freebsd-amd64) then
++  if($TARGET == freebsd64) then
 +
 +     set CC = %%CC%%
 +     set CFLAGS = "-DLINUX -m64 -O3 -fstrict-aliasing -I./include"
 +
-+     set FORTRAN=%%FORTRAN%%
++     set FORTRAN=%%GMS_FORTRAN%%
 +     switch ($FORTRAN)
 +        case g77:
 +        case pgf77:
@@ -71,6 +60,7 @@
 +        case gfortran:
 +           set CFLAGS = "$CFLAGS -Dgetarg_=_gfortran_getarg_i4"
 +           set CFLAGS = "$CFLAGS -Diargc_=_gfortran_iargc"
++           set FORT_FLAGS = "-O2 $ARCH -fdefault-integer-8 -std=legacy"
 +           set NumUS=1
 +           breaksw
 +        case ifort:
@@ -85,8 +75,8 @@
 +     set F77_OPTS = "-DINT_SIZE=long -D_UNDERSCORES=$NumUS"
 +     set AR_FLAGS     = 'cr'
 +     set RANLIB_FLAGS = ' '
-+
++     set FORT_LIBS = ' '
 +  endif
  
- # -------- #
- # Mac OS X #
+ # ---------------------------------------- #
+ # Linux for 32 bit systems (Red Hat, etc.) #

Added: head/science/gamess/files/patch-gms-files.csh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/gamess/files/patch-gms-files.csh	Tue Mar  5 11:43:18 2013	(r313450)
@@ -0,0 +1,13 @@
+$FreeBSD$
+
+--- gms-files.csh	2013-03-05 18:04:02.000000000 +0900
++++ gms-files.csh	2013-03-05 18:05:38.000000000 +0900
+@@ -28,7 +28,7 @@
+ #     to see all the file definitions (one is just below).
+ #
+ #---quiet---set echo
+-setenv AUXDATA $GMSPATH/auxdata
++setenv AUXDATA %%PREFIX%%/share/gamess/auxdata
+ setenv  EXTBAS /dev/null
+ setenv  NUCBAS /dev/null
+ setenv  POSBAS /dev/null

Modified: head/science/gamess/files/patch-lked
==============================================================================
--- head/science/gamess/files/patch-lked	Tue Mar  5 11:26:54 2013	(r313449)
+++ head/science/gamess/files/patch-lked	Tue Mar  5 11:43:18 2013	(r313450)
@@ -1,26 +1,264 @@
---- lked.orig	2009-05-05 05:59:41.000000000 +0900
-+++ lked	2010-02-01 10:29:52.000000000 +0900
-@@ -12,11 +12,11 @@
- #       axp64,compaq-sc,cray-pvp,cray-t3e,cray-x1,cray-xd1,cray-xt3,
- #       fuji-pp32,fuji-pp64,hpux32,hpux64,ibm32,ibm64,ibm64-sp,ibm-bg,
- #       linux32,linux64,linux-ia64,mac32,mac64,macG5,necsx,
--#       sgi32,sgi64,sun32,sun64
-+#       sgi32,sgi64,sun32,sun64,freebsd-i386,freebsd-amd64
- #  2. Choose your GAMESS directory tree.
+--- lked.orig	2012-10-27 01:12:07.000000000 +0900
++++ lked	2013-02-27 16:06:32.000000000 +0900
+@@ -57,6 +57,8 @@
+                         set VB2000=false
+ if ($TARGET == linux64) set VB2000=true
+ if ($TARGET == linux32) set VB2000=true
++if ($TARGET == freebsd64) set VB2000=true
++if ($TARGET == freebsd32) set VB2000=true
+ if ($TARGET == mac64)   set VB2000=true
+ set XMVB=false
  #
--set TARGET=ibm64
--chdir /u1/mike/gamess
-+set TARGET=%%ARCH%%
-+#chdir /u1/mike/gamess
+@@ -632,6 +634,243 @@
+ endif
  #
- #    ---- and now the script begins...
+ endif
++
++if ($TARGET == freebsd32) then
++   set VECTOR=' '
++   set QUICHE='zunix.o'
++#
++#  settings which depend on the compiler choice:
++#
++   switch ($GMS_FORTRAN)
++     case g77:
++        set LDR='g77'
++        set LDOPTS=' '  # add '-Wl,-M' to see load map
++        set FORTLIBS=' '
++        breaksw
++     case gfortran:
++        set LDR=%%FC%%
++        set LDOPTS=' '
++        set FORTLIBS=' '
++        breaksw
++     case ifort:
++        set LDR='ifort'
++        set LDOPTS=' '  # add '-Wl,-M' to see load map
++        set FORTLIBS='-Vaxlib'
++        breaksw
++     case f2c:
++        set LDR='gcc'
++        set LDOPTS=' '
++        set FORTLIBS='-lf2c -lm'
++        breaksw
++     default:
++        echo Please spell your freebsd32 compiler correctly.
++        exit 4
++   endsw
++#
++#  settings which depend on the math library: mkl, atlas, acml, none
++#
++   switch ($GMS_MATHLIB)
++
++#       for MKL, we lack experience.  The following is the 64-bit
++#       stuff, with all 64's removed.  It might be right!
++#       For the case of "11", this has actually been verified.
++   case mkl:
++      set mpath=$GMS_MATHLIB_PATH
++      switch ($GMS_MKL_VERNO)
++        case 8:
++          set MATHLIBS="-L$mpath -lmkl_lapack   -lmkl -lguide -lpthread"
++          breaksw
++        case 9:
++          set MATHLIBS="-L$mpath -lmkl_lapack   -lmkl -lguide -lpthread"
++          breaksw
++        case 10:
++          #  next one forces single-threaded usage only...exactly what we want.
++          set MATHLIBS="-L$mpath -lmkl_intel -lmkl_sequential -lmkl_core"
++          breaksw
++        case 11:
++        case 12:
++          # next attempts a static link, whereas 10 above is a dynamic link.
++          # if this fails to work, try the version 10 lines shown just above.
++          set MATHLIBS="$mpath/libmkl_intel.a"
++          set MATHLIBS="$MATHLIBS $mpath/libmkl_sequential.a"
++          set MATHLIBS="$MATHLIBS $mpath/libmkl_core.a"
++          breaksw
++        default:
++          echo "unknown version number for MKL/linux32"
++          echo "please edit 'lked' to select the right 32 bit MKL libraries."
++          exit
++          breaksw
++      endsw
++      set BLAS=' '
++      breaksw
++
++   case atlas:
++      #     If the ATLAS comes with static libraries, link to them,
++      #     so that only the compile node has to have the libraries.
++      #     Otherwise, attempt a link against shared object libs.
++      #     See the 64 bit Atlas below for a way to fix the linker's
++      #     not being able to locate -lf77blas, if that happens.
++      if (-e $GMS_MATHLIB_PATH/libf77blas.a) then
++         set MATHLIBS="$GMS_MATHLIB_PATH/libf77blas.a"
++         set MATHLIBS="$MATHLIBS $GMS_MATHLIB_PATH/libatlas.a"
++      else
++         set MATHLIBS="-L$GMS_MATHLIB_PATH -lf77blas -latlas"
++      endif
++      set BLAS=' '
++      breaksw
++
++   case acml:
++      #     do a static link so that only compile node needs to install ACML
++      set MATHLIBS="$GMS_MATHLIB_PATH/libacml.a"
++      set BLAS=' '
++      breaksw
++
++   case none:
++   default:
++      echo "Warning.  No math library was found, you should install one."
++      echo "    MP2 calculations speed up about 2x with a math library."
++      echo "CCSD(T) calculations speed up about 5x with a math library."
++      set BLAS='%%BLAS%% %%LAPACK%%'
++      set MATHLIBS=' '
++      breaksw
++   endsw
++#
++   set LIBRARIES="$FORTLIBS $MATHLIBS"
++endif
++#
++#   ------ FreeBSD on 64 bit chips -----
++#
++if ($TARGET == freebsd64) then
++   set VECTOR=' '
++   set QUICHE='zunix.o'
++#
++#  settings which depend on the FORTRAN:
++#
++   switch ($GMS_FORTRAN)
++      case gfortran:
++         set LDR=%%FC%%
++         set LDOPTS=' '
++         set FORTLIBS=' '

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303051143.r25BhIHD056554>