summaryrefslogtreecommitdiff
blob: cfcbd8761624e81327c5596c9dfde7743aab1054 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

KDE_HANDBOOK="true"
KDE_PUNT_BOGUS_DEPS="true"
KDE_TEST="true"
VIRTUALX_REQUIRED="test"
inherit kde5 multilib pam

DESCRIPTION="KDE Plasma workspace"
KEYWORDS="~amd64 ~x86"
IUSE="dbus +drkonqi gps prison qalculate +systemmonitor"

COMMON_DEPEND="
	$(add_plasma_dep kwayland)
	$(add_plasma_dep kwin)
	$(add_plasma_dep libkscreen)
	$(add_plasma_dep libksysguard)
	$(add_frameworks_dep baloo)
	$(add_frameworks_dep kactivities)
	$(add_frameworks_dep kauth)
	$(add_frameworks_dep kbookmarks)
	$(add_frameworks_dep kcmutils)
	$(add_frameworks_dep kcompletion)
	$(add_frameworks_dep kconfig)
	$(add_frameworks_dep kconfigwidgets)
	$(add_frameworks_dep kcoreaddons)
	$(add_frameworks_dep kcrash)
	$(add_frameworks_dep kdbusaddons)
	$(add_frameworks_dep kdeclarative)
	$(add_frameworks_dep kdelibs4support)
	$(add_frameworks_dep kdesu)
	$(add_frameworks_dep kglobalaccel)
	$(add_frameworks_dep kguiaddons)
	$(add_frameworks_dep ki18n)
	$(add_frameworks_dep kiconthemes)
	$(add_frameworks_dep kidletime)
	$(add_frameworks_dep kio)
	$(add_frameworks_dep kitemviews)
	$(add_frameworks_dep kjobwidgets)
	$(add_frameworks_dep kjs)
	$(add_frameworks_dep kjsembed)
	$(add_frameworks_dep knewstuff)
	$(add_frameworks_dep knotifications)
	$(add_frameworks_dep knotifyconfig)
	$(add_frameworks_dep kpackage)
	$(add_frameworks_dep krunner)
	$(add_frameworks_dep kservice)
	$(add_frameworks_dep ktexteditor)
	$(add_frameworks_dep ktextwidgets)
	$(add_frameworks_dep kwallet)
	$(add_frameworks_dep kwidgetsaddons)
	$(add_frameworks_dep kwindowsystem)
	$(add_frameworks_dep kxmlgui)
	$(add_frameworks_dep kxmlrpcclient)
	$(add_frameworks_dep networkmanager-qt)
	$(add_frameworks_dep plasma)
	$(add_frameworks_dep solid)
	dev-libs/wayland
	dev-qt/qtconcurrent:5
	dev-qt/qtdbus:5
	dev-qt/qtdeclarative:5[widgets]
	dev-qt/qtgui:5[jpeg]
	dev-qt/qtnetwork:5
	dev-qt/qtscript:5
	dev-qt/qtsql:5
	dev-qt/qtwidgets:5
	dev-qt/qtx11extras:5
	dev-qt/qtxml:5
	media-libs/phonon[qt5]
	sys-libs/pam
	sys-libs/zlib
	x11-libs/libICE
	x11-libs/libSM
	x11-libs/libX11
	x11-libs/libXau
	x11-libs/libxcb
	x11-libs/libXfixes
	x11-libs/libXi
	x11-libs/libXrender
	x11-libs/xcb-util-keysyms
	dbus? ( dev-libs/libdbusmenu-qt[qt5] )
	drkonqi? (
		$(add_frameworks_dep kdewebkit)
		dev-qt/qtwebkit:5
	)
	gps? ( sci-geosciences/gpsd )
	prison? ( media-libs/prison:5 )
	qalculate? ( sci-libs/libqalculate )
	systemmonitor? (
		$(add_plasma_dep libksysguard processui)
	)
"
RDEPEND="${COMMON_DEPEND}
	$(add_frameworks_dep kded)
	$(add_plasma_dep kde-cli-tools)
	$(add_plasma_dep milou)
	dev-qt/qdbus:5
	dev-qt/qtpaths:5
	dev-qt/qtquickcontrols:5[widgets]
	x11-apps/mkfontdir
	x11-apps/xmessage
	x11-apps/xprop
	x11-apps/xrdb
	x11-apps/xset
	x11-apps/xsetroot
	!<kde-apps/kio-extras-5.4.0
	!kde-base/freespacenotifier
	!kde-base/libtaskmanager
	!kde-base/kcminit
	!kde-base/kdebase-startkde
	!kde-base/klipper
	!kde-base/krunner
	!kde-base/ksmserver
	!kde-base/ksplash
	!kde-base/plasma-workspace
	!kde-plasma/kio-extras
"
DEPEND="${COMMON_DEPEND}
	x11-proto/xproto
"

PATCHES=(
	"${FILESDIR}/${PN}-5.4-startkde-script.patch"
	"${FILESDIR}/${PN}-5.4-consolekit2.patch"
)

RESTRICT="test"

src_prepare() {
	# whole patch should be upstreamed, doesn't work in PATCHES
	epatch "${FILESDIR}/${PN}-tests-optional.patch"

	kde5_src_prepare

	sed -e "s|\`qtpaths|\`/usr/$(get_libdir)/qt5/bin/qtpaths|" -i startkde/startkde.cmake || die

	if ! use drkonqi; then
		comment_add_subdirectory drkonqi
	fi

	if ! use systemmonitor; then
		comment_add_subdirectory systemmonitor
	fi
}

src_configure() {
	local mycmakeargs=(
		$(cmake-utils_use_find_package dbus dbusmenu-qt5)
		$(cmake-utils_use_find_package gps libgps)
		$(cmake-utils_use_find_package prison)
		$(cmake-utils_use_find_package qalculate Qalculate)
	)

	kde5_src_configure
}

src_install() {
	kde5_src_install

	newpamd "${FILESDIR}/kde.pam" kde
	newpamd "${FILESDIR}/kde-np.pam" kde-np

	# startup and shutdown scripts
	insinto /etc/plasma/startup
	doins "${FILESDIR}/agent-startup.sh"

	insinto /etc/plasma/shutdown
	doins "${FILESDIR}/agent-shutdown.sh"
}

pkg_postinst () {
	kde5_pkg_postinst

	echo
	elog "To enable gpg-agent and/or ssh-agent in Plasma sessions,"
	elog "edit ${EPREFIX}/etc/plasma/startup/agent-startup.sh and"
	elog "${EPREFIX}/etc/plasma/shutdown/agent-shutdown.sh"
	echo
}