SUMMARY="Independent Open DataBase Connectivity"
DESCRIPTION="
iODBC is the acronym for Independent Open DataBase Connectivity, \
an Open Source platform independent implementation of both the ODBC \
and X/Open specifications. It is rapidly emerging as the industry standard \
for developing solutions that are language, platform and database independent."
HOMEPAGE="http://www.iodbc.org"
LICENSE="GNU LGPL v2
	BSD (3-clause)"
COPYRIGHT="1995 Ke Jin
	1996-2014 OpenLink Software"
SOURCE_URI="http://downloads.sourceforge.net/project/iodbc/iodbc/3.52.9/libiodbc-3.52.9.tar.gz"
CHECKSUM_SHA256="33207d9f477aa5fa76962ff644baa38e59255b96812f28574794659fb61a7ab2"
PATCHES="libiodbc-$portVersion.patchset"
REVISION="1"
ARCHITECTURES="x86_gcc2 ?x86"
SECONDARY_ARCHITECTURES="x86 x86_gcc2"

PROVIDES="
	libiodbc$secondaryArchSuffix = $portVersion
	cmd:iodbctest$secondaryArchSuffix = $portVersion
	cmd:iodbctestw$secondaryArchSuffix = $portVersion
	lib:libiodbc$secondaryArchSuffix = $portVersion
	lib:libiodbcinst$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	"

BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:awk
	cmd:find
	cmd:make
	"

PROVIDES_devel="
	libiodbc${secondaryArchSuffix}_devel = $portVersion
	cmd:iodbc_config$secondaryArchSuffix = $portVersion
	devel:libiodbc$secondaryArchSuffix = $portVersion
	devel:libiodbcinst$secondaryArchSuffix = $portVersion
	devel:libodbc$secondaryArchSuffix = $portVersion
	"
REQUIRES_devel="
	libiodbc$secondaryArchSuffix == $portVersion base
	"

BUILD()
{
	runConfigure ./configure --with-iodbc-inidir=$settingsDir/etc
	make $jobArgs
}

INSTALL()
{
	make install
	
	prepareInstalledDevelLibs libiodbc \
		libiodbcinst \
		libodbc
	fixPkgconfig

	packageEntries devel \
		$binDir/iodbc-config \
		$developDir \
		$dataDir
}
