# -*- 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
# $Id: Portfile 96590 2012-08-14 22:16:29Z ryandesign@macports.org $

PortSystem          1.0

name                cyassl
version             2.3.0
categories          devel security
platforms           darwin
maintainers         yassl.com:chris
homepage            http://www.yassl.com/yaSSL/Products-cyassl.html
license             GPL-2
description         CyaSSL Embedded SSL Library

long_description    \
    The CyaSSL embedded SSL library is a lightweight SSL library written \
    in ANSI C and targeted for embedded and RTOS environments - primarily \
    because of its small size, speed, and feature set.  It is commonly \
    used in standard operating environments as well because of its \
    royalty-free pricing and excellent cross platform support.  CyaSSL \
    supports industry standards up to the current TLS 1.2 level, is up \
    to 20 times smaller than OpenSSL, and offers progressive ciphers such \
    as HC-128, RABBIT, and NTRU.

master_sites        http://www.yassl.com/
use_zip             yes

checksums           md5     e73b50c95eae06a2fb4a7eb0183b21ab \
                    sha1    920979641200fc5cde38de40b969459ff4a954fa \
                    rmd160  567665bac4e749953e99a8feff268b66e57b6f96 \
                    sha256  b597f1c55d3bc4556d9c37e98ca56da2a529e111164d97c650fb097ef0a0d461

configure.args      --enable-opensslExtra \
                    --enable-fastmath \
                    --enable-aesgcm \
                    --enable-ripemd \
                    --enable-sha512 \
                    --enable-hc128 \
                    --enable-keygen \
                    --enable-certgen \
                    --enable-ocsp \
                    --enable-crl \
                    --enable-crl-monitor

compiler.blacklist  clang

variant debug description {Enable CyaSSL debugging support} {
    configure.args-append \
        --enable-debug
}

variant dtls description {Enable CyaSSL DTLS} {
    configure.args-append \
        --enable-dtls
}

variant sniffer description {Enable CyaSSL sniffer support} {
    depends_lib-append \
        port:libpcap
    configure.args-append \
        --enable-sniffer
}

