summaryrefslogtreecommitdiff
blob: 9c54d37110e0d4756576aa034f57fcd89fceedd4 (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
40
41
42
43
44
45
46
47
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit postgresql
KEYWORDS="~x86"

DESCRIPTION="A database-independent, system-independent benchmark to enable individuals to analyze the performance of a variety of database and system configurations."
HOMEPAGE="http://osdb.sourceforge.net"
SRC_URI="mirror://sourceforge/osdb/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
IUSE="mysql postgres"

DEPEND="mysql? ( dev-db/mysql )
		postgres? ( virtual/postgresql-base )"
RDEPEND="${DEPEND}"

src_unpack() {
	unpack ${A}
	cd "${S}"
	find . -iname "Makefile" | xargs \
		sed -i \
			-e 's:$(bindir):$(DESTDIR)/$(bindir):g' \
			|| die "sed failed"
}

src_compile() {
	econf \
		$(use_with mysql) \
		$(use_with postgres postgresql $(postgresql_get_pgconfig )) \
		|| die "econf failed"
	emake || die "emake failed"

# TODO: check how mpi works and enable the support
# mpicc is needed to compile
#	if use mpi ; then
#		cd src/
#		emake mpi || die "emake mpi failed"
#	fi
}

src_install() {
	emake DESTDIR="${D}" install || die "emake install failed"
	dodoc AUTHORS ChangeLog README* TODO
	dohtml docs/*
}