SUMMARY="Tool for creating Simutrans paksets"
DESCRIPTION="Makeobj is a tool for graphics/pakset developers \
and is not needed for playing the game.
Makeobj joins both the image and the data files in a single \
compressed pak-file that will then be read by the game engine."
HOMEPAGE="http://www.simutrans.com"
SOURCE_URI="svn://tron.yamagi.org/simutrans/simutrans/trunk \
	--username=anon --password="
SOURCE_FILENAME="simutrans-$portVersion"
SOURCE_DIR="trunk"
COPYRIGHT="1997-2004 Hj. Malthaner
	2005-2015 The Simutrans Team"
LICENSE="Artistic"
REVISION="2"
ARCHITECTURES="?x86 x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
	# x86_gcc2 is fine as primary target architecture as long as we're building
	# for a different secondary architecture.
	ARCHITECTURES="$ARCHITECTURES x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
	makeobj$secondaryArchSuffix = $portVersion
	cmd:makeobj$secondaryArchSuffix = 55.4
	"
REQUIRES="
	haiku$secondaryArchSuffix
	gcc_syslibs$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	lib:libpng$secondaryArchSuffix
	lib:libbz2$secondaryArchSuffix
	"
BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libsdl$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	devel:libpng$secondaryArchSuffix
	devel:libbz2$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:gcc$secondaryArchSuffix
	cmd:svn
	cmd:autoreconf
	cmd:aclocal
	cmd:make
	cmd:ld$secondaryArchSuffix
	cmd:strip$secondaryArchSuffix
	cmd:sdl_config$secondaryArchSuffix
	cmd:pkg_config$secondaryArchSuffix
	"

BUILD()
{
	autoreconf configure.ac
	runConfigure ./configure
	make makeobj $jobArgs
	strip makeobj/makeobj
}

INSTALL()
{
	fixPkgconfig
	mkdir -p $binDir
	cp -r makeobj/makeobj $binDir/
}
