Ticket #14651: Portfile.diff

File Portfile.diff, 1.1 KB (added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), 17 years ago)
  • Portfile

    old new  
    4747    }
    4848}
    4949
    50 variant mpi description {Enable lammpi support} {
     50variant mpi description {Enable lammpi support} conflicts openmpi {
    5151    depends_lib-append  port:lammpi
    5252    post-build {
    5353        reinplace "s|%s %s -o mpipython|${prefix}/bin/%s -o mpipython -I${prefix}/include/python2.5 -I${worksrcpath}/Include|g" \
     
    6464    }
    6565}
    6666
     67variant openmpi description {Enable openmpi support} conflicts mpi {
     68    depends_lib-append  port:openmpi
     69
     70    post-patch {
     71        reinplace "s|mpicompiler = 'mpicc'|mpicompiler = 'openmpicc'|g" \
     72                        ${worksrcpath}/Src/MPI/compile.py
     73        reinplace "s|\\(-I%s\\)|\\1 -I${worksrcpath}/Include|g" \
     74                        ${worksrcpath}/Src/MPI/compile.py
     75
     76        system "cd ${worksrcpath}/Src/MPI && ${python.bin} compile.py"
     77    }
     78
     79    post-destroot {
     80        xinstall ${worksrcpath}/Src/MPI/mpipython ${destroot}${prefix}/bin
     81    }
     82}
     83
    6784livecheck.check regex
    6885livecheck.url   http://sourcesup.cru.fr/projects/scientific-py/
    6986livecheck.regex {<td>(\d+(?:\.\d+)*)}