/[gentoo-x86]/eclass/kde4-base.eclass
Gentoo

Diff of /eclass/kde4-base.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.41 Revision 1.42
1# Copyright 2007-2009 Gentoo Foundation 1# Copyright 2007-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.41 2009/06/05 09:48:46 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.42 2009/08/03 21:59:53 wired 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
59 KDE_MINIMAL_VALID=1 59 KDE_MINIMAL_VALID=1
60fi 60fi
61 61
62# @ECLASS-VARIABLE: KDE_MINIMAL 62# @ECLASS-VARIABLE: KDE_MINIMAL
63# @DESCRIPTION: 63# @DESCRIPTION:
64# This wariable is used when KDE_REQUIRED is set, to specify required KDE minimal 64# This variable is used when KDE_REQUIRED is set, to specify required KDE minimal
65# version for apps to work. Currently defaults to 4.2 65# version for apps to work. Currently defaults to 4.2
66# One may override this variable to raise version requirements. 66# One may override this variable to raise version requirements.
67# For possible values look at KDE_SLOTS and KDE_LIVE_SLOTS variables. 67# For possible values look at KDE_SLOTS and KDE_LIVE_SLOTS variables.
68# Note that for kde-base packages is fixed to ${SLOT}. 68# Note that it is fixed to ${SLOT} for kde-base packages.
69KDE_MINIMAL="${KDE_MINIMAL:-4.2}" 69KDE_MINIMAL="${KDE_MINIMAL:-4.2}"
70 70
71# Fallback behaviour (for now) 71# Fallback behaviour (for now)
72# TODO Remove when tree is clean 72# TODO Remove when tree is clean
73if [[ -n ${NEED_KDE} ]]; then 73if [[ -n ${NEED_KDE} ]]; then
92qtopengldepend=" 92qtopengldepend="
93 >=x11-libs/qt-opengl-${QT_DEPEND}:4 93 >=x11-libs/qt-opengl-${QT_DEPEND}:4
94" 94"
95case ${OPENGL_REQUIRED} in 95case ${OPENGL_REQUIRED} in
96 always) 96 always)
97 COMMONDEPEND="${COMMONDEPEND} ${qtopengldepend}" 97 COMMONDEPEND+=" ${qtopengldepend}"
98 ;; 98 ;;
99 optional) 99 optional)
100 IUSE="${IUSE} opengl" 100 IUSE+=" opengl"
101 COMMONDEPEND="${COMMONDEPEND}
102 opengl? ( ${qtopengldepend} ) 101 COMMONDEPEND+=" opengl? ( ${qtopengldepend} )"
103 "
104 ;; 102 ;;
105 *) ;; 103 *) ;;
106esac 104esac
107unset qtopengldepend 105unset qtopengldepend
108 106
110qtwebkitdepend=" 108qtwebkitdepend="
111 >=x11-libs/qt-webkit-${QT_DEPEND}:4 109 >=x11-libs/qt-webkit-${QT_DEPEND}:4
112" 110"
113case ${WEBKIT_REQUIRED} in 111case ${WEBKIT_REQUIRED} in
114 always) 112 always)
115 COMMONDEPEND="${COMMONDEPEND} ${qtwebkitdepend}" 113 COMMONDEPEND+=" ${qtwebkitdepend}"
116 ;; 114 ;;
117 optional) 115 optional)
118 IUSE="${IUSE} webkit" 116 IUSE+=" webkit"
119 COMMONDEPEND="${COMMONDEPEND}
120 webkit? ( ${qtwebkitdepend} ) 117 COMMONDEPEND+=" webkit? ( ${qtwebkitdepend} )"
121 "
122 ;; 118 ;;
123 *) ;; 119 *) ;;
124esac 120esac
125unset qtwebkitdepend 121unset qtwebkitdepend
126 122
128cppuintdepend=" 124cppuintdepend="
129 dev-util/cppunit 125 dev-util/cppunit
130" 126"
131case ${CPPUNIT_REQUIRED} in 127case ${CPPUNIT_REQUIRED} in
132 always) 128 always)
133 DEPEND="${DEPEND} ${cppuintdepend}" 129 DEPEND+=" ${cppuintdepend}"
134 ;; 130 ;;
135 optional) 131 optional)
136 IUSE="${IUSE} test" 132 IUSE+=" test"
137 DEPEND="${DEPEND}
138 test? ( ${cppuintdepend} ) 133 DEPEND+=" test? ( ${cppuintdepend} )"
139 "
140 ;; 134 ;;
141 *) ;; 135 *) ;;
142esac 136esac
143unset cppuintdepend 137unset cppuintdepend
144
145# DEPRECATED block
146if [[ ${NEED_KDE} != "none" ]]; then
147 # localization deps
148 # DISABLED UNTIL PMS decide correct approach :(
149 if [[ -n ${KDE_LINGUAS} ]]; then
150 LNG_DEP=""
151 for _lng in ${KDE_LINGUAS}; do
152 # there must be or due to issue if lingua is not present in kde-l10n so
153 # it wont die but pick kde-l10n as-is.
154 LNG_DEP="${LNG_DEP}
155 || (
156 kde-base/kde-l10n[linguas_${_lng},kdeprefix=]
157 kde-base/kde-l10n[kdeprefix=]
158 )
159 "
160 done
161 fi
162fi # NEED_KDE != NONE block
163 138
164# Setup packages inheriting this eclass 139# Setup packages inheriting this eclass
165case ${KDEBASE} in 140case ${KDEBASE} in
166 kde-base) 141 kde-base)
167 if [[ $BUILD_TYPE = live ]]; then 142 if [[ $BUILD_TYPE = live ]]; then
168 # Disable tests for live ebuilds 143 # Disable tests for live ebuilds
169 RESTRICT="${RESTRICT} test" 144 RESTRICT+=" test"
170 # Live ebuilds in kde-base default to kdeprefix by default 145 # Live ebuilds in kde-base default to kdeprefix by default
171 IUSE="${IUSE} +kdeprefix" 146 IUSE+=" +kdeprefix"
172 else 147 else
173 # All other ebuild types default to -kdeprefix as before 148 # All other ebuild types default to -kdeprefix as before
174 IUSE="${IUSE} kdeprefix" 149 IUSE+=" kdeprefix"
175 fi 150 fi
176 # Determine SLOT from PVs 151 # Determine SLOT from PVs
177 case ${PV} in 152 case ${PV} in
178 *.9999*) SLOT="${PV/.9999*/}" ;; # stable live 153 *.9999*) SLOT="${PV/.9999*/}" ;; # stable live
154 4.4* | 4.3.9* | 4.3.8* | 4.3.7* | 4.3.6*) SLOT="4.4" ;;
179 4.3* | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) SLOT="4.3" ;; 155 4.3* | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) SLOT="4.3" ;;
180 4.2* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*) SLOT="4.2" ;; 156 4.2* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*) SLOT="4.2" ;;
181 9999*) SLOT="live" ;; # regular live 157 9999*) SLOT="live" ;; # regular live
182 *) die "Unsupported ${PV}" ;; 158 *) die "Unsupported ${PV}" ;;
183 esac 159 esac
184 _kdedir="${SLOT}" 160 _kdedir="${SLOT}"
185 _pv="-${PV}:${SLOT}" 161 _pv="-${PV}:${SLOT}"
186 _pvn="-${PV}" 162 _pvn="-${PV}"
187 163
188 # Block installation of other SLOTS unless kdeprefix 164 # Block installation of other SLOTS unless kdeprefix
189 for slot in ${KDE_SLOTS[@]}; do 165 for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do
190 # Block non kdeprefix ${PN} on other slots 166 # Block non kdeprefix ${PN} on other slots
191 if [[ ${SLOT} != ${slot} ]]; then 167 if [[ ${SLOT} != ${slot} ]]; then
192 RDEPEND="${RDEPEND}
193 !kdeprefix? ( !kde-base/${PN}:${slot}[-kdeprefix] ) 168 RDEPEND+=" !kdeprefix? ( !kde-base/${PN}:${slot}[-kdeprefix] )"
194 "
195 fi 169 fi
196 done 170 done
197 unset slot 171 unset slot
198 ;; 172 ;;
199 koffice) 173 koffice)
209esac 183esac
210 184
211# KDE dependencies 185# KDE dependencies
212kdecommondepend=" 186kdecommondepend="
213 dev-lang/perl 187 dev-lang/perl
214 x11-libs/libXext
215 x11-libs/libXt
216 x11-libs/libXxf86vm
217 >=x11-libs/qt-core-${QT_DEPEND}:4[qt3support,ssl] 188 >=x11-libs/qt-core-${QT_DEPEND}:4[qt3support,ssl]
218 >=x11-libs/qt-gui-${QT_DEPEND}:4[accessibility,dbus] 189 >=x11-libs/qt-gui-${QT_DEPEND}:4[accessibility,dbus]
219 >=x11-libs/qt-qt3support-${QT_DEPEND}:4[accessibility] 190 >=x11-libs/qt-qt3support-${QT_DEPEND}:4[accessibility]
220 >=x11-libs/qt-script-${QT_DEPEND}:4 191 >=x11-libs/qt-script-${QT_DEPEND}:4
221 >=x11-libs/qt-sql-${QT_DEPEND}:4[qt3support] 192 >=x11-libs/qt-sql-${QT_DEPEND}:4[qt3support]
222 >=x11-libs/qt-svg-${QT_DEPEND}:4 193 >=x11-libs/qt-svg-${QT_DEPEND}:4
223 >=x11-libs/qt-test-${QT_DEPEND}:4 194 >=x11-libs/qt-test-${QT_DEPEND}:4
195 !aqua? (
196 x11-libs/libXext
197 x11-libs/libXt
198 x11-libs/libXxf86vm
199 )
224" 200"
225if [[ ${PN} != kdelibs ]]; then 201if [[ ${PN} != kdelibs ]]; then
226 if [[ ${KDEBASE} = kde-base ]]; then 202 if [[ ${KDEBASE} = kde-base ]]; then
227 kdecommondepend="${kdecommondepend} 203 kdecommondepend+="
228 kdeprefix? ( >=kde-base/kdelibs${_pv}[kdeprefix] ) 204 kdeprefix? ( >=kde-base/kdelibs${_pv}[kdeprefix] )
229 !kdeprefix? ( >=kde-base/kdelibs${_pvn}[-kdeprefix] ) 205 !kdeprefix? ( >=kde-base/kdelibs${_pvn}[-kdeprefix] )
230 " 206 "
231 else 207 else
232 kdecommondepend="${kdecommondepend} 208 kdecommondepend+="
233 >=kde-base/kdelibs${_pv} 209 >=kde-base/kdelibs${_pv}
234 " 210 "
235 fi 211 fi
236fi 212fi
237unset _pv _pvn 213unset _pv _pvn
238kdedepend=" 214kdedepend="
239 dev-util/pkgconfig 215 dev-util/pkgconfig
240 >=sys-apps/sandbox-1.3.2
241" 216"
242case ${KDE_REQUIRED} in 217case ${KDE_REQUIRED} in
243 always) 218 always)
219 IUSE+=" aqua"
244 COMMONDEPEND="${COMMONDEPEND} ${kdecommondepend}" 220 COMMONDEPEND+=" ${kdecommondepend}"
245 DEPEND="${DEPEND} ${kdedepend}" 221 DEPEND+=" ${kdedepend}"
246 ;; 222 ;;
247 optional) 223 optional)
248 IUSE="${IUSE} kde" 224 IUSE+=" aqua kde"
249 COMMONDEPEND="${COMMONDEPEND}
250 kde? ( ${kdecommondepend} )" 225 COMMONDEPEND+=" kde? ( ${kdecommondepend} )"
251 DEPEND="${DEPEND}
252 kde? ( ${kdedepend} )" 226 DEPEND+=" kde? ( ${kdedepend} )"
253 ;; 227 ;;
254 *) ;; 228 *) ;;
255esac 229esac
256unset kdecommondepend kdedepend 230unset kdecommondepend kdedepend
257 231
258debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}" 232debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}"
259debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}" 233debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}"
260debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}" 234debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}"
261 235
262# Accumulate dependencies set by this eclass 236# Accumulate dependencies set by this eclass
263DEPEND="${DEPEND} ${COMMONDEPEND}" 237DEPEND+=" ${COMMONDEPEND}"
264RDEPEND="${RDEPEND} ${COMMONDEPEND}" 238RDEPEND+=" ${COMMONDEPEND}"
239unset COMMONDEPEND
265 240
266# Fetch section - If the ebuild's category is not 'kde-base' and if it is not a 241# Fetch section - If the ebuild's category is not 'kde-base' and if it is not a
267# koffice ebuild, the URI should be set in the ebuild itself 242# koffice ebuild, the URI should be set in the ebuild itself
268case ${BUILD_TYPE} in 243case ${BUILD_TYPE} in
269 live) 244 live)
299 # Split kde-base/ ebuilds: (they reside in trunk/KDE) 274 # Split kde-base/ ebuilds: (they reside in trunk/KDE)
300 case ${KMNAME} in 275 case ${KMNAME} in
301 kdebase-*) 276 kdebase-*)
302 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdebase/${KMNAME#kdebase-}" 277 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdebase/${KMNAME#kdebase-}"
303 ;; 278 ;;
279 kdelibs-*)
280 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdelibs/${KMNAME#kdelibs-}"
281 ;;
304 kdereview) 282 kdereview)
305 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}" 283 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
306 ;; 284 ;;
307 kdesupport) 285 kdesupport)
308 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}" 286 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
351 _kmname_pv="${_kmname}-${PV}" 329 _kmname_pv="${_kmname}-${PV}"
352 if [[ $NEED_KDE != live ]]; then 330 if [[ $NEED_KDE != live ]]; then
353 case ${KDEBASE} in 331 case ${KDEBASE} in
354 kde-base) 332 kde-base)
355 case ${PV} in 333 case ${PV} in
356 4.2.85|4.2.90) 334 4.3.85 | 4.3.90 | 4.3.95 | 4.3.96)
335 # block for normally packed unstable releases
336 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
337 4.3.9* | 4.3.8* | 4.3.7* | 4.3.6*)
338 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.lzma" ;;
339 4.2.85 | 4.2.90 | 4.2.95 | 4.2.96 | 4.2.98)
357 # block for normally packed unstable releases 340 # block for normally packed unstable releases
358 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 341 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
359 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) 342 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*)
360 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.lzma" ;; 343 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.lzma" ;;
361 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6* | 4.0.9* | 4.0.8*) 344 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6* | 4.0.9* | 4.0.8*)
382 365
383# @ECLASS-VARIABLE: PREFIX 366# @ECLASS-VARIABLE: PREFIX
384# @DESCRIPTION: 367# @DESCRIPTION:
385# Set the installation PREFIX for non kde-base applications. It defaults to /usr. 368# Set the installation PREFIX for non kde-base applications. It defaults to /usr.
386# kde-base packages go into KDE4 installation directory (KDEDIR) by default. 369# kde-base packages go into KDE4 installation directory (KDEDIR) by default.
387# No matter the PREFIX, package will be built agains KDE installed in KDEDIR. 370# No matter the PREFIX, package will be built against KDE installed in KDEDIR.
388 371
389# @FUNCTION: kde4-base_pkg_setup 372# @FUNCTION: kde4-base_pkg_setup
390# @DESCRIPTION: 373# @DESCRIPTION:
391# Do the basic kdeprefix KDEDIR settings and determine with which kde should 374# Do the basic kdeprefix KDEDIR settings and determine with which kde should
392# optional applications link 375# optional applications link
403 # Don't set KDEHOME during compilation, it will cause access violations 386 # Don't set KDEHOME during compilation, it will cause access violations
404 unset KDEHOME 387 unset KDEHOME
405 388
406 if [[ ${KDEBASE} = kde-base ]]; then 389 if [[ ${KDEBASE} = kde-base ]]; then
407 if use kdeprefix; then 390 if use kdeprefix; then
408 KDEDIR="${ROOT}usr/kde/${_kdedir}" 391 KDEDIR="${EROOT}usr/kde/${_kdedir}"
409 else 392 else
410 KDEDIR="${ROOT}usr" 393 KDEDIR="${EROOT}usr"
411 fi 394 fi
412 PREFIX="${PREFIX:-${KDEDIR}}" 395 PREFIX="${PREFIX:-${KDEDIR}}"
413 else 396 else
414 # Determine KDEDIR by loooking for the closest match with KDE_MINIMAL 397 # Determine KDEDIR by loooking for the closest match with KDE_MINIMAL
415 KDEDIR= 398 KDEDIR=
416 local kde_minimal_met 399 local kde_minimal_met
417 for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do 400 for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do
418 [[ -z ${kde_minimal_met} ]] && [[ ${slot} = ${KDE_MINIMAL} ]] && kde_minimal_met=1 401 [[ -z ${kde_minimal_met} ]] && [[ ${slot} = ${KDE_MINIMAL} ]] && kde_minimal_met=1
419 if [[ -n ${kde_minimal_met} ]] && has_version "kde-base/kdelibs:${slot}"; then 402 if [[ -n ${kde_minimal_met} ]] && has_version "kde-base/kdelibs:${slot}"; then
420 if has_version "kde-base/kdelibs:${slot}[kdeprefix]"; then 403 if has_version "kde-base/kdelibs:${slot}[kdeprefix]"; then
421 KDEDIR="${ROOT}usr/kde/${slot}" 404 KDEDIR="${EROOT}usr/kde/${slot}"
422 else 405 else
423 KDEDIR="${ROOT}usr" 406 KDEDIR="${EROOT}usr"
424 fi 407 fi
425 break; 408 break;
426 fi 409 fi
427 done 410 done
428 unset slot 411 unset slot
429 412
430 # Bail out if kdelibs required but not found 413 # Bail out if kdelibs required but not found
431 if [[ ${KDE_REQUIRED} = always ]] || { [[ ${KDE_REQUIRED} = optional ]] && use kde; }; then 414 if [[ ${KDE_REQUIRED} = always ]] || { [[ ${KDE_REQUIRED} = optional ]] && use kde; }; then
432 [[ -z ${KDEDIR} ]] && die "Failed to determine KDEDIR!" 415 [[ -z ${KDEDIR} ]] && die "Failed to determine KDEDIR!"
433 else 416 else
434 [[ -z ${KDEDIR} ]] && KDEDIR="${ROOT}usr" 417 [[ -z ${KDEDIR} ]] && KDEDIR="${EROOT}usr"
435 fi 418 fi
436 419
437 PREFIX="${PREFIX:-${ROOT}usr}" 420 PREFIX="${PREFIX:-${EROOT}usr}"
438 fi 421 fi
422 # Point pkg-config path to KDE *.pc files
423 export PKG_CONFIG_PATH="${KDEDIR}/$(get_libdir)/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
424 # Point to correct QT plugins path
425 QT_PLUGIN_PATH="${KDEDIR}/$(get_libdir)/kde4/plugins/"
439 426
440 # Not needed anymore 427 # Not needed anymore
441 unset _kdedir 428 unset _kdedir
442} 429}
443 430
457 444
458# @FUNCTION: kde4-base_src_compile 445# @FUNCTION: kde4-base_src_compile
459# @DESCRIPTION: 446# @DESCRIPTION:
460# General pre-configure and pre-compile function for KDE4 applications. 447# General pre-configure and pre-compile function for KDE4 applications.
461# It also handles translations if KDE_LINGUAS is defined. See KDE_LINGUAS and 448# It also handles translations if KDE_LINGUAS is defined. See KDE_LINGUAS and
449# enable_selected_linguas() and enable_selected_doc_linguas()
462# enable_selected_linguas() in kde4-functions.eclass(5) for further details. 450# in kde4-functions.eclass(5) for further details.
463kde4-base_src_prepare() { 451kde4-base_src_prepare() {
464 debug-print-function ${FUNCNAME} "$@" 452 debug-print-function ${FUNCNAME} "$@"
465 453
466 # Only enable selected languages, used for KDE extragear apps. 454 # Only enable selected languages, used for KDE extragear apps.
467 if [[ -n ${KDE_LINGUAS} ]]; then 455 if [[ -n ${KDE_LINGUAS} ]]; then
468 enable_selected_linguas 456 enable_selected_linguas
469 fi 457 fi
470 458
459 # Enable/disable handbooks for kde4-base packages
460 # kde-l10n inherits kde-base but is metpackage, so no check for doc
461 if ! has kde4-meta ${INHERITED}; then
462 has handbook ${IUSE//+} && [[ ${PN} != kde-l10n ]] && enable_selected_doc_linguas
463 fi
464
471 [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare 465 [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare
472 base_src_prepare 466 base_src_prepare
473 467
474 # Save library dependencies 468 # Save library dependencies
475 if [[ -n ${KMSAVELIBS} ]] ; then 469 if [[ -n ${KMSAVELIBS} ]] ; then
500 if has debug ${IUSE//+} && use debug; then 494 if has debug ${IUSE//+} && use debug; then
501 CMAKE_BUILD_TYPE="Debugfull" 495 CMAKE_BUILD_TYPE="Debugfull"
502 fi 496 fi
503 497
504 # Set distribution name 498 # Set distribution name
505 [[ ${PN} = kdelibs ]] && cmakeargs="${cmakeargs} -DKDE_DISTRIBUTION_TEXT=Gentoo" 499 [[ ${PN} = kdelibs ]] && cmakeargs+=" -DKDE_DISTRIBUTION_TEXT=Gentoo"
506 500
507 # Here we set the install prefix 501 # Here we set the install prefix
508 cmakeargs="${cmakeargs} -DCMAKE_INSTALL_PREFIX=${PREFIX}" 502 cmakeargs+=" -DCMAKE_INSTALL_PREFIX=${PREFIX}"
509 503
510 # Set environment 504 # Use colors
511 QTEST_COLORED=1 505 QTEST_COLORED=1
512 QT_PLUGIN_PATH="${KDEDIR}/$(get_libdir)/kde4/plugins/"
513
514 # Point pkg-config path to KDE *.pc files
515 export PKG_CONFIG_PATH="${KDEDIR}/$(get_libdir)/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
516 506
517 # Shadow existing /usr installations 507 # Shadow existing /usr installations
518 unset KDEDIRS 508 unset KDEDIRS
519 509
520 if [[ ${KDEDIR} != "${ROOT}usr" ]]; then 510 if [[ ${KDEDIR} != "${EROOT}usr" ]]; then
521 # Override some environment variables - only when kdeprefix is different, 511 # Override some environment variables - only when kdeprefix is different,
522 # to not break ccache/distcc 512 # to not break ccache/distcc
523 PATH="${KDEDIR}/bin:${PATH}" 513 PATH="${KDEDIR}/bin:${PATH}"
524 LDPATH="${KDEDIR}/$(get_libdir):${LDPATH}" 514 LDPATH="${KDEDIR}/$(get_libdir):${LDPATH}"
525 515
526 # Append full RPATH 516 # Append full RPATH
527 cmakeargs="${cmakeargs} -DCMAKE_SKIP_RPATH=OFF" 517 cmakeargs+=" -DCMAKE_SKIP_RPATH=OFF"
528 fi 518 fi
529 519
530 if has kdeprefix ${IUSE//+} && use kdeprefix; then 520 if has kdeprefix ${IUSE//+} && use kdeprefix; then
531 # Set cmake prefixes to allow buildsystem to localize valid KDE installation 521 # Set cmake prefixes to allow buildsystem to localize valid KDE installation
532 # when more are present 522 # when more are present
533 cmakeargs="${cmakeargs} -DCMAKE_SYSTEM_PREFIX_PATH=${KDEDIR}" 523 cmakeargs+=" -DCMAKE_SYSTEM_PREFIX_PATH=${KDEDIR}"
534 else 524 else
535 # If prefix is /usr, sysconf needs to be /etc, not /usr/etc 525 # If prefix is /usr, sysconf needs to be /etc, not /usr/etc
536 cmakeargs="${cmakeargs} -DSYSCONF_INSTALL_DIR=${ROOT}etc" 526 cmakeargs+=" -DSYSCONF_INSTALL_DIR=${EROOT}etc"
537 fi 527 fi
538 528
539 mycmakeargs="${cmakeargs} ${mycmakeargs}" 529 mycmakeargs="${cmakeargs} ${mycmakeargs}"
540 530
541 cmake-utils_src_configure 531 cmake-utils_src_configure
545# @DESCRIPTION: 535# @DESCRIPTION:
546# General function for compiling KDE4 applications. 536# General function for compiling KDE4 applications.
547kde4-base_src_compile() { 537kde4-base_src_compile() {
548 debug-print-function ${FUNCNAME} "$@" 538 debug-print-function ${FUNCNAME} "$@"
549 539
550 cmake-utils_src_compile 540 cmake-utils_src_compile "$@"
551} 541}
552 542
553# @FUNCTION: kde4-base_src_test 543# @FUNCTION: kde4-base_src_test
554# @DESCRIPTION: 544# @DESCRIPTION:
555# Function for testing KDE4 applications. 545# Function for testing KDE4 applications.
556kde4-base_src_test() { 546kde4-base_src_test() {
557 debug-print-function ${FUNCNAME} "$@" 547 debug-print-function ${FUNCNAME} "$@"
558 548
559 # Override this value, set in kde4-base_src_configure() 549 # Override this value, set in kde4-base_src_configure()
560 mycmakeargs="${mycmakeargs} -DKDE4_BUILD_TESTS=ON" 550 mycmakeargs+=" -DKDE4_BUILD_TESTS=ON"
561 cmake-utils_src_configure 551 cmake-utils_src_configure
562 kde4-base_src_compile 552 kde4-base_src_compile
563 553
564 cmake-utils_src_test 554 cmake-utils_src_test
565} 555}
597 newdoc "$doc_complete" "${doc%/*}.${doc##*/}" 587 newdoc "$doc_complete" "${doc%/*}.${doc##*/}"
598 fi 588 fi
599 done 589 done
600 fi 590 fi
601 591
602 if [[ -n ${KDEBASE} ]] && [[ -d "${D}${ROOT}usr/share/doc/${PF}" ]]; then 592 if [[ -n ${KDEBASE} ]] && [[ -d "${D}${EROOT}usr/share/doc/${PF}" ]]; then
603 # work around bug #97196 593 # work around bug #97196
604 dodir /usr/share/doc/KDE4 && \ 594 dodir /usr/share/doc/KDE4 && \
605 mv "${D}${ROOT}usr/share/doc/${PF}" "${D}${ROOT}usr/share/doc/KDE4/" || \ 595 mv "${D}${EROOT}usr/share/doc/${PF}" "${D}${EROOT}usr/share/doc/KDE4/" || \
606 die "Failed to move docs to KDE4/." 596 die "Failed to move docs to KDE4/."
607 fi 597 fi
608} 598}
609 599
610# @FUNCTION: kde4-base_pkg_postinst 600# @FUNCTION: kde4-base_pkg_postinst
615 605
616 buildsycoca 606 buildsycoca
617 607
618 if [[ ${BUILD_TYPE} = live ]] && [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then 608 if [[ ${BUILD_TYPE} = live ]] && [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
619 echo 609 echo
620 einfo "WARNING! This is an experimental live ebuild of ${KMNAME:-${PN}}" 610 einfo "WARNING! This is an experimental live ebuild of ${CATEGORY}/${PN}"
621 einfo "Use it at your own risk." 611 einfo "Use it at your own risk."
622 einfo "Do _NOT_ file bugs at bugs.gentoo.org because of this ebuild!" 612 einfo "Do _NOT_ file bugs at bugs.gentoo.org because of this ebuild!"
623 echo 613 echo
624 elif [[ ${BUILD_TYPE} != live ]] && [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]] && has kdeprefix ${IUSE//+} && use kdeprefix; then 614 elif [[ ${BUILD_TYPE} != live ]] && [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]] && has kdeprefix ${IUSE//+} && use kdeprefix; then
625 # warning about kdeprefix for non-live users 615 # warning about kdeprefix for non-live users
626 echo 616 echo
627 ewarn "WARNING! You have kdeprefix useflag enabled." 617 ewarn "WARNING! You have the kdeprefix useflag enabled."
628 ewarn "This setting is strongly discouraged and might lead to potential troubles" 618 ewarn "This setting is strongly discouraged and might lead to potential trouble"
629 ewarn "with KDE update strategies." 619 ewarn "with KDE update strategies."
630 ewarn "You are using this setup at your own risk and kde team does not" 620 ewarn "You are using this setup at your own risk and the kde team does not"
631 ewarn "take responsibilities for dead kittens." 621 ewarn "take responsibilities for dead kittens."
632 echo 622 echo
633 fi 623 fi
634} 624}
635 625

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42

  ViewVC Help
Powered by ViewVC 1.1.20