1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 )
7 PYTHON_REQ_USE="threads"
9 inherit waf-utils python-single-r1 multilib multilib-minimal
11 DESCRIPTION="Samba talloc library"
12 HOMEPAGE="https://talloc.samba.org/"
13 SRC_URI="https://www.samba.org/ftp/${PN}/${P}.tar.gz"
15 LICENSE="GPL-3 LGPL-3+ LGPL-2"
17 KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~sparc-solaris"
20 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
22 RDEPEND="python? ( ${PYTHON_DEPS} )
23 !!<sys-libs/talloc-2.0.5"
29 WAF_BINARY="${S}/buildtools/bin/waf"
33 MULTILIB_WRAPPED_HEADERS=(
34 # python goes only for native
35 /usr/include/pytalloc.h
39 # what would you expect of waf? i won't even waste time trying.
43 multilib_src_configure() {
46 use compat && extra_opts+=( --enable-talloc-compat1 )
47 if ! multilib_is_native_abi || ! use python; then
48 extra_opts+=( --disable-python )
51 waf-utils_src_configure \
55 multilib_src_compile() {
59 multilib_src_install() {
62 # waf is stupid, and no, we can't fix the build-system, since it's provided
63 # as a brilliant binary blob thats decompressed on the fly
64 if [[ ${CHOST} == *-darwin* ]] ; then
66 -id "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
67 "${ED}"/usr/$(get_libdir)/libtalloc.2.0.5.dylib || die
70 -id "${EPREFIX}"/usr/$(get_libdir)/libpytalloc-util.2.dylib \
71 "${ED}"/usr/$(get_libdir)/libpytalloc-util.2.0.5.dylib || die
73 -change "${S}/bin/default/libtalloc.dylib" \
74 "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
75 "${ED}"/usr/$(get_libdir)/libpytalloc-util.2.0.5.dylib || die
77 -change "${S}/bin/default/libtalloc.dylib" \
78 "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
79 "${D}"$(python_get_sitedir)/talloc.bundle || die