*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / sys-libs / tdb / tdb-1.4.2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python3_{6,7} )
7 PYTHON_REQ_USE="threads(+)"
8
9 inherit waf-utils multilib-minimal python-single-r1
10
11 DESCRIPTION="A simple database API"
12 HOMEPAGE="http://tdb.samba.org/"
13 SRC_URI="http://samba.org/ftp/tdb/${P}.tar.gz"
14
15 LICENSE="GPL-3"
16 SLOT="0"
17 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
18 IUSE="python"
19
20 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
21
22 RDEPEND="!elibc_FreeBSD? ( dev-libs/libbsd[${MULTILIB_USEDEP}] )
23         python? ( ${PYTHON_DEPS} )"
24 DEPEND="
25         ${RDEPEND}
26         ${PYTHON_DEPS}
27         app-text/docbook-xml-dtd:4.2"
28
29 WAF_BINARY="${S}/buildtools/bin/waf"
30
31 RESTRICT="test"
32
33 src_prepare() {
34         default
35         python_fix_shebang .
36         multilib_copy_sources
37 }
38
39 multilib_src_configure() {
40         local extra_opts=()
41         if ! multilib_is_native_abi || ! use python; then
42                 extra_opts+=( --disable-python )
43         fi
44
45         waf-utils_src_configure "${extra_opts[@]}"
46 }
47
48 multilib_src_compile() {
49         # need to avoid parallel building, this looks like the sanest way with waf-utils/multiprocessing eclasses
50         unset MAKEOPTS
51         waf-utils_src_compile
52 }
53
54 multilib_src_test() {
55         # the default src_test runs 'make test' and 'make check', letting
56         # the tests fail occasionally (reason: unknown)
57         emake check
58 }
59
60 multilib_src_install() {
61         waf-utils_src_install
62 }