Ticket #22029: Portfile.diff

File Portfile.diff, 1.6 KB (added by stromnov (Andrey Stromnov), 15 years ago)
  • Portfile

    old new  
    2626depends_lib     port:netcdf \
    2727                port:py26-numeric
    2828
    29 build.env       CPPFLAGS="-I${prefix}/include/python${python.branch} \
     29build.env       CPPFLAGS="-I${python.include} \
    3030                    -I${worksrcpath}/Include" \
    3131                NETCDF_PREFIX=${prefix}
    3232
     
    4949}
    5050
    5151variant mpi description {Enable lammpi support} {
    52     depends_lib-append  port:lammpi
     52    depends_lib-append  port:lammpi port:py26-numpy
    5353    post-build {
    54         reinplace "s|%s %s -o mpipython|${prefix}/bin/%s -o mpipython -I${prefix}/include/python${python.branch} -I${worksrcpath}/Include|g" \
     54        reinplace "s|^from Scientific import N|#from Scientific import N|g" \
    5555                        ${worksrcpath}/Src/MPI/compile.py
    56         reinplace "s|-L%s -lpython%s|-L/Library/Frameworks/Python.framework/Versions/${python.branch}/lib -L%s -lpython.%s|g" \
     56        reinplace "s|^if N.package ==|if \"NumPy\" ==|g" \
    5757                        ${worksrcpath}/Src/MPI/compile.py
    58         reinplace "s|cfgDict\\\[\'LINK|#cfgDict\\\[\'LINK|g" \
     58        reinplace "s|%s %s -o mpipython|${prefix}/bin/%s %s ${prefix}/lib/libmpi.a ${prefix}/lib/liblam.a -o mpipython|g" \
    5959                        ${worksrcpath}/Src/MPI/compile.py
    6060        system "cd ${worksrcpath}/Src/MPI && ${prefix}/bin/python${python.branch} compile.py"
    6161    }
    62 
    6362    post-destroot {
    64         xinstall ${worksrcpath}/Src/MPI/mpipython ${destroot}${prefix}/bin
     63        xinstall ${worksrcpath}/Src/MPI/mpipython ${destroot}${python.prefix}/bin
     64        ln -s ${python.prefix}/bin/mpipython ${destroot}${prefix}/bin/mpipython${python.branch}
    6565    }
    6666}
    6767