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

name            libdap
conflicts       dap
version         3.18.1
maintainers     {takeshi @tenomoto}
categories      science
license         LGPL-2.1
description     A C++ SDK which contains an implementation of DAP 2.0
long_description \
                {*}${description}, Client- and Server-side support \
                classes and a prototype implementation of the AIS.
homepage        https://www.opendap.org
master_sites    ${homepage}/pub/source/
checksums       rmd160  83581a5511ea802de55907c027d71064cccf4af7 \
                sha256  a755c472d7c9e54bc3aa6c92a847a69466fbc6cdc56ee912f411802a725d57a4 \
                size    2209343

depends_build   port:bison \
                port:flex \
                path:bin/pkg-config:pkgconfig
depends_lib     port:curl \
                port:libiconv \
                port:libxml2

# https://trac.macports.org/ticket/70469
if {${configure.build_arch} in [list i386 ppc]} {
    patchfiles-append \
                patch-fix-32-bit.diff
}

livecheck.type  regex
livecheck.url   ${homepage}download/${name}
livecheck.regex ${name}-(\[0-9\]+.\[0-9\]+.\[0-9\]+)${extract.suffix}
