# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="psqlODBC driver for Postgresql" HOMEPAGE="http://gborg.postgresql.org/project/psqlodbc/projdisplay.php" SRC_URI="mirror://postgresql/odbc/versions/src/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="debug doc iodbc static threads" DEPEND="iodbc? ( dev-db/libiodbc ) !iodbc? ( dev-db/unixODBC )" src_compile() { local myconf="" use static && myconf="${myconf} --enable-static" use threads && myconf="${myconf} --with-pthreads" if use iodbc ; then myconf="${myconf} --with-iodbc" sed -i -e "/^DEFAULT_INCLUDES/s:$: `iodbc-config --cflags`:" \ Makefile.in || die else myconf="${myconf} --with-unixodbc" fi econf ${myconf} || die "econf failed" emake || die "emake failed" } src_install() { make DESTDIR=${D} install || die "make install failed" dodoc README.unix odbcinst.ini *.txt } pkg_postinst() { einfo "If this is a new install, please see /usr/share/doc/${PF}/odbcinst.ini" }