dev-python/virtualenv: arm64 keyworded (bug #700918)
[gentoo.git] / dev-python / pyilmbase / pyilmbase-2.3.0-r2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python2_7 )
6
7 inherit autotools python-single-r1
8
9 DESCRIPTION="IlmBase Python bindings"
10 HOMEPAGE="https://www.openexr.com"
11 SRC_URI="https://github.com/openexr/openexr/releases/download/v${PV}/${P}.tar.gz"
12 LICENSE="BSD"
13
14 SLOT="0"
15 KEYWORDS="amd64 x86"
16 IUSE="+numpy"
17
18 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
19
20 RDEPEND="${PYTHON_DEPS}
21         ~media-libs/ilmbase-${PV}:=
22         $(python_gen_cond_dep '
23                 >=dev-libs/boost-1.62.0-r1[python(+),${PYTHON_MULTI_USEDEP}]
24                 numpy? (
25                         || (
26                                 dev-python/numpy-python2[${PYTHON_MULTI_USEDEP}]
27                                 >=dev-python/numpy-1.10.4[${PYTHON_MULTI_USEDEP}]
28                         )
29                 )
30         ')"
31 DEPEND="${RDEPEND}
32         ${PYTHON_DEPS}
33         >=virtual/pkgconfig-0-r1"
34
35 PATCHES=(
36         "${FILESDIR}/${P}-link-pyimath.patch"
37         "${FILESDIR}/${P}-fix-build-system.patch"
38 )
39
40 DOCS=( README.md )
41
42 src_prepare() {
43         default
44         eautoreconf
45 }
46
47 src_configure() {
48         local boostpython_ver="${EPYTHON:6}"
49         if has_version ">=dev-libs/boost-1.70.0"; then
50                 boostpython_ver="${boostpython_ver/./}"
51         else
52                 boostpython_ver="-${boostpython_ver}"
53         fi
54
55         local myeconfargs=(
56                 --with-boost-include-dir="${EPREFIX}/usr/include/boost"
57                 --with-boost-lib-dir="${EPREFIX}/usr/$(get_libdir)"
58                 --with-boost-python-libname="boost_python${boostpython_ver}"
59                 $(use_with numpy)
60         )
61
62         econf "${myeconfargs[@]}"
63 }
64
65 src_install() {
66         # Fails to install with multiple jobs
67         emake DESTDIR="${D}" -j1 install
68
69         einstalldocs
70
71         # package provides pkg-config files
72         find "${D}" -name '*.la' -delete || die
73 }