forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
alembic-1.7.4.ebuild
100 lines (84 loc) · 2.3 KB
/
alembic-1.7.4.ebuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 )
inherit eutils python-single-r1 cmake-utils
DESCRIPTION="Alembic is an open framework for storing and sharing scene data"
HOMEPAGE="http://alembic.io/"
SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"
IUSE="+boost doc hdf5 pyalembic test +zlib"
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
hdf5? ( zlib )
pyalembic? ( boost )"
DEPEND="
${PYTHON_DEP}
>=dev-util/cmake-3.7.2
boost? ( >=dev-libs/boost-1.62.0-r1 )
doc? ( >=app-doc/doxygen-1.8.13-r1 )
pyalembic? ( >=dev-python/pyilmbase-2.2.0 )"
RDEPEND="
${PYTHON_DEP}
>=media-libs/openexr-2.2.0-r2
hdf5? ( >=sci-libs/hdf5-1.8.18[zlib(+)] )
zlib? ( >=sys-libs/zlib-1.2.11-r1 )"
DOCS=( ACKNOWLEDGEMENTS.txt FEEDBACK.txt NEWS.txt README.txt )
PATCHES=(
"${FILESDIR}/${PN}-FindIlmBase-pkgconfig.patch"
"${FILESDIR}/${PN}-CMakeLists-fix_lib.patch"
)
pkg_setup() {
python-single-r1_pkg_setup
}
src_prepare() {
cmake-utils_src_prepare
}
# Static linking, the use of tr1 and support for prman might be added
# in the future.
src_configure() {
# I don't have a license for arnold renderer or maya so I disable them
# as default.
# Also I'm currently not using renderman, so I disable the prman flag
# by default too.
local mycmakeargs=(
-DUSE_ARNOLD=OFF
-DUSE_BINARIES=ON
-DUSE_EXAMPLES=OFF
-DUSE_HDF5=$(usex hdf5)
-DUSE_MAYA=OFF
-DUSE_PRMAN=OFF
-DUSE_PYALEMBIC=$(usex pyalembic)
-DUSE_STATIC_BOOST=OFF # I won't use static libraries
-DUSE_STATIC_HDF5=OFF
-DUSE_TESTS=$(usex test)
-DALEMBIC_ILMBASE_LINK_STATIC=OFF # I don't want to link statically against ilmbase
-DALEMBIC_SHARED_LIBS=ON # For now let's ignore building static libraries
-DALEMBIC_LIB_USES_BOOST=$(usex boost)
-DALEMBIC_LIB_USES_TR1=$(usex !boost)
)
cmake-utils_src_configure
}
src_compile() {
cmake-utils_src_compile
if use doc; then
doxygen -u Doxyfile
doxygen Doxyfile
fi
}
src_test() {
if use test; then
cmake-utils_src_test
fi
}
src_install() {
DESTDIR="${D}" cmake-utils_src_install
if use doc; then
dodoc -r "doc/html"
fi
# move the cmake files from lib->lib64
mv "${D}/usr/lib/cmake" "${D}/usr/lib64/cmake" || die
rm -rv "${D}/usr/lib" || die
}