# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=3 DESCRIPTION="ODBC driver for PostgreSQL" HOMEPAGE="http://psqlodbc.projects.postgresql.org/" SRC_URI="mirror://postgresql/odbc/versions/src/${P}.tar.gz" LICENSE="LGPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="doc iodbc ssl threads unicode" DEPEND="dev-db/postgresql-base iodbc? ( dev-db/libiodbc ) !iodbc? ( dev-db/unixODBC ) ssl? ( dev-libs/openssl )" RDEPEND="${DEPEND}" src_configure() { local myconf if use iodbc ; then myconf="--with-iodbc" else myconf="--with-unixodbc" sed -i s/UNIXODBC/UNIXODBCobsolete/g odbcapi.c fi econf --prefix=${EPREFIX}/usr \ --with-libpq=${EPREFIX}/usr/include/postgresql \ --with-gnu-ld \ $(use_enable threads pthreads) \ $(use_enable unicode) \ $(use_enable ssl openssl) \ ${myconf} \ || die "econf failed" } src_install() { emake DESTDIR=${ED} install || die "make install failed" dodoc readme.txt license.txt if use doc ; then dohtml docs/* fi }