SUMMARY="PostgreSQL ODBC driver"
DESCRIPTION="
The PostgreSQL ODBC driver is used to connect to the PostgreSQL database using the ODBC API. 
"
HOMEPAGE="http://odbc.postgresql.org"
LICENSE="GNU LGPL v2"
COPYRIGHT="1996-2014 PostgreSQL Global Development Group"
SOURCE_URI="https://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-09.03.0400.tar.gz"
CHECKSUM_SHA256="de77dfa89dba0a159afc57b2e312ca6e9075dd92b761c7cc700c0450ba02b56b"
PATCHES="psqlodbc-$portVersion.patchset"
REVISION="1"
ARCHITECTURES="x86_gcc2 ?x86"
SECONDARY_ARCHITECTURES="x86 x86_gcc2"

PROVIDES="
	psqlodbc$secondaryArchSuffix = $portVersion
	lib:psqlodbcw$secondaryArchSuffix = $portVersion
"

REQUIRES="
	haiku$secondaryArchSuffix
	lib:libiodbc$secondaryArchSuffix
	lib:libpq$secondaryArchSuffix
	lib:libssl$secondaryArchSuffix
	"
BUILD_REQUIRES="
	devel:libiodbc$secondaryArchSuffix
	devel:libpq$secondaryArchSuffix
	devel:libssl$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	cmd:autoconf
	"
PROVIDES_devel="
	psqlodbc${secondaryArchSuffix}_devel = $portVersion
	devel:psqlodbcw${secondaryArchSuffix} = $portVersion
	"
REQUIRES_devel="
	psqlodbc$secondaryArchSuffix == $portVersion base
"

BUILD()
{
	autoconf
	runConfigure ./configure --with-iodbc
	make $jobArgs
}

INSTALL()
{
	make install

	prepareInstalledDevelLibs psqlodbcw

	packageEntries devel \
		$developDir

}
