*/*: [QA] Fix trivial cases of MissingTestRestrict
[gentoo.git] / net-libs / qxmpp / qxmpp-9999.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 EGIT_REPO_URI="https://github.com/qxmpp-project/qxmpp"
7
8 inherit git-r3 cmake-utils
9
10 DESCRIPTION="A cross-platform C++ XMPP client library based on the Qt framework"
11 HOMEPAGE="https://github.com/qxmpp-project/qxmpp/"
12
13 LICENSE="LGPL-2.1"
14 SLOT="0"
15 KEYWORDS=""
16 IUSE="debug doc opus +speex test theora vpx"
17 RESTRICT="!test? ( test )"
18
19 RDEPEND="
20         dev-qt/qtcore:5
21         dev-qt/qtnetwork:5[ssl]
22         dev-qt/qtxml:5
23         opus? ( media-libs/opus )
24         speex? ( media-libs/speex )
25         theora? ( media-libs/libtheora )
26         vpx? ( media-libs/libvpx:= )
27 "
28 DEPEND="${RDEPEND}
29         dev-util/cmake
30         test? ( dev-qt/qttest:5 )
31         doc? ( app-doc/doxygen )
32 "
33
34 src_prepare() {
35         # requires network connection, bug #623708
36         sed -e "/qxmppiceconnection/d" \
37                 -i tests/CMakeLists.txt || die "failed to drop single test"
38
39         cmake-utils_src_prepare
40 }
41
42 src_configure() {
43         local mycmakeargs=(
44                 -DBUILD_DOCUMENTATION=$(usex doc)
45                 -DBUILD_EXAMPLES=OFF
46                 -DBUILD_TESTS=$(usex test)
47                 -DWITH_OPUS=$(usex opus)
48                 -DWITH_SPEEX=$(usex speex)
49                 -DWITH_THEORA=$(usex theora)
50                 -DWITH_VPX=$(usex vpx)
51         )
52
53         cmake-utils_src_configure
54 }
55
56 src_install() {
57         cmake-utils_src_install
58
59         if use doc; then
60                 # Use proper path for documentation
61                 mv "${ED}"/usr/share/doc/${PN} "${ED}"/usr/share/doc/${PF} || die "doc mv failed"
62         fi
63 }