diff options
author | Victor Ostorga <vostorga@gentoo.org> | 2011-01-18 21:16:58 +0000 |
---|---|---|
committer | Victor Ostorga <vostorga@gentoo.org> | 2011-01-18 21:16:58 +0000 |
commit | e8517af0175ac5b198df2de71ec874322c5a2b8b (patch) | |
tree | 593b1a1aa9b126aa65c21278c2e7a0029b4559fc /sys-libs/tdb/tdb-1.2.7-r1.ebuild | |
parent | Marking pykde4-4.4.5-r1 ppc for bug 351784 (diff) | |
download | historical-e8517af0175ac5b198df2de71ec874322c5a2b8b.tar.gz historical-e8517af0175ac5b198df2de71ec874322c5a2b8b.tar.bz2 historical-e8517af0175ac5b198df2de71ec874322c5a2b8b.zip |
Set _PUBLIC_ in C file rather than header files bug #350720 patch thanks to Rafał Mużyło <galtgendo@o2.pl>
Package-Manager: portage-2.1.9.25/cvs/Linux i686
Diffstat (limited to 'sys-libs/tdb/tdb-1.2.7-r1.ebuild')
-rw-r--r-- | sys-libs/tdb/tdb-1.2.7-r1.ebuild | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/sys-libs/tdb/tdb-1.2.7-r1.ebuild b/sys-libs/tdb/tdb-1.2.7-r1.ebuild new file mode 100644 index 000000000000..92c58b5096c9 --- /dev/null +++ b/sys-libs/tdb/tdb-1.2.7-r1.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/tdb/tdb-1.2.7-r1.ebuild,v 1.3 2011/01/18 21:16:58 vostorga Exp $ + +EAPI="2" +PYTHON_DEPEND="python? 2" + +inherit autotools python eutils flag-o-matic + +DESCRIPTION="Samba tdb" +HOMEPAGE="http://tdb.samba.org/" +SRC_URI="http://samba.org/ftp/tdb/${P}.tar.gz + mirror://gentoo/${P}-patches.tar.gz" +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="python static-libs tools tdbtest" + +RDEPEND="" +DEPEND="!<net-fs/samba-3.3 + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + dev-libs/popt" + +pkg_setup() { + if use python; then + python_set_active_version 2 + python_pkg_setup + fi +} + +src_prepare() { + eautoconf -Ilib/replace + sed -i \ + -e 's:$(SHLD_FLAGS) :$(SHLD_FLAGS) $(LDFLAGS) :' \ + {Makefile.in,tdb.mk} || die "sed failed" + + # xsltproc will display a warning but we can assume the xml files are valid + sed -i \ + -e 's|$(XSLTPROC) -o|$(XSLTPROC) --nonet -o|' \ + tdb.mk || die "sed failed" + + #Fixing missing public symbols + epatch "${WORKDIR}"/${P}-public-in-c-file.patch + append-flags '-D_PUBLIC_=' +} + +src_configure() { + local myconf=() + + if use python; then + myconf+=( + PYTHON_CONFIG="${EPREFIX}/usr/bin/python-config-$(python_get_version)" + PYTHON="$(PYTHON -a)" + ) + fi + + econf \ + --sysconfdir=/etc/samba \ + --localstatedir=/var \ + $(use_enable python) \ + "${myconf[@]}" +} + +src_compile() { + # TODO: + # - don't build static-libs in case of USE=-static-libs + + # we create the directories first to avoid workaround parallel build problem + emake dirs || die "emake dirs failed" + + emake shared-build || die "emake shared-build failed" + + if use tdbtest ; then + emake bin/tdbtest || die "emake tdbtest failed" + fi +} + +src_install() { + emake install DESTDIR="${D}" || die "emake install failed" + + # installs a necessary symlink + dolib.so sharedbuild/lib/libtdb.so + + dodoc docs/README + + use static-libs || rm -f "${D}"/usr/lib*/*.a + use tools || rm -rf "${D}/usr/bin" "${D}/usr/share/man" + use tdbtest && dobin bin/tdbtest + use python && python_need_rebuild +} + +src_test() { + # the default src_test runs 'make test' and 'make check', letting + # the tests fail occasionally (reason: unknown) + emake check || die "emake check failed" +} |