SUMMARY="Tools for ScummVM"
DESCRIPTION="This is a collection of various tools that may be useful to use \
in conjunction with ScummVM. Please note that although a tool may support a \
feature, certain ScummVM versions may not. ScummVM 0.6.x does not support \
FLAC audio, for example."
HOMEPAGE="http://scummvm.org"
SOURCE_URI="http://sourceforge.net/projects/scummvm/files/scummvm-tools/1.7.0/scummvm-tools-1.7.0.tar.gz"
SOURCE_DIR="scummvm-tools-1.7.0"
CHECKSUM_SHA256="6437cc87d5a0c81fe971c96059670e662e72141b53ee61923d374b5660997cbc"
REVISION="2"
LICENSE="GNU GPL v2"
COPYRIGHT="2001-2013 ScummVM Team"

PATCHES="scummvm_tools-1.7.0.patch"

ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"

PROVIDES="
	cmd:construct_mohawk = $portVersion
	cmd:decine = $portVersion
	cmd:degob = $portVersion
	cmd:dekyra = $portVersion
	cmd:deriven = $portVersion
	cmd:descumm = $portVersion
	cmd:desword2 = $portVersion
	cmd:extract_mohawk = $portVersion
	cmd:gob_loadcalc = $portVersion
	cmd:scummvm_tools_cli = $portVersion
	cmd:create_sjisfnt = $portVersion
"

REQUIRES="
	haiku
	lib:libvorbis
	lib:libogg
	lib:libFLAC
	lib:libmad
	lib:libpng
	lib:libz
	lib:libfreetype
	lib:libiconv
	lib:libbz2
"

BUILD_REQUIRES="
	haiku_devel
	devel:libvorbis
	devel:libogg
	devel:libFLAC
	devel:libmad
	devel:libpng
	devel:libz
	devel:libfreetype
	devel:libiconv
	devel:libbz2
"

BUILD_PREREQUIRES="
	cmd:make
	cmd:gcc
	cmd:ld
	cmd:pkg_config
	cmd:libtoolize
"

BUILD()
{
	./configure --prefix=$prefix --datadir=$dataDir
	make $jobArgs
}

INSTALL()
{
	make install
	#data files are not needed as long as we don't have a graphical interface for the tools
	rm -r $dataDir/scummvm-tools
}
