Changeset 135278


Ignore:
Timestamp:
Apr 21, 2015, 11:39:46 PM (4 years ago)
Author:
ryandesign@…
Message:

pdb2pqr: update to 2.0.0 (#47254; maintainer)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/science/pdb2pqr/Portfile

    r128656 r135278  
    66
    77name                pdb2pqr
    8 version             1.7
    9 revision            2
     8version             2.0.0
    109categories          science
    1110maintainers         gmail.com:howarth.at.macports
     
    1716homepage            http://pdb2pqr.sourceforge.net/
    1817platforms           darwin
    19 master_sites        sourceforge
    20 checksums           md5     058622cb2ca6ca12af04d4f11b272951 \
    21                     sha1    df2bf4303dbc64b69a20d48331386d8c08c234f1
     18master_sites        sourceforge:project/pdb2pqr/pdb2pqr/pdb2pqr-${version}/
     19distfiles           ${name}-src-${version}.tar.gz
     20checksums           md5     e4d50d3057778f051f49cc385909b293 \
     21                    sha1    77285efe9b78c8bd2df61b977eed8cca71df7ace
    2222
    23 python.default_version  26
     23python.default_version  27
    2424
    25 use_parallel_build  no
    26 use_configure       yes
    27 build.cmd           make
    28 build.target        all
     25worksrcdir          ${name}-src-${version}
     26
    2927depends_lib         port:py${python.version}-numeric
    3028
    3129post-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
     30    fs-traverse f ${worksrcpath} {
     31        if {[file isfile ${f}] && [file extension ${f}] eq ".py"} {
     32            reinplace -E "s,(/usr/bin/python|/usr/bin/env python),${prefix}/bin/python${python.branch},g" ${f}
     33        }
     34    }
    3935}
    40 configure.args      --with-max-atoms="1000000" --without-url --with-python=${python.bin}
    41 pre-configure {
    42     configure.args-append   -with-f77=${configure.f77}
     36
     37build.cmd           ${prefix}/bin/python${python.branch} scons/scons.py
     38build.target
     39build.args          BUILD_PDB2PKA=True
     40
     41test.run            yes
     42test.cmd            ${prefix}/bin/python${python.branch} scons/scons.py
     43test.target         complete-test
     44
     45pre-destroot {
     46    fs-traverse f ${worksrcpath} {
     47        if {[file isfile ${f}] && [file extension ${f}] eq ".pyc"} {
     48            delete ${f}
     49        }
     50    }
     51    foreach f {build_config.py pdb2pqr.py.in tools SConscript-error.py SConscript-install.py SConscript-main.py SConscript scons site_scons} {
     52        delete ${worksrcpath}/${f}
     53    }
    4354}
    4455destroot {
    45       system "find ${worksrcpath} -name '*.o' -delete"
    46       file mkdir ${destroot}${prefix}/share/{name}
    4756      move ${worksrcpath} ${destroot}${prefix}/share/${name}
    4857      system "echo '#!/bin/zsh -f' >| ${destroot}${prefix}/bin/pdb2pqr"
    4958      system "echo '${prefix}/share/${name}/pdb2pqr.py \"\$@\"' >> ${destroot}${prefix}/bin/pdb2pqr"
    5059      file attributes ${destroot}${prefix}/bin/pdb2pqr -permissions a+x
     60      file attributes ${destroot}${prefix}/share/${name}/propka30/propka.py -permissions a+x
    5161      system "echo '#!/bin/zsh -f' >| ${destroot}${prefix}/bin/propka"
    52       system "echo '${prefix}/share/${name}/propka/propka \"\$@\"' >> ${destroot}${prefix}/bin/propka"
     62      system "echo '${prefix}/share/${name}/propka30/propka.py \"\$@\"' >> ${destroot}${prefix}/bin/propka"
    5363      file attributes ${destroot}${prefix}/bin/propka -permissions a+x
    5464}
    5565
    5666universal_variant no
    57 
    58 set gcc_versions {4.5 4.6 4.7 4.8 4.9}
    59 set default_fortran_variant +gcc48
    60 
    61 foreach ver ${gcc_versions} {
    62     set ver_no_dot [join [split ${ver} "."] ""]
    63 
    64     set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}"}
    65 
    66     foreach over ${gcc_versions} {
    67         if {${ver} == ${over}} {
    68             continue
    69         }
    70 
    71         set over_no_dot [join [split ${over} "."] ""]
    72         append variant_line " conflicts gcc${over_no_dot}"
    73     }
    74     append variant_line { {}}
    75 
    76     eval $variant_line
    77 
    78     if {[variant_isset gcc${ver_no_dot}]} {
    79         if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
    80             set default_fortran_variant ""
    81         }
    82     }
    83 }
    84 
    85 if {${default_fortran_variant} != ""} {
    86     default_variants-append "${default_fortran_variant}"
    87 }
    88 
    89 foreach ver ${gcc_versions} {
    90     set ver_no_dot [join [split ${ver} "."] ""]
    91 
    92     if {[variant_isset gcc${ver_no_dot}]} {
    93         depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
    94         depends_build-append port:gcc${ver_no_dot}
    95 
    96         configure.fc  ${prefix}/bin/gfortran-mp-${ver}
    97         configure.f77 ${prefix}/bin/gfortran-mp-${ver}
    98         configure.f90 ${prefix}/bin/gfortran-mp-${ver}
    99     }
    100 }
Note: See TracChangeset for help on using the changeset viewer.