summaryrefslogtreecommitdiff
blob: 8fdd4089e4cf6d1f2fa2f208a28850ef4d690401 (plain)
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
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

SCM=""
if [ "${PV#9999}" != "${PV}" ] ; then
	SCM="git-r3"
	EGIT_REPO_URI="https://github.com/introlab/rtabmap"
fi

inherit ${SCM} cmake-utils multilib

if [ "${PV#9999}" != "${PV}" ] ; then
	KEYWORDS=""
	SRC_URI=""
else
	KEYWORDS="~amd64"
	SRC_URI="https://github.com/introlab/rtabmap/archive/${PV}.tar.gz -> ${P}.tar.gz"
fi

DESCRIPTION="Real-Time Appearance-Based Mapping (RGB-D Graph SLAM)"
HOMEPAGE="http://introlab.github.io/rtabmap/"
LICENSE="BSD"
SLOT="0"
IUSE="ieee1394 openni2 qt4 qt5"

RDEPEND="
	media-libs/opencv:=
	sci-libs/pcl[openni,vtk]
	sci-libs/vtk
	sys-libs/zlib
	ieee1394? ( media-libs/libdc1394 )
	openni2? ( dev-libs/OpenNI2 )
	!qt5? (
		qt4? (
			dev-qt/qtgui:4
			dev-qt/qtsvg:4
			dev-qt/qtcore:4
			media-libs/opencv[-qt5(-)]
		)
	)
	qt5? (
		dev-qt/qtwidgets:5
		dev-qt/qtcore:5
		dev-qt/qtgui:5
		dev-qt/qtsvg:5
		media-libs/opencv[qt5(-)]
	)
"
DEPEND="${RDEPEND}
	virtual/pkgconfig"

src_configure() {
	local mycmakeargs=(
		"-DWITH_QT=$(usex qt4 ON "$(usex qt5 ON OFF)")"
		"-DRTABMAP_QT_VERSION=$(usex qt5 5 4)"
		"-DWITH_DC1394=$(usex ieee1394 ON OFF)"
		"-DWITH_OPENNI2=$(usex openni2 ON OFF)"
	)
	cmake-utils_src_configure
}