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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Mon Jul 11 00:16:00 2011 UTC (3 years, 2 months ago) by halcy0n
Branch: MAIN
Changes since 1.8: +2 -2 lines
Stable on ppc/ppc64; bug #361055

(Portage version: 2.1.10.3/cvs/Linux ppc64)

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.7-r1.ebuild,v 1.8 2011/04/25 14:33:46 armin76 Exp $
4
5 EAPI="2"
6 PYTHON_DEPEND="python? 2"
7
8 inherit autotools python eutils flag-o-matic
9
10 DESCRIPTION="Samba tdb"
11 HOMEPAGE="http://tdb.samba.org/"
12 SRC_URI="http://samba.org/ftp/tdb/${P}.tar.gz
13 mirror://gentoo/${P}-patches.tar.gz"
14 LICENSE="GPL-3"
15 SLOT="0"
16 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
17 IUSE="python static-libs tools tdbtest"
18
19 RDEPEND=""
20 DEPEND="!<net-fs/samba-3.3
21 app-text/docbook-xsl-stylesheets
22 dev-libs/libxslt
23 dev-libs/popt"
24
25 pkg_setup() {
26 if use python; then
27 python_set_active_version 2
28 python_pkg_setup
29 fi
30 }
31
32 src_prepare() {
33 eautoconf -Ilib/replace
34 sed -i \
35 -e 's:$(SHLD_FLAGS) :$(SHLD_FLAGS) $(LDFLAGS) :' \
36 {Makefile.in,tdb.mk} || die "sed failed"
37
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
43 #Fixing missing public symbols
44 epatch "${WORKDIR}"/${P}-public-in-c-file.patch
45 append-flags '-D_PUBLIC_='
46 }
47
48 src_configure() {
49 local myconf=()
50
51 if use python; then
52 myconf+=(
53 PYTHON_CONFIG="${EPREFIX}/usr/bin/python-config-$(python_get_version)"
54 PYTHON="$(PYTHON -a)"
55 )
56 fi
57
58 econf \
59 --sysconfdir=/etc/samba \
60 --localstatedir=/var \
61 $(use_enable python) \
62 "${myconf[@]}"
63 }
64
65 src_compile() {
66 # TODO:
67 # - don't build static-libs in case of USE=-static-libs
68
69 # we create the directories first to avoid workaround parallel build problem
70 emake dirs || die "emake dirs failed"
71
72 emake shared-build || die "emake shared-build failed"
73
74 if use tdbtest ; then
75 emake bin/tdbtest || die "emake tdbtest failed"
76 fi
77 }
78
79 src_install() {
80 emake install DESTDIR="${D}" || die "emake install failed"
81
82 dodoc docs/README
83
84 use static-libs || rm -f "${D}"/usr/lib*/*.a
85 use tools || rm -rf "${D}/usr/bin" "${D}/usr/share/man"
86 use tdbtest && dobin bin/tdbtest
87 use python && python_need_rebuild
88 }
89
90 src_test() {
91 # the default src_test runs 'make test' and 'make check', letting
92 # the tests fail occasionally (reason: unknown)
93 emake check || die "emake check failed"
94 }

  ViewVC Help
Powered by ViewVC 1.1.20