dev-qt/qtsingleapplication: Prepare live-revdeps for dropping qt4,qt5
[gentoo.git] / net-p2p / qbittorrent / qbittorrent-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 inherit cmake-utils gnome2-utils xdg-utils
7
8 DESCRIPTION="BitTorrent client in C++ and Qt"
9 HOMEPAGE="https://www.qbittorrent.org/"
10
11 if [[ ${PV} == *9999 ]]; then
12         inherit git-r3
13         EGIT_REPO_URI="https://github.com/${PN}/qBittorrent.git"
14 else
15         MY_P=${P/_}
16         SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz"
17         KEYWORDS="~amd64 ~arm ~ppc64 ~x86"
18         S=${WORKDIR}/${MY_P}
19 fi
20
21 LICENSE="GPL-2"
22 SLOT="0"
23 IUSE="+dbus debug webui +X"
24 REQUIRED_USE="dbus? ( X )"
25
26 RDEPEND="
27         >=dev-libs/boost-1.62.0-r1:=
28         dev-qt/qtcore:5
29         dev-qt/qtnetwork:5[ssl]
30         >=dev-qt/qtsingleapplication-2.6.1_p20130904-r1[qt5(+),X?]
31         dev-qt/qtxml:5
32         >=net-libs/libtorrent-rasterbar-1.0.6
33         sys-libs/zlib
34         dbus? ( dev-qt/qtdbus:5 )
35         X? (
36                 dev-qt/qtgui:5
37                 dev-qt/qtsvg:5
38                 dev-qt/qtwidgets:5
39         )"
40 DEPEND="${RDEPEND}
41         dev-qt/linguist-tools:5
42         virtual/pkgconfig"
43
44 DOCS=( AUTHORS Changelog CONTRIBUTING.md README.md TODO )
45
46 src_prepare() {
47         cmake-utils_src_prepare
48
49         # bug 641382
50         sed -i -e "s/-Werror  //" cmake/Modules/MacroQbtCompilerSettings.cmake || die
51 }
52
53 src_configure() {
54         local mycmakeargs=(
55                 -DSYSTEM_QTSINGLEAPPLICATION=ON
56                 -DDBUS=$(usex dbus)
57                 -DGUI=$(usex X)
58                 -DWEBUI=$(usex webui)
59         )
60         cmake-utils_src_configure
61 }
62
63 pkg_postinst() {
64         gnome2_icon_cache_update
65         xdg_desktop_database_update
66 }
67
68 pkg_postrm() {
69         gnome2_icon_cache_update
70         xdg_desktop_database_update
71 }