Ticket #46249: Portfile.diff
File Portfile.diff, 3.8 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 1.9.0 10 9 categories science 11 10 maintainers gmail.com:howarth.at.macports 12 11 description automate Poisson-Boltzmann electrostatics calculations … … 16 15 protein files in PDB format to PQR format. 17 16 homepage http://pdb2pqr.sourceforge.net/ 18 17 platforms darwin 19 master_sites sourceforge20 checksums md5 058622cb2ca6ca12af04d4f11b272951 \ 21 sha1 df2bf4303dbc64b69a20d48331386d8c08c234f1 22 23 python.default_version 26 24 25 use_parallel_build no 26 use_configure yes 27 build. cmd make28 build.target all 18 master_sites https://github.com/Electrostatics/apbs-${name}/releases/download/${name}-${version}/ 19 distfiles ${name}-src-${version}.tar.gz 20 checksums md5 3ffba8fd6ae4c33badb31ec07654e39d \ 21 sha1 256c6bb08f7fc7fe79b24263f37ee8893152226c 22 23 python.default_version 27 24 25 build.cmd ${prefix}/bin/python2.7 26 build.target scons/scons.py BUILD_PDB2PKA=True 27 29 28 depends_lib port:py${python.version}-numeric 30 29 30 test.run yes 31 test.cmd ${prefix}/bin/python2.7 32 test.target scons/scons.py complete-test 33 31 34 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} 35 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'" 36 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'" 37 } 38 pre-destroot { 39 system "/usr/bin/find ${worksrcpath} -name '*.pyc' -delete" 40 foreach f {build_config.py pdb2pqr.py.in tools SConscript-error.py SConscript-install.py SConscript-main.py SConscript scons site_scons} { 41 delete ${worksrcpath}/${f} 42 } 43 43 } 44 44 destroot { 45 system "find ${worksrcpath} -name '*.o' -delete" 46 file mkdir ${destroot}${prefix}/share/{name} 47 move ${worksrcpath} ${destroot}${prefix}/share/${name} 45 move ${worksrcpath} ${destroot}${prefix}/share/ 48 46 system "echo '#!/bin/zsh -f' >| ${destroot}${prefix}/bin/pdb2pqr" 49 system "echo '${prefix}/share/${name} /pdb2pqr.py \"\$@\"' >> ${destroot}${prefix}/bin/pdb2pqr"47 system "echo '${prefix}/share/${name}-${version}/pdb2pqr.py \"\$@\"' >> ${destroot}${prefix}/bin/pdb2pqr" 50 48 file attributes ${destroot}${prefix}/bin/pdb2pqr -permissions a+x 49 file attributes ${destroot}${prefix}/share/${name}-${version}/propka30/propka.py -permissions a+x 51 50 system "echo '#!/bin/zsh -f' >| ${destroot}${prefix}/bin/propka" 52 system "echo '${prefix}/share/${name} /propka/propka\"\$@\"' >> ${destroot}${prefix}/bin/propka"51 system "echo '${prefix}/share/${name}-${version}/propka30/propka.py \"\$@\"' >> ${destroot}${prefix}/bin/propka" 53 52 file attributes ${destroot}${prefix}/bin/propka -permissions a+x 54 53 } 55 54