# $Id$

PortSystem	1.0

name		roboctl
version		0.3.7
categories	devel
platforms	darwin
maintainers	nomaintainer
license		BSD

description	Communication tools for Lego and VEX robots
long_description	Tools for communicating with and controlling Lego \
			Mindstorms and VEX robotics controllers.

homepage	http://personalpages.tds.net/~jwbacon/Ports
master_sites	http://personalpages.tds.net/~jwbacon/Ports/distfiles/ \
		http://jbacon.dyndns.org/~bacon/Ports/distfiles/

checksums	sha1    6edf410f34d3c3507c48cf10b13c9aa946acef33 \
		rmd160  e7cbc213e6aa20ecd09439dbb9d035948805b09f

depends_lib	port:libusb-compat

patchfiles	patch-Commands-Legoctl-Makefile.diff

use_configure	no

build.args	LOCALBASE=${prefix} \
		PREFIX=${prefix} \
		MANPREFIX=${prefix}/share \
		CC="${configure.cc} ${configure.cc_archflags}"

pre-build {
	system "cd ${worksrcpath} && make depend [join ${build.args}]"
}

destroot.destdir	PREFIX=${destroot}${prefix}
destroot.args	MANPREFIX=${prefix}/share

platform darwin {
	if {${os.major} >= 9} {
		patchfiles-append patch-Scripts-lego_bluetooth_config.diff
	}
}

use_parallel_build no