Ticket #22029: Portfile.diff
File Portfile.diff, 1.6 KB (added by stromnov (Andrey Stromnov), 15 years ago) |
---|
-
Portfile
old new 26 26 depends_lib port:netcdf \ 27 27 port:py26-numeric 28 28 29 build.env CPPFLAGS="-I${p refix}/include/python${python.branch} \29 build.env CPPFLAGS="-I${python.include} \ 30 30 -I${worksrcpath}/Include" \ 31 31 NETCDF_PREFIX=${prefix} 32 32 … … 49 49 } 50 50 51 51 variant mpi description {Enable lammpi support} { 52 depends_lib-append port:lammpi 52 depends_lib-append port:lammpi port:py26-numpy 53 53 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" \ 55 55 ${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" \ 57 57 ${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" \ 59 59 ${worksrcpath}/Src/MPI/compile.py 60 60 system "cd ${worksrcpath}/Src/MPI && ${prefix}/bin/python${python.branch} compile.py" 61 61 } 62 63 62 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} 65 65 } 66 66 } 67 67