Ticket #47254: Portfile.diff

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

Portfile diff for pdb2pqr 2.0.0

  • Portfile

    old new  
    55PortGroup           python 1.0
    66
    77name                pdb2pqr
    8 version             1.7
    9 revision            2
     8version             2.0.0
    109categories          science
    1110maintainers         gmail.com:howarth.at.macports
    1211description         automate Poisson-Boltzmann electrostatics calculations
     
    1716homepage            http://pdb2pqr.sourceforge.net/
    1817platforms           darwin
    1918master_sites        sourceforge
    20 checksums           md5     058622cb2ca6ca12af04d4f11b272951 \
    21                     sha1    df2bf4303dbc64b69a20d48331386d8c08c234f1
     19distfiles           ${name}-src-${version}.tar.gz
     20checksums           md5     e4d50d3057778f051f49cc385909b293 \
     21                    sha1    77285efe9b78c8bd2df61b977eed8cca71df7ace
    2222
    23 python.default_version  26
     23python.default_version  27
     24
     25worksrcdir          ${name}-src-${version}
     26
     27build.cmd           ${prefix}/bin/python2.7
     28build.target        scons/scons.py BUILD_PDB2PKA=True
    2429
    25 use_parallel_build  no
    26 use_configure       yes
    27 build.cmd           make
    28 build.target        all
    2930depends_lib         port:py${python.version}-numeric
    3031
     32test.run            yes
     33test.cmd            ${prefix}/bin/python2.7
     34test.target         scons/scons.py complete-test
     35
    3136post-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}
     40pre-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      }
    4345}
    4446destroot {
    45       system "find ${worksrcpath} -name '*.o' -delete"
    46       file mkdir ${destroot}${prefix}/share/{name}
    4747      move ${worksrcpath} ${destroot}${prefix}/share/${name}
    4848      system "echo '#!/bin/zsh -f' >| ${destroot}${prefix}/bin/pdb2pqr"
    4949      system "echo '${prefix}/share/${name}/pdb2pqr.py \"\$@\"' >> ${destroot}${prefix}/bin/pdb2pqr"
    5050      file attributes ${destroot}${prefix}/bin/pdb2pqr -permissions a+x
     51      file attributes ${destroot}${prefix}/share/${name}/propka30/propka.py -permissions a+x
    5152      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"
    5354      file attributes ${destroot}${prefix}/bin/propka -permissions a+x
    5455}
    5556