tkurbad-overlay/dev-libs/libfreenect/libfreenect-9999.ebuild

75 lines
1.9 KiB
Bash
Raw Permalink Normal View History

2015-06-04 22:19:40 +02:00
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
2017-10-28 23:54:41 +02:00
EAPI="6"
2015-06-04 22:19:40 +02:00
2017-04-04 23:29:11 +02:00
PYTHON_COMPAT=( python2_7 )
2017-10-28 23:54:41 +02:00
inherit cmake-utils git-r3 python-r1
2015-06-04 22:19:40 +02:00
DESCRIPTION="Core library for accessing the Microsoft Kinect."
HOMEPAGE="https://github.com/OpenKinect/${PN}"
EGIT_REPO_URI="git://github.com/OpenKinect/${PN}.git"
LICENSE="Apache-2.0 GPL-2"
SLOT="0"
KEYWORDS=""
IUSE="bindist +c_sync +cpp doc examples fakenect opencv openni2 python"
COMMON_DEP="virtual/libusb:1
examples? ( media-libs/freeglut
virtual/opengl
x11-libs/libXi
x11-libs/libXmu )
opencv? ( media-libs/opencv )
python? ( dev-python/numpy )"
RDEPEND="${COMMON_DEP}"
DEPEND="${COMMON_DEP}
dev-util/cmake
virtual/pkgconfig
doc? ( app-doc/doxygen )
python? ( dev-python/cython )"
src_configure() {
local mycmakeargs=(
2017-10-28 23:54:41 +02:00
-DBUILD_REDIST_PACKAGE="$(usex bindist)"
-DBUILD_C_SYNC="$(usex c_sync)"
-DBUILD_CPP="$(usex cpp)"
-DBUILD_EXAMPLES="$(usex examples)"
-DBUILD_FAKENECT="$(usex fakenect)"
-DBUILD_CV="$(usex opencv)"
-DBUILD_OPENNI2_DRIVER="$(usex openni2)"
-DBUILD_PYTHON2="$(usex python)"
2015-06-04 22:19:40 +02:00
-DPYTHON_EXECUTABLE=/usr/bin/python2
)
cmake-utils_src_configure
}
src_install() {
cmake-utils_src_install
2016-07-08 15:04:50 +02:00
2015-06-04 22:19:40 +02:00
# udev rules
insinto /lib/udev/rules.d/
2015-06-04 23:09:14 +02:00
doins "${FILESDIR}"/51-kinect.rules
2015-06-04 22:19:40 +02:00
# documentation
dodoc README.md
if use doc; then
cd doc
doxygen || ewarn "doxygen failed"
2017-10-28 23:54:41 +02:00
#dodoc -r html || ewarn "dodoc failed"
2015-06-04 22:19:40 +02:00
cd -
fi
}
pkg_postinst() {
if ! use bindist; then
ewarn "The bindist USE flag is disabled. Resulting binaries may not be legal to re-distribute."
fi
elog "Make sure your user is in the 'video' group"
elog "Just run 'gpasswd -a <USER> video', then have <USER> re-login."
}