source: trunk/dports/science/pdb2pqr/Portfile

Last change on this file was 135278, checked in by ryandesign@…, 2 years ago

pdb2pqr: update to 2.0.0 (#47254; maintainer)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 135278 2015-04-21 23:39:46Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6
7name                pdb2pqr
8version             2.0.0
9categories          science
10maintainers         gmail.com:howarth.at.macports
11description         automate Poisson-Boltzmann electrostatics calculations
12long_description    PDB2PQR is a Python software package that automates many of the \
13                    common tasks of preparing structures for continuum electrostatics \
14                    calculations, providing a platform-independent utility for converting \
15                    protein files in PDB format to PQR format.
16homepage            http://pdb2pqr.sourceforge.net/
17platforms           darwin
18master_sites        sourceforge:project/pdb2pqr/pdb2pqr/pdb2pqr-${version}/
19distfiles           ${name}-src-${version}.tar.gz
20checksums           md5     e4d50d3057778f051f49cc385909b293 \
21                    sha1    77285efe9b78c8bd2df61b977eed8cca71df7ace
22
23python.default_version  27
24
25worksrcdir          ${name}-src-${version}
26
27depends_lib         port:py${python.version}-numeric
28
29post-patch {
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    }
35}
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    }
54}
55destroot {
56      move ${worksrcpath} ${destroot}${prefix}/share/${name}
57      system "echo '#!/bin/zsh -f' >| ${destroot}${prefix}/bin/pdb2pqr"
58      system "echo '${prefix}/share/${name}/pdb2pqr.py \"\$@\"' >> ${destroot}${prefix}/bin/pdb2pqr"
59      file attributes ${destroot}${prefix}/bin/pdb2pqr -permissions a+x
60      file attributes ${destroot}${prefix}/share/${name}/propka30/propka.py -permissions a+x
61      system "echo '#!/bin/zsh -f' >| ${destroot}${prefix}/bin/propka"
62      system "echo '${prefix}/share/${name}/propka30/propka.py \"\$@\"' >> ${destroot}${prefix}/bin/propka"
63      file attributes ${destroot}${prefix}/bin/propka -permissions a+x
64}
65
66universal_variant no
Note: See TracBrowser for help on using the repository browser.