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

# clock_gettime
legacysupport.newest_darwin_requires_legacy 15

github.setup        GNS3 dynamips 0.2.23 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0

license             GPL-2
categories          net
maintainers         {gmail.com:lasticppc @lastic} openmaintainer

description         Cisco router emulator
long_description    Dynamips emulates a variety of Cisco routers on a \
                    traditional PC.  It supports the emulation of select 7200, \
                    3600, 3700, and 2600 series routers.  It uses real Cisco \
                    IOS images (which are not part of this package).  Of \
                    course, this emulator cannot replace a real router. It is \
                    simply a complementary tool to real labs for administrators \
                    of Cisco networks or people wanting to pass their \
                    CCNA/CCNP/CCIE exams.

checksums           rmd160  0c141447398ecc62e3ece16a760facf38a8e9f16 \
                    sha256  108ea9088d339ef66cf9c25ca1aada718089df028433e101d319986b2c024ab4 \
                    size    835750

depends_lib         port:libelf \
                    port:libpcap

# /opt/local/include/base64.h: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
compiler.blacklist-append \
                    *gcc-4.0 *gcc-4.2

configure.args-append \
                    -DDYNAMIPS_CODE=stable

post-patch {
    if {${prefix} ne "/opt/local"} {
        reinplace -W ${worksrcpath} "s|/opt/local/|${prefix}/|g" CMakeLists.txt cmake/FindLibElf.cmake
    }
}
