# -*- 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

PortSystem              1.0
PortGroup               python 1.0
PortGroup               github 1.0

github.setup            jensengroup propka 3.5.1 v
github.tarball_from     tarball
revision                0

categories              science python
supported_archs         noarch
platforms               {darwin any}
license                 LGPL-2.1
maintainers             {gmail.com:howarth.at.macports @jwhowarth} openmaintainer

description             Heuristic pKa calculations with ligands
long_description        {*}${description}

checksums               rmd160  c4654d7cff915449bc4bb33c90357da9f2e5f025 \
                        sha256  9f25ba5e57ecbc138692a87dd73c777af53acb544606a9d6a34478997abb0b18 \
                        size    376314

python.default_version  312

depends_test-append     port:py${python.version}-numpy

test.run                yes

post-destroot {
    ln -fs ${python.prefix}/bin/propka3 ${destroot}/${prefix}/bin/propka
}

# remove after June 17, 2025
pre-activate {
    # pdb2pqr previously provided a c-based version of propka binary
    # which now is provided from its own python-based package.
    if {![catch {lindex [registry_active pdb2pqr] 0} installed]} {
        set _version [lindex $installed 1]
        if {[vercmp $_version 3.6.1] < 0} {
            # pdb2pqr used to install propka executable  now provided by propka
            registry_deactivate_composite pdb2pqr "" [list ports_nodepcheck 1]
        }
    }
}
