SUMMARY="A theoretic integer library written entirely in C"
DESCRIPTION="LibTomMath is a free open source portable number theoretic \
multiple-precision integer library written entirely in C."
HOMEPAGE="http://libtommath.org"
LICENSE="Public Domain"
REVISION="1"

ARCHITECTURES="x86_gcc2 ?x86"
SECONDARY_ARCHITECTURES="x86"

SOURCE_URI="https://github.com/libtom/libtommath/archive/v0.42.0.tar.gz"
CHECKSUM_SHA256="5246356ba18c1b6edf4a7bc836a3d223842b86914cdba6dd8c112bfc59e227c8"
COPYRIGHT="2010 Tom St. Denis"
PATCHES="libtommath-0.42.0.patchset"

PROVIDES="
	libtommath$secondaryArchSuffix = $portVersion
	"
PROVIDES_devel="
	libtommath${secondaryArchSuffix}_devel = $portVersion
	devel:libtommath$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	"  
REQUIRES_devel="
	haiku${secondaryArchSuffix}_devel
	libtommath$secondaryArchSuffix == $portVersion base
	"
BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	cmd:make
	cmd:cc
	cmd:ar
	cmd:ranlib
	cmd:install
	"

BUILD()
{
	make $jobArgs
}

INSTALL()
{
	export LIBPATH=$libDir
	export INCPATH=$includeDir
	make install $jobArgs
	prepareInstalledDevelLibs libtommath
	packageEntries devel $developDir
}
