1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 )
6 PYTHON_REQ_USE="threads"
8 inherit python-single-r1 waf-utils multilib-minimal eutils
10 DESCRIPTION="An LDAP-like embedded database"
11 HOMEPAGE="https://ldb.samba.org/"
12 SRC_URI="https://www.samba.org/ftp/pub/${PN}/${P}.tar.gz"
16 KEYWORDS="~alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
19 RDEPEND="!elibc_FreeBSD? ( dev-libs/libbsd[${MULTILIB_USEDEP}] )
20 dev-libs/popt[${MULTILIB_USEDEP}]
21 >=sys-libs/talloc-2.1.5[python,${MULTILIB_USEDEP}]
22 >=sys-libs/tevent-0.9.27[python(+),${MULTILIB_USEDEP}]
23 >=sys-libs/tdb-1.3.8[python,${MULTILIB_USEDEP}]
25 !!<net-fs/samba-3.6.0[ldb]
26 !!>=net-fs/samba-4.0.0[ldb]
30 DEPEND="dev-libs/libxslt
31 doc? ( app-doc/doxygen )
35 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
37 WAF_BINARY="${S}/buildtools/bin/waf"
39 MULTILIB_WRAPPED_HEADERS=( /usr/include/pyldb.h )
42 "${FILESDIR}"/${PN}-1.1.24-optional-python.patch
46 python-single-r1_pkg_setup
54 multilib_src_configure() {
57 --disable-rpath-install --bundled-libraries=NONE \
58 --with-modulesdir="${EPREFIX}"/usr/$(get_libdir)/samba \
59 --builtin-libraries=NONE
61 if ! multilib_is_native_abi; then
62 myconf+=( --disable-python )
64 waf-utils_src_configure "${myconf[@]}"
67 multilib_src_compile(){
69 multilib_is_native_abi && use doc && doxygen Doxyfile
73 if multilib_is_native_abi; then
75 PATH=buildtools/bin:../../../buildtools/bin:$PATH:"${BUILD_DIR}"/bin/shared/private/ \
76 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"${BUILD_DIR}"/bin/shared/private/:"${BUILD_DIR}"/bin/shared \
81 multilib_src_install() {
84 if multilib_is_native_abi && use doc; then
85 doman apidocs/man/man3/*.3
87 dodoc -r apidocs/html/*
92 if has_version sys-auth/sssd; then
93 ewarn "You have sssd installed. It is known to break after ldb upgrades,"
94 ewarn "so please try to rebuild it before reporting bugs."
95 ewarn "See https://bugs.gentoo.org/404281"