| 1 | # Copyright 1999-2010 Gentoo Foundation |
1 | # Copyright 1999-2010 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.63 2010/06/22 13:49:08 reavertm Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.79 2010/12/06 10:17:04 tampakrap Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: kde4-base.eclass |
5 | # @ECLASS: kde4-base.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # kde@gentoo.org |
7 | # kde@gentoo.org |
| 8 | # @BLURB: This eclass provides functions for kde 4.X ebuilds |
8 | # @BLURB: This eclass provides functions for kde 4.X ebuilds |
| … | |
… | |
| 11 | # and KDE4 applications. |
11 | # and KDE4 applications. |
| 12 | # |
12 | # |
| 13 | # NOTE: KDE 4 ebuilds by default define EAPI="2", this can be redefined but |
13 | # NOTE: KDE 4 ebuilds by default define EAPI="2", this can be redefined but |
| 14 | # eclass will fail with version older than 2. |
14 | # eclass will fail with version older than 2. |
| 15 | |
15 | |
|
|
16 | # @ECLASS-VARIABLE: VIRTUALX_REQUIRED |
|
|
17 | # @DESCRIPTION: |
|
|
18 | # Do we need an X server? Valid values are "always", "optional", and "manual". |
|
|
19 | # "tests" is a synonym for "optional". While virtualx.eclass supports in principle |
|
|
20 | # also the use of an X server during other ebuild phases, we only use it in |
|
|
21 | # src_test here. Most likely you'll want to set "optional", which introduces the |
|
|
22 | # use-flag "test" (if not already present), adds dependencies conditional on that |
|
|
23 | # use-flag, and automatically runs (only) the ebuild test phase with a virtual X server |
|
|
24 | # present. This makes things a lot more comfortable than the bare virtualx eclass. |
|
|
25 | |
|
|
26 | # In case the variable is not set in the ebuild, let virtualx eclass not do anything |
|
|
27 | : ${VIRTUALX_REQUIRED:=manual} |
|
|
28 | |
| 16 | inherit kde4-functions base eutils |
29 | inherit kde4-functions base virtualx eutils |
| 17 | |
30 | |
| 18 | get_build_type |
31 | get_build_type |
| 19 | if [[ ${BUILD_TYPE} = live ]]; then |
32 | if [[ ${BUILD_TYPE} = live ]]; then |
| 20 | if [[ ${KDEBASE} = kdevelop ]]; then |
33 | if [[ ${KDEBASE} = kdevelop ]]; then |
| 21 | inherit git |
34 | inherit git |
| … | |
… | |
| 48 | fi |
61 | fi |
| 49 | |
62 | |
| 50 | # @ECLASS-VARIABLE: KDE_MINIMAL |
63 | # @ECLASS-VARIABLE: KDE_MINIMAL |
| 51 | # @DESCRIPTION: |
64 | # @DESCRIPTION: |
| 52 | # This variable is used when KDE_REQUIRED is set, to specify required KDE minimal |
65 | # This variable is used when KDE_REQUIRED is set, to specify required KDE minimal |
| 53 | # version for apps to work. Currently defaults to 4.3 |
66 | # version for apps to work. Currently defaults to 4.4 |
| 54 | # One may override this variable to raise version requirements. |
67 | # One may override this variable to raise version requirements. |
| 55 | # For possible values look at KDE_SLOTS and KDE_LIVE_SLOTS variables. |
68 | # For possible values look at KDE_SLOTS and KDE_LIVE_SLOTS variables. |
| 56 | # Note that it is fixed to ${SLOT} for kde-base packages. |
69 | # Note that it is fixed to ${SLOT} for kde-base packages. |
| 57 | KDE_MINIMAL="${KDE_MINIMAL:-4.3}" |
70 | KDE_MINIMAL="${KDE_MINIMAL:-4.4}" |
| 58 | |
71 | |
| 59 | # Set slot for packages in kde-base, koffice and kdevelop |
72 | # Set slot for packages in kde-base, koffice and kdevelop |
| 60 | case ${KDEBASE} in |
73 | case ${KDEBASE} in |
| 61 | kde-base) |
74 | kde-base) |
| 62 | # Determine SLOT from PVs |
75 | # Determine SLOT from PVs |
| 63 | case ${PV} in |
76 | case ${PV} in |
| 64 | *.9999*) SLOT="${PV/.9999*/}" ;; # stable live |
77 | *.9999*) SLOT="${PV/.9999*/}" ;; # stable live |
|
|
78 | 4.6* | 4.5.[6-9][0-9]*) SLOT="4.6" ;; |
| 65 | 4.5* | 4.4.[6-9]*) SLOT="4.5" ;; |
79 | 4.5* | 4.4.[6-9][0-9]*) SLOT="4.5" ;; |
| 66 | 4.4* | 4.3.[6-9]*) SLOT="4.4" ;; |
80 | 4.4* | 4.3.[6-9][0-9]*) SLOT="4.4" ;; |
| 67 | 4.3*) SLOT="4.3" ;; |
|
|
| 68 | 9999*) SLOT="live" ;; # regular live |
81 | 9999*) SLOT="live" ;; # regular live |
| 69 | *) die "Unsupported ${PV}" ;; |
82 | *) die "Unsupported ${PV}" ;; |
| 70 | esac |
83 | esac |
| 71 | KDE_MINIMAL="${SLOT}" |
84 | KDE_MINIMAL="${SLOT}" |
| 72 | ;; |
85 | ;; |
| 73 | koffice) |
86 | koffice) |
| 74 | SLOT="2" |
87 | SLOT="2" |
| 75 | ;; |
88 | ;; |
| 76 | kdevelop) |
89 | kdevelop) |
| 77 | if [[ ${BUILD_TYPE} = live ]]; then |
90 | if [[ ${BUILD_TYPE} = live ]]; then |
| 78 | KDEVELOP_VERSION="9999" |
91 | # @ECLASS-VARIABLE: KDEVELOP_VERSION |
| 79 | KDEVPLATFORM_VERSION="9999" |
92 | # @DESCRIPTION: |
|
|
93 | # Specifies KDevelop version. Default is 4.0.0 for tagged packages and 9999 for live packages. |
|
|
94 | # Applies to KDEBASE=kdevelop only. |
|
|
95 | KDEVELOP_VERSION="${KDEVELOP_VERSION:-9999}" |
|
|
96 | # @ECLASS-VARIABLE: KDEVPLATFORM_VERSION |
|
|
97 | # @DESCRIPTION: |
|
|
98 | # Specifies KDevplatform version. Default is 1.0.0 for tagged packages and 9999 for live packages. |
|
|
99 | # Applies to KDEBASE=kdevelop only. |
|
|
100 | KDEVPLATFORM_VERSION="${KDEVPLATFORM_VERSION:-9999}" |
| 80 | else |
101 | else |
| 81 | case ${PN} in |
102 | case ${PN} in |
| 82 | kdevelop|quanta) |
103 | kdevelop|quanta) |
| 83 | KDEVELOP_VERSION=${PV} |
104 | KDEVELOP_VERSION=${PV} |
| 84 | KDEVPLATFORM_VERSION="$(($(get_major_version)-3)).$(get_after_major_version)" |
105 | KDEVPLATFORM_VERSION="$(($(get_major_version)-3)).$(get_after_major_version)" |
| 85 | ;; |
106 | ;; |
| 86 | *) |
107 | kdevplatform) |
| 87 | KDEVELOP_VERSION="$(($(get_major_version)+3)).$(get_after_major_version)" |
108 | KDEVELOP_VERSION="$(($(get_major_version)+3)).$(get_after_major_version)" |
| 88 | KDEVPLATFORM_VERSION=${PV} |
109 | KDEVPLATFORM_VERSION=${PV} |
|
|
110 | ;; |
|
|
111 | *) |
|
|
112 | KDEVELOP_VERSION="${KDEVELOP_VERSION:-4.0.0}" |
|
|
113 | KDEVPLATFORM_VERSION="${KDEVPLATFORM_VERSION:-1.0.0}" |
| 89 | esac |
114 | esac |
| 90 | fi |
115 | fi |
| 91 | SLOT="4" |
116 | SLOT="4" |
| 92 | ;; |
117 | ;; |
| 93 | esac |
118 | esac |
| 94 | |
119 | |
| 95 | slot_is_at_least 4.5 ${KDE_MINIMAL} && CMAKE_MIN_VERSION="2.6.4" |
120 | slot_is_at_least 4.5 ${KDE_MINIMAL} && CMAKE_MIN_VERSION="2.8.1" |
| 96 | |
121 | |
| 97 | inherit ${buildsystem_eclass} |
122 | inherit ${buildsystem_eclass} |
| 98 | |
123 | |
| 99 | EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare ${export_fns} pkg_postinst pkg_postrm |
124 | EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare ${export_fns} pkg_postinst pkg_postrm |
| 100 | |
125 | |
| 101 | unset buildsystem_eclass |
126 | unset buildsystem_eclass |
| 102 | unset export_fns |
127 | unset export_fns |
| 103 | |
128 | |
|
|
129 | # @ECLASS-VARIABLE: DECLARATIVE_REQUIRED |
|
|
130 | # @DESCRIPTION: |
|
|
131 | # Is qt-declarative required? Possible values are 'always', 'optional' and 'never'. |
|
|
132 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
133 | DECLARATIVE_REQUIRED="${DECLARATIVE_REQUIRED:-never}" |
|
|
134 | |
|
|
135 | # @ECLASS-VARIABLE: QTHELP_REQUIRED |
|
|
136 | # @DESCRIPTION: |
|
|
137 | # Is qt-assistant required? Possible values are 'always', 'optional' and 'never'. |
|
|
138 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
139 | QTHELP_REQUIRED="${QTHELP_REQUIRED:-never}" |
|
|
140 | |
|
|
141 | # @ECLASS-VARIABLE: OPENGL_REQUIRED |
|
|
142 | # @DESCRIPTION: |
|
|
143 | # Is qt-opengl required? Possible values are 'always', 'optional' and 'never'. |
|
|
144 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
145 | OPENGL_REQUIRED="${OPENGL_REQUIRED:-never}" |
|
|
146 | |
|
|
147 | # @ECLASS-VARIABLE: MULTIMEDIA_REQUIRED |
|
|
148 | # @DESCRIPTION: |
|
|
149 | # Is qt-multimedia required? Possible values are 'always', 'optional' and 'never'. |
|
|
150 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
151 | MULTIMEDIA_REQUIRED="${MULTIMEDIA_REQUIRED:-never}" |
|
|
152 | |
|
|
153 | # @ECLASS-VARIABLE: WEBKIT_REQUIRED |
|
|
154 | # @DESCRIPTION: |
|
|
155 | # Is qt-webkit requred? Possible values are 'always', 'optional' and 'never'. |
|
|
156 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
157 | WEBKIT_REQUIRED="${WEBKIT_REQUIRED:-never}" |
|
|
158 | |
|
|
159 | # @ECLASS-VARIABLE: CPPUNIT_REQUIRED |
|
|
160 | # @DESCRIPTION: |
|
|
161 | # Is cppunit required for tests? Possible values are 'always', 'optional' and 'never'. |
|
|
162 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
163 | CPPUNIT_REQUIRED="${CPPUNIT_REQUIRED:-never}" |
|
|
164 | |
|
|
165 | # @ECLASS-VARIABLE: KDE_REQUIRED |
|
|
166 | # @DESCRIPTION: |
|
|
167 | # Is kde required? Possible values are 'always', 'optional' and 'never'. |
|
|
168 | # This variable must be set before inheriting any eclasses. Defaults to 'always' |
|
|
169 | # If set to 'always' or 'optional', KDE_MINIMAL may be overriden as well. |
|
|
170 | # Note that for kde-base packages this variable is fixed to 'always'. |
|
|
171 | KDE_REQUIRED="${KDE_REQUIRED:-always}" |
|
|
172 | |
|
|
173 | # @ECLASS-VARIABLE: KDE_HANDBOOK |
|
|
174 | # @DESCRIPTION: |
|
|
175 | # Set to enable handbook in application. Possible values are 'always', 'optional' |
|
|
176 | # (handbook USE flag) and 'never'. |
|
|
177 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
178 | # It adds default handbook dirs for kde-base packages to KMEXTRA and in any case it |
|
|
179 | # ensures buildtime and runtime dependencies. |
|
|
180 | KDE_HANDBOOK="${KDE_HANDBOOK:-never}" |
|
|
181 | |
|
|
182 | # Setup packages inheriting this eclass |
| 104 | case ${KDEBASE} in |
183 | case ${KDEBASE} in |
| 105 | kde-base) |
184 | kde-base) |
| 106 | HOMEPAGE="http://www.kde.org/" |
185 | HOMEPAGE="http://www.kde.org/" |
| 107 | LICENSE="GPL-2" |
186 | LICENSE="GPL-2" |
| 108 | ;; |
|
|
| 109 | koffice) |
|
|
| 110 | HOMEPAGE="http://www.koffice.org/" |
|
|
| 111 | LICENSE="GPL-2" |
|
|
| 112 | ;; |
|
|
| 113 | kdevelop) |
|
|
| 114 | HOMEPAGE="http://www.kdevelop.org/" |
|
|
| 115 | LICENSE="GPL-2" |
|
|
| 116 | ;; |
|
|
| 117 | esac |
|
|
| 118 | |
|
|
| 119 | # @ECLASS-VARIABLE: OPENGL_REQUIRED |
|
|
| 120 | # @DESCRIPTION: |
|
|
| 121 | # Is qt-opengl required? Possible values are 'always', 'optional' and 'never'. |
|
|
| 122 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
| 123 | OPENGL_REQUIRED="${OPENGL_REQUIRED:-never}" |
|
|
| 124 | |
|
|
| 125 | # @ECLASS-VARIABLE: MULTIMEDIA_REQUIRED |
|
|
| 126 | # @DESCRIPTION: |
|
|
| 127 | # Is qt-multimedia required? Possible values are 'always', 'optional' and 'never'. |
|
|
| 128 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
| 129 | MULTIMEDIA_REQUIRED="${MULTIMEDIA_REQUIRED:-never}" |
|
|
| 130 | |
|
|
| 131 | # @ECLASS-VARIABLE: WEBKIT_REQUIRED |
|
|
| 132 | # @DESCRIPTION: |
|
|
| 133 | # Is qt-webkit requred? Possible values are 'always', 'optional' and 'never'. |
|
|
| 134 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
| 135 | WEBKIT_REQUIRED="${WEBKIT_REQUIRED:-never}" |
|
|
| 136 | |
|
|
| 137 | # @ECLASS-VARIABLE: CPPUNIT_REQUIRED |
|
|
| 138 | # @DESCRIPTION: |
|
|
| 139 | # Is cppunit required for tests? Possible values are 'always', 'optional' and 'never'. |
|
|
| 140 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
| 141 | CPPUNIT_REQUIRED="${CPPUNIT_REQUIRED:-never}" |
|
|
| 142 | |
|
|
| 143 | # @ECLASS-VARIABLE: KDE_REQUIRED |
|
|
| 144 | # @DESCRIPTION: |
|
|
| 145 | # Is kde required? Possible values are 'always', 'optional' and 'never'. |
|
|
| 146 | # This variable must be set before inheriting any eclasses. Defaults to 'always' |
|
|
| 147 | # If set to always or optional, KDE_MINIMAL may be overriden as well. |
|
|
| 148 | # Note that for kde-base packages this variable is fixed to 'always'. |
|
|
| 149 | KDE_REQUIRED="${KDE_REQUIRED:-always}" |
|
|
| 150 | |
|
|
| 151 | # Setup packages inheriting this eclass |
|
|
| 152 | case ${KDEBASE} in |
|
|
| 153 | kde-base) |
|
|
| 154 | if [[ $BUILD_TYPE = live ]]; then |
187 | if [[ $BUILD_TYPE = live ]]; then |
| 155 | # Disable tests for live ebuilds |
188 | # Disable tests for live ebuilds |
| 156 | RESTRICT+=" test" |
189 | RESTRICT+=" test" |
| 157 | # Live ebuilds in kde-base default to kdeprefix by default |
190 | # Live ebuilds in kde-base default to kdeprefix by default |
| 158 | IUSE+=" +kdeprefix" |
191 | IUSE+=" +kdeprefix" |
| … | |
… | |
| 169 | ;; |
202 | ;; |
| 170 | esac |
203 | esac |
| 171 | # Block installation of other SLOTS unless kdeprefix |
204 | # Block installation of other SLOTS unless kdeprefix |
| 172 | RDEPEND+=" $(block_other_slots)" |
205 | RDEPEND+=" $(block_other_slots)" |
| 173 | ;; |
206 | ;; |
|
|
207 | koffice) |
|
|
208 | HOMEPAGE="http://www.koffice.org/" |
|
|
209 | LICENSE="GPL-2" |
|
|
210 | ;; |
|
|
211 | kdevelop) |
|
|
212 | HOMEPAGE="http://www.kdevelop.org/" |
|
|
213 | LICENSE="GPL-2" |
|
|
214 | ;; |
| 174 | esac |
215 | esac |
| 175 | |
216 | |
| 176 | # @ECLASS-VARIABLE: QT_MINIMAL |
217 | # @ECLASS-VARIABLE: QT_MINIMAL |
| 177 | # @DESCRIPTION: |
218 | # @DESCRIPTION: |
| 178 | # Determine version of qt we enforce as minimal for the package. 4.4.0 4.5.1.. |
219 | # Determine version of qt we enforce as minimal for the package. 4.4.0 4.5.1... |
| 179 | # Currently defaults to 4.5.1 for KDE 4.3 and earlier |
220 | # 4.6.0 for 4.4, 4.6.3 for 4.5, and 4.7.0 for 4.6 and later |
| 180 | # or 4.6.0 for KDE 4.4 and later |
|
|
| 181 | if slot_is_at_least 4.4 "${KDE_MINIMAL}"; then |
221 | if slot_is_at_least 4.6 "${KDE_MINIMAL}"; then |
|
|
222 | QT_MINIMAL="${QT_MINIMAL:-4.7.0}" |
|
|
223 | elif slot_is_at_least 4.5 "${KDE_MINIMAL}"; then |
|
|
224 | QT_MINIMAL="${QT_MINIMAL:-4.6.3}" |
|
|
225 | else |
| 182 | QT_MINIMAL="${QT_MINIMAL:-4.6.0}" |
226 | QT_MINIMAL="${QT_MINIMAL:-4.6.0}" |
| 183 | fi |
227 | fi |
| 184 | |
228 | |
| 185 | QT_MINIMAL="${QT_MINIMAL:-4.5.1}" |
229 | # Declarative dependencies |
|
|
230 | qtdeclarativedepend=" |
|
|
231 | >=x11-libs/qt-declarative-${QT_MINIMAL}:4 |
|
|
232 | " |
|
|
233 | case ${DECLARATIVE_REQUIRED} in |
|
|
234 | always) |
|
|
235 | COMMONDEPEND+=" ${qtdeclarativedepend}" |
|
|
236 | ;; |
|
|
237 | optional) |
|
|
238 | IUSE+=" declarative" |
|
|
239 | COMMONDEPEND+=" declarative? ( ${qtdeclarativedepend} )" |
|
|
240 | ;; |
|
|
241 | *) ;; |
|
|
242 | esac |
|
|
243 | unset qtdeclarativedepend |
|
|
244 | |
|
|
245 | # QtHelp dependencies |
|
|
246 | qthelpdepend=" |
|
|
247 | >=x11-libs/qt-assistant-${QT_MINIMAL}:4 |
|
|
248 | " |
|
|
249 | case ${QTHELP_REQUIRED} in |
|
|
250 | always) |
|
|
251 | COMMONDEPEND+=" ${qthelpdepend}" |
|
|
252 | ;; |
|
|
253 | optional) |
|
|
254 | IUSE+=" qthelp" |
|
|
255 | COMMONDEPEND+=" qthelp? ( ${qthelpdepend} )" |
|
|
256 | ;; |
|
|
257 | esac |
|
|
258 | unset qthelpdepend |
| 186 | |
259 | |
| 187 | # OpenGL dependencies |
260 | # OpenGL dependencies |
| 188 | qtopengldepend=" |
261 | qtopengldepend=" |
| 189 | >=x11-libs/qt-opengl-${QT_MINIMAL}:4 |
262 | >=x11-libs/qt-opengl-${QT_MINIMAL}:4 |
| 190 | " |
263 | " |
| … | |
… | |
| 257 | *) ;; |
330 | *) ;; |
| 258 | esac |
331 | esac |
| 259 | unset cppuintdepend |
332 | unset cppuintdepend |
| 260 | |
333 | |
| 261 | # KDE dependencies |
334 | # KDE dependencies |
|
|
335 | # Qt accessibility classes are needed in various places, bug 325461 |
| 262 | kdecommondepend=" |
336 | kdecommondepend=" |
|
|
337 | dev-lang/perl |
| 263 | >=x11-libs/qt-core-${QT_MINIMAL}:4[qt3support,ssl] |
338 | >=x11-libs/qt-core-${QT_MINIMAL}:4[qt3support,ssl] |
| 264 | >=x11-libs/qt-gui-${QT_MINIMAL}:4[dbus] |
339 | >=x11-libs/qt-gui-${QT_MINIMAL}:4[accessibility,dbus] |
| 265 | >=x11-libs/qt-qt3support-${QT_MINIMAL}:4[kde] |
340 | >=x11-libs/qt-qt3support-${QT_MINIMAL}:4[accessibility,kde] |
| 266 | >=x11-libs/qt-script-${QT_MINIMAL}:4 |
341 | >=x11-libs/qt-script-${QT_MINIMAL}:4 |
| 267 | >=x11-libs/qt-sql-${QT_MINIMAL}:4[qt3support] |
342 | >=x11-libs/qt-sql-${QT_MINIMAL}:4[qt3support] |
| 268 | >=x11-libs/qt-svg-${QT_MINIMAL}:4 |
343 | >=x11-libs/qt-svg-${QT_MINIMAL}:4 |
| 269 | >=x11-libs/qt-test-${QT_MINIMAL}:4 |
344 | >=x11-libs/qt-test-${QT_MINIMAL}:4 |
| 270 | !aqua? ( |
345 | !aqua? ( |
| 271 | x11-libs/libXext |
346 | x11-libs/libXext |
| 272 | x11-libs/libXt |
347 | x11-libs/libXt |
| 273 | x11-libs/libXxf86vm |
348 | x11-libs/libXxf86vm |
| 274 | ) |
349 | ) |
| 275 | " |
350 | " |
| 276 | #perl is not needed on host (+ difficult crosscompilation) |
|
|
| 277 | tc-is-cross-compiler || kdecommondepend="$kdecommondepend dev-lang/perl" |
|
|
| 278 | |
351 | |
| 279 | if [[ ${PN} != kdelibs ]]; then |
352 | if [[ ${PN} != kdelibs ]]; then |
| 280 | if [[ ${KDEBASE} = kde-base ]]; then |
|
|
| 281 | kdecommondepend+=" $(add_kdebase_dep kdelibs)" |
353 | kdecommondepend+=" $(add_kdebase_dep kdelibs)" |
| 282 | # libknotificationitem only when SLOT is 4.3 |
|
|
| 283 | [[ ${PN} != libknotificationitem ]] && [[ ${SLOT} = 4.3 ]] && \ |
|
|
| 284 | kdecommondepend+=" $(add_kdebase_dep libknotificationitem)" |
|
|
| 285 | else |
|
|
| 286 | kdecommondepend+=" |
|
|
| 287 | >=kde-base/kdelibs-${KDE_MINIMAL} |
|
|
| 288 | " |
|
|
| 289 | if [[ ${KDEBASE} = kdevelop ]]; then |
354 | if [[ ${KDEBASE} = kdevelop ]]; then |
| 290 | if [[ ${PN} != kdevplatform ]]; then |
355 | if [[ ${PN} != kdevplatform ]]; then |
|
|
356 | # @ECLASS-VARIABLE: KDEVPLATFORM_REQUIRED |
|
|
357 | # @DESCRIPTION: |
|
|
358 | # Specifies whether kdevplatform is required. Possible values are 'always' (default) and 'never'. |
|
|
359 | # Applies to KDEBASE=kdevelop only. |
|
|
360 | KDEVPLATFORM_REQUIRED="${KDEVPLATFORM_REQUIRED:-always}" |
|
|
361 | case ${KDEVPLATFORM_REQUIRED} in |
|
|
362 | always) |
| 291 | kdecommondepend+=" |
363 | kdecommondepend+=" |
| 292 | >=dev-util/kdevplatform-${KDEVPLATFORM_VERSION} |
364 | >=dev-util/kdevplatform-${KDEVPLATFORM_VERSION} |
| 293 | " |
365 | " |
| 294 | fi |
366 | ;; |
|
|
367 | *) ;; |
|
|
368 | esac |
| 295 | fi |
369 | fi |
| 296 | fi |
370 | fi |
| 297 | fi |
371 | fi |
| 298 | kdedepend=" |
372 | kdedepend=" |
| 299 | dev-util/automoc |
373 | dev-util/automoc |
| … | |
… | |
| 301 | !aqua? ( |
375 | !aqua? ( |
| 302 | || ( >=x11-libs/libXtst-1.1.0 <x11-proto/xextproto-7.1.0 ) |
376 | || ( >=x11-libs/libXtst-1.1.0 <x11-proto/xextproto-7.1.0 ) |
| 303 | x11-proto/xf86vidmodeproto |
377 | x11-proto/xf86vidmodeproto |
| 304 | ) |
378 | ) |
| 305 | " |
379 | " |
|
|
380 | kderdepend="" |
|
|
381 | |
|
|
382 | kdehandbookdepend=" |
|
|
383 | app-text/docbook-xml-dtd:4.2 |
|
|
384 | app-text/docbook-xsl-stylesheets |
|
|
385 | " |
|
|
386 | kdehandbookrdepend=" |
|
|
387 | $(add_kdebase_dep kdelibs 'handbook') |
|
|
388 | " |
|
|
389 | case ${KDE_HANDBOOK} in |
|
|
390 | always) |
|
|
391 | kdedepend+=" ${kdehandbookdepend}" |
|
|
392 | [[ ${PN} != kdelibs ]] && kderdepend+=" ${kdehandbookrdepend}" |
|
|
393 | ;; |
|
|
394 | optional) |
|
|
395 | IUSE+=" +handbook" |
|
|
396 | kdedepend+=" handbook? ( ${kdehandbookdepend} )" |
|
|
397 | [[ ${PN} != kdelibs ]] && kderdepend+=" handbook? ( ${kdehandbookrdepend} )" |
|
|
398 | ;; |
|
|
399 | *) ;; |
|
|
400 | esac |
|
|
401 | unset kdehandbookdepend kdehandbookrdepend |
|
|
402 | |
| 306 | case ${KDE_REQUIRED} in |
403 | case ${KDE_REQUIRED} in |
| 307 | always) |
404 | always) |
| 308 | IUSE+=" aqua" |
405 | IUSE+=" aqua" |
| 309 | COMMONDEPEND+=" ${kdecommondepend}" |
406 | [[ -n ${kdecommondepend} ]] && COMMONDEPEND+=" ${kdecommondepend}" |
| 310 | DEPEND+=" ${kdedepend}" |
407 | [[ -n ${kdedepend} ]] && DEPEND+=" ${kdedepend}" |
|
|
408 | [[ -n ${kderdepend} ]] && RDEPEND+=" ${kderdepend}" |
| 311 | ;; |
409 | ;; |
| 312 | optional) |
410 | optional) |
| 313 | IUSE+=" aqua kde" |
411 | IUSE+=" aqua kde" |
| 314 | COMMONDEPEND+=" kde? ( ${kdecommondepend} )" |
412 | [[ -n ${kdecommondepend} ]] && COMMONDEPEND+=" kde? ( ${kdecommondepend} )" |
| 315 | DEPEND+=" kde? ( ${kdedepend} )" |
413 | [[ -n ${kdedepend} ]] && DEPEND+=" kde? ( ${kdedepend} )" |
|
|
414 | [[ -n ${kderdepend} ]] && RDEPEND+=" kde? ( ${kderdepend} )" |
| 316 | ;; |
415 | ;; |
| 317 | *) ;; |
416 | *) ;; |
| 318 | esac |
417 | esac |
| 319 | |
418 | |
| 320 | unset kdecommondepend kdedepend |
419 | unset kdecommondepend kdedepend kderdepend |
| 321 | |
420 | |
| 322 | debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}" |
421 | debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}" |
| 323 | debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}" |
422 | debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}" |
| 324 | debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}" |
423 | debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}" |
| 325 | |
424 | |
| … | |
… | |
| 411 | if [[ -z ${KMNOMODULE} ]] && [[ -z ${KMMODULE} ]]; then |
510 | if [[ -z ${KMNOMODULE} ]] && [[ -z ${KMMODULE} ]]; then |
| 412 | KMMODULE="${PN}" |
511 | KMMODULE="${PN}" |
| 413 | fi |
512 | fi |
| 414 | case ${KDEBASE} in |
513 | case ${KDEBASE} in |
| 415 | kdevelop) |
514 | kdevelop) |
| 416 | EGIT_REPO_URI="git://gitorious.org/${KMNAME}/${KMMODULE}.git" |
515 | EGIT_REPO_URI="git://git.kde.org/${KMMODULE}" |
| 417 | ;; |
516 | ;; |
| 418 | esac |
517 | esac |
| 419 | fi |
518 | fi |
| 420 | ;; |
519 | ;; |
| 421 | *) |
520 | *) |
| … | |
… | |
| 432 | fi |
531 | fi |
| 433 | _kmname_pv="${_kmname}-${PV}" |
532 | _kmname_pv="${_kmname}-${PV}" |
| 434 | case ${KDEBASE} in |
533 | case ${KDEBASE} in |
| 435 | kde-base) |
534 | kde-base) |
| 436 | case ${PV} in |
535 | case ${PV} in |
| 437 | 4.[34].8[05] | 4.[34].9[0568]) |
536 | 4.[456].8[05] | 4.[456].9[023568]) |
| 438 | # block for normally packed unstable releases |
537 | # Unstable KDE SC releases |
| 439 | SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; |
538 | SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" |
| 440 | 4.[34].[6-9]*) |
|
|
| 441 | # Repacked tarballs: need to depend on xz-utils to ensure that they can be unpacked |
|
|
| 442 | SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/src/${_kmname_pv}.tar.xz" |
|
|
| 443 | DEPEND+=" app-arch/xz-utils" |
|
|
| 444 | ;; |
539 | ;; |
|
|
540 | 4.4.6 | 4.4.7 | 4.4.8) |
|
|
541 | # Only kdepim here |
|
|
542 | SRC_URI="mirror://kde/stable/kdepim-${PV}/src/${_kmname_pv}.tar.bz2" |
|
|
543 | ;; |
|
|
544 | *) |
|
|
545 | # Stable KDE SC releases |
| 445 | *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; |
546 | SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" |
|
|
547 | ;; |
| 446 | esac |
548 | esac |
| 447 | ;; |
549 | ;; |
| 448 | koffice) |
550 | koffice) |
| 449 | case ${PV} in |
551 | case ${PV} in |
| 450 | 2.1.[6-9]*) SRC_URI="mirror://kde/unstable/${_kmname_pv}/${_kmname_pv}.tar.bz2" ;; |
552 | 2.1.[6-9]*) SRC_URI="mirror://kde/unstable/${_kmname_pv}/${_kmname_pv}.tar.bz2" ;; |
| … | |
… | |
| 599 | fi |
701 | fi |
| 600 | fi |
702 | fi |
| 601 | |
703 | |
| 602 | # Apply patches |
704 | # Apply patches |
| 603 | base_src_prepare |
705 | base_src_prepare |
| 604 | epatch_user |
|
|
| 605 | |
706 | |
| 606 | # Save library dependencies |
707 | # Save library dependencies |
| 607 | if [[ -n ${KMSAVELIBS} ]] ; then |
708 | if [[ -n ${KMSAVELIBS} ]] ; then |
| 608 | save_library_dependencies |
709 | save_library_dependencies |
| 609 | fi |
710 | fi |
| 610 | |
711 | |
| 611 | # Inject library dependencies |
712 | # Inject library dependencies |
| 612 | if [[ -n ${KMLOADLIBS} ]] ; then |
713 | if [[ -n ${KMLOADLIBS} ]] ; then |
| 613 | load_library_dependencies |
714 | load_library_dependencies |
|
|
715 | fi |
|
|
716 | |
|
|
717 | # Replace KDE4Workspace library targets |
|
|
718 | find "${S}" -name CMakeLists.txt \ |
|
|
719 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_TASKMANAGER_(LIBRARY|LIBS)\}/taskmanager/g' {} + \ |
|
|
720 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_KWORKSPACE_(LIBRARY|LIBS)\}/kworkspace/g' {} + \ |
|
|
721 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_SOLIDCONTROLIFACES_(LIBRARY|LIBS)\}/solidcontrolifaces/g' {} + \ |
|
|
722 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_SOLIDCONTROL_(LIBRARY|LIBS)\}/solidcontrol/g' {} + \ |
|
|
723 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_PROCESSUI_(LIBRARY|LIBS)\}/processui/g' {} + \ |
|
|
724 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_LSOFUI_(LIBRARY|LIBS)\}/lsofui/g' {} + \ |
|
|
725 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_PLASMACLOCK_(LIBRARY|LIBS)\}/plasmaclock/g' {} + \ |
|
|
726 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_NEPOMUKQUERYCLIENT_(LIBRARY|LIBS)\}/nepomukqueryclient/g' {} + \ |
|
|
727 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_NEPOMUKQUERY_(LIBRARY|LIBS)\}/nepomukquery/g' {} + \ |
|
|
728 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_KSCREENSAVER_(LIBRARY|LIBS)\}/kscreensaver/g' {} + \ |
|
|
729 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_WEATHERION_(LIBRARY|LIBS)\}/weather_ion/g' {} + \ |
|
|
730 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_KWINEFFECTS_(LIBRARY|LIBS)\}/kwineffects/g' {} + \ |
|
|
731 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_KDECORATIONS_(LIBRARY|LIBS)\}/kdecorations/g' {} + \ |
|
|
732 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_KSGRD_(LIBRARY|LIBS)\}/ksgrd/g' {} + \ |
|
|
733 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_KEPHAL_(LIBRARY|LIBS)\}/kephal/g' {} + \ |
|
|
734 | || die 'failed to replace KDE4Workspace library targets' |
|
|
735 | |
|
|
736 | # Hack for manuals relying on outdated DTD, only outside kde-base/koffice/... |
|
|
737 | if [[ -z ${KDEBASE} ]]; then |
|
|
738 | find "${S}" -name "*.docbook" \ |
|
|
739 | -exec sed -i -r \ |
|
|
740 | -e 's:-//KDE//DTD DocBook XML V4\.1(\..)?-Based Variant V1\.[01]//EN:-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN:g' {} + \ |
|
|
741 | || die 'failed to fix DocBook variant version' |
| 614 | fi |
742 | fi |
| 615 | } |
743 | } |
| 616 | |
744 | |
| 617 | # @FUNCTION: kde4-base_src_configure |
745 | # @FUNCTION: kde4-base_src_configure |
| 618 | # @DESCRIPTION: |
746 | # @DESCRIPTION: |
| … | |
… | |
| 702 | # Override this value, set in kde4-base_src_configure() |
830 | # Override this value, set in kde4-base_src_configure() |
| 703 | mycmakeargs+=(-DKDE4_BUILD_TESTS=ON) |
831 | mycmakeargs+=(-DKDE4_BUILD_TESTS=ON) |
| 704 | cmake-utils_src_configure |
832 | cmake-utils_src_configure |
| 705 | kde4-base_src_compile |
833 | kde4-base_src_compile |
| 706 | |
834 | |
|
|
835 | if [[ ${VIRTUALX_REQUIRED} == always ]] || |
|
|
836 | ( [[ ${VIRTUALX_REQUIRED} != manual ]] && use test ); then |
|
|
837 | |
|
|
838 | if [[ ${maketype} ]]; then |
|
|
839 | # surprise- we are already INSIDE virtualmake!!! |
|
|
840 | ewarn "QA Notice: This version of kde4-base.eclass includes the virtualx functionality." |
|
|
841 | ewarn " You may NOT set maketype or call virtualmake from the ebuild. Applying workaround." |
|
|
842 | cmake-utils_src_test |
|
|
843 | else |
|
|
844 | export maketype="cmake-utils_src_test" |
|
|
845 | virtualmake |
|
|
846 | fi |
|
|
847 | else |
| 707 | cmake-utils_src_test |
848 | cmake-utils_src_test |
|
|
849 | fi |
| 708 | } |
850 | } |
| 709 | |
851 | |
| 710 | # @FUNCTION: kde4-base_src_install |
852 | # @FUNCTION: kde4-base_src_install |
| 711 | # @DESCRIPTION: |
853 | # @DESCRIPTION: |
| 712 | # Function for installing KDE4 applications. |
854 | # Function for installing KDE4 applications. |