net-libs/qxmpp: Disable failing test
[gentoo.git] / net-libs / qxmpp / qxmpp-9999.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
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 qmake-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
18 RDEPEND="
19         dev-qt/qtcore:5
20         dev-qt/qtnetwork:5[ssl]
21         dev-qt/qtxml:5
22         opus? ( media-libs/opus )
23         speex? ( media-libs/speex )
24         theora? ( media-libs/libtheora )
25         vpx? ( media-libs/libvpx )
26 "
27 DEPEND="${RDEPEND}
28         test? ( dev-qt/qttest:5 )
29 "
30
31 src_prepare() {
32         default
33
34         if ! use doc; then
35                 sed -e '/SUBDIRS/s/doc//' \
36                         -e '/INSTALLS/d' \
37                         -i qxmpp.pro || die "failed to remove docs"
38         fi
39         if ! use test; then
40                 sed -e '/SUBDIRS/s/tests//' \
41                         -i qxmpp.pro || die "failed to remove tests"
42         else
43                 # requires network connection, bug #623708
44                 sed -e "/qxmppiceconnection/d" \
45                         -i tests/tests.pro || die "failed to drop single test"
46         fi
47         # There is no point in building examples. Also, they require dev-qt/qtgui
48         sed -e '/SUBDIRS/s/examples//' \
49                 -i qxmpp.pro || die "sed for removing examples failed"
50 }
51
52 src_configure() {
53         eqmake5 "${S}"/qxmpp.pro \
54                 PREFIX="${EPREFIX}/usr" \
55                 LIBDIR="$(get_libdir)" \
56                 QXMPP_USE_OPUS=$(usex opus 1 0) \
57                 QXMPP_USE_SPEEX=$(usex speex 1 0) \
58                 QXMPP_USE_THEORA=$(usex theora 1 0) \
59                 QXMPP_USE_VPX=$(usex vpx 1 0)
60 }
61
62 src_install() {
63         emake INSTALL_ROOT="${D}" install
64         einstalldocs
65         if use doc; then
66                 # Use proper path for documentation
67                 mv "${ED}"/usr/share/doc/${PN} "${ED}"/usr/share/doc/${PF} || die "doc mv failed"
68         fi
69 }
70
71 src_test() {
72         MAKEOPTS="-j1" # random tests fail otherwise
73         default_src_test
74 }