dev-python/pytest: arm64 stable (bug #723996)
[gentoo.git] / media-gfx / alembic / alembic-1.7.11-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python2_7 )
7
8 inherit cmake multiprocessing python-single-r1
9
10 DESCRIPTION="Open framework for storing and sharing scene data"
11 HOMEPAGE="https://www.alembic.io/"
12 SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
13
14 LICENSE="BSD"
15
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="arnold +boost doc examples hdf5 maya prman python test zlib"
19 RESTRICT="!test? ( test )"
20
21 # pyalembic python bindings need boost
22 REQUIRED_USE="
23         ${PYTHON_REQUIRED_USE}
24         hdf5? ( zlib )
25         python? ( boost )
26 "
27
28 RDEPEND="
29         ${PYTHON_DEPS}
30         >=media-libs/openexr-2.3.0:=
31         hdf5? ( >=sci-libs/hdf5-1.10.2:=[zlib(+)] )
32         python? ( >=dev-python/pyilmbase-2.3.0[${PYTHON_SINGLE_USEDEP}] )
33         zlib? ( >=sys-libs/zlib-1.2.11-r1 )
34         $(python_gen_cond_dep '
35                 boost? ( >=dev-libs/boost-1.65.0:=[python,${PYTHON_MULTI_USEDEP}] )
36         ')
37 "
38 DEPEND="
39         ${RDEPEND}
40         doc? ( >=app-doc/doxygen-1.8.14-r1 )
41 "
42
43 DOCS=( "ACKNOWLEDGEMENTS.txt" "FEEDBACK.txt" "NEWS.txt" "README.txt" )
44
45 PATCHES=(
46         "${FILESDIR}/${P}-0001-Fix-to-find-boost-with-cmake-3.11.patch"
47         "${FILESDIR}/${P}-0002-Find-IlmBase-by-setting-a-proper-ILMBASE_ROOT-value.patch"
48         "${FILESDIR}/${P}-0003-Fix-env-var-for-renderman.patch"
49         "${FILESDIR}/${P}-0004-Fix-a-compile-issue-with-const.patch"
50         "${FILESDIR}/${P}-0005-Fix-install-locations.patch"
51         "${FILESDIR}/${P}-0006-python-PyAlembic-Tests-CMakeLists.txt-fix-variable.patch"
52 )
53
54 src_prepare() {
55         cmake_src_prepare
56         if use doc; then
57                 doxygen -u Doxyfile || die "Failed to update Doxyfile"
58                 sed -i -e 's|DOT_NUM_THREADS[ \t]*= 0|DOT_NUM_THREADS = '$(makeopts_jobs)'|' Doxyfile || die "Failed to change dot threads"
59         fi
60 }
61
62 src_configure() {
63         local mycmakeargs=(
64                 -DALEMBIC_SHARED_LIBS=ON
65                 # The CMakeLists.txt file needs C++11 or C++-0x if none of them
66                 # is defined
67                 -DALEMBIC_LIB_USES_BOOST=$(usex boost)
68                 -DALEMBIC_LIB_USES_TR1=$(usex !boost)
69                 -DUSE_ARNOLD=$(usex arnold)
70                 -DUSE_BINARIES=ON
71                 -DUSE_EXAMPLES=$(usex examples)
72                 -DUSE_HDF5=$(usex hdf5)
73                 -DUSE_MAYA=$(usex maya)
74                 -DUSE_PRMAN=$(usex prman)
75                 -DUSE_PYALEMBIC=$(usex python)
76                 -DUSE_TESTS=$(usex test)
77         )
78         cmake_src_configure
79 }
80
81 src_compile() {
82         cmake_src_compile
83         if use doc; then
84                 doxygen Doxyfile || die "Failed to build documentation"
85         fi
86 }
87
88 src_install() {
89         use doc && local HTML_DOCS=( doc/html/. )
90         cmake_src_install
91 }
92
93 pkg_postinst() {
94         if use arnold; then
95                 einfo "NOTE: The arnold plugin is highly experimental and hasn't been"
96                 einfo "tested, due to missing license. If you have trouble compiling"
97                 einfo "or running it, please file a bug report for the package at"
98                 einfo "Gentoo's bugzilla."
99         fi
100         if use maya; then
101                 einfo "NOTE: The maya plugin is highly experimental and hasn't been"
102                 einfo "tested, due to missing license. If you have trouble compiling"
103                 einfo "or running it, please file a bug report for the package at"
104                 einfo "Gentoo's bugzilla."
105         fi
106         if use prman; then
107                 einfo "If you're looking for an ebuild for renderman, you may want to"
108                 einfo "try the waebbl overlay: 'eselect repository enable waebbl'"
109                 einfo "followed by 'emerge renderman'"
110         fi
111 }