Ticket #47254: Portfile.diff
File Portfile.diff, 3.4 KB (added by howarth.at.macports@…, 10 years ago) |
---|
-
Portfile
old new 5 5 PortGroup python 1.0 6 6 7 7 name pdb2pqr 8 version 1.7 9 revision 2 8 version 2.0.0 10 9 categories science 11 10 maintainers gmail.com:howarth.at.macports 12 11 description automate Poisson-Boltzmann electrostatics calculations … … 17 16 homepage http://pdb2pqr.sourceforge.net/ 18 17 platforms darwin 19 18 master_sites sourceforge 20 checksums md5 058622cb2ca6ca12af04d4f11b272951 \ 21 sha1 df2bf4303dbc64b69a20d48331386d8c08c234f1 19 distfiles ${name}-src-${version}.tar.gz 20 checksums md5 e4d50d3057778f051f49cc385909b293 \ 21 sha1 77285efe9b78c8bd2df61b977eed8cca71df7ace 22 22 23 python.default_version 26 23 python.default_version 27 24 25 worksrcdir ${name}-src-${version} 26 27 build.cmd ${prefix}/bin/python2.7 28 build.target scons/scons.py BUILD_PDB2PKA=True 24 29 25 use_parallel_build no26 use_configure yes27 build.cmd make28 build.target all29 30 depends_lib port:py${python.version}-numeric 30 31 32 test.run yes 33 test.cmd ${prefix}/bin/python2.7 34 test.target scons/scons.py complete-test 35 31 36 post-patch { 32 reinplace "s|fort xlf95 lf95 g95|${configure.f77}|g" ${worksrcpath}/propka/configure 33 reinplace "s|/usr/bin/env python|${python.bin}|g" ${worksrcpath}/pdb2pka/pka.py 34 reinplace "s|/usr/bin/python|${python.bin}|g" ${worksrcpath}/src/psize.py 35 reinplace "s|-Wl,-framework -Wl,Python -bundle|${python.lib} -bundle|g" \ 36 ${worksrcpath}/configure \ 37 ${worksrcpath}/propka/configure 38 delete ${worksrcpath}/contrib 39 } 40 configure.args --with-max-atoms="1000000" --without-url --with-python=${python.bin} 41 pre-configure { 42 configure.args-append -with-f77=${configure.f77} 37 system "cd ${worksrcpath}; /usr/bin/find . -type f -name '*.py' -print0 | xargs -0 perl -pi -e 's|/usr/bin/python|${prefix}/bin/python2.7|g'" 38 system "cd ${worksrcpath}; /usr/bin/find . -type f -name '*.py' -print0 | xargs -0 perl -pi -e 's|/usr/bin/env python|${prefix}/bin/python2.7|g'" 39 } 40 pre-destroot { 41 system "/usr/bin/find ${worksrcpath} -name '*.pyc' -delete" 42 foreach f {build_config.py pdb2pqr.py.in tools SConscript-error.py SConscript-install.py SConscript-main.py SConscript scons site_scons} { 43 delete ${worksrcpath}/${f} 44 } 43 45 } 44 46 destroot { 45 system "find ${worksrcpath} -name '*.o' -delete"46 file mkdir ${destroot}${prefix}/share/{name}47 47 move ${worksrcpath} ${destroot}${prefix}/share/${name} 48 48 system "echo '#!/bin/zsh -f' >| ${destroot}${prefix}/bin/pdb2pqr" 49 49 system "echo '${prefix}/share/${name}/pdb2pqr.py \"\$@\"' >> ${destroot}${prefix}/bin/pdb2pqr" 50 50 file attributes ${destroot}${prefix}/bin/pdb2pqr -permissions a+x 51 file attributes ${destroot}${prefix}/share/${name}/propka30/propka.py -permissions a+x 51 52 system "echo '#!/bin/zsh -f' >| ${destroot}${prefix}/bin/propka" 52 system "echo '${prefix}/share/${name}/propka /propka\"\$@\"' >> ${destroot}${prefix}/bin/propka"53 system "echo '${prefix}/share/${name}/propka30/propka.py \"\$@\"' >> ${destroot}${prefix}/bin/propka" 53 54 file attributes ${destroot}${prefix}/bin/propka -permissions a+x 54 55 } 55 56