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

github.setup                chriskohlhoff asio 1-32-0 asio-
version                     [string map {- .} ${github.version}]
revision                    0
checksums                   rmd160  0423632d026775525907daac33d66adbc0b11317 \
                            sha256  f1b94b80eeb00bb63a3c8cef5047d4e409df4d8a3fe502305976965827d95672 \
                            size    2857719
github.tarball_from         archive

license                     Boost-1
platforms                   any
supported_archs             noarch
description                 Asio C++ Library.
long_description            Asio is a cross-platform C++ library for network \
                            and low-level I/O programming that provides developers \
                            with a consistent asynchronous model using a modern C++ approach.
maintainers                 {gmail.com:g.litenstein @Lord-Kamina} openmaintainer
categories                  devel

homepage                    https://think-async.com/Asio/

worksrcdir                  ${worksrcdir}/${name}
use_autoconf                yes
autoconf.cmd                ./autogen.sh

depends_build-append        port:autoconf \
                            port:automake \
                            port:libtool \
                            path:bin/pkg-config:pkgconfig

compiler.cxx_standard       2014
compiler.blacklist-append   {clang < 800}

configure.cxxflags-append   -std=gnu++14

if { [string match *clang* ${configure.compiler}] } {
    # Quiet warnings
    configure.cxxflags-append \
                    -Wno-unknown-pragmas \
                    -Wno-error=unknown-warning-option \
                    -Wno-unknown-warning-option
}

configure.args              --with-boost=no \
                            --with-openssl=[openssl::install_area]
configure.env-append        ASIO_HAS_STD_CHRONO=1 \
                            ASIO_DISABLE_STD_STRING_VIEW=1
