summaryrefslogtreecommitdiff
blob: 357745bd6e648a4e2b5176bf7b8e96597a9c86fa (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
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit cmake-utils kde5-functions

DESCRIPTION="API to manage the serial connection between the computer and 3D Printers"
SRC_URI="mirror://kde/stable/${PN}/${PV}/${P}.tar.xz"
HOMEPAGE="https://atelier.kde.org/"

LICENSE="|| ( LGPL-2.1+ LGPL-3 ) gui? ( GPL-3+ )"
SLOT="0"
KEYWORDS="~amd64"
IUSE="doc gui test"

RDEPEND="
	$(add_qt_dep qtcore)
	$(add_qt_dep qtserialport)
	gui? (
		$(add_qt_dep qtcharts)
		$(add_qt_dep qtgui)
		$(add_qt_dep qtwidgets)
	)
"
DEPEND="${RDEPEND}
	$(add_frameworks_dep extra-cmake-modules)
	doc? ( app-doc/doxygen[dot] )
	test? ( $(add_qt_dep qttest) )
"

src_prepare() {
	cmake-utils_src_prepare

	sed -e "s/${PN}/${PF}/" -i doc/CMakeLists.txt || die

	use gui || punt_bogus_dep Qt5 Charts
	if ! use test; then
		cmake_comment_add_subdirectory unittests
		punt_bogus_dep Qt5 Test
	fi
}

src_configure() {
	local mycmakeargs=(
		-DBUILD_DOCS=$(usex doc)
		-DBUILD_TEST_GUI=$(usex gui)
	)

	cmake-utils_src_configure
}