626c931ef3d1bca0f411248f1eb3482e1b6fb47b
[gentoo.git] / kde-plasma / plasma-nm / plasma-nm-5.13.4.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 kde5
7
8 DESCRIPTION="KDE Plasma applet for NetworkManager"
9 LICENSE="GPL-2 LGPL-2.1"
10 KEYWORDS="~amd64 ~arm ~x86"
11 IUSE="modemmanager openconnect teamd"
12
13 DEPEND="
14         $(add_frameworks_dep kcompletion)
15         $(add_frameworks_dep kconfig)
16         $(add_frameworks_dep kconfigwidgets)
17         $(add_frameworks_dep kcoreaddons)
18         $(add_frameworks_dep kdbusaddons)
19         $(add_frameworks_dep kdeclarative)
20         $(add_frameworks_dep kdelibs4support)
21         $(add_frameworks_dep ki18n)
22         $(add_frameworks_dep kiconthemes)
23         $(add_frameworks_dep kio)
24         $(add_frameworks_dep kitemviews)
25         $(add_frameworks_dep knotifications)
26         $(add_frameworks_dep kservice)
27         $(add_frameworks_dep kwallet)
28         $(add_frameworks_dep kwidgetsaddons)
29         $(add_frameworks_dep kwindowsystem)
30         $(add_frameworks_dep kxmlgui)
31         $(add_frameworks_dep networkmanager-qt 'teamd=')
32         $(add_frameworks_dep plasma)
33         $(add_frameworks_dep solid)
34         $(add_qt_dep qtdbus)
35         $(add_qt_dep qtdeclarative)
36         $(add_qt_dep qtgui)
37         $(add_qt_dep qtnetwork)
38         $(add_qt_dep qtwidgets)
39         >=app-crypt/qca-2.1.1:2[qt5(+)]
40         net-misc/networkmanager[teamd=]
41         modemmanager? (
42                 $(add_frameworks_dep modemmanager-qt)
43                 $(add_qt_dep qtxml)
44                 net-misc/mobile-broadband-provider-info
45         )
46         openconnect? (
47                 $(add_qt_dep qtxml)
48                 net-misc/networkmanager-openconnect
49                 net-vpn/openconnect:=
50         )
51 "
52 RDEPEND="${DEPEND}
53         $(add_plasma_dep kde-cli-tools)
54         !kde-plasma/plasma-nm:4
55 "
56
57 src_configure() {
58         local mycmakeargs=(
59                 -DDISABLE_MODEMMANAGER_SUPPORT=$(usex !modemmanager)
60                 $(cmake-utils_use_find_package modemmanager KF5ModemManagerQt)
61                 $(cmake-utils_use_find_package openconnect OpenConnect)
62         )
63
64         kde5_src_configure
65 }
66
67 pkg_postinst() {
68         kde5_pkg_postinst
69
70         if ! has_version "kde-plasma/plasma-workspace:5"; then
71                 einfo "${PN} is not terribly useful without kde-plasma/plasma-workspace:5."
72                 einfo "However, the networkmanagement KCM can be called from either systemsettings"
73                 einfo "or manually: $ kcmshell5 kcm_networkmanagement"
74         fi
75 }