inherit eutils autotools DESCRIPTION="A thread safe high level multi-database connection pool library" HOMEPAGE="http://www.tildeslash.com/libzdb/" SRC_URI="http://www.tildeslash.com/libzdb/dist/${P}.tar.gz" LICENSE="GPL-3" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="mysql postgres sqlite3" DEPEND="postgres? ( >=virtual/postgresql-server-7.4 ) mysql? ( >=virtual/mysql-4.1 ) sqlite3? ( >=dev-db/sqlite-3.0 ) !mysql? ( !postgres? ( !sqlite3? ( >=dev-db/sqlite-3.0 ) ) ) >=dev-libs/glib-2.8" src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}/libzdb-mysql-ac.patch" } src_compile() { eautoreconf if !use postgres && !use mysql && !use sqlite3; then myconf="${myconf} --with-sqlite=/usr" ; fi use sqlite3 && myconf=${myconf}" --with-sqlite=/usr" use !sqlite3 && myconf=${myconf}" --without-sqlite" use mysql && myconf=${myconf}" --with-mysql=/usr" use !mysql && myconf=${myconf}" --without-mysql" econf \ ${myconf} \ $(use_with postgres postgresql) \ || die "econf failed" emake || die "emake failed" } src_install() { emake DESTDIR="${D}" install || die "emake install failed" dodoc AUTHORS CHANGES README }