Gentoo Archives: gentoo-commits

From: Reinis Danne <rei4dan@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-chemistry/gamess/files/, sci-chemistry/gamess/
Date: Sun, 29 Sep 2013 16:12:23
Message-Id: 1380471053.81dd3085772aa83b590f20538b1ea60eaf9f24df.rei4dan@gentoo
1 commit: 81dd3085772aa83b590f20538b1ea60eaf9f24df
2 Author: Reinis Danne <rei4dan <AT> gmail <DOT> com>
3 AuthorDate: Sun Sep 29 16:10:53 2013 +0000
4 Commit: Reinis Danne <rei4dan <AT> gmail <DOT> com>
5 CommitDate: Sun Sep 29 16:10:53 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=81dd3085
7
8 sci-chemistry/gamess: Bump to 20130501.1
9
10 ---
11 sci-chemistry/gamess/ChangeLog | 6 +
12 .../gamess/files/gamess-20130501.1.gentoo.patch | 206 +++++++++++++
13 sci-chemistry/gamess/gamess-20130501.1.ebuild | 338 +++++++++++++++++++++
14 3 files changed, 550 insertions(+)
15
16 diff --git a/sci-chemistry/gamess/ChangeLog b/sci-chemistry/gamess/ChangeLog
17 index fc9a8d7..252e34e 100644
18 --- a/sci-chemistry/gamess/ChangeLog
19 +++ b/sci-chemistry/gamess/ChangeLog
20 @@ -2,6 +2,12 @@
21 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
22 # $Header: $
23
24 +*gamess-20130501.1 (29 Sep 2013)
25 +
26 + 29 Sep 2013; Reinis Danne <rei4dan@×××××.com> +gamess-20130501.1.ebuild,
27 + +files/gamess-20130501.1.gentoo.patch:
28 + Bump to 2013 May 01 (R1).
29 +
30 27 Feb 2013; Justin Lecher <jlec@g.o> gamess-20120501.1.ebuild,
31 files/gamess-20120501.1.gentoo.patch, metadata.xml:
32 Use PKG_CONFIG instead of generic pkg-config
33
34 diff --git a/sci-chemistry/gamess/files/gamess-20130501.1.gentoo.patch b/sci-chemistry/gamess/files/gamess-20130501.1.gentoo.patch
35 new file mode 100644
36 index 0000000..54a403b
37 --- /dev/null
38 +++ b/sci-chemistry/gamess/files/gamess-20130501.1.gentoo.patch
39 @@ -0,0 +1,206 @@
40 +diff -urN gamess.orig/comp gamess.new/comp
41 +--- gamess.orig/comp 2013-05-03 23:18:53.000000000 +0300
42 ++++ gamess.new/comp 2013-09-28 18:32:46.621341822 +0300
43 +@@ -1544,7 +1544,7 @@
44 + # g77 does not support FORTRAN logical units above 99, or 128 bit math.
45 + #
46 + case g77:
47 +- set OPT = '-O2'
48 ++ set gentoo-OPT = '-O2'
49 + if ($MODULE == ormas1) set OPT='-O2 -fno-move-all-movables' # RH9, g77 3.3
50 + if ($MODULE == zheev) set OPT='-O0' # defensive compiling
51 + if (($MODULE == qeigen) || ($MODULE == int2c)) then
52 +@@ -1574,7 +1574,7 @@
53 + # -std=legacy suppresses warnings about use of f77 constructs.
54 + #
55 + case gfortran:
56 +- set OPT='-O2'
57 ++ set gentoo-OPT='-O2'
58 + if ($MODULE == zheev) set OPT='-O0' # defensive compiling
59 + if ($MODULE == pcmcv2) set OPT='-O1' # EFP+CPCM, ala Francois, v4.1.2
60 + if ($GMS_GFORTRAN_VERNO == 4.6) then
61 +@@ -1636,7 +1636,7 @@
62 + # optimizations in 32 bit mode, as a function of the ifort version.
63 + #
64 + case ifort:
65 +- set OPT = '-O3'
66 ++ set gentoo-OPT = '-O2'
67 + if ($MODULE == delocl) set OPT='-O0' # from Cheol
68 + if ($MODULE == prpamm) set OPT='-O0' # for exam13
69 + if ($MODULE == zheev) set OPT='-O0'
70 +@@ -1755,7 +1755,7 @@
71 + # -finit-real=<zero|inf|-inf|nan> could be interesting debug opt
72 + # -fno-automatic forces static storage of all local variables
73 + # -fno-whole-file suppresses argument's data type checking
74 +- set OPT='-O2'
75 ++ set gentoo-OPT='-O2'
76 + if (".$GMS_DEBUG_FLAGS" != .) set OPT="$GMS_DEBUG_FLAGS"
77 +
78 + if ($GMS_GFORTRAN_VERNO == 4.6) then
79 +@@ -1804,6 +1804,7 @@
80 + breaksw
81 + case 4.6:
82 + case 4.7:
83 ++ case 4.8:
84 + set EXTRAOPT="$EXTRAOPT -fno-whole-file"
85 + breaksw
86 + default:
87 +@@ -1833,7 +1834,7 @@
88 + # -WB means warn but don't fail on out-of-bounds array references
89 + # -ftz flushes underflow results to zero
90 + #
91 +- set OPT = '-O2'
92 ++ set gentoo-OPT = '-O2'
93 + if (".$GMS_DEBUG_FLAGS" != .) set OPT="$GMS_DEBUG_FLAGS"
94 + # alas, I'm so tired of hearing about so many versions failing to
95 + # diagonalize, that this time critical code is run w/o optimization.
96 +diff -urN gamess.orig/ddi/compddi gamess.new/ddi/compddi
97 +--- gamess.orig/ddi/compddi 2013-05-03 23:14:15.000000000 +0300
98 ++++ gamess.new/ddi/compddi 2013-09-28 18:09:10.390246354 +0300
99 +@@ -640,7 +640,7 @@
100 +
101 + set FORTRAN=$GMS_FORTRAN # might be g77, gfortran, ifort, pgf77, f2c
102 +
103 +- set CC = 'gcc'
104 ++ set gentoo-CC = 'gcc'
105 + set CFLAGS = "-DLINUX -O3 -fstrict-aliasing -I./"
106 + set CLIBS = "-lpthread"
107 +
108 +@@ -694,7 +694,7 @@
109 + set ARCH='-m64'
110 + if (`uname -p` == ia64) set ARCH=''
111 +
112 +- set CC = 'gcc'
113 ++ set gentoo-CC = 'gcc'
114 + set CFLAGS = "-DLINUX $ARCH -O3 -fstrict-aliasing -I./"
115 + set CLIBS = "-lpthread"
116 +
117 +diff -urN gamess.orig/ddi/kickoff/ddikick.c gamess.new/ddi/kickoff/ddikick.c
118 +--- gamess.orig/ddi/kickoff/ddikick.c 2011-11-22 21:54:33.000000000 +0200
119 ++++ gamess.new/ddi/kickoff/ddikick.c 2013-09-28 18:10:27.380423340 +0300
120 +@@ -105,7 +105,7 @@
121 + remoteshell = argv[++i];
122 + } else {
123 + if((remoteshell = getenv("DDI_RSH")) == NULL) {
124 +- remoteshell = (char *) strdup("rsh");
125 ++ remoteshell = (char *) strdup("ssh");
126 + }
127 + }
128 +
129 +diff -urN gamess.orig/gms-files.csh gamess.new/gms-files.csh
130 +--- gamess.orig/gms-files.csh 2013-05-03 22:18:03.000000000 +0300
131 ++++ gamess.new/gms-files.csh 2013-09-28 18:28:04.952744349 +0300
132 +@@ -28,7 +28,7 @@
133 + # to see all the file definitions (one is just below).
134 + #
135 + #---quiet---set echo
136 +-setenv AUXDATA $GMSPATH/auxdata
137 ++setenv AUXDATA /usr/share/gamess
138 + setenv EXTBAS /dev/null
139 + setenv NUCBAS /dev/null
140 + setenv POSBAS /dev/null
141 +diff -urN gamess.orig/lked gamess.new/lked
142 +--- gamess.orig/lked 2013-05-17 19:15:06.000000000 +0300
143 ++++ gamess.new/lked 2013-09-28 18:20:14.922777944 +0300
144 +@@ -384,17 +384,17 @@
145 + switch ($GMS_FORTRAN)
146 + case g77:
147 + set LDR='g77'
148 +- set LDOPTS=' ' # add '-Wl,-M' to see load map
149 ++ set gentoo-LDOPTS=' ' # add '-Wl,-M' to see load map
150 + set FORTLIBS=' '
151 + breaksw
152 + case gfortran:
153 + set LDR='gfortran'
154 +- set LDOPTS=' '
155 ++ set gentoo-LDOPTS=' '
156 + set FORTLIBS=' '
157 + breaksw
158 + case ifort:
159 + set LDR='ifort'
160 +- set LDOPTS=' ' # add '-Wl,-M' to see load map
161 ++ set gentoo-LDOPTS=' ' # add '-Wl,-M' to see load map
162 + set FORTLIBS='-Vaxlib'
163 + breaksw
164 + case pgfortran
165 +@@ -405,7 +405,7 @@
166 + breaksw
167 + case f2c:
168 + set LDR='gcc'
169 +- set LDOPTS=' '
170 ++ set gentoo-LDOPTS=' '
171 + set FORTLIBS='-lf2c -lm'
172 + breaksw
173 + default:
174 +@@ -458,12 +458,7 @@
175 + # Otherwise, attempt a link against shared object libs.
176 + # See the 64 bit Atlas below for a way to fix the linker's
177 + # not being able to locate -lf77blas, if that happens.
178 +- if (-e $GMS_MATHLIB_PATH/libf77blas.a) then
179 +- set MATHLIBS="$GMS_MATHLIB_PATH/libf77blas.a"
180 +- set MATHLIBS="$MATHLIBS $GMS_MATHLIB_PATH/libatlas.a"
181 +- else
182 +- set MATHLIBS="-L$GMS_MATHLIB_PATH -lf77blas -latlas"
183 +- endif
184 ++ set MATHLIBS=`${PKG_CONFIG} --libs blas`
185 + set BLAS=' '
186 + breaksw
187 +
188 +@@ -497,12 +492,12 @@
189 + switch ($GMS_FORTRAN)
190 + case gfortran:
191 + set LDR='gfortran'
192 +- set LDOPTS=' '
193 ++ set gentoo-LDOPTS=' '
194 + set FORTLIBS=' '
195 + breaksw
196 + case ifort:
197 + set LDR='ifort'
198 +- set LDOPTS='-i8' # -Wl,-M generates a load map
199 ++ set gentoo-LDOPTS=' ' # -Wl,-M generates a load map
200 + # this auxiliary library seems to have disappeared in ifort 10
201 + set FORTLIBS=' '
202 + if($GMS_IFORT_VERNO < 10) set FORTLIBS='-Vaxlib'
203 +@@ -619,13 +614,7 @@
204 + # ln -s liblapack_atlas.so.3.0 liblapack.so
205 + # ln -s liblapack.so.3.0 liblapack.so
206 + # It is strange the RPM's don't do these soft links for us.
207 +- if (-e $GMS_MATHLIB_PATH/libf77blas.a) then
208 +- set MATHLIBS="$GMS_MATHLIB_PATH/libf77blas.a"
209 +- set MATHLIBS="$MATHLIBS $GMS_MATHLIB_PATH/libatlas.a"
210 +- else
211 +- set MATHLIBS="-L$GMS_MATHLIB_PATH -lf77blas -latlas"
212 +- if ($CCHEM == true) set MATHLIBS="$MATHLIBS -llapack"
213 +- endif
214 ++ set MATHLIBS=`${PKG_CONFIG} --libs blas`
215 + set BLAS=' '
216 + breaksw
217 +
218 +diff -urN gamess.orig/runall gamess.new/runall
219 +--- gamess.orig/runall 2012-02-03 01:55:01.000000000 +0200
220 ++++ gamess.new/runall 2013-09-28 18:20:59.446867749 +0300
221 +@@ -46,7 +46,7 @@
222 + xgms -v $VERNO -q $QUEUE -l exam$NUM.log exam$NUM
223 + sleep 2
224 + else
225 +- ./rungms exam$NUM $VERNO 1 >& exam$NUM.log
226 ++ rungms exam$NUM $VERNO 1 >& exam$NUM.log
227 + endif
228 + @ i++
229 + end
230 +diff -urN gamess.orig/rungms gamess.new/rungms
231 +--- gamess.orig/rungms 2013-05-17 19:15:11.000000000 +0300
232 ++++ gamess.new/rungms 2013-09-28 18:26:53.268594417 +0300
233 +@@ -60,9 +60,9 @@
234 + # See also a very old LoadLeveler "ll-gms" for some IBM systems.
235 + #
236 + set TARGET=sockets
237 +-set SCR=/scr/$USER
238 +-set USERSCR=~$USER/scr
239 +-set GMSPATH=/u1/mike/gamess
240 ++set SCR=`pwd`
241 ++set USERSCR=`pwd`
242 ++set GMSPATH=/usr/bin
243 + #
244 + set JOB=$1 # name of the input file xxx.inp, give only the xxx part
245 + set VERNO=$2 # revision number of the executable created by 'lked' step
246
247 diff --git a/sci-chemistry/gamess/gamess-20130501.1.ebuild b/sci-chemistry/gamess/gamess-20130501.1.ebuild
248 new file mode 100644
249 index 0000000..8e38cbc
250 --- /dev/null
251 +++ b/sci-chemistry/gamess/gamess-20130501.1.ebuild
252 @@ -0,0 +1,338 @@
253 +# Copyright 1999-2013 Gentoo Foundation
254 +# Distributed under the terms of the GNU General Public License v2
255 +# $Header: $
256 +
257 +EAPI="5"
258 +
259 +inherit eutils fortran-2 flag-o-matic pax-utils toolchain-funcs
260 +
261 +DESCRIPTION="A powerful quantum chemistry package"
262 +LICENSE="gamess"
263 +HOMEPAGE="http://www.msg.chem.iastate.edu/GAMESS/GAMESS.html"
264 +SRC_URI="
265 + ${P}.tar.gz
266 + qmmm-tinker? ( tinker.tar.Z )"
267 +
268 +SLOT="0"
269 +# NOTE: PLEASE do not stabilize gamess. It does not make sense
270 +# since the tarball has fetch restrictions and upstream only
271 +# provides the latest version. In other words: As soon as a
272 +# new version comes out the stable version will be useless since
273 +# users can not get at the tarball any more.
274 +KEYWORDS="~amd64 ~ppc ~x86"
275 +IUSE="mpi neo pax_kernel qmmm-tinker"
276 +
277 +CDEPEND="
278 + app-shells/tcsh
279 + mpi? ( virtual/mpi )
280 + virtual/blas"
281 +DEPEND="${CDEPEND}
282 + virtual/pkgconfig"
283 +RDEPEND="${CDEPEND}
284 + net-misc/openssh"
285 +
286 +S="${WORKDIR}/${PN}"
287 +
288 +RESTRICT="fetch"
289 +
290 +GAMESS_DOWNLOAD="http://www.msg.ameslab.gov/GAMESS/License_Agreement.html"
291 +GAMESS_VERSION="1 MAY 2013 (R1)"
292 +
293 +pkg_nofetch() {
294 + echo
295 + elog "Please download ${PN}-current.tar.gz from"
296 + elog "${GAMESS_DOWNLOAD}."
297 + elog "Be sure to select the version ${GAMESS_VERSION} tarball!!"
298 + elog "Then move the tarball to"
299 + elog "${DISTDIR}/${P}.tar.gz"
300 + if use qmmm-tinker ; then
301 + elog "Also download http://www.msg.ameslab.gov/GAMESS/tinker.tar.Z"
302 + elog "and place tinker.tar.Z to ${DISTDIR}"
303 + fi
304 + echo
305 +}
306 +
307 +get_fcomp() {
308 + case $(tc-getFC) in
309 + *gfortran* )
310 + FCOMP="gfortran" ;;
311 + ifort )
312 + FCOMP="ifc" ;;
313 + * )
314 + FCOMP=$(tc-getFC) ;;
315 + esac
316 +}
317 +
318 +pkg_setup() {
319 + fortran-2_pkg_setup
320 + get_fcomp
321 + # currently amd64 is only supported with gfortran
322 + if [[ "${ARCH}" == "amd64" ]] && [[ ${FCOMP} != *gfortran* ]];
323 + then die "You will need gfortran to compile gamess on amd64"
324 + fi
325 +
326 + # note about qmmm-tinker
327 + if use qmmm-tinker; then
328 + einfo "By default MM subsistem is restricted to 1000 atoms"
329 + einfo "if you want larger MM subsystems then you should set"
330 + einfo "QMMM_GAMESS_MAXMM variable to needed value in your make.conf"
331 + einfo "By default maximum number of atom classes types and size of"
332 + einfo "hessian are restricted to 250, 500 and 1000000 respectively"
333 + einfo "If you want larger sizes set:"
334 + einfo "QMMM_GAMESS_MAXCLASS"
335 + einfo "QMMM_GAMESS_MAXCTYP"
336 + einfo "QMMM_GAMESS_MAXHESS"
337 + einfo "in your make.conf"
338 + fi
339 +
340 + #note about mpi
341 + if use mpi; then
342 + ewarn ""
343 + ewarn "You should adjust rungms script for your mpi implentation"
344 + ewarn "because deafult one will not work"
345 + ewarn ""
346 + fi
347 +}
348 +
349 +src_unpack() {
350 + unpack ${A}
351 +
352 + if use qmmm-tinker; then
353 + mv tinker gamess/ || die "failed to move tinker directory"
354 + fi
355 +}
356 +
357 +src_prepare() {
358 + tc-export PKG_CONFIG
359 + # apply LINUX-arch patches to gamess makesfiles
360 + epatch "${FILESDIR}/${P}.gentoo.patch"
361 + # select arch
362 + # NOTE: please leave lked alone; it should be good as is!!
363 + cd "${S}"
364 + local active_arch;
365 + if [[ "${ARCH}" == "amd64" ]]; then
366 + active_arch="linux64";
367 + else
368 + active_arch="linux32";
369 + fi
370 +
371 + # for hardened-gcc let't turn off ssp, since it breakes
372 + # a few routines
373 + if use pax_kernel && [[ ${FCOMP} == g77 ]]; then
374 + FFLAGS="${FFLAGS} -fno-stack-protector-all"
375 + fi
376 +
377 + # Enable mpi stuff
378 + if use mpi; then
379 + sed -e "s:set COMM = sockets:set COMM = mpi:g" \
380 + -i ddi/compddi || die "Enabling mpi build failed"
381 + sed -e "s:MPI_INCLUDE_PATH = ' ':MPI_INCLUDE_PATH = '-I/usr/include ':g" \
382 + -i ddi/compddi || die "Enabling mpi build failed"
383 + sed -e "s:MSG_LIBRARIES='../ddi/libddi.a -lpthread':MSG_LIBRARIES='../ddi/libddi.a -lmpi -lpthread':g" \
384 + -i lked || die "Enabling mpi build failed"
385 + fi
386 +
387 + # enable NEO
388 + if use neo; then
389 + sed -e "s:NEO=false:NEO=true:" -i compall lked || \
390 + die "Failed to enable NEO code"
391 + else
392 + sed -e "s:NEO=true:NEO=false:" -i compall lked || \
393 + die "Failed to disable NEO code"
394 + fi
395 + # enable GAMESS-qmmm
396 + if use qmmm-tinker; then
397 + epatch "${FILESDIR}/${PN}-qmmm-tinker-fix-idate.patch"
398 + sed -e "s:TINKER=false:TINKER=true:" -i compall lked || \
399 + die "Failed to enable TINKER code"
400 + if [ "x$QMMM_GAMESS_MAXMM" == "x" ]; then
401 + einfo "No QMMM_GAMESS_MAXMM set. Using default value = 1000"
402 + else
403 + einfo "Setting QMMM_GAMESS_MAXMM to $QMMM_GAMESS_MAXMM"
404 + sed -e "s:maxatm=1000:maxatm=$QMMM_GAMESS_MAXMM:g" \
405 + -i tinker/sizes.i \
406 + || die "Setting QMMM_GAMESS_MAXMM failed"
407 + sed -e "s:MAXATM=1000:MAXATM=$QMMM_GAMESS_MAXMM:g" \
408 + -i source/inputb.src \
409 + || die "Setting QMMM_GAMESS_MAXMM failed"
410 + fi
411 + if [ "x$QMMM_GAMESS_MAXCLASS" == "x" ]; then
412 + einfo "No QMMM_GAMESS_MAXMM set. Using default value = 250"
413 + else
414 + sed -e "s:maxclass=250:maxclass=$QMMM_GAMESS_MAXCLASS:g" \
415 + -i tinker/sizes.i \
416 + || die "Setting QMMM_GAMESS_MAXCLASS failed"
417 + fi
418 + if [ "x$QMMM_GAMESS_MAXCTYP" == "x" ]; then
419 + einfo "No QMMM_GAMESS_MAXCTYP set. Using default value = 500"
420 + else
421 + sed -e "s:maxtyp=500:maxtyp=$QMMM_GAMESS_MAXCTYP:g" \
422 + -i tinker/sizes.i \
423 + || die "Setting QMMM_GAMESS_MAXCTYP failed"
424 + fi
425 + if [ "x$QMMM_GAMESS_MAXHESS" == "x" ]; then
426 + einfo "No QMMM_GAMESS_MAXHESS set. Usingdefault value = 1000000"
427 + else
428 + sed -e "s:maxhess=1000000:maxhess=$QMMM_GAMESS_MAXHESS:g" \
429 + -i tinker/sizes.i \
430 + || die "Setting QMMM_GAMESS_MAXHESS failed"
431 + fi
432 + fi
433 + # create proper activate sourcefile
434 + cp "./tools/actvte.code" "./tools/actvte.f" || \
435 + die "Failed to create actvte.f"
436 + sed -e "s/^\*UNX/ /" -i "./tools/actvte.f" || \
437 + die "Failed to perform UNX substitutions in actvte.f"
438 +
439 + # fix GAMESS' compall script to use proper CC
440 + sed -e "s|\$CCOMP -c \$extraflags source/zunix.c|$(tc-getCC) -c \$extraflags source/zunix.c|" \
441 + -i compall || die "Failed setting up compall script"
442 +
443 + # insert proper FFLAGS into GAMESS' comp makefile
444 + # in case we're using ifc let's strip all the gcc
445 + # specific stuff
446 + if [[ ${FCOMP} == "ifort" ]]; then
447 + sed -e "s/gentoo-OPT = '-O2'/OPT = '${FFLAGS} -quiet'/" \
448 + -i comp || die "Failed setting up comp script"
449 + elif ! use x86; then
450 + sed -e "s/-malign-double //" \
451 + -e "s/gentoo-OPT='-O2'/OPT='${FFLAGS}'/" \
452 + -i comp || die "Failed setting up comp script"
453 + else
454 + sed -e "s/gentoo-OPT = '-O2'/OPT = '${FFLAGS}'/" \
455 + -i comp || die "Failed setting up comp script"
456 + fi
457 +
458 + # fix up GAMESS' linker script;
459 + sed -e "s/gentoo-LDOPTS=' '/LDOPTS='${LDFLAGS}'/" \
460 + -i lked || die "Failed setting up lked script"
461 + # fix up GAMESS' ddi TCP/IP socket build
462 + sed -e "s/gentoo-CC = 'gcc'/CC = '$(tc-getCC)'/" \
463 + -i ddi/compddi || die "Failed setting up compddi script"
464 + # Creating install.info
465 + cat > install.info <<-EOF
466 + #!/bin/csh
467 + setenv GMS_PATH $WORKDIR/gamess
468 + setenv GMS_BUILD_DIR $WORKDIR/gamess
469 + setenv GMS_TARGET $active_arch
470 + setenv GMS_FORTRAN $FCOMP
471 + setenv GMS_GFORTRAN_VERNO 4.7
472 + setenv GMS_MATHLIB atlas
473 + setenv GMS_MATHLIB_PATH /usr/$(get_libdir)/atlas
474 + setenv GMS_DDI_COMM sockets
475 + EOF
476 +
477 +}
478 +
479 +src_compile() {
480 + # build actvte
481 + cd "${S}"/tools
482 + ${FCOMP} -o actvte.x actvte.f || \
483 + die "Failed to compile actvte.x"
484 +
485 + # for hardened (PAX) users and ifc we need to turn
486 + # MPROTECT off
487 + if [[ ${FCOMP} == "ifort" ]] && use pax_kernel; then
488 + pax-mark -PemRxS actvte.x
489 + fi
490 +
491 + # build gamess
492 + cd "${S}"
493 + ./compall || die "compall failed"
494 +
495 + # build the ddi TCP/IP socket stuff
496 + cd ${S}/"ddi"
497 + ./compddi || die "compddi failed"
498 +
499 + # finally, link it all together
500 + cd "${S}"
501 + ./lked || die "lked failed"
502 +
503 + # for hardened (PAX) users and ifc we need to turn
504 + # MPROTECT off
505 + if [[ ${FCOMP} == "ifort" ]] && use pax_kernel; then
506 + pax-mark -PemRxS ${PN}.00.x
507 + fi
508 +}
509 +
510 +src_install() {
511 + # the executables
512 + dobin ${PN}.00.x rungms gms-files.csh \
513 + || die "Failed installing binaries"
514 + if use !mpi; then
515 + dobin ddi/ddikick.x \
516 + || die "Failed installing binaries"
517 + fi
518 +
519 + # the docs
520 + dodoc *.DOC qmnuc/*.DOC || die "Failed installing docs"
521 +
522 + # install ericftm
523 + insinto /usr/share/${PN}
524 + doins auxdata/ericfmt.dat || die "Failed installing ericfmt.dat"
525 +
526 + # install mcpdata
527 + insinto /usr/share/${PN}/MCP
528 + doins auxdata/MCP/* || die "Failed installing MCP"
529 +
530 + # install BASES
531 + insinto /usr/share/${PN}/BASES
532 + doins auxdata/BASES/* || die "Failed installing BASES"
533 +
534 + # install QUANPOL
535 + insinto /usr/share/${PN}/QUANPOL
536 + doins auxdata/QUANPOL/* || die "Failed installing QUANPOL"
537 +
538 + # install tinker params in case of qmmm
539 + if use qmmm-tinker ; then
540 + dodoc tinker/simomm.doc || die "Failed installing docs"
541 + insinto /usr/share/${PN}
542 + doins -r tinker/params51 || die "Failed to install Tinker params"
543 + fi
544 +
545 + # install the tests the user should run, and
546 + # fix up the runscript; also grab a copy of rungms
547 + # so the user is ready to run the tests
548 + insinto /usr/share/${PN}/tests
549 + insopts -m0644
550 + doins -r tests/* || die "Failed installing tests"
551 + insopts -m0744
552 + doins runall || die "Failed installing tests"
553 + #doins tools/checktst/checktst tools/checktst/chkabs || \
554 + # die "Failed to install main test checker"
555 + #doins tools/checktst/exam* || \
556 + # die "Failed to install individual test files"
557 +
558 + insinto /usr/share/${PN}/neotests
559 + insopts -m0644
560 + doins -r qmnuc/neotests/* || die "Failed to install NEO tests"
561 +}
562 +
563 +pkg_postinst() {
564 + echo
565 + einfo "Before you use GAMESS for any serious work you HAVE"
566 + einfo "to run the supplied test files located in"
567 + einfo "/usr/share/gamess/tests and check them thoroughly."
568 + einfo "Otherwise all scientific publications resulting from"
569 + einfo "your GAMESS runs should be immediately rejected :)"
570 + einfo "To do so copy the content of /usr/share/gamess/tests"
571 + einfo "to some temporary location and execute './runall'. "
572 + einfo "Then run the checktst script in the same directory to"
573 + einfo "validate the tests."
574 + einfo "Please consult TEST.DOC and the other docs!"
575 +
576 + if [[ ${FCOMP} == "ifort" ]]; then
577 + echo
578 + ewarn "IMPORTANT NOTE: We STRONGLY recommend to stay away"
579 + ewarn "from ifc-9.0 for now and use the ifc-8.1 series of"
580 + ewarn "compilers UNLESS you can run through ALL of the "
581 + ewarn "test cases (see above) successfully."
582 + fi
583 +
584 + echo
585 + einfo "If you want to run on more than a single CPU"
586 + einfo "you will have to acquaint yourself with the way GAMESS"
587 + einfo "does multiprocessor runs and adjust rungms according to"
588 + einfo "your target network architecture."
589 + echo
590 +}