# $Id: Portfile 80549 2011-07-14 17:10:23Z jmr@macports.org $

PortSystem 1.0

name		dynamips-devel
version		0.2.8-RC2
revision	1
categories	net
maintainers	mr_bond openmaintainer
description	Cisco router emulator
homepage	http://www.ipflow.utc.fr/index.php/Cisco_7200_Simulator
platforms	darwin

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.

master_sites	http://www.ipflow.utc.fr/dynamips
distname	dynamips-${version}
checksums	md5 8d12d28684d164fe3312a3fe43c84d2e \
		sha1 349270690996a1e260b3eceb51ea90f94c25a59e

depends_lib	port:libelf \
			port:libpcap

patchfiles	patch-Makefile
use_configure no

build.pre_args-append		PREFIX=${prefix}
destroot.pre_args-append	PREFIX=${prefix}

# compile using nojit if on non-i386 platform
# is meant to work on x86_64 too but apparently crashes; ticket #22285
if {${build_arch} != "i386"} {
	build.pre_args-append		DYNAMIPS_ARCH=nojit
	destroot.pre_args-append	DYNAMIPS_ARCH=nojit
}

#default_variants	+idle_pcs

variant no_pcap \
	description {Without support to send/receive external traffic} {

	depends_lib-delete		port:libpcap
	build.pre_args-append		HAS_PCAP=0
	destroot.pre_args-append	HAS_PCAP=0
}
