SUMMARY="A tool to automate interactive applications"
DESCRIPTION="expect is a program that performs programmed \
dialogue with other interactive programs."
HOMEPAGE="http://www.nist.gov/el/msid/expect.cfm"
COPYRIGHT="1987-1994 The Regents of the University of California.
	1994-1997 Sun Microsystems, Inc.
	1993-1996 Lucent Technologies.
	1998-1999 Scriptics Corporation."
LICENSE="Public Domain"
REVISION="4"
SOURCE_URI="http://downloads.sourceforge.net/project/expect/Expect/$portVersion/expect$portVersion.tar.gz"
CHECKSUM_SHA256="b28dca90428a3b30e650525cdc16255d76bb6ccd65d448be53e620d95d5cc040"
SOURCE_DIR="expect$portVersion"
PATCHES="expect-$portVersion.patchset"

ARCHITECTURES="all"

PROVIDES="
	expect = $portVersion
	cmd:autoexpect
	cmd:autopasswd
	cmd:cryptdir
	cmd:decryptdir
	cmd:dislocate
	cmd:expect
	cmd:ftp_rfc
	cmd:kibitz
	cmd:lpunlock
	cmd:mkpasswd
	cmd:multixterm
	cmd:passmass
	cmd:rftp
	cmd:rlogin_cwd
	cmd:timed_read
	cmd:timed_run
	cmd:tknewsbiff
	cmd:tkpasswd
	cmd:unbuffer
	cmd:weather
	cmd:xkibitz
	cmd:xpstat
	lib:libexpect$portVersion
	"
REQUIRES="
	haiku
	tcl
	"

PROVIDES_devel="
	expect_devel = $portVersion
	devel:libexpect$portVersion
	"
REQUIRES_devel="
	expect == $portVersion
	"

BUILD_REQUIRES="
	haiku_devel
	tcl_devel
	"
BUILD_PREREQUIRES="
	cmd:autoconf
	cmd:gcc
	cmd:make
	"

BUILD()
{
	autoconf -f
	runConfigure --omit-dirs "docDir dataRootDir" ./configure \
		--with-tcl=$(finddir B_SYSTEM_DEVELOP_DIRECTORY)/lib
	make $jobArgs
}

INSTALL()
{
	make install

	mv $libDir/expect$portVersion/libexpect$portVersion.so $libDir

	prepareInstalledDevelLibs libexpect$portVersion

	packageEntries devel $developDir

}
