Ticket #22375: Portfile

File Portfile, 2.7 KB (added by adfernandes (Andrew Fernandes), 15 years ago)
Line 
1# $Id: Portfile -1   $
2
3# Important: keep in sync with the 'gromacs' port!
4
5PortSystem  1.0
6name            gromacs-double
7version         4.0.5
8revision        2
9categories      science math
10maintainers     adfernandes openmaintainer
11description     The World's fastest Molecular Dynamics package (double-precision)
12long_description        GROMACS is a versatile package to perform molecular \
13        dynamics, i.e. simulate the Newtonian equations of motion for \
14        systems with hundreds to millions of particles. It is primarily \
15        designed for biochemical molecules like proteins and lipids that \
16        have a lot of complicated bonded interactions, but since GROMACS is \
17        extremely fast at calculating the nonbonded interactions (that \
18        usually dominate simulations) many groups are also using it for \
19        research on non-biological systems, e.g. polymers (double-precision).
20platforms       darwin
21
22distname        gromacs-${version}
23homepage            http://www.gromacs.org/
24master_sites    ftp://ftp.gromacs.org/pub/gromacs \
25                http://cluster.earlham.edu/detail/home/charliep/packages
26
27checksums       sha1 9969aae6f77e2216add22a7b29805c4de8df649f
28
29# Currently, no patchfiles are needed since the only patch is in
30# a data file for the dependent gromacs (single-precision) port.
31
32depends_lib     port:fftw-3 port:libxml2 port:openmotif port:gromacs
33
34configure.args  --bindir=${prefix}/lib/${name}/bin --enable-shared --with-x --enable-double
35
36variant no_x11 {
37    depends_lib-delete      port:openmotif
38    configure.args-delete   --with-x
39    configure.args-append   --without-x
40}
41 
42variant gsl description {enable extra analyses via the GNU scientific library} {
43    depends_lib-append      port:gsl
44    configure.args-append   --with-gsl
45}
46
47if { ![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] } {
48    default_variants-append     +gcc44
49}
50
51variant gcc42 conflicts gcc43 gcc44 description {build with macports-gcc-4.2} {
52    depends_lib         port:gcc42
53    configure.compiler  macports-gcc-4.2
54}
55
56variant gcc43 conflicts gcc42 gcc44 description {build with macports-gcc-4.3} {
57    depends_lib         port:gcc43
58    configure.compiler  macports-gcc-4.3
59}
60
61variant gcc44 conflicts gcc42 gcc43 description {build with macports-gcc-4.4} {
62    depends_lib         port:gcc44
63    configure.compiler  macports-gcc-4.4
64}
65
66post-destroot {
67    # All the required files are provided by the single-precision 'gromacs' port. Delete everything that's not required.
68    system "find \"${destroot}/${prefix}\" -depth 1 -not -name lib -print0 | xargs -0 rm -rf"
69    system "find \"${destroot}/${prefix}\" -type f -not -iname '*_d' -a -not -name '*_d.*' -print0 | xargs -0 rm -rf"
70    system "mv \"${destroot}/${prefix}/lib/gromacs-double\" \"${destroot}/${prefix}/lib/gromacs\""
71}