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

github.setup            lfranchi libechonest 2.3.1
revision                0
categories              audio
maintainers             {@barracuda156 gmail.com:vital.had} openmaintainer
description             Echo Nest API wrapper
long_description        ${name} is a C++/Qt wrapper around the wonderful \
                        Echo Nest API.
license                 GPL-2

checksums               rmd160  b33794631e4e5014db2d4d1570d245c4ae16bfd5 \
                        sha256  ab961ab952df30c5234b548031594d7e281e7c9f2a9d1ce91fe5421ddde85e7c \
                        size    12084908
github.tarball_from     archive

depends_build-append    bin:doxygen:doxygen

compiler.cxx_standard   2014
# https://github.com/lfranchi/libechonest/issues/29
configure.cxxflags-append \
                        -std=c++14

configure.args-append   -DECHONEST_BUILD_TESTS=OFF

variant qt4 conflicts qt5 description "Build with Qt4" {
    PortGroup           qt4 1.0

    depends_lib-append  port:qjson
    configure.args-append \
                        -DBUILD_WITH_QT4=ON
}

variant qt5 conflicts qt4 description "Build with Qt5" {
    PortGroup           qt5 1.0

    configure.args-append \
                        -DBUILD_WITH_QT4=OFF
}

if {${os.platform} eq "darwin" && ${os.major} < 11} {
    default_variants    +qt4
} else {
    default_variants    +qt5
}
