# -*- 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
# $Id: Portfile 144801 2016-01-18 20:37:46Z dstrubbe@macports.org $

PortSystem          1.0
PortGroup           compilers 1.0

name                gpp4
version             1.3.1
revision            1
set branch          [join [lrange [split ${version} .] 0 1] .]
categories          science
maintainers         fastmail.net:konrad.hinsen openmaintainer
license             LGPL-3+

description         macromolecular crystallography library
long_description    The goal of this project -- named gpp4 to \
                    distinguish it from CCP4 -- is to provide a \
                    drop-in replacement for the CCP4 libraries, that \
                    as carefully as possible implements the current \
                    CCP4 library interface, while not requiring the \
                    whole CCP4 package to be installed. \
                    Select a Fortran variant to build the Fortran interface library.

homepage            https://launchpad.net/gpp4
platforms           darwin

master_sites        http://launchpad.net/gpp4/${branch}/${version}/+download/

checksums           md5 e608519594f430c78be3c53e8e26a260 \
                    sha256 ad18b8771f68b55bcf40a59f2be5489daf6bd97934a181602de7f44fbe27776f

depends_build       port:mmdb port:pkgconfig

compilers.choose    f77
compilers.setup     

pre-fetch {
#    depends_lib-append         port:mmdb
    # README says: "To compile the Fortran library, it is required that the MMDB library is installed."
    # However, configure appears to require it regardless.
    if {![fortran_variant_isset]} {
        configure.args-append  --without-fortran-api F77=no
    }
}

universal_variant no

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     Latest version is (\[0-9.\]+)
