1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit flag-o-matic multilib
9 DESCRIPTION="OpenDBX - A database abstraction layer"
10 HOMEPAGE="http://www.linuxnetworks.de/doc/index.php/OpenDBX"
11 SRC_URI="http://www.linuxnetworks.de/opendbx/download/${P}.tar.gz"
16 IUSE="firebird +mysql oracle postgres sqlite"
17 RESTRICT="firebird? ( bindist )"
19 DEPEND="mysql? ( virtual/mysql )
20 postgres? ( dev-db/postgresql:* )
21 sqlite? ( dev-db/sqlite:3 )
22 oracle? ( dev-db/oracle-instantclient-basic )
23 firebird? ( dev-db/firebird )"
27 if ! ( use firebird || use mysql || use oracle || use postgres || use sqlite )
29 ewarn "You should enable at least one of the following USE flags:"
30 ewarn "firebird, mysql, oracle, postgres or sqlite"
33 if use oracle && [[ ! -d ${ORACLE_HOME} ]]
35 die "Oracle support requested, but ORACLE_HOME not set to a valid directory!"
38 use mysql && append-cppflags -I/usr/include/mysql
39 use firebird && append-cppflags -I/opt/firebird/include
40 use oracle && append-ldflags -L"${ORACLE_HOME}"/lib
46 use firebird && backends="${backends} firebird"
47 use mysql && backends="${backends} mysql"
48 use oracle && backends="${backends} oracle"
49 use postgres && backends="${backends} pgsql"
50 use sqlite && backends="${backends} sqlite3"
52 econf --with-backends="${backends}"
61 emake -j1 install DESTDIR="${D}"
62 dodoc AUTHORS ChangeLog README
64 rm -f "${D}"/usr/$(get_libdir)/opendbx/*.{a,la}