summaryrefslogtreecommitdiff
path: root/dev-libs/libdbusmenu-qt5/libdbusmenu-qt5-0.9.3_pre20160218-r3.ebuild
blob: ec1c37d2b80a2fc8d943c056c4a37c6b059db113 (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
64
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=7

MY_PN="${PN/qt5/qt}"
MY_PV=${PV/_pre/+16.04.}

EBZR_REPO_URI="lp:libdbusmenu-qt"

[[ ${PV} == 9999* ]] && inherit bzr
inherit cmake virtualx

DESCRIPTION="Library providing Qt implementation of DBusMenu specification"
HOMEPAGE="https://launchpad.net/libdbusmenu-qt/"
if [[ ${PV} != 9999* ]] ; then
	SRC_URI="https://launchpad.net/ubuntu/+archive/primary/+files/${MY_PN}_${MY_PV}.orig.tar.gz"
	KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
fi

LICENSE="LGPL-2"
SLOT="0"
IUSE="debug"

RDEPEND="
	dev-qt/qtcore:5
	dev-qt/qtdbus:5
	dev-qt/qtgui:5
	dev-qt/qtwidgets:5
"
DEPEND="${RDEPEND}
	test? ( dev-qt/qttest:5 )
"

[[ ${PV} == 9999* ]] || S=${WORKDIR}/${PN}-${MY_PV}

# tests fail due to missing connection to dbus
RESTRICT="test"

S=${WORKDIR}/${MY_PN}-${MY_PV}

src_prepare() {
	[[ ${PV} == 9999* ]] && bzr_src_prepare
	cmake_src_prepare

	cmake_comment_add_subdirectory tools
	use test || cmake_comment_add_subdirectory tests
}

src_configure() {
	local mycmakeargs=(
		-DWITH_DOC=OFF
		-DUSE_QT5=ON
	)
	cmake_src_configure
}

src_test() {
	local builddir=${BUILD_DIR}

	BUILD_DIR=${BUILD_DIR}/tests virtx cmake_src_test

	BUILD_DIR=${builddir}
}