| 1 |
dev-zero |
1.1 |
# Copyright 1999-2010 Gentoo Foundation |
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
tester |
1.3 |
# $Header: /var/cvsroot/gentoo-x86/sys-libs/tdb/tdb-1.2.1.ebuild,v 1.2 2010/04/10 15:50:53 dev-zero Exp $ |
| 4 |
dev-zero |
1.1 |
|
| 5 |
|
|
EAPI="2" |
| 6 |
|
|
|
| 7 |
|
|
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 |
tester |
1.3 |
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 |
|
|
RDEPEND="" |
| 18 |
|
|
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 |
|
|
src_prepare() { |
| 25 |
|
|
eautoconf -Ilibreplace |
| 26 |
|
|
sed -i \ |
| 27 |
|
|
-e 's:$(SHLD_FLAGS) :$(SHLD_FLAGS) $(LDFLAGS) :' \ |
| 28 |
|
|
Makefile.in || die "sed failed" |
| 29 |
dev-zero |
1.2 |
|
| 30 |
|
|
# xsltproc will display a warning but we can assume the xml files are valid |
| 31 |
|
|
sed -i \ |
| 32 |
|
|
-e 's|$(XSLTPROC) -o|$(XSLTPROC) --nonet -o|' \ |
| 33 |
|
|
tdb.mk || die "sed failed" |
| 34 |
dev-zero |
1.1 |
} |
| 35 |
|
|
|
| 36 |
|
|
src_configure() { |
| 37 |
|
|
econf \ |
| 38 |
|
|
--sysconfdir=/etc/samba \ |
| 39 |
|
|
--localstatedir=/var \ |
| 40 |
|
|
$(use_enable python) |
| 41 |
|
|
} |
| 42 |
|
|
|
| 43 |
|
|
src_compile() { |
| 44 |
|
|
# TODO: |
| 45 |
|
|
# - don't build static-libs in case of USE=-static-libs |
| 46 |
|
|
|
| 47 |
|
|
# we create the directories first to avoid workaround parallel build problem |
| 48 |
|
|
emake dirs || die "emake dirs failed" |
| 49 |
|
|
|
| 50 |
|
|
emake shared-build || die "emake shared-build failed" |
| 51 |
|
|
|
| 52 |
|
|
if use tdbtest ; then |
| 53 |
|
|
emake bin/tdbtest || die "emake tdbtest failed" |
| 54 |
|
|
fi |
| 55 |
|
|
} |
| 56 |
|
|
|
| 57 |
|
|
src_install() { |
| 58 |
|
|
emake install DESTDIR="${D}" || die "emake install failed" |
| 59 |
|
|
|
| 60 |
|
|
# installs a necessary symlink |
| 61 |
|
|
dolib.so sharedbuild/lib/libtdb.so |
| 62 |
|
|
|
| 63 |
|
|
dodoc docs/README |
| 64 |
|
|
|
| 65 |
|
|
use static-libs || rm -f "${D}"/usr/lib*/*.a |
| 66 |
|
|
use tools || rm -rf "${D}/usr/bin" |
| 67 |
|
|
use tdbtest && dobin bin/tdbtest |
| 68 |
|
|
use python && python_need_rebuild |
| 69 |
|
|
} |
| 70 |
|
|
|
| 71 |
|
|
src_test() { |
| 72 |
|
|
# the default src_test runs 'make test' and 'make check', letting |
| 73 |
|
|
# the tests fail occasionally (reason: unknown) |
| 74 |
|
|
emake check || die "emake check failed" |
| 75 |
|
|
} |