1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit autotools eutils
7 DESCRIPTION="Integrates C++ objects tightly to relational database and thus provides an object persistence layer."
8 HOMEPAGE="http://litesql.sourceforge.net/"
9 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="doc examples mysql postgres sqlite"
16 RDEPEND="mysql? ( virtual/mysql )
17 postgres? ( dev-db/postgresql-base )
18 sqlite? ( =dev-db/sqlite-3* )
19 !mysql? ( !postgres? ( !sqlite? ( =dev-db/sqlite-3* ) ) )"
21 doc? ( app-doc/doxygen )"
24 if ! use mysql && ! use postgres && ! use sqlite ; then
25 ewarn "You have to specify at least one of the mysql postgresq sqlite USE flags."
26 ewarn "None specified: support for sqlite automatically activated."
35 "${FILESDIR}/${P}-extra_qualifier.patch" \
36 "${FILESDIR}/${P}-pkg_makefile_am.patch" \
37 "${FILESDIR}/${P}-gcc43_glibc28.patch"
42 Makefile.am || die "sed failed"
48 if ! use mysql && ! use postgres && ! use sqlite ; then
49 local myconf="--with-sqlite3"
53 $(use_with postgres pgsql) \
54 $(use_with sqlite sqlite3) \
57 emake || die "emake failed"
59 if use examples ; then
60 cd "${S}/src/examples"
61 emake || die "emake failed"
64 cd "${S}/docs/doxygen"
70 emake DESTDIR="${D}" install || die "emake install failed"
71 if use examples ; then
72 rm src/examples/Makefile* src/examples/*.o
73 insinto /usr/share/${PF}