[113577] trunk/dports/science

ryandesign at macports.org ryandesign at macports.org
Tue Nov 19 18:42:47 PST 2013


Revision: 113577
          https://trac.macports.org/changeset/113577
Author:   ryandesign at macports.org
Date:     2013-11-19 18:42:47 -0800 (Tue, 19 Nov 2013)
Log Message:
-----------
gromacs: make gromacs-double a subport instead of a standalone port (#39811)

Modified Paths:
--------------
    trunk/dports/science/gromacs/Portfile

Removed Paths:
-------------
    trunk/dports/science/gromacs-double/

Modified: trunk/dports/science/gromacs/Portfile
===================================================================
--- trunk/dports/science/gromacs/Portfile	2013-11-20 02:23:23 UTC (rev 113576)
+++ trunk/dports/science/gromacs/Portfile	2013-11-20 02:42:47 UTC (rev 113577)
@@ -1,10 +1,9 @@
 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
 # $Id$
 
-# Important: keep in sync with the 'gromacs-double' port!
-
 PortSystem          1.0
 PortGroup           muniversal 1.0
+
 name                gromacs
 version             4.5.5
 revision            2
@@ -19,11 +18,9 @@
                     have a lot of complicated bonded interactions, but since GROMACS is \
                     extremely fast at calculating the nonbonded interactions (that \
                     usually dominate simulations) many groups are also using it for \
-                    research on non-biological systems, e.g. polymers.
+                    research on non-biological systems, e.g. polymers
 platforms           darwin
 
-distname            gromacs-${version}
-dist_subdir         gromacs
 homepage            http://www.gromacs.org/
 master_sites        ftp://ftp.gromacs.org/pub/gromacs \
                     http://cluster.earlham.edu/detail/home/charliep/packages
@@ -33,8 +30,7 @@
 
 depends_build       port:pkgconfig
 
-depends_lib         port:fftw-3-single \
-                    port:libxml2
+depends_lib         port:libxml2
 
 configure.args      --bindir=${prefix}/lib/${name}/bin \
                     --enable-shared \
@@ -87,3 +83,23 @@
 variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 description {build with macports-gcc-4.7} {
     configure.compiler  macports-gcc-4.7
 }
+
+if {${name} eq ${subport}} {
+    depends_lib-append      port:fftw-3-single
+}
+
+subport ${name}-double {
+    description-append      (double-precision)
+    long_description-append (double-precision)
+
+    depends_lib-append      port:${name} \
+                            port:fftw-3
+
+    configure.args-append   --enable-double
+
+    post-destroot {
+        # All the required files are provided by the single-precision 'gromacs' port. Delete everything that's not required.
+        system "find \"${destroot}${prefix}\" -depth 1 -not -name lib -print0 | xargs -0 rm -rf"
+        system "find \"${destroot}${prefix}\" -type f -not -iname '*_d' -a -not -name '*_d.*' -print0 | xargs -0 rm -rf"
+    }
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131119/4a3c141b/attachment.html>


More information about the macports-changes mailing list