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

github.setup            cisco libsrtp 2.8.1 v
github.tarball_from     archive
revision                0
categories              net devel
maintainers             {db.org:aeh @alfredh} openmaintainer
description             Secure Real-time Transport Protocol (SRTP)
long_description        The libSRTP library is an open-source implementation of \
                        the Secure Real-time Transport Protocol (SRTP).
homepage                https://github.com/cisco/libsrtp
license                 BSD

checksums               rmd160  f597bdb614d2788942c1bd0be925b7a520593430 \
                        sha256  ef5569220749529d778013aae1178391d972570a2b4f7288dda22effa875b07c \
                        size    647097

depends_build-append    path:bin/pkg-config:pkgconfig
depends_lib-append      port:zlib

configure.args-append   --enable-openssl

# datatypes.c: error: ‘for’ loop initial declaration used outside C99 mode
configure.cflags-append -std=c99

# libpcap is only for the rtp_decoder test program, which is not built.
configure.args-append   --disable-pcap

build.target            shared_library

# libsrtp 1.x is unmaintained and needs OpenSSL 1.0.
subport libsrtp1 {
    PortGroup           obsolete 1.0

    replaced_by         libsrtp
    version             1.6.0
    revision            2
    openssl.branch      no_version
}
