# -*- 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           github 1.0
PortGroup           muniversal 1.0

epoch               1
github.setup        openvenues libpostal 1.1 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0
checksums           rmd160  7b176495ed2f907ff51e08c7aac32fcb5d759358 \
                    sha256  8cc473a05126895f183f2578ca234428d8b58ab6fadf550deaacd3bd0ae46032 \
                    size    5602643

categories          textproc
maintainers         {amake @amake} openmaintainer
license             MIT

description         A C library for parsing/normalizing street addresses around the world
long_description    {*}${description}. Powered by statistical NLP and open geo data.

# Workaround for https://trac.macports.org/ticket/70652
# Remove on next update
master_sites        macports_distfiles

# No configure script in tarball.
use_autoreconf      yes
autoreconf.cmd      ./bootstrap.sh

depends_run-append  port:libpostal-data

depends_build       port:autoconf \
                    port:automake \
                    port:libtool \
                    port:pkgconfig

configure.args-append \
    --datadir=${prefix}/share \
    --disable-data-download

set merger_configure_args(arm64)    --disable-sse2
set merger_configure_args(ppc)      --disable-sse2
set merger_configure_args(ppc64)    --disable-sse2

if {(!${universal_possible} || ![variant_isset universal]) && [info exists merger_configure_args(${configure.build_arch})]} {
    configure.args-append   $merger_configure_args(${configure.build_arch})
}

github.livecheck.regex {([0-9.]+)}
