| 1 |
vostorga |
1.9 |
# Copyright 1999-2011 Gentoo Foundation
|
| 2 |
dev-zero |
1.1 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
vostorga |
1.9 |
# $Header: /var/cvsroot/gentoo-x86/sys-libs/tdb/tdb-1.2.1.ebuild,v 1.8 2010/08/12 01:14:43 josejx Exp $
|
| 4 |
dev-zero |
1.1 |
|
| 5 |
|
|
EAPI="2"
|
| 6 |
vostorga |
1.9 |
PYTHON_DEPEND="python? 2:2.6"
|
| 7 |
dev-zero |
1.1 |
inherit autotools python
|
| 8 |
|
|
|
| 9 |
|
|
DESCRIPTION="Samba tdb"
|
| 10 |
|
|
HOMEPAGE="http://tdb.samba.org/"
|
| 11 |
|
|
SRC_URI="http://samba.org/ftp/tdb/${P}.tar.gz"
|
| 12 |
|
|
LICENSE="GPL-3"
|
| 13 |
|
|
SLOT="0"
|
| 14 |
josejx |
1.8 |
KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86"
|
| 15 |
dev-zero |
1.1 |
IUSE="python static-libs tools tdbtest"
|
| 16 |
|
|
|
| 17 |
vostorga |
1.9 |
RDEPEND="!!<sys-libs/tdb-1.2.1"
|
| 18 |
dev-zero |
1.1 |
DEPEND="python? ( dev-lang/python )
|
| 19 |
|
|
!<net-fs/samba-libs-3.4
|
| 20 |
dev-zero |
1.2 |
!<net-fs/samba-3.3
|
| 21 |
|
|
app-text/docbook-xsl-stylesheets
|
| 22 |
|
|
dev-libs/libxslt"
|
| 23 |
dev-zero |
1.1 |
|
| 24 |
vostorga |
1.9 |
pkg_setup() {
|
| 25 |
|
|
if use python; then
|
| 26 |
|
|
# Make sure the build system will use the right python bug #360033
|
| 27 |
|
|
python_set_active_version 2
|
| 28 |
|
|
python_pkg_setup
|
| 29 |
|
|
fi
|
| 30 |
|
|
}
|
| 31 |
|
|
|
| 32 |
dev-zero |
1.1 |
src_prepare() {
|
| 33 |
|
|
eautoconf -Ilibreplace
|
| 34 |
|
|
sed -i \
|
| 35 |
|
|
-e 's:$(SHLD_FLAGS) :$(SHLD_FLAGS) $(LDFLAGS) :' \
|
| 36 |
|
|
Makefile.in || die "sed failed"
|
| 37 |
dev-zero |
1.2 |
|
| 38 |
|
|
# xsltproc will display a warning but we can assume the xml files are valid
|
| 39 |
|
|
sed -i \
|
| 40 |
|
|
-e 's|$(XSLTPROC) -o|$(XSLTPROC) --nonet -o|' \
|
| 41 |
|
|
tdb.mk || die "sed failed"
|
| 42 |
dev-zero |
1.1 |
}
|
| 43 |
|
|
|
| 44 |
|
|
src_configure() {
|
| 45 |
|
|
econf \
|
| 46 |
|
|
--sysconfdir=/etc/samba \
|
| 47 |
|
|
--localstatedir=/var \
|
| 48 |
|
|
$(use_enable python)
|
| 49 |
|
|
}
|
| 50 |
|
|
|
| 51 |
|
|
src_compile() {
|
| 52 |
|
|
# TODO:
|
| 53 |
|
|
# - don't build static-libs in case of USE=-static-libs
|
| 54 |
|
|
|
| 55 |
|
|
# we create the directories first to avoid workaround parallel build problem
|
| 56 |
|
|
emake dirs || die "emake dirs failed"
|
| 57 |
|
|
|
| 58 |
|
|
emake shared-build || die "emake shared-build failed"
|
| 59 |
|
|
|
| 60 |
|
|
if use tdbtest ; then
|
| 61 |
|
|
emake bin/tdbtest || die "emake tdbtest failed"
|
| 62 |
|
|
fi
|
| 63 |
|
|
}
|
| 64 |
|
|
|
| 65 |
|
|
src_install() {
|
| 66 |
|
|
emake install DESTDIR="${D}" || die "emake install failed"
|
| 67 |
|
|
|
| 68 |
|
|
# installs a necessary symlink
|
| 69 |
|
|
dolib.so sharedbuild/lib/libtdb.so
|
| 70 |
|
|
|
| 71 |
|
|
dodoc docs/README
|
| 72 |
|
|
|
| 73 |
|
|
use static-libs || rm -f "${D}"/usr/lib*/*.a
|
| 74 |
|
|
use tools || rm -rf "${D}/usr/bin"
|
| 75 |
|
|
use tdbtest && dobin bin/tdbtest
|
| 76 |
|
|
use python && python_need_rebuild
|
| 77 |
|
|
}
|
| 78 |
|
|
|
| 79 |
|
|
src_test() {
|
| 80 |
|
|
# the default src_test runs 'make test' and 'make check', letting
|
| 81 |
|
|
# the tests fail occasionally (reason: unknown)
|
| 82 |
|
|
emake check || die "emake check failed"
|
| 83 |
|
|
}
|