[116400] trunk/dports/python/py-scientific

sean at macports.org sean at macports.org
Thu Jan 23 12:16:16 PST 2014


Revision: 116400
          https://trac.macports.org/changeset/116400
Author:   sean at macports.org
Date:     2014-01-23 12:16:16 -0800 (Thu, 23 Jan 2014)
Log Message:
-----------
py-scientific: use mpi portgroup and bring portfile up to date

Modified Paths:
--------------
    trunk/dports/python/py-scientific/Portfile
    trunk/dports/python/py-scientific/files/patch-Src-MPI-compile.py.diff

Modified: trunk/dports/python/py-scientific/Portfile
===================================================================
--- trunk/dports/python/py-scientific/Portfile	2014-01-23 20:16:13 UTC (rev 116399)
+++ trunk/dports/python/py-scientific/Portfile	2014-01-23 20:16:16 UTC (rev 116400)
@@ -3,10 +3,15 @@
 
 PortSystem          1.0
 PortGroup           python 1.0
+PortGroup           mpi 1.0
 
+compilers.choose    cc cxx
+mpi.choose
+mpi.setup
+
 name                py-scientific
 version             2.9.2
-revision            1
+revision            2
 categories-append   science
 license             CeCILL-C
 platforms           darwin
@@ -23,9 +28,8 @@
 distname            ScientificPython-${version}
 fetch.ignore_sslcert yes
 
-checksums           md5     5fb53f29126316ae2628e74e629312d5 \
-                    sha1    387b0ed5600b0f08301412745aab2da72e1459d7 \
-                    rmd160  aa9aa06a09645e422ed6174d745bacd4c6404885
+checksums           rmd160  aa9aa06a09645e422ed6174d745bacd4c6404885 \
+                    sha256  0ed9cb725a7c1736a15de27d62a2abfd1d84de1a45b5932e9747bc3952a73ad9
 
 if {${name} ne ${subport}} {
     depends_lib     port:netcdf \
@@ -46,37 +50,27 @@
         }
     }
 
-variant openmpi description {Enable openmpi support} conflicts mpi {
-    depends_lib-append  port:openmpi
+    if {[mpi_variant_isset]} {
+        patchfiles-append patch-Src-MPI-compile.py.diff
+        post-patch {
+            reinplace "s|mpicompiler = 'mpicc'|mpicompiler = '${mpi.cc}'|g" \
+                ${worksrcpath}/Src/MPI/compile.py
+            reinplace "s|\\(-I%s\\)|\\1 -I${worksrcpath}/Include|g" \
+                ${worksrcpath}/Src/MPI/compile.py
+            reinplace "s|@prefix@|${prefix}|g" ${worksrcpath}/Src/MPI/compile.py
+            reinplace "s|@worksrcpath@|${worksrcpath}|g" ${worksrcpath}/Src/MPI/compile.py
 
-    post-patch {
-        reinplace "s|mpicompiler = 'mpicc'|mpicompiler = 'openmpicc'|g" \
-           ${worksrcpath}/Src/MPI/compile.py
-        reinplace "s|\\(-I%s\\)|\\1 -I${worksrcpath}/Include|g" \
-           ${worksrcpath}/Src/MPI/compile.py
+            system -W ${worksrcpath}/Src/MPI "${python.bin} compile.py"
+        }
 
-        system "cd ${worksrcpath}/Src/MPI && ${python.bin} compile.py"
+        post-destroot {
+            xinstall ${worksrcpath}/Src/MPI/mpipython ${destroot}${prefix}/bin
+        }
     }
 
-    post-destroot {
-        xinstall ${worksrcpath}/Src/MPI/mpipython ${destroot}${prefix}/bin
-    }
+    livecheck.type  none
+} else {
+    livecheck.type  regexm
+    livecheck.url   http://sourcesup.renater.fr/projects/scientific-py/
+    livecheck.regex {<strong>Development Releases</strong>\s*</td>\s*<td>(\d+(?:\.\d+)*)}
 }
-
-variant mpi description {Enable lammpi support} conflicts openmpi {
-    depends_lib-append  port:lammpi
-    patchfiles-append patch-Src-MPI-compile.py.diff
-    post-build {
-        reinplace "s|@prefix@|${prefix}|g" ${worksrcpath}/Src/MPI/compile.py
-        reinplace "s|@worksrcpath@|${worksrcpath}|g" ${worksrcpath}/Src/MPI/compile.py
-        system "cd ${worksrcpath}/Src/MPI && ${prefix}/bin/python${python.branch} compile.py"
-    }
-    post-destroot {
-        xinstall ${worksrcpath}/Src/MPI/mpipython ${destroot}${python.prefix}/bin
-    }
-}
-}
-
-livecheck.type  regexm
-livecheck.url   http://sourcesup.renater.fr/projects/scientific-py/
-livecheck.regex {<strong>Development Releases</strong>\s*</td>\s*<td>(\d+(?:\.\d+)*)}

Modified: trunk/dports/python/py-scientific/files/patch-Src-MPI-compile.py.diff
===================================================================
--- trunk/dports/python/py-scientific/files/patch-Src-MPI-compile.py.diff	2014-01-23 20:16:13 UTC (rev 116399)
+++ trunk/dports/python/py-scientific/files/patch-Src-MPI-compile.py.diff	2014-01-23 20:16:16 UTC (rev 116400)
@@ -29,7 +29,7 @@
      linkforshared = ' '.join(items)
  
 -cmd = '%s %s -o mpipython -I%s %s %s -L%s -lpython%s %s %s' % \
-+cmd = '%s %s -o mpipython -Wl,-search_paths_first @prefix@/lib/libmpi.a @prefix@/lib/liblam.a -I at worksrcpath@/Include -I%s %s %s %s %s' % \
++cmd = '%s %s -o mpipython -Wl,-search_paths_first -I at worksrcpath@/Include -I%s %s %s %s %s' % \
      (mpicompiler, 
       linkforshared,
       cfgDict['INCLUDEPY'],
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140123/9ee9934f/attachment.html>


More information about the macports-changes mailing list