summaryrefslogtreecommitdiff
blob: 11b8913a0b87a74146c0b6d7664dd8164bdb534a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/bsddb3/bsddb3-4.5.0.ebuild,v 1.1 2007/02/14 21:46:30 dev-zero Exp $

NEED_PYTHON=2.1

inherit distutils db-use multilib

DESCRIPTION="Python bindings for BerkeleyDB"
HOMEPAGE="http://pybsddb.sourceforge.net/"
SRC_URI="mirror://sourceforge/pybsddb/${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86"
IUSE="doc"

DEPEND=">=sys-libs/db-4.0"

src_compile() {
	sed -i \
		-e "s/dblib = 'db'/dblib = '$(db_libname)'/" \
		setup.py
	distutils_src_compile \
		"--berkeley-db=/usr" \
		"--berkeley-db-incdir=$(db_includedir)" \
		"--berkeley-db-libdir=/usr/$(get_libdir)"
}


src_install() {
	DOCS="TODO.txt"
	distutils_src_install
	use doc && dohtml -r docs/*
}

src_test() {
	"${python}" test.py || die "tests failed"
}