media-libs/partio: Add live ebuild
[gentoo.git] / media-libs / partio / partio-9999.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 : ${CMAKE_MAKEFILE_GENERATOR:=ninja}
7 PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
8
9 inherit cmake-utils vcs-snapshot python-single-r1
10
11 if [[ ${PV} == *9999 ]]; then
12         inherit git-r3
13         EGIT_REPO_URI="https://github.com/wdas/partio.git"
14 else
15         MY_GIT_COMMIT="2774ef3958da46d9f8a4230ebda9e04b1aa8f4e5"
16         SRC_URI="https://github.com/wdas/${PN}/archive/${MY_GIT_COMMIT}.tar.gz -> ${P}.tar.gz"
17         KEYWORDS="~amd64 ~x86"
18 fi
19
20 DESCRIPTION="A library for particle IO and manipulation"
21 HOMEPAGE="https://www.disneyanimation.com/technology/partio.html"
22
23 LICENSE="BSD"
24 SLOT="0"
25 IUSE="doc"
26 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
27
28 RDEPEND="${PYTHON_DEPS}
29         media-libs/freeglut
30         virtual/opengl
31         sys-libs/zlib:="
32
33 DEPEND="${RDEPEND}
34         doc? ( app-doc/doxygen[latex] )
35         dev-lang/swig:*"
36
37 src_prepare() {
38         cmake-utils_src_prepare
39         cmake_comment_add_subdirectory "src/tests"
40 }
41
42 src_configure() {
43         local mycmakeargs=(
44                 $(cmake-utils_use_find_package doc Doxygen)
45                 -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}"
46         )
47         cmake-utils_src_configure
48 }