Ticket #46249: Portfile.diff

File Portfile.diff, 3.8 KB (added by howarth.at.macports@…, 6 years ago)

Portfile diff for pdb2pqr-1.9.0

  • Portfile

    old new  
    55PortGroup           python 1.0
    66
    77name                pdb2pqr
    8 version             1.7
    9 revision            2
     8version             1.9.0
    109categories          science
    1110maintainers         gmail.com:howarth.at.macports
    1211description         automate Poisson-Boltzmann electrostatics calculations
     
    1615                    protein files in PDB format to PQR format.
    1716homepage            http://pdb2pqr.sourceforge.net/
    1817platforms           darwin
    19 master_sites        sourceforge
    20 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           make
    28 build.target        all
     18master_sites        https://github.com/Electrostatics/apbs-${name}/releases/download/${name}-${version}/
     19distfiles           ${name}-src-${version}.tar.gz
     20checksums           md5     3ffba8fd6ae4c33badb31ec07654e39d \
     21                    sha1    256c6bb08f7fc7fe79b24263f37ee8893152226c
     22
     23python.default_version  27
     24
     25build.cmd           ${prefix}/bin/python2.7
     26build.target        scons/scons.py BUILD_PDB2PKA=True
     27
    2928depends_lib         port:py${python.version}-numeric
    3029
     30test.run            yes
     31test.cmd            ${prefix}/bin/python2.7
     32test.target         scons/scons.py complete-test
     33
    3134post-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}
     38pre-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      }
    4343}
    4444destroot {
    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/
    4846      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"
    5048      file attributes ${destroot}${prefix}/bin/pdb2pqr -permissions a+x
     49      file attributes ${destroot}${prefix}/share/${name}-${version}/propka30/propka.py -permissions a+x
    5150      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"
    5352      file attributes ${destroot}${prefix}/bin/propka -permissions a+x
    5453}
    5554