| 1 | # Copyright 2007-2009 Gentoo Foundation |
1 | # Copyright 1999-2009 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.43 2009/08/07 01:00:11 wired Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.53 2009/11/25 19:51:11 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 | inherit base cmake-utils eutils kde4-functions |
16 | # @ECLASS-VARIABLE: CMAKE_REQUIRED |
|
|
17 | # @DESCRIPTION: |
|
|
18 | # Specify if cmake buildsystem is being used. Possible values are 'always' and 'never'. |
|
|
19 | # Please note that if it's set to 'never' you need to explicitly override following phases: |
|
|
20 | # src_configure, src_compile, src_test and src_install. |
|
|
21 | # Defaults to 'always'. |
|
|
22 | CMAKE_REQUIRED="${CMAKE_REQUIRED:-${CMAKE_REQUIRED:-always}}" |
|
|
23 | if [[ ${CMAKE_REQUIRED} = false || ${CMAKE_REQUIRED} = never ]]; then |
|
|
24 | buildsystem_eclass="" |
|
|
25 | export_fns="" |
|
|
26 | else |
|
|
27 | buildsystem_eclass="cmake-utils" |
|
|
28 | export_fns="src_configure src_compile src_test src_install" |
|
|
29 | fi |
|
|
30 | |
|
|
31 | inherit kde4-functions |
| 17 | |
32 | |
| 18 | get_build_type |
33 | get_build_type |
| 19 | if [[ ${BUILD_TYPE} = live ]]; then |
34 | if [[ ${BUILD_TYPE} = live ]]; then |
| 20 | inherit subversion |
35 | subversion_eclass="subversion" |
| 21 | fi |
36 | fi |
| 22 | |
37 | |
|
|
38 | inherit base ${buildsystem_eclass} eutils ${subversion_eclass} |
|
|
39 | |
| 23 | EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm |
40 | EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare ${export_fns} pkg_postinst pkg_postrm |
|
|
41 | |
|
|
42 | unset buildsystem_eclass |
|
|
43 | unset export_fns |
|
|
44 | unset subversion_eclass |
| 24 | |
45 | |
| 25 | case ${KDEBASE} in |
46 | case ${KDEBASE} in |
| 26 | kde-base) |
47 | kde-base) |
| 27 | HOMEPAGE="http://www.kde.org/" |
48 | HOMEPAGE="http://www.kde.org/" |
| 28 | LICENSE="GPL-2" |
49 | LICENSE="GPL-2" |
| … | |
… | |
| 71 | fi |
92 | fi |
| 72 | |
93 | |
| 73 | # @ECLASS-VARIABLE: KDE_MINIMAL |
94 | # @ECLASS-VARIABLE: KDE_MINIMAL |
| 74 | # @DESCRIPTION: |
95 | # @DESCRIPTION: |
| 75 | # This variable is used when KDE_REQUIRED is set, to specify required KDE minimal |
96 | # This variable is used when KDE_REQUIRED is set, to specify required KDE minimal |
| 76 | # version for apps to work. Currently defaults to 4.2 |
97 | # version for apps to work. Currently defaults to 4.3 |
| 77 | # One may override this variable to raise version requirements. |
98 | # One may override this variable to raise version requirements. |
| 78 | # For possible values look at KDE_SLOTS and KDE_LIVE_SLOTS variables. |
99 | # For possible values look at KDE_SLOTS and KDE_LIVE_SLOTS variables. |
| 79 | # Note that it is fixed to ${SLOT} for kde-base packages. |
100 | # Note that it is fixed to ${SLOT} for kde-base packages. |
| 80 | KDE_MINIMAL="${KDE_MINIMAL:-4.2}" |
101 | KDE_MINIMAL="${KDE_MINIMAL:-4.3}" |
| 81 | |
|
|
| 82 | # Fallback behaviour (for now) |
|
|
| 83 | # TODO Remove when tree is clean |
|
|
| 84 | if [[ -n ${NEED_KDE} ]]; then |
|
|
| 85 | case ${NEED_KDE} in |
|
|
| 86 | none) |
|
|
| 87 | KDE_REQUIRED="never" |
|
|
| 88 | ;; |
|
|
| 89 | *) |
|
|
| 90 | KDE_REQUIRED="always" |
|
|
| 91 | KDE_MINIMAL="${NEED_KDE}" |
|
|
| 92 | ;; |
|
|
| 93 | esac |
|
|
| 94 | fi |
|
|
| 95 | |
|
|
| 96 | # @ECLASS-VARIABLE: QT_DEPEND |
|
|
| 97 | # @DESCRIPTION: |
|
|
| 98 | # Determine version of qt we enforce as minimal for the package. 4.4.0 4.5.1.. |
|
|
| 99 | # Currently defaults to 4.5.1 |
|
|
| 100 | QT_DEPEND="${QT_DEPEND:-4.5.1}" |
|
|
| 101 | |
|
|
| 102 | # OpenGL dependencies |
|
|
| 103 | qtopengldepend=" |
|
|
| 104 | >=x11-libs/qt-opengl-${QT_DEPEND}:4 |
|
|
| 105 | " |
|
|
| 106 | case ${OPENGL_REQUIRED} in |
|
|
| 107 | always) |
|
|
| 108 | COMMONDEPEND+=" ${qtopengldepend}" |
|
|
| 109 | ;; |
|
|
| 110 | optional) |
|
|
| 111 | IUSE+=" opengl" |
|
|
| 112 | COMMONDEPEND+=" opengl? ( ${qtopengldepend} )" |
|
|
| 113 | ;; |
|
|
| 114 | *) ;; |
|
|
| 115 | esac |
|
|
| 116 | unset qtopengldepend |
|
|
| 117 | |
|
|
| 118 | # WebKit dependencies |
|
|
| 119 | qtwebkitdepend=" |
|
|
| 120 | >=x11-libs/qt-webkit-${QT_DEPEND}:4 |
|
|
| 121 | " |
|
|
| 122 | case ${WEBKIT_REQUIRED} in |
|
|
| 123 | always) |
|
|
| 124 | COMMONDEPEND+=" ${qtwebkitdepend}" |
|
|
| 125 | ;; |
|
|
| 126 | optional) |
|
|
| 127 | IUSE+=" webkit" |
|
|
| 128 | COMMONDEPEND+=" webkit? ( ${qtwebkitdepend} )" |
|
|
| 129 | ;; |
|
|
| 130 | *) ;; |
|
|
| 131 | esac |
|
|
| 132 | unset qtwebkitdepend |
|
|
| 133 | |
|
|
| 134 | # CppUnit dependencies |
|
|
| 135 | cppuintdepend=" |
|
|
| 136 | dev-util/cppunit |
|
|
| 137 | " |
|
|
| 138 | case ${CPPUNIT_REQUIRED} in |
|
|
| 139 | always) |
|
|
| 140 | DEPEND+=" ${cppuintdepend}" |
|
|
| 141 | ;; |
|
|
| 142 | optional) |
|
|
| 143 | IUSE+=" test" |
|
|
| 144 | DEPEND+=" test? ( ${cppuintdepend} )" |
|
|
| 145 | ;; |
|
|
| 146 | *) ;; |
|
|
| 147 | esac |
|
|
| 148 | unset cppuintdepend |
|
|
| 149 | |
102 | |
| 150 | # Setup packages inheriting this eclass |
103 | # Setup packages inheriting this eclass |
| 151 | case ${KDEBASE} in |
104 | case ${KDEBASE} in |
| 152 | kde-base) |
105 | kde-base) |
| 153 | if [[ $BUILD_TYPE = live ]]; then |
106 | if [[ $BUILD_TYPE = live ]]; then |
| … | |
… | |
| 160 | IUSE+=" kdeprefix" |
113 | IUSE+=" kdeprefix" |
| 161 | fi |
114 | fi |
| 162 | # Determine SLOT from PVs |
115 | # Determine SLOT from PVs |
| 163 | case ${PV} in |
116 | case ${PV} in |
| 164 | *.9999*) SLOT="${PV/.9999*/}" ;; # stable live |
117 | *.9999*) SLOT="${PV/.9999*/}" ;; # stable live |
| 165 | 4.4* | 4.3.9* | 4.3.8* | 4.3.7* | 4.3.6*) SLOT="4.4" ;; |
118 | 4.4* | 4.3.[6-9]*) SLOT="4.4" ;; |
| 166 | 4.3* | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) SLOT="4.3" ;; |
119 | 4.3*) SLOT="4.3" ;; |
| 167 | 4.2* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*) SLOT="4.2" ;; |
120 | 4.2*) SLOT="4.2" ;; |
| 168 | 9999*) SLOT="live" ;; # regular live |
121 | 9999*) SLOT="live" ;; # regular live |
| 169 | *) die "Unsupported ${PV}" ;; |
122 | *) die "Unsupported ${PV}" ;; |
| 170 | esac |
123 | esac |
|
|
124 | # This code is to prevent portage from searching GENTOO_MIRRORS for |
|
|
125 | # packages that will never be mirrored. (As they only will ever be in |
|
|
126 | # the overlay). |
|
|
127 | case ${PV} in |
|
|
128 | *9999* | 4.?.[6-9]?) |
|
|
129 | RESTRICT+=" mirror" |
|
|
130 | ;; |
|
|
131 | esac |
|
|
132 | KDE_MINIMAL="${SLOT}" |
| 171 | _kdedir="${SLOT}" |
133 | _kdedir="${SLOT}" |
| 172 | _pv="-${PV}:${SLOT}" |
|
|
| 173 | _pvn="-${PV}" |
|
|
| 174 | |
134 | |
| 175 | # Block installation of other SLOTS unless kdeprefix |
135 | # Block installation of other SLOTS unless kdeprefix |
| 176 | for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do |
136 | RDEPEND+=" $(block_other_slots)" |
| 177 | # Block non kdeprefix ${PN} on other slots |
|
|
| 178 | if [[ ${SLOT} != ${slot} ]]; then |
|
|
| 179 | RDEPEND+=" !kdeprefix? ( !kde-base/${PN}:${slot}[-kdeprefix] )" |
|
|
| 180 | fi |
|
|
| 181 | done |
|
|
| 182 | unset slot |
|
|
| 183 | ;; |
137 | ;; |
| 184 | koffice) |
138 | koffice) |
| 185 | SLOT="2" |
139 | SLOT="2" |
| 186 | _pv="-${KDE_MINIMAL}" |
|
|
| 187 | _pvn="${_pv}" |
|
|
| 188 | ;; |
140 | ;; |
| 189 | *) |
|
|
| 190 | _pv="-${KDE_MINIMAL}" |
|
|
| 191 | _pvn="${_pv}" |
|
|
| 192 | ;; |
|
|
| 193 | |
|
|
| 194 | esac |
141 | esac |
|
|
142 | |
|
|
143 | # @ECLASS-VARIABLE: QT_MINIMAL |
|
|
144 | # @DESCRIPTION: |
|
|
145 | # Determine version of qt we enforce as minimal for the package. 4.4.0 4.5.1.. |
|
|
146 | # Currently defaults to 4.5.1 for KDE 4.3 and earlier |
|
|
147 | # or 4.6.0_beta for KDE 4.4 and later |
|
|
148 | if slot_is_at_least 4.4 "${KDE_MINIMAL}"; then |
|
|
149 | QT_MINIMAL="${QT_MINIMAL:-4.6.0_beta}" |
|
|
150 | fi |
|
|
151 | |
|
|
152 | QT_MINIMAL="${QT_MINIMAL:-4.5.1}" |
|
|
153 | |
|
|
154 | # OpenGL dependencies |
|
|
155 | qtopengldepend=" |
|
|
156 | >=x11-libs/qt-opengl-${QT_MINIMAL}:4 |
|
|
157 | " |
|
|
158 | case ${OPENGL_REQUIRED} in |
|
|
159 | always) |
|
|
160 | COMMONDEPEND+=" ${qtopengldepend}" |
|
|
161 | ;; |
|
|
162 | optional) |
|
|
163 | IUSE+=" opengl" |
|
|
164 | COMMONDEPEND+=" opengl? ( ${qtopengldepend} )" |
|
|
165 | ;; |
|
|
166 | *) ;; |
|
|
167 | esac |
|
|
168 | unset qtopengldepend |
|
|
169 | |
|
|
170 | # WebKit dependencies |
|
|
171 | case ${KDE_REQUIRED} in |
|
|
172 | always) |
|
|
173 | qtwebkitusedeps="[kde]" |
|
|
174 | ;; |
|
|
175 | optional) |
|
|
176 | qtwebkitusedeps="[kde?]" |
|
|
177 | ;; |
|
|
178 | *) ;; |
|
|
179 | esac |
|
|
180 | qtwebkitdepend=" |
|
|
181 | >=x11-libs/qt-webkit-${QT_MINIMAL}:4${qtwebkitusedeps} |
|
|
182 | " |
|
|
183 | unset qtwebkitusedeps |
|
|
184 | case ${WEBKIT_REQUIRED} in |
|
|
185 | always) |
|
|
186 | COMMONDEPEND+=" ${qtwebkitdepend}" |
|
|
187 | ;; |
|
|
188 | optional) |
|
|
189 | IUSE+=" webkit" |
|
|
190 | COMMONDEPEND+=" webkit? ( ${qtwebkitdepend} )" |
|
|
191 | ;; |
|
|
192 | *) ;; |
|
|
193 | esac |
|
|
194 | unset qtwebkitdepend |
|
|
195 | |
|
|
196 | # CppUnit dependencies |
|
|
197 | cppuintdepend=" |
|
|
198 | dev-util/cppunit |
|
|
199 | " |
|
|
200 | case ${CPPUNIT_REQUIRED} in |
|
|
201 | always) |
|
|
202 | DEPEND+=" ${cppuintdepend}" |
|
|
203 | ;; |
|
|
204 | optional) |
|
|
205 | IUSE+=" test" |
|
|
206 | DEPEND+=" test? ( ${cppuintdepend} )" |
|
|
207 | ;; |
|
|
208 | *) ;; |
|
|
209 | esac |
|
|
210 | unset cppuintdepend |
| 195 | |
211 | |
| 196 | # KDE dependencies |
212 | # KDE dependencies |
| 197 | kdecommondepend=" |
213 | kdecommondepend=" |
| 198 | dev-lang/perl |
214 | dev-lang/perl |
| 199 | >=x11-libs/qt-core-${QT_DEPEND}:4[qt3support,ssl] |
215 | >=x11-libs/qt-core-${QT_MINIMAL}:4[qt3support,ssl] |
| 200 | >=x11-libs/qt-gui-${QT_DEPEND}:4[accessibility,dbus] |
216 | >=x11-libs/qt-gui-${QT_MINIMAL}:4[accessibility,dbus] |
| 201 | >=x11-libs/qt-qt3support-${QT_DEPEND}:4[accessibility] |
217 | >=x11-libs/qt-qt3support-${QT_MINIMAL}:4[accessibility,kde] |
| 202 | >=x11-libs/qt-script-${QT_DEPEND}:4 |
218 | >=x11-libs/qt-script-${QT_MINIMAL}:4 |
| 203 | >=x11-libs/qt-sql-${QT_DEPEND}:4[qt3support] |
219 | >=x11-libs/qt-sql-${QT_MINIMAL}:4[qt3support] |
| 204 | >=x11-libs/qt-svg-${QT_DEPEND}:4 |
220 | >=x11-libs/qt-svg-${QT_MINIMAL}:4 |
| 205 | >=x11-libs/qt-test-${QT_DEPEND}:4 |
221 | >=x11-libs/qt-test-${QT_MINIMAL}:4 |
| 206 | !aqua? ( |
222 | !aqua? ( |
| 207 | x11-libs/libXext |
223 | x11-libs/libXext |
| 208 | x11-libs/libXt |
224 | x11-libs/libXt |
| 209 | x11-libs/libXxf86vm |
225 | x11-libs/libXxf86vm |
| 210 | ) |
226 | ) |
| 211 | " |
227 | " |
| 212 | if [[ ${PN} != kdelibs ]]; then |
228 | if [[ ${PN} != kdelibs ]]; then |
| 213 | if [[ ${KDEBASE} = kde-base ]]; then |
229 | if [[ ${KDEBASE} = kde-base ]]; then |
| 214 | kdecommondepend+=" |
230 | kdecommondepend+=" $(add_kdebase_dep kdelibs)" |
| 215 | kdeprefix? ( >=kde-base/kdelibs${_pv}[kdeprefix] ) |
231 | # libknotificationitem only when SLOT is 4.3 |
| 216 | !kdeprefix? ( >=kde-base/kdelibs${_pvn}[-kdeprefix] ) |
232 | [[ ${PN} != libknotificationitem ]] && [[ ${SLOT} = 4.3 ]] && \ |
| 217 | " |
233 | kdecommondepend+=" $(add_kdebase_dep libknotificationitem)" |
| 218 | else |
234 | else |
| 219 | kdecommondepend+=" |
235 | kdecommondepend+=" |
| 220 | >=kde-base/kdelibs${_pv} |
236 | >=kde-base/kdelibs-${KDE_MINIMAL} |
| 221 | " |
237 | " |
| 222 | fi |
238 | fi |
| 223 | fi |
239 | fi |
| 224 | unset _pv _pvn |
|
|
| 225 | kdedepend=" |
240 | kdedepend=" |
| 226 | dev-util/pkgconfig |
241 | dev-util/pkgconfig |
| 227 | " |
242 | " |
| 228 | case ${KDE_REQUIRED} in |
243 | case ${KDE_REQUIRED} in |
| 229 | always) |
244 | always) |
| … | |
… | |
| 336 | esac |
351 | esac |
| 337 | else |
352 | else |
| 338 | _kmname=${PN} |
353 | _kmname=${PN} |
| 339 | fi |
354 | fi |
| 340 | _kmname_pv="${_kmname}-${PV}" |
355 | _kmname_pv="${_kmname}-${PV}" |
| 341 | if [[ $NEED_KDE != live ]]; then |
|
|
| 342 | case ${KDEBASE} in |
356 | case ${KDEBASE} in |
| 343 | kde-base) |
357 | kde-base) |
| 344 | case ${PV} in |
358 | case ${PV} in |
| 345 | 4.3.85 | 4.3.90 | 4.3.95 | 4.3.96) |
359 | 4.3.85 | 4.3.9[0568]) |
| 346 | # block for normally packed unstable releases |
|
|
| 347 | SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; |
|
|
| 348 | 4.3.9* | 4.3.8* | 4.3.7* | 4.3.6*) |
|
|
| 349 | SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.lzma" ;; |
|
|
| 350 | 4.2.85 | 4.2.90 | 4.2.95 | 4.2.96 | 4.2.98) |
|
|
| 351 | # block for normally packed unstable releases |
360 | # block for normally packed unstable releases |
| 352 | SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; |
361 | SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; |
| 353 | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) |
362 | 4.3.[6-9]*) |
| 354 | SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.lzma" ;; |
363 | SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.lzma" ;; |
| 355 | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6* | 4.0.9* | 4.0.8*) |
|
|
| 356 | SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; |
|
|
| 357 | *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; |
364 | *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; |
| 358 | esac |
365 | esac |
| 359 | ;; |
366 | ;; |
| 360 | koffice) |
367 | koffice) |
| 361 | case ${PV} in |
368 | case ${PV} in |
| 362 | 1.9*) |
|
|
| 363 | SRC_URI="mirror://kde/unstable/${_kmname_pv}/src/${_kmname_pv}.tar.bz2" |
369 | 2.0.[6-9]*) SRC_URI="mirror://kde/unstable/${_kmname_pv}/src/${_kmname_pv}.tar.bz2" ;; |
| 364 | ;; |
|
|
| 365 | *) SRC_URI="mirror://kde/stable/${_kmname_pv}/src/${_kmname_pv}.tar.bz2" ;; |
370 | *) SRC_URI="mirror://kde/stable/${_kmname_pv}/${_kmname_pv}.tar.bz2" ;; |
| 366 | esac |
371 | esac |
| 367 | ;; |
|
|
| 368 | esac |
372 | esac |
| 369 | fi |
|
|
| 370 | unset _kmname _kmname_pv |
373 | unset _kmname _kmname_pv |
| 371 | fi |
374 | fi |
| 372 | ;; |
375 | ;; |
| 373 | esac |
376 | esac |
| 374 | |
377 | |
| … | |
… | |
| 385 | # Do the basic kdeprefix KDEDIR settings and determine with which kde should |
388 | # Do the basic kdeprefix KDEDIR settings and determine with which kde should |
| 386 | # optional applications link |
389 | # optional applications link |
| 387 | kde4-base_pkg_setup() { |
390 | kde4-base_pkg_setup() { |
| 388 | debug-print-function ${FUNCNAME} "$@" |
391 | debug-print-function ${FUNCNAME} "$@" |
| 389 | |
392 | |
|
|
393 | # Prefix compat: |
|
|
394 | use prefix || EROOT=${ROOT} |
|
|
395 | # Append missing trailing slash character |
|
|
396 | [[ ${EROOT} = */ ]] || EROOT+="/" |
|
|
397 | |
| 390 | # QA ebuilds |
398 | # QA ebuilds |
| 391 | case ${NEED_KDE} in |
|
|
| 392 | none) ewarn "QA Notice: using deprecated NEED_KDE variable, use KDE_REQUIRED=\"never\" or KDE_REQUIRED=\"optional\" instead. You may want to override KDE_MINIMAL as well (default is KDE_MINIMAL=\"${KDE_MINIMAL}\")." ;; |
|
|
| 393 | *) [[ -n ${NEED_KDE} ]] && ewarn "QA Notice: using deprecated NEED_KDE variable, use KDE_MINIMAL instead (default is KDE_MINIMAL=\"${KDE_MINIMAL}\")." ;; |
|
|
| 394 | esac |
|
|
| 395 | [[ -z ${KDE_MINIMAL_VALID} ]] && ewarn "QA Notice: ignoring invalid KDE_MINIMAL (defaulting to ${KDE_MINIMAL})." |
399 | [[ -z ${KDE_MINIMAL_VALID} ]] && ewarn "QA Notice: ignoring invalid KDE_MINIMAL (defaulting to ${KDE_MINIMAL})." |
| 396 | |
400 | |
| 397 | # Don't set KDEHOME during compilation, it will cause access violations |
401 | # Don't set KDEHOME during compilation, it will cause access violations |
| 398 | unset KDEHOME |
402 | unset KDEHOME |
| 399 | |
403 | |
| … | |
… | |
| 433 | # Point pkg-config path to KDE *.pc files |
437 | # Point pkg-config path to KDE *.pc files |
| 434 | export PKG_CONFIG_PATH="${KDEDIR}/$(get_libdir)/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}" |
438 | export PKG_CONFIG_PATH="${KDEDIR}/$(get_libdir)/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}" |
| 435 | # Point to correct QT plugins path |
439 | # Point to correct QT plugins path |
| 436 | QT_PLUGIN_PATH="${KDEDIR}/$(get_libdir)/kde4/plugins/" |
440 | QT_PLUGIN_PATH="${KDEDIR}/$(get_libdir)/kde4/plugins/" |
| 437 | |
441 | |
|
|
442 | # Fix XDG collision with sandbox |
|
|
443 | export XDG_CONFIG_HOME="${T}" |
| 438 | # Not needed anymore |
444 | # Not needed anymore |
| 439 | unset _kdedir |
445 | unset _kdedir |
| 440 | } |
446 | } |
| 441 | |
447 | |
| 442 | # @FUNCTION: kde4-base_src_unpack |
448 | # @FUNCTION: kde4-base_src_unpack |
| … | |
… | |
| 451 | else |
457 | else |
| 452 | base_src_unpack |
458 | base_src_unpack |
| 453 | fi |
459 | fi |
| 454 | } |
460 | } |
| 455 | |
461 | |
| 456 | # @FUNCTION: kde4-base_src_compile |
462 | # @FUNCTION: kde4-base_src_prepare |
| 457 | # @DESCRIPTION: |
463 | # @DESCRIPTION: |
| 458 | # General pre-configure and pre-compile function for KDE4 applications. |
464 | # General pre-configure and pre-compile function for KDE4 applications. |
| 459 | # It also handles translations if KDE_LINGUAS is defined. See KDE_LINGUAS and |
465 | # It also handles translations if KDE_LINGUAS is defined. See KDE_LINGUAS and |
| 460 | # enable_selected_linguas() and enable_selected_doc_linguas() |
466 | # enable_selected_linguas() and enable_selected_doc_linguas() |
| 461 | # in kde4-functions.eclass(5) for further details. |
467 | # in kde4-functions.eclass(5) for further details. |
| … | |
… | |
| 466 | if [[ -n ${KDE_LINGUAS} ]]; then |
472 | if [[ -n ${KDE_LINGUAS} ]]; then |
| 467 | enable_selected_linguas |
473 | enable_selected_linguas |
| 468 | fi |
474 | fi |
| 469 | |
475 | |
| 470 | # Enable/disable handbooks for kde4-base packages |
476 | # Enable/disable handbooks for kde4-base packages |
| 471 | # kde-l10n inherits kde-base but is metpackage, so no check for doc |
477 | # kde-l10n inherits kde4-base but is metpackage, so no check for doc |
|
|
478 | # kdelibs inherits kde4-base but handle installing the handbook itself |
| 472 | if ! has kde4-meta ${INHERITED}; then |
479 | if ! has kde4-meta ${INHERITED}; then |
| 473 | has handbook ${IUSE//+} && [[ ${PN} != kde-l10n ]] && enable_selected_doc_linguas |
480 | has handbook ${IUSE//+} && [[ ${PN} != kde-l10n ]] && [[ ${PN} != kdelibs ]] && enable_selected_doc_linguas |
| 474 | fi |
481 | fi |
| 475 | |
482 | |
| 476 | [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare |
483 | [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare |
| 477 | base_src_prepare |
484 | base_src_prepare |
| 478 | |
485 | |
| … | |
… | |
| 516 | QTEST_COLORED=1 |
523 | QTEST_COLORED=1 |
| 517 | |
524 | |
| 518 | # Shadow existing /usr installations |
525 | # Shadow existing /usr installations |
| 519 | unset KDEDIRS |
526 | unset KDEDIRS |
| 520 | |
527 | |
|
|
528 | # Handle kdeprefix-ed KDE |
| 521 | if [[ ${KDEDIR} != "${EROOT}usr" ]]; then |
529 | if [[ ${KDEDIR} != "${EROOT}usr" ]]; then |
| 522 | # Override some environment variables - only when kdeprefix is different, |
530 | # Override some environment variables - only when kdeprefix is different, |
| 523 | # to not break ccache/distcc |
531 | # to not break ccache/distcc |
| 524 | PATH="${KDEDIR}/bin:${PATH}" |
532 | PATH="${KDEDIR}/bin:${PATH}" |
| 525 | LDPATH="${KDEDIR}/$(get_libdir):${LDPATH}" |
533 | LDPATH="${KDEDIR}/$(get_libdir):${LDPATH}" |
| 526 | |
534 | |
| 527 | # Append full RPATH |
535 | # Append full RPATH |
| 528 | cmakeargs+=" -DCMAKE_SKIP_RPATH=OFF" |
536 | cmakeargs+=" -DCMAKE_SKIP_RPATH=OFF" |
| 529 | fi |
|
|
| 530 | |
537 | |
| 531 | if has kdeprefix ${IUSE//+} && use kdeprefix; then |
|
|
| 532 | # Set cmake prefixes to allow buildsystem to localize valid KDE installation |
538 | # Set cmake prefixes to allow buildsystem to locate valid KDE installation |
| 533 | # when more are present |
539 | # when more are present |
| 534 | cmakeargs+=" -DCMAKE_SYSTEM_PREFIX_PATH=${KDEDIR}" |
540 | cmakeargs+=" -DCMAKE_SYSTEM_PREFIX_PATH=${KDEDIR}" |
| 535 | else |
541 | fi |
|
|
542 | |
|
|
543 | # Handle kdeprefix in application itself |
|
|
544 | if ! has kdeprefix ${IUSE//+} || ! use kdeprefix; then |
| 536 | # If prefix is /usr, sysconf needs to be /etc, not /usr/etc |
545 | # If prefix is /usr, sysconf needs to be /etc, not /usr/etc |
| 537 | cmakeargs+=" -DSYSCONF_INSTALL_DIR=${EROOT}etc" |
546 | cmakeargs+=" -DSYSCONF_INSTALL_DIR=${EROOT}etc" |
| 538 | fi |
547 | fi |
| 539 | |
548 | |
| 540 | mycmakeargs="${cmakeargs} ${mycmakeargs}" |
549 | mycmakeargs="${cmakeargs} ${mycmakeargs}" |
| … | |
… | |
| 601 | fi |
610 | fi |
| 602 | |
611 | |
| 603 | if [[ -n ${KDEBASE} ]] && [[ -d "${D}${EROOT}usr/share/doc/${PF}" ]]; then |
612 | if [[ -n ${KDEBASE} ]] && [[ -d "${D}${EROOT}usr/share/doc/${PF}" ]]; then |
| 604 | # work around bug #97196 |
613 | # work around bug #97196 |
| 605 | dodir /usr/share/doc/KDE4 && \ |
614 | dodir /usr/share/doc/KDE4 && \ |
| 606 | mv "${D}${EROOT}usr/share/doc/${PF}" "${D}${EROOT}usr/share/doc/KDE4/" || \ |
615 | cp -r "${D}${EROOT}usr/share/doc/${PF}" "${D}${EROOT}usr/share/doc/KDE4/" || \ |
| 607 | die "Failed to move docs to KDE4/." |
616 | die "Failed to move docs to KDE4/." |
|
|
617 | rm -rf "${D}${EROOT}usr/share/doc/${PF}" |
| 608 | fi |
618 | fi |
| 609 | } |
619 | } |
| 610 | |
620 | |
| 611 | # @FUNCTION: kde4-base_pkg_postinst |
621 | # @FUNCTION: kde4-base_pkg_postinst |
| 612 | # @DESCRIPTION: |
622 | # @DESCRIPTION: |