# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem      1.0
PortGroup       muniversal 1.0
PortGroup       compiler_blacklist_versions 1.0

name            libopus
version         1.4
categories      audio
license         BSD
platforms       darwin
maintainers     {jeremyhu @jeremyhu} openmaintainer
description     The Opus Audio Codec (IETF RFC 6716), refrence implementation

long_description \
    Opus is the first state-of-the-art, fully Free and Open audio codec \
    ratified by a major standards organization.  It is reportedly better than \
    all pre-existing codecs across the spectrum for voice, audio, archival, \
    and real-time uses.

homepage        https://www.opus-codec.org
master_sites    https://ftp.osuosl.org/pub/xiph/releases/opus/

platform i386 {
    # checking How to get X86 CPU Info... configure: error: no supported Get CPU Info method, please disable intrinsics
    compiler.blacklist *gcc-4.* {clang < 500}
}

checksums       rmd160  cea9e4095d5f52f02e99cdda223c317242e5e105 \
                sha256  c9b32b4253be5ae63d1ff16eea06b94b5f0f2951b7a02aceef58e3a3ce49c51f \
                size    1063408

distname        opus-${version}

depends_build   port:pkgconfig

configure.args  --disable-silent-rules

platform darwin 10 {
    # See: https://trac.macports.org/ticket/64611
    if {${build_arch} eq "ppc"} {
        compiler.blacklist-append *gcc-4.* *clang*
        configure.args-append   --build=powerpc-apple-darwin${os.major}
    }
}

livecheck.type  regex
livecheck.url   ${master_sites}
livecheck.regex opus-(\[\\d.\]+)${extract.suffix}
