SUMMARY="C interface to Legacy BLAS"
DESCRIPTION="C wrapper interface to the F77 reference BLAS implementation."
HOMEPAGE="http://www.netlib.org/blas/"
COPYRIGHT="1998 Keita Teranishi
	1999 Jeff Horner
	2003 R. Clint Whaley"
LICENSE="Public Domain"
REVISION="4"
SOURCE_URI="http://www.netlib.org/blas/blast-forum/cblas.tgz"
CHECKSUM_SHA256="0f6354fd67fabd909baf57ced2ef84e962db58fae126e4f41b21dd4fec60a2a3"
SOURCE_DIR="CBLAS"
ADDITIONAL_FILES="Makefile.HAIKU"

ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	cblas_reference$secondaryArchSuffix = $portVersion
	devel:cblas$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libopenblas$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libopenblas$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:g++$secondaryArchSuffix
	cmd:gfortran$secondaryArchSuffix
	cmd:make
	cmd:strip$secondaryArchSuffix
	"

BUILD()
{
	rm -rf Makefile.in
	cp $portDir/additional-files/Makefile.HAIKU Makefile.in

	make all
}

INSTALL()
{
	mkdir -p $developLibDir $includeDir
	cp lib/cblas.a $developLibDir
	cp include/* $includeDir
}

TEST()
{
	make runtst
}
