SUMMARY="The open-source IA-32 emulator"
DESCRIPTION="Bochs IA-32 Emulator provides a virtual PC that can run operating systems such as Windows, Linux, and BSD"
HOMEPAGE="http://bochs.org/"
COPYRIGHT="2001-2006 The Bochs Project"
LICENSE="GNU LGPL v2.1"

SOURCE_URI="http://downloads.sourceforge.net/project/bochs/bochs/2.6/bochs-2.6.tar.gz"
CHECKSUM_SHA256="65123e44a6d2c1148d741da025d16311b9ccd600ef268b911aba73c67eaf86e1"

REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	bochs$secondaryArchSuffix = $portVersion
	cmd:bochs$secondaryArchSuffix = $portVersion
	cmd:bochs$secondaryArchSuffix = $portVersion
	cmd:bximage$secondaryArchSuffix = $portVersion
	"

REQUIRES="
	haiku$secondaryArchSuffix
	lib:libstdc++$secondaryArchSuffix
	lib:libsdl$secondaryArchSuffix
	"

BUILD_REQUIRES="
	devel:libz$secondaryArchSuffix
	devel:libsdl$secondaryArchSuffix
	"

BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel
	cmd:awk
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	"

BUILD()
{
	LIBS=-lnetwork runConfigure ./configure --with-sdl
	make $jobArgs
}

INSTALL()
{
	make install
	strip -s $binDir/bochs
}
