summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Dittrich <markusle@gentoo.org>2005-12-07 15:01:23 +0000
committerMarkus Dittrich <markusle@gentoo.org>2005-12-07 15:01:23 +0000
commit242dc0725548bad9c59a3b079debc55e2f2fc5a3 (patch)
treebc8528b382864f9ccdd6d2cf4ea961cac03385ff /sci-chemistry
parentFixed confd and initscript. Other changes for bug #111373 (diff)
downloadgentoo-2-242dc0725548bad9c59a3b079debc55e2f2fc5a3.tar.gz
gentoo-2-242dc0725548bad9c59a3b079debc55e2f2fc5a3.tar.bz2
gentoo-2-242dc0725548bad9c59a3b079debc55e2f2fc5a3.zip
This revision has the TDHF code enabled, which should now work properly with the patched g77 (see bug #114367).
(Portage version: 2.0.51.22-r3)
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/gamess/ChangeLog9
-rw-r--r--sci-chemistry/gamess/Manifest3
-rw-r--r--sci-chemistry/gamess/files/comp-gentoo.1.patch42
-rw-r--r--sci-chemistry/gamess/files/digest-gamess-05272005.3-r21
-rw-r--r--sci-chemistry/gamess/gamess-05272005.3-r2.ebuild223
5 files changed, 277 insertions, 1 deletions
diff --git a/sci-chemistry/gamess/ChangeLog b/sci-chemistry/gamess/ChangeLog
index 92285ed9cd43..e5a803c20357 100644
--- a/sci-chemistry/gamess/ChangeLog
+++ b/sci-chemistry/gamess/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sci-chemistry/gamess
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gamess/ChangeLog,v 1.4 2005/12/04 17:00:50 markusle Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gamess/ChangeLog,v 1.5 2005/12/07 15:01:23 markusle Exp $
+
+*gamess-05272005.3-r2 (07 Dec 2005)
+
+ 07 Dec 2005; Markus Dittrich <markusle@gentoo.org>
+ +files/comp-gentoo.1.patch, +gamess-05272005.3-r2.ebuild:
+ This revision has the TDHF code enabled, which should now work properly with
+ the patched g77 (see bug #114367).
*gamess-05272005.3-r1 (04 Dec 2005)
diff --git a/sci-chemistry/gamess/Manifest b/sci-chemistry/gamess/Manifest
index a982b9a636b7..354db2050d6b 100644
--- a/sci-chemistry/gamess/Manifest
+++ b/sci-chemistry/gamess/Manifest
@@ -1,10 +1,13 @@
+MD5 326cc14bac3829b6323737fdefee9fb6 gamess-05272005.3-r2.ebuild 6664
MD5 2e42d76c41b4338282fe7e1b5cfd3093 gamess-05272005.3-r1.ebuild 6664
MD5 81efef3dd25f618ec470f589743f1882 gamess-05272005.3.ebuild 7057
MD5 63b363841b3744759ec0c415fcc6d8d3 ChangeLog 1463
MD5 041650a939ada57b9df1755a488ad1b7 metadata.xml 254
MD5 bfc4049f6e2546889b161c6c9b3be72f files/runall-gentoo.patch 688
MD5 51d32e48137f8f59ff14cd870cbc70b2 files/digest-gamess-05272005.3-r1 70
+MD5 51d32e48137f8f59ff14cd870cbc70b2 files/digest-gamess-05272005.3-r2 70
MD5 d2f6837d02ac960e7bed4addf9632eec files/lked-gentoo.patch 783
+MD5 5b5d5d5d530d675c1f8fea3e2bda27c6 files/comp-gentoo.1.patch 1376
MD5 51d32e48137f8f59ff14cd870cbc70b2 files/digest-gamess-05272005.3 70
MD5 e980cc327bd2de746b91a395f1af3e0f files/compddi-gentoo.patch 975
MD5 cc629344d268783ea8be555bd06249af files/comp-gentoo.patch 1276
diff --git a/sci-chemistry/gamess/files/comp-gentoo.1.patch b/sci-chemistry/gamess/files/comp-gentoo.1.patch
new file mode 100644
index 000000000000..bed62dd1ebb8
--- /dev/null
+++ b/sci-chemistry/gamess/files/comp-gentoo.1.patch
@@ -0,0 +1,42 @@
+--- gamess/comp 2005-11-14 15:44:06.000000000 +0000
++++ gamess-patched/comp 2005-12-07 03:08:59.000000000 +0000
+@@ -11,8 +11,8 @@
+ # linux-ia64,linux-pc,mac32,macG5,necsx,sgi32,sgi64,sun32,sun64
+ # 2. Choose your GAMESS directory tree.
+ #
+-set TARGET=ibm64
+-chdir /u1/mike/gamess
++set TARGET=linux-pc
++#chdir /u1/mike/gamess
+ #
+ # ---- and now the script begins...
+ #
+@@ -1015,11 +1015,12 @@
+ # Pentium II fractionally). None of these optimizations are used below.
+ #
+ if ($TARGET == linux-pc) then
+- set OPT = '-O2'
++ set gentoo-OPT = '-O2'
+ if ($MODULE == ormas1) set OPT='-O2 -fno-move-all-movables' # RH9, g77 3.3
+ #
+ # g77 does not support FORTRAN logical units above 99, or 128 bit math.
+ #
++ if ($MODULE == zheev) set OPT='-O1'
+ if (($MODULE == qeigen) || ($MODULE == int2c)) then
+ mv $MODULE.f $MODULE.junk
+ sed -e "s/Q-/D-/g" \
+@@ -1027,13 +1028,8 @@
+ -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 echo
+- g77 -c $OPT -malign-double -fautomatic \
++ gentoo-g77 -c $OPT -malign-double -fautomatic \
+ -Wno-globals -fno-globals $MODULE.f
+ unset echo
+ endif
diff --git a/sci-chemistry/gamess/files/digest-gamess-05272005.3-r2 b/sci-chemistry/gamess/files/digest-gamess-05272005.3-r2
new file mode 100644
index 000000000000..fe86e56c2ef2
--- /dev/null
+++ b/sci-chemistry/gamess/files/digest-gamess-05272005.3-r2
@@ -0,0 +1 @@
+MD5 1478f6223f5096d00552806f2a98fd9e gamess-05272005.3.tar.gz 6339705
diff --git a/sci-chemistry/gamess/gamess-05272005.3-r2.ebuild b/sci-chemistry/gamess/gamess-05272005.3-r2.ebuild
new file mode 100644
index 000000000000..7968dabc6ccb
--- /dev/null
+++ b/sci-chemistry/gamess/gamess-05272005.3-r2.ebuild
@@ -0,0 +1,223 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gamess/gamess-05272005.3-r2.ebuild,v 1.1 2005/12/07 15:01:23 markusle Exp $
+
+inherit eutils toolchain-funcs fortran
+
+DESCRIPTION="A powerful quantum chemistry package"
+LICENSE="gamess"
+HOMEPAGE="http://www.msg.ameslab.gov/GAMESS/GAMESS.html"
+SRC_URI="${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="ifc hardened blas"
+
+RESTRICT="fetch"
+
+DEPEND="app-shells/tcsh
+ ifc? ( >=dev-lang/ifc-8.1 )
+ hardened? ( sys-apps/paxctl )
+ blas? ( virtual/blas )"
+
+RDEPEND="app-shells/tcsh
+ net-misc/openssh
+ ifc? ( >=dev-lang/ifc-8.1 )"
+
+S="${WORKDIR}/${PN}"
+
+GAMESS_DOWNLOAD="http://www.msg.ameslab.gov/GAMESS/License_Agreement.html"
+GAMESS_VERSION="27 JUN 2005 (R3)"
+
+
+pkg_nofetch() {
+ echo
+ einfo "Please download ${PN}-current.tar.gz from"
+ einfo "${GAMESS_DOWNLOAD}."
+ einfo "Be sure to select the version ${GAMESS_VERSION} tarball!!"
+ einfo "Then move the tarball to"
+ einfo "${DISTDIR}/${P}.tar.gz"
+ echo
+}
+
+pkg_setup() {
+ # make sure we have the proper fortan compiler;
+ # use ifc for USE="ifc" and g77 otherwise
+ if use ifc; then
+ need_fortran ifc
+ else
+ need_fortran g77
+ fi
+
+ # blas and ifc don't go together
+ if use blas && use ifc; then
+ die "${PN} can not be compiled with USE=blas and USE=ifc"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ # apply LINUX-arch patches to gamess makesfiles
+ epatch "${FILESDIR}"/comp-gentoo.1.patch
+ epatch "${FILESDIR}"/compall-gentoo.patch
+ epatch "${FILESDIR}"/lked-gentoo.patch
+ epatch "${FILESDIR}"/ddi-use-ssh-gentoo.patch
+ epatch "${FILESDIR}"/compddi-gentoo.patch
+ epatch "${FILESDIR}"/rungms-gentoo.1.patch
+ epatch "${FILESDIR}"/runall-gentoo.1.patch
+
+ # for hardened-gcc let't turn off ssp, since it breakes
+ # a few routines
+ cd "${S}"
+ if use hardened && [[ $(tc-getF77) = f77 ]]; then
+ FFLAGS="${FFLAGS} -fno-stack-protector-all"
+ fi
+
+ # greate proper activate sourcefile
+ cp "./tools/actvte.code" "./tools/actvte.f" || \
+ die || "Failed to create actvte.f"
+ sed -e "s/^\*UNX/ /" -i "./tools/actvte.f" || \
+ die || "Failed to perform UNX substitutions in actvte.f"
+
+ # fix GAMESS' compall script to use proper CC
+ sed -e "s|\$CCOMP -c \$extraflags source/zunix.c|$(tc-getCC) -c \$extraflags source/zunix.c|" \
+ -i compall || die "Failed setting up compall script"
+
+ # insert proper FFLAGS into GAMESS' comp makefile
+ # in case we're using ifc let's strip all the gcc
+ # specific stuff
+ if use ifc; then
+ sed -e "s/-malign-double -fautomatic /-cm -w \$MODULE.f/" \
+ -e "s/-Wno-globals -fno-globals \$MODULE.f//" \
+ -e "s/gentoo-OPT = '-O2'/OPT = '${FFLAGS} -quiet'/" \
+ -e "s/gentoo-g77/$(tc-getF77)/" \
+ -i comp || die "Failed setting up comp script"
+ else
+ sed -e "s/gentoo-OPT = '-O2'/OPT = '${FFLAGS}'/" \
+ -e "s/gentoo-g77/$(tc-getF77)/" \
+ -i comp || die "Failed setting up comp script"
+ fi
+
+ # use proper blas
+ if ! use blas; then
+ sed -e "s|/usr/lib/libblas.a|/usr/lib/dontuselibblas.a|" \
+ -i lked || die "Failed to adjust blas in lked"
+ fi
+
+ # fix up GAMESS' linker script;
+ if use ifc; then
+ sed -e "s/gentoo-LDR='g77'/LDR='$(tc-getF77)'/" \
+ -e "s/gentoo-LDOPTS=' '/LDOPTS='${LDFLAGS}'/" \
+ -i lked || die "Failed setting up lked script"
+ else
+ sed -e "s/gentoo-LDR='g77'/LDR='$(tc-getF77)'/" \
+ -e "s/gentoo-LDOPTS=' '/LDOPTS='${LDFLAGS}'/" \
+ -i lked || die "Failed patching lked script"
+ fi
+
+ # fix up GAMESS' ddi TCP/IP socket build
+ sed -e "s/gentoo-CC = 'gcc'/CC = '$(tc-getCC)'/" \
+ -i ddi/compddi || die "Failed setting up compddi script"
+
+ # for ifc we have to fix the number of underscores of fortran
+ # symbols, otherwise the linker will barf
+ if use ifc; then
+ sed -e "s/gentoo-F77_OPTS = '-DINT_SIZE=int -D_UNDERSCORES=2/F77_OPTS = '-DINT_SIZE=int -D_UNDERSCORES=1/" \
+ -i ddi/compddi || die "Failed fixing underscores in compddi"
+ else
+ sed -e "s/gentoo-F77_OPTS/F77_OPTS/" \
+ -i ddi/compddi || die "Failed fixing underscores in compddi"
+ fi
+}
+
+src_compile() {
+ # build actvte
+ cd "${S}"/tools
+ $(tc-getF77) -o actvte.x actvte.f || die "Failed to compile actvte.x"
+
+ # for hardened (PAX) users and ifc we need to turn
+ # MPROTECT off
+ if use ifc && use hardened; then
+ /sbin/paxctl -PemRxS actvte.x 2> /dev/null || \
+ die "paxctl failed on actvte.x"
+ fi
+
+ # build gamess
+ cd "${S}"
+ ./compall || die "compall failed"
+
+ # build the ddi TCP/IP socket stuff
+ cd ${S}/"ddi"
+ ./compddi || die "compddi failed"
+
+ # finally, link it all together
+ cd "${S}"
+ ./lked || die "lked failed"
+
+ # for hardened (PAX) users and ifc we need to turn
+ # MPROTECT off
+ if use ifc && use hardened; then
+ /sbin/paxctl -PemRxS ${PN}.00.x 2> /dev/null || \
+ die "paxctl failed on actvte.x"
+ fi
+}
+
+src_install() {
+ cd "${S}"
+
+ # the executables
+ dobin ${PN}.00.x ddi/ddikick.x rungms \
+ || die "Failed installing binaries"
+
+ # the docs
+ dodoc *.DOC || die "Failed installing docs"
+
+ # install ericftm
+ insinto /usr/share/${PN}/ericfmt
+ doins ericfmt.dat || die "Failed installing ericfmt.dat"
+
+ # install mcpdata
+ insinto /usr/share/${PN}/mcpdata
+ doins mcpdata/* || die "Failed installing mcpdata"
+
+ # install the tests the user should run, and
+ # fix up the runscript; also grab a copy of rungms
+ # so the user is ready to run the tests
+ insinto /usr/share/${PN}/tests
+ insopts -m0644
+ doins tests/* || die "Failed installing tests"
+ insopts -m0744
+ doins runall || die "Failed installing tests"
+}
+
+pkg_postinst() {
+ echo
+ ewarn "Before you use GAMESS for any serious work you HAVE"
+ ewarn "to run the supplied test files located in"
+ ewarn "/usr/share/gamess/tests and check them thoroughly."
+ ewarn "Otherwise all scientific publications resulting from"
+ ewarn "your GAMESS runs should be immediately rejected :)"
+ ewarn "To do so copy the content of /usr/share/gamess/tests"
+ ewarn "to some temporary location and execute './runall'. "
+ ewarn "Please consult TEST.DOC and the other docs!"
+ ewarn "If exam39 fails or you have problems with the TDHF"
+ ewarn "code due to bad file unit numbers you will have to"
+ ewarn "re-emerge and re-compile gcc. Please refer to"
+ ewarn "bug #114367 regarding this issue!"
+
+ if use ifc; then
+ echo
+ ewarn "IMPORTANT NOTE: We STRONGLY recommend to stay away"
+ ewarn "from ifc-9.0 for now and use the ifc-8.1 series of"
+ ewarn "compilers UNLESS you can run through ALL of the "
+ ewarn "test cases (see above) successfully."
+ fi
+
+ echo
+ einfo "If you want to run on more than a single CPU"
+ einfo "you will have to acquaint yourself with the way GAMESS"
+ einfo "does multiprocessor runs and adjust rungms according to"
+ einfo "your target network architecture."
+ echo
+}