SUMMARY="Arithmetics of complex numbers with arbitrarily high precision"
DESCRIPTION="Gnu Mpc is a C library for the arithmetic of complex numbers \
with arbitrarily high precision and correct rounding of the result. It \
extends the principles of the IEEE-754 standard for fixed precision real \
floating point numbers to complex numbers, providing well-defined semantics \
for every operation. At the same time, speed of operation at high precision \
is a major design goal.
"
LICENSE="GNU LGPL v3"
COPYRIGHT="2006-2014 Andreas Enge, Mickaël Gastineau, Philippe Théveny
and Paul Zimmermann"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86 x86_gcc2"
HOMEPAGE="http://www.multiprecision.org"
SOURCE_URI="$HOMEPAGE/mpc/download/mpc-$portVersion.tar.gz"
CHECKSUM_SHA256="617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3"

PROVIDES="
	mpc$secondaryArchSuffix = $portVersion
	lib:libmpc$secondaryArchSuffix = 3.0.0 compat >= 3
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libgmp$secondaryArchSuffix
	lib:libmpfr$secondaryArchSuffix
	"
BUILD_REQUIRES="
	devel:libgmp$secondaryArchSuffix
	devel:libmpfr$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel
	cmd:awk
	cmd:gcc$secondaryArchSuffix
	cmd:make
	"

BUILD()
{
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install
	prepareInstalledDevelLibs libmpc
	packageEntries devel $developDir
}

TEST()
{
	make $jobArgs check
}

# ----- devel package -------------------------------------------------------

PROVIDES_devel="
	mpc${secondaryArchSuffix}_devel = $portVersion
	devel:libmpc$secondaryArchSuffix = 3.0.0 compat >= 3
	"
REQUIRES_devel="
	mpc$secondaryArchSuffix == $portVersion base
	"
