Changeset 116400 for trunk/dports/python


Ignore:
Timestamp:
Jan 23, 2014, 8:16:16 PM (6 years ago)
Author:
sean@…
Message:

py-scientific: use mpi portgroup and bring portfile up to date

Location:
trunk/dports/python/py-scientific
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/python/py-scientific/Portfile

    r115869 r116400  
    44PortSystem          1.0
    55PortGroup           python 1.0
     6PortGroup           mpi 1.0
     7
     8compilers.choose    cc cxx
     9mpi.choose
     10mpi.setup
    611
    712name                py-scientific
    813version             2.9.2
    9 revision            1
     14revision            2
    1015categories-append   science
    1116license             CeCILL-C
     
    2429fetch.ignore_sslcert yes
    2530
    26 checksums           md5     5fb53f29126316ae2628e74e629312d5 \
    27                     sha1    387b0ed5600b0f08301412745aab2da72e1459d7 \
    28                     rmd160  aa9aa06a09645e422ed6174d745bacd4c6404885
     31checksums           rmd160  aa9aa06a09645e422ed6174d745bacd4c6404885 \
     32                    sha256  0ed9cb725a7c1736a15de27d62a2abfd1d84de1a45b5932e9747bc3952a73ad9
    2933
    3034if {${name} ne ${subport}} {
     
    4751    }
    4852
    49 variant openmpi description {Enable openmpi support} conflicts mpi {
    50     depends_lib-append  port:openmpi
     53    if {[mpi_variant_isset]} {
     54        patchfiles-append patch-Src-MPI-compile.py.diff
     55        post-patch {
     56            reinplace "s|mpicompiler = 'mpicc'|mpicompiler = '${mpi.cc}'|g" \
     57                ${worksrcpath}/Src/MPI/compile.py
     58            reinplace "s|\\(-I%s\\)|\\1 -I${worksrcpath}/Include|g" \
     59                ${worksrcpath}/Src/MPI/compile.py
     60            reinplace "s|@prefix@|${prefix}|g" ${worksrcpath}/Src/MPI/compile.py
     61            reinplace "s|@worksrcpath@|${worksrcpath}|g" ${worksrcpath}/Src/MPI/compile.py
    5162
    52     post-patch {
    53         reinplace "s|mpicompiler = 'mpicc'|mpicompiler = 'openmpicc'|g" \
    54            ${worksrcpath}/Src/MPI/compile.py
    55         reinplace "s|\\(-I%s\\)|\\1 -I${worksrcpath}/Include|g" \
    56            ${worksrcpath}/Src/MPI/compile.py
     63            system -W ${worksrcpath}/Src/MPI "${python.bin} compile.py"
     64        }
    5765
    58         system "cd ${worksrcpath}/Src/MPI && ${python.bin} compile.py"
     66        post-destroot {
     67            xinstall ${worksrcpath}/Src/MPI/mpipython ${destroot}${prefix}/bin
     68        }
    5969    }
    6070
    61     post-destroot {
    62         xinstall ${worksrcpath}/Src/MPI/mpipython ${destroot}${prefix}/bin
    63     }
     71    livecheck.type  none
     72} else {
     73    livecheck.type  regexm
     74    livecheck.url   http://sourcesup.renater.fr/projects/scientific-py/
     75    livecheck.regex {<strong>Development Releases</strong>\s*</td>\s*<td>(\d+(?:\.\d+)*)}
    6476}
    65 
    66 variant mpi description {Enable lammpi support} conflicts openmpi {
    67     depends_lib-append  port:lammpi
    68     patchfiles-append patch-Src-MPI-compile.py.diff
    69     post-build {
    70         reinplace "s|@prefix@|${prefix}|g" ${worksrcpath}/Src/MPI/compile.py
    71         reinplace "s|@worksrcpath@|${worksrcpath}|g" ${worksrcpath}/Src/MPI/compile.py
    72         system "cd ${worksrcpath}/Src/MPI && ${prefix}/bin/python${python.branch} compile.py"
    73     }
    74     post-destroot {
    75         xinstall ${worksrcpath}/Src/MPI/mpipython ${destroot}${python.prefix}/bin
    76     }
    77 }
    78 }
    79 
    80 livecheck.type  regexm
    81 livecheck.url   http://sourcesup.renater.fr/projects/scientific-py/
    82 livecheck.regex {<strong>Development Releases</strong>\s*</td>\s*<td>(\d+(?:\.\d+)*)}
  • trunk/dports/python/py-scientific/files/patch-Src-MPI-compile.py.diff

    r59363 r116400  
    3030 
    3131-cmd = '%s %s -o mpipython -I%s %s %s -L%s -lpython%s %s %s' % \
    32 +cmd = '%s %s -o mpipython -Wl,-search_paths_first @prefix@/lib/libmpi.a @prefix@/lib/liblam.a -I@worksrcpath@/Include -I%s %s %s %s %s' % \
     32+cmd = '%s %s -o mpipython -Wl,-search_paths_first -I@worksrcpath@/Include -I%s %s %s %s %s' % \
    3333     (mpicompiler,
    3434      linkforshared,
Note: See TracChangeset for help on using the changeset viewer.