1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils toolchain-funcs
8 DESCRIPTION="A thread safe high level multi-database connection pool library"
9 HOMEPAGE="http://www.tildeslash.com/libzdb/"
10 SRC_URI="http://www.tildeslash.com/${PN}/dist/${P}.tar.gz"
15 IUSE="debug doc mysql postgres +sqlite ssl static-libs"
16 REQUIRED_USE=" || ( postgres mysql sqlite )"
20 RDEPEND="mysql? ( virtual/mysql )
21 postgres? ( dev-db/postgresql )
22 sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] )
23 ssl? ( dev-libs/openssl:0= )"
26 doc? ( app-doc/doxygen )"
29 sed -i -e "s|&& ./pool||g" test/Makefile.in || die
33 ## TODO: check what --enable-optimized actually does
34 ## TODO: find someone with oracle db to add oci8 support
36 # enable default hidden visibility
37 myconf="${myconf} --enable-protected"
40 myconf="${myconf} --with-sqlite=${EPREFIX}/usr/ --enable-sqliteunlock"
42 myconf="${myconf} --without-sqlite"
46 myconf="${myconf} --with-mysql=${EPREFIX}/usr/bin/mysql_config"
48 myconf="${myconf} --without-mysql"
52 myconf="${myconf} --with-postgresql=${EPREFIX}/usr/bin/pg_config"
54 myconf="${myconf} --without-postgresql"
58 $(use_enable debug profiling) \
59 $(use_enable static-libs static) \
60 $(use_enable ssl openssl) \
73 emake DESTDIR="${D}" install
75 # the --disable-static flag only skips .a
76 use static-libs || rm -f "${D}"/usr/lib*/libzdb.la
78 dodoc AUTHORS CHANGES README
80 dohtml -r "${S}/doc/api-docs"/*