/[gentoo-x86]/dev-db/libzdb/libzdb-2.10.3.ebuild
Gentoo

Contents of /dev-db/libzdb/libzdb-2.10.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Sep 5 19:27:25 2012 UTC (2 years, 1 month ago) by lordvan
Branch: MAIN
Changes since 1.1: +6 -2 lines
fix bug #251063

(Portage version: 2.1.11.12/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-db/libzdb/libzdb-2.10.3.ebuild,v 1.1 2012/09/05 19:08:19 lordvan Exp $
4
5 EAPI="4"
6
7 inherit eutils toolchain-funcs autotools-utils
8
9 DESCRIPTION="A thread safe high level multi-database connection pool library"
10 HOMEPAGE="http://www.tildeslash.com/libzdb/"
11 SRC_URI="http://www.tildeslash.com/${PN}/dist/${P}.tar.gz"
12
13 LICENSE="GPL-3"
14 SLOT="0"
15 KEYWORDS="~x86 ~amd64"
16 IUSE="debug doc mysql postgres +sqlite +sqliteunlock ssl static-libs"
17 REQUIRED_USE=" || ( postgres mysql sqlite )"
18
19 RDEPEND="mysql? ( virtual/mysql )
20 postgres? ( dev-db/postgresql-base )
21 sqlite? ( >=dev-db/sqlite-3 )
22 sqliteunlock? ( >=dev-db/sqlite-3.6.12[unlock-notify] )
23 ssl? ( dev-libs/openssl )"
24 DEPEND="${RDEPEND}
25 virtual/pkgconfig
26 doc? ( app-doc/doxygen )"
27
28 src_prepare() {
29 sed -i -e "s|&& ./pool||g" test/Makefile.in || die
30 if ( use sqlite); then
31 epatch "$FILESDIR/sqlite_configure.patch"
32 fi
33 eautoreconf
34 }
35
36 src_configure() {
37 ## TODO: check what --enable-optimized actually does
38 ## TODO: find someone with oracle db to add oci8 support
39 myconf=""
40 if [[ $(gcc-version) < 4.1 ]];then
41 myconf="${myconf} --disable-protected"
42 else
43 myconf="${myconf} --enable-protected"
44 fi
45
46 if ( use sqlite ); then
47 myconf="${myconf} --with-sqlite=${EPREFIX}/usr/"
48 if has_version 'dev-db/sqlite[unlock-notify]'; then
49 myconf="${myconf} --enable-sqliteunlock"
50 fi
51 else
52 myconf="${myconf} --without-sqlite"
53 fi
54
55 if use mysql; then
56 myconf="${myconf} --with-mysql=${EPREFIX}/usr/bin/mysql_config"
57 else
58 myconf="${myconf} --without-mysql"
59 fi
60
61 if use postgres; then
62 myconf="${myconf} --with-postgresql=${EPREFIX}/usr/bin/pg_config"
63 else
64 myconf="${myconf} --without-postgresql"
65 fi
66
67 econf \
68 $(use_enable debug profiling) \
69 $(use_enable static-libs static) \
70 $(use_enable ssl openssl) \
71 --without-oci \
72 ${myconf}
73 }
74
75 src_compile() {
76 default_src_compile
77 if use doc; then
78 emake doc
79 fi
80 }
81
82 src_install() {
83 emake DESTDIR="${D}" install
84
85 # the --disable-static flag only skips .a
86 use static-libs || rm -f "${D}"/usr/lib*/libzdb.la
87
88 dodoc AUTHORS CHANGES README
89 if use doc;then
90 dohtml -r "${S}/doc/api-docs"/*
91 fi
92 }
93
94 src_test() {
95 emake verify
96 }

  ViewVC Help
Powered by ViewVC 1.1.20