Gentoo Archives: gentoo-commits

From: "Alexey Shvetsov (alexxy)" <alexxy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-chemistry/gamess: gamess-20090112.1-r1.ebuild metadata.xml ChangeLog
Date: Wed, 22 Apr 2009 13:08:21
Message-Id: E1LwcBB-0001jh-C3@stork.gentoo.org
1 alexxy 09/04/22 13:07:57
2
3 Modified: metadata.xml ChangeLog
4 Added: gamess-20090112.1-r1.ebuild
5 Log:
6 Add QM/MM support to GAMESS-US
7 (Portage version: 2.2_rc31/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.5 sci-chemistry/gamess/metadata.xml
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gamess/metadata.xml?rev=1.5&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gamess/metadata.xml?rev=1.5&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gamess/metadata.xml?r1=1.4&r2=1.5
15
16 Index: metadata.xml
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/gamess/metadata.xml,v
19 retrieving revision 1.4
20 retrieving revision 1.5
21 diff -u -r1.4 -r1.5
22 --- metadata.xml 20 Feb 2009 09:53:10 -0000 1.4
23 +++ metadata.xml 22 Apr 2009 13:07:57 -0000 1.5
24 @@ -10,4 +10,7 @@
25 <name>Alexey Shvetsov</name>
26 </maintainer>
27 <herd>sci-chemistry</herd>
28 + <use>
29 + <flag name='qmmm-tinker'>Enable tinker qmmm code</flag>
30 + </use>
31 </pkgmetadata>
32
33
34
35 1.31 sci-chemistry/gamess/ChangeLog
36
37 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gamess/ChangeLog?rev=1.31&view=markup
38 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gamess/ChangeLog?rev=1.31&content-type=text/plain
39 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gamess/ChangeLog?r1=1.30&r2=1.31
40
41 Index: ChangeLog
42 ===================================================================
43 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/gamess/ChangeLog,v
44 retrieving revision 1.30
45 retrieving revision 1.31
46 diff -u -r1.30 -r1.31
47 --- ChangeLog 20 Feb 2009 09:53:10 -0000 1.30
48 +++ ChangeLog 22 Apr 2009 13:07:57 -0000 1.31
49 @@ -1,6 +1,12 @@
50 # ChangeLog for sci-chemistry/gamess
51 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
52 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gamess/ChangeLog,v 1.30 2009/02/20 09:53:10 alexxy Exp $
53 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gamess/ChangeLog,v 1.31 2009/04/22 13:07:57 alexxy Exp $
54 +
55 +*gamess-20090112.1-r1 (22 Apr 2009)
56 +
57 + 22 Apr 2009; Alexey Shvetsov <alexxy@g.o> metadata.xml,
58 + +gamess-20090112.1-r1.ebuild:
59 + Add QM/MM support to GAMESS-US
60
61 *gamess-20090112.1 (20 Feb 2009)
62
63
64
65
66 1.1 sci-chemistry/gamess/gamess-20090112.1-r1.ebuild
67
68 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gamess/gamess-20090112.1-r1.ebuild?rev=1.1&view=markup
69 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/gamess/gamess-20090112.1-r1.ebuild?rev=1.1&content-type=text/plain
70
71 Index: gamess-20090112.1-r1.ebuild
72 ===================================================================
73 # Copyright 1999-2009 Gentoo Foundation
74 # Distributed under the terms of the GNU General Public License v2
75 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/gamess/gamess-20090112.1-r1.ebuild,v 1.1 2009/04/22 13:07:57 alexxy Exp $
76
77 inherit eutils toolchain-funcs fortran flag-o-matic
78
79 DESCRIPTION="A powerful quantum chemistry package"
80 LICENSE="gamess"
81 HOMEPAGE="http://www.msg.chem.iastate.edu/GAMESS/GAMESS.html"
82 SRC_URI="
83 ${P}.tar.gz
84 qmmm-tinker? ( tinker.tar.Z )"
85
86 SLOT="0"
87 KEYWORDS="~ppc ~x86 ~amd64"
88 IUSE="hardened qmmm-tinker"
89
90 RESTRICT="fetch"
91
92 DEPEND="app-shells/tcsh
93 hardened? ( sys-apps/paxctl )
94 virtual/blas"
95
96 RDEPEND="${DEPEND}
97 net-misc/openssh"
98
99 S="${WORKDIR}/${PN}"
100
101 GAMESS_DOWNLOAD="http://www.msg.ameslab.gov/GAMESS/License_Agreement.html"
102 GAMESS_VERSION="12 JAN 2009 (R1)"
103 FORTRAN="ifc g77 gfortran"
104
105 pkg_nofetch() {
106 echo
107 einfo "Please download ${PN}-current.tar.gz from"
108 einfo "${GAMESS_DOWNLOAD}."
109 einfo "Be sure to select the version ${GAMESS_VERSION} tarball!!"
110 einfo "Then move the tarball to"
111 einfo "${DISTDIR}/${P}.tar.gz"
112 if use qmmm-tinker ; then
113 einfo "Also download http://www.msg.ameslab.gov/GAMESS/tinker.tar.Z"
114 einfo "and place tinker.tar.Z to ${DISTDIR}"
115 fi
116 echo
117 }
118
119 pkg_setup() {
120 fortran_pkg_setup
121
122 # currently amd64 is only supported with gfortran
123 if [[ "${ARCH}" == "amd64" ]] && [[ "${FORTRANC}" != "gfortran" ]];
124 then die "You will need gfortran to compile gamess on amd64"
125 fi
126 }
127
128 src_unpack() {
129 unpack ${A}
130 mv tinker gamess/
131 # apply LINUX-arch patches to gamess makesfiles
132 epatch "${FILESDIR}"/${P}.gentoo.patch
133
134 # select arch
135 # NOTE: please leave lked alone; it should be good as is!!
136 cd "${S}"
137 local active_arch;
138 if [[ "${ARCH}" == "amd64" ]]; then
139 active_arch="linux64";
140 else
141 active_arch="linux32";
142 fi
143 sed -e "s:gentoo-target:${active_arch}:" \
144 -i comp compall ddi/compddi \
145 || die "Failed to select proper architecure"
146
147 # for hardened-gcc let't turn off ssp, since it breakes
148 # a few routines
149 if use hardened && [[ "${FORTRANC}" = "g77" ]]; then
150 FFLAGS="${FFLAGS} -fno-stack-protector-all"
151 fi
152
153 # enable NEO
154 sed -e "s:NEO=false:NEO=true:" -i compall lked || \
155 die "Failed to enable NEO code"
156 # enable GAMESS-qmmm
157 if use qmmm-tinker; then
158 sed -e "s:TINKER=false:TINKER=true:" -i compall lked || \
159 die "Failed to enable TINKER code"
160 fi
161 # greate proper activate sourcefile
162 cp "./tools/actvte.code" "./tools/actvte.f" || \
163 die "Failed to create actvte.f"
164 sed -e "s/^\*UNX/ /" -i "./tools/actvte.f" || \
165 die "Failed to perform UNX substitutions in actvte.f"
166
167 # fix GAMESS' compall script to use proper CC
168 sed -e "s|\$CCOMP -c \$extraflags source/zunix.c|$(tc-getCC) -c \$extraflags source/zunix.c|" \
169 -i compall || die "Failed setting up compall script"
170
171 # insert proper FFLAGS into GAMESS' comp makefile
172 # in case we're using ifc let's strip all the gcc
173 # specific stuff
174 if [[ "${FORTRANC}" == "ifc" ]]; then
175 sed -e "s/gentoo-OPT = '-O2'/OPT = '${FFLAGS} -quiet'/" \
176 -e "s/gentoo-g77/${FORTRANC}/" \
177 -i comp || die "Failed setting up comp script"
178 elif ! use x86; then
179 sed -e "s/-malign-double //" \
180 -e "s/gentoo-OPT = '-O2'/OPT = '${FFLAGS}'/" \
181 -e "s/gentoo-g77/${FORTRANC}/" \
182 -i comp || die "Failed setting up comp script"
183 else
184 sed -e "s/gentoo-OPT = '-O2'/OPT = '${FFLAGS}'/" \
185 -e "s/gentoo-g77/${FORTRANC}/" \
186 -i comp || die "Failed setting up comp script"
187 fi
188
189 # fix up GAMESS' linker script;
190 sed -e "s/gentoo-g77/${FORTRANC}/" \
191 -e "s/gentoo-LDOPTS=' '/LDOPTS='${LDFLAGS}'/" \
192 -i lked || die "Failed setting up lked script"
193
194 # fix up GAMESS' ddi TCP/IP socket build
195 sed -e "s/gentoo-CC = 'gcc'/CC = '$(tc-getCC)'/" \
196 -e "s/gentoo-g77/${FORTRANC}/" \
197 -i ddi/compddi || die "Failed setting up compddi script"
198
199 # fix up the checker scripts for gamess tests
200 sed -e "s:set GMSPATH:#set GMSPATH:g" \
201 -e "s:\$GMSPATH/tools/checktst:.:g" \
202 -i tools/checktst/checktst
203 }
204
205 src_compile() {
206 # build actvte
207 cd "${S}"/tools
208 "${FORTRANC}" -o actvte.x actvte.f || \
209 die "Failed to compile actvte.x"
210
211 # for hardened (PAX) users and ifc we need to turn
212 # MPROTECT off
213 if [[ "${FORTRANC}" == "ifc" ]] && use hardened; then
214 /sbin/paxctl -PemRxS actvte.x 2> /dev/null || \
215 die "paxctl failed on actvte.x"
216 fi
217
218 # build gamess
219 cd "${S}"
220 ./compall || die "compall failed"
221
222 # build the ddi TCP/IP socket stuff
223 cd ${S}/"ddi"
224 ./compddi || die "compddi failed"
225
226 # finally, link it all together
227 cd "${S}"
228 ./lked || die "lked failed"
229
230 # for hardened (PAX) users and ifc we need to turn
231 # MPROTECT off
232 if [[ "${FORTRANC}" == "ifc" ]] && use hardened; then
233 /sbin/paxctl -PemRxS ${PN}.00.x 2> /dev/null || \
234 die "paxctl failed on actvte.x"
235 fi
236 }
237
238 src_install() {
239 # the executables
240 dobin ${PN}.00.x ddi/ddikick.x rungms \
241 || die "Failed installing binaries"
242
243 # the docs
244 dodoc *.DOC qmnuc/*.DOC || die "Failed installing docs"
245
246 # install ericftm
247 insinto /usr/share/${PN}/ericfmt
248 doins ericfmt.dat || die "Failed installing ericfmt.dat"
249
250 # install mcpdata
251 insinto /usr/share/${PN}/mcpdata
252 doins mcpdata/* || die "Failed installing mcpdata"
253
254 # install tinker params in case of qmmm
255 if use qmmm-tinker ; then
256 dodoc tinker/simomm.doc || die "Failed installing docs"
257 insinto /usr/share/${PN}
258 doins -r tinker/params || die "Failed to install Tinker params"
259 fi
260
261 # install the tests the user should run, and
262 # fix up the runscript; also grab a copy of rungms
263 # so the user is ready to run the tests
264 insinto /usr/share/${PN}/tests
265 insopts -m0644
266 doins tests/* || die "Failed installing tests"
267 insopts -m0744
268 doins runall || die "Failed installing tests"
269 doins tools/checktst/checktst tools/checktst/chkabs || \
270 die "Failed to install main test checker"
271 doins tools/checktst/exam* || \
272 die "Failed to install individual test files"
273
274 insinto /usr/share/${PN}/neotests
275 insopts -m0644
276 doins -r qmnuc/neotests/* || die "Failed to install NEO tests"
277 }
278
279 pkg_postinst() {
280 echo
281 einfo "Before you use GAMESS for any serious work you HAVE"
282 einfo "to run the supplied test files located in"
283 einfo "/usr/share/gamess/tests and check them thoroughly."
284 einfo "Otherwise all scientific publications resulting from"
285 einfo "your GAMESS runs should be immediately rejected :)"
286 einfo "To do so copy the content of /usr/share/gamess/tests"
287 einfo "to some temporary location and execute './runall'. "
288 einfo "Then run the checktst script in the same directory to"
289 einfo "validate the tests."
290 einfo "Please consult TEST.DOC and the other docs!"
291
292 if [[ "${FORTRANC}" == "ifc" ]]; then
293 echo
294 ewarn "IMPORTANT NOTE: We STRONGLY recommend to stay away"
295 ewarn "from ifc-9.0 for now and use the ifc-8.1 series of"
296 ewarn "compilers UNLESS you can run through ALL of the "
297 ewarn "test cases (see above) successfully."
298 fi
299
300 echo
301 einfo "If you want to run on more than a single CPU"
302 einfo "you will have to acquaint yourself with the way GAMESS"
303 einfo "does multiprocessor runs and adjust rungms according to"
304 einfo "your target network architecture."
305 echo
306 }