/[gentoo-x86]/sys-libs/tdb/tdb-1.2.1-r1.ebuild
Gentoo

Contents of /sys-libs/tdb/tdb-1.2.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Fri Apr 1 15:04:52 2011 UTC (3 years, 5 months ago) by vostorga
Branch: MAIN
Changes since 1.4: +4 -3 lines
Restricting working python version to 2.x bug #360033 . Adding double blocker to previous tdb version #314611

(Portage version: 2.1.9.42/cvs/Linux i686)

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

  ViewVC Help
Powered by ViewVC 1.1.20