/[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.22 Revision 1.30
1# Copyright 2007-2008 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.22 2009/01/12 17:25:59 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.30 2009/03/01 11:44:09 scarabeus 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
14# eclass will fail with version older than 2. 14# eclass will fail with version older than 2.
15 15
16inherit base cmake-utils eutils multilib kde4-functions 16inherit base cmake-utils eutils multilib kde4-functions
17 17
18get_build_type 18get_build_type
19if [[ $BUILD_TYPE = live ]]; then 19if [[ ${BUILD_TYPE} = live ]]; then
20 inherit subversion 20 inherit subversion
21fi 21fi
22 22
23EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm 23EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm
24 24
53 *) 53 *)
54 OPENGL_REQUIRED="never" 54 OPENGL_REQUIRED="never"
55 ;; 55 ;;
56 esac 56 esac
57 57
58 COMMONDEPEND="${COMMONDEPEND} ${qtdepend} !x11-libs/qt-phonon" 58 COMMONDEPEND="${COMMONDEPEND} ${qtdepend}"
59} 59}
60kde4-base_set_qt_dependencies 60kde4-base_set_qt_dependencies
61 61
62# Set the cmake dependencies 62# Xorg
63# Quite a few packages fail with cmake-2.4 even for KDE 4.1, so we just require 2.6.2 63COMMONDEPEND="${COMMONDEPEND}
64CMAKEDEPEND=">=dev-util/cmake-2.6.2" 64 >=x11-base/xorg-server-1.5.2
65"
65 66
66# Set the common dependencies 67# X11 libs
68COMMONDEPEND="${COMMONDEPEND}
69 x11-libs/libXext
70 x11-libs/libXt
71 x11-libs/libXxf86vm
72"
73
74# localization deps
75# DISABLED UNTIL PMS decide correct approach :(
76if [[ -n ${KDE_LINGUAS} ]]; then
77 LNG_DEP=""
78 for _lng in ${KDE_LINGUAS}; do
79 # there must be or due to issue if lingua is not present in kde-l10n so
80 # it wont die but pick kde-l10n as-is.
81 LNG_DEP="${LNG_DEP}
82 || ( kde-base/kde-l10n[linguas_${_lng},kdeprefix=] kde-base/kde-l10n[kdeprefix=] )"
83 done
84fi
85
86# Set common dependencies for all ebuilds that inherit this eclass
67DEPEND="${DEPEND} ${COMMONDEPEND} ${CMAKEDEPEND} 87DEPEND="${DEPEND} ${COMMONDEPEND}
88 >=dev-util/cmake-2.6.2
68 dev-util/pkgconfig 89 dev-util/pkgconfig
69 x11-libs/libXt 90 >=sys-apps/sandbox-1.3.2
70 x11-proto/xf86vidmodeproto" 91"
71RDEPEND="${RDEPEND} ${COMMONDEPEND}" 92RDEPEND="${RDEPEND} ${COMMONDEPEND}"
72 93
73if [[ $BUILD_TYPE = live ]]; then 94if [[ $BUILD_TYPE = live ]]; then
74 # Disable tests for live ebuilds 95 # Disable tests for live ebuilds
75 RESTRICT="${RESTRICT} test" 96 RESTRICT="${RESTRICT} test"
135# @CODE 156# @CODE
136# KDE_MINIMAL="-4.1" 157# KDE_MINIMAL="-4.1"
137# @CODE 158# @CODE
138# Note: default minimal version is kde-4.1, which means that the apps will work 159# Note: default minimal version is kde-4.1, which means that the apps will work
139# with any KDE version >=${KDE_MINIMAL} 160# with any KDE version >=${KDE_MINIMAL}
140KDE_MINIMAL="${KDE_MINIMAL:=4.1}" 161KDE_MINIMAL="${KDE_MINIMAL:=4.2}"
141export KDE_MINIMAL 162export KDE_MINIMAL
142 163
143# FIXME: the code section, explanation of live. The last sentence needs other 164# FIXME: the code section, explanation of live. The last sentence needs other
144# formulation too. 165# formulation too.
145# 166#
164 185
165case ${NEED_KDE} in 186case ${NEED_KDE} in
166 latest) 187 latest)
167 if [[ $KDEBASE = kde-base ]]; then 188 if [[ $KDEBASE = kde-base ]]; then
168 case ${PV} in 189 case ${PV} in
190 4.3* | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*)
191 _kdedir="4.3"
192 _pv="-${PV}:4.3"
193 _pvn="-${PV}"
194 ;;
169 4.2* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*) 195 4.2* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*)
170 _kdedir="4.2" 196 _kdedir="4.2"
171 _pv="-${PV}:4.2" 197 _pv="-${PV}:4.2"
172 _pvn="-${PV}" 198 _pvn="-${PV}"
173 ;; 199 ;;
191 _pv="-${PV}:live" 217 _pv="-${PV}:live"
192 _pvn="-${PV}" 218 _pvn="-${PV}"
193 ;; 219 ;;
194 *) 220 *)
195 die "NEED_KDE=latest not supported for PV=${PV}" ;; 221 die "NEED_KDE=latest not supported for PV=${PV}" ;;
196 esac 222 esac
197 _operator=">=" 223 _operator=">="
198 else 224 else
199 # this creates dependency on any version of kde4 225 # this creates dependency on any version of kde4
200 _operator=">=" 226 _operator=">="
201 _pv="-${KDE_MINIMAL}" 227 _pv="-${KDE_MINIMAL}"
209 _operator=">=" 235 _operator=">="
210 _pv="-${NEED_KDE}:live" 236 _pv="-${NEED_KDE}:live"
211 _pvn="-${NEED_KDE}" 237 _pvn="-${NEED_KDE}"
212 export NEED_KDE="live" 238 export NEED_KDE="live"
213 ;; 239 ;;
240 4.3 | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*)
241 _kdedir="4.3"
242 _pv="-${NEED_KDE}:4.3"
243 _pvn="-${NEED_KDE}"
244 _operator=">="
245 ;;
214 4.2 | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*) 246 4.2 | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*)
215 _kdedir="4.2" 247 _kdedir="4.2"
216 _pv="-${NEED_KDE}:4.2" 248 _pv="-${NEED_KDE}:4.2"
217 _pvn="-${NEED_KDE}" 249 _pvn="-${NEED_KDE}"
218 _operator=">=" 250 _operator=">="
245 die "NEED_KDE=${NEED_KDE} currently not supported." 277 die "NEED_KDE=${NEED_KDE} currently not supported."
246 ;; 278 ;;
247esac 279esac
248 280
249if [[ ${NEED_KDE} != none ]]; then 281if [[ ${NEED_KDE} != none ]]; then
250
251 #Set the SLOT 282 #Set the SLOT
252 if [[ -n $KDEBASE ]]; then 283 if [[ -n ${KDEBASE} ]]; then
253 if [[ $NEED_KDE = live ]]; then 284 if [[ ${NEED_KDE} = live ]]; then
254 SLOT="live" 285 SLOT="live"
255 else 286 else
256 case ${KMNAME} in 287 case ${KMNAME} in
257 koffice) 288 koffice)
258 case ${PV} in 289 case ${PV} in
273 esac 304 esac
274 ;; 305 ;;
275 *) 306 *)
276 case ${PV} in 307 case ${PV} in
277 9999*) SLOT="live" ;; 308 9999*) SLOT="live" ;;
309 4.3* | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) SLOT="4.3" ;;
278 4.2* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*) SLOT="4.2" ;; 310 4.2* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*) SLOT="4.2" ;;
279 4.1* | 4.0.9* | 4.0.8*) SLOT="4.1" ;; 311 4.1* | 4.0.9* | 4.0.8*) SLOT="4.1" ;;
280 *) SLOT="4.1" ;; 312 *) SLOT="4.1" ;;
281 esac 313 esac
282 ;; 314 ;;
283 esac 315 esac
284 fi 316 fi
285 fi 317 fi
286 318
287 # Block installation of other SLOTS unless kdeprefix 319 # Block installation of other SLOTS unless kdeprefix
288 for KDE_SLOT in ${KDE_SLOTS[@]}; do 320 for KDE_SLOT in ${KDE_SLOTS[@]}; do
296 fi 328 fi
297 done 329 done
298 330
299 # Adding kdelibs, kdepimlibs and kdebase-data deps to all other packages. 331 # Adding kdelibs, kdepimlibs and kdebase-data deps to all other packages.
300 # We only need to add the dependencies if ${PN} is not "kdelibs" or "kdepimlibs" 332 # We only need to add the dependencies if ${PN} is not "kdelibs" or "kdepimlibs"
301 if [[ $PN != kdelibs ]]; then 333 if [[ ${PN} != kdelibs ]]; then
302 DEPEND="${DEPEND} 334 DEPEND="${DEPEND}
303 kdeprefix? ( ${_operator}kde-base/kdelibs${_pv}[kdeprefix] ) 335 kdeprefix? ( ${_operator}kde-base/kdelibs${_pv}[kdeprefix] )
304 !kdeprefix? ( ${_operator}kde-base/kdelibs${_pvn}[-kdeprefix] )" 336 !kdeprefix? ( ${_operator}kde-base/kdelibs${_pvn}[-kdeprefix] )"
305 RDEPEND="${RDEPEND} 337 RDEPEND="${RDEPEND}
306 kdeprefix? ( ${_operator}kde-base/kdelibs${_pv}[kdeprefix] ) 338 kdeprefix? ( ${_operator}kde-base/kdelibs${_pv}[kdeprefix] )
307 !kdeprefix? ( ${_operator}kde-base/kdelibs${_pvn}[-kdeprefix] )" 339 !kdeprefix? ( ${_operator}kde-base/kdelibs${_pvn}[-kdeprefix] )"
308 if [[ $PN != kdepimlibs ]]; then 340 if [[ ${PN} != kdepimlibs ]]; then
309 DEPEND="${DEPEND} 341 DEPEND="${DEPEND}
310 kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pv}[kdeprefix] ) 342 kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pv}[kdeprefix] )
311 !kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pvn}[-kdeprefix] )" 343 !kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pvn}[-kdeprefix] )"
312 RDEPEND="${RDEPEND} 344 RDEPEND="${RDEPEND}
313 kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pv}[kdeprefix] ) 345 kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pv}[kdeprefix] )
314 !kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pvn}[-kdeprefix] )" 346 !kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pvn}[-kdeprefix] )"
315 if [[ $PN != kdebase-data ]]; then 347 if [[ ${PN} != kdebase-data ]]; then
316 RDEPEND="${RDEPEND} 348 RDEPEND="${RDEPEND}
317 kdeprefix? ( ${_operator}kde-base/kdebase-data${_pv}[kdeprefix] ) 349 kdeprefix? ( ${_operator}kde-base/kdebase-data${_pv}[kdeprefix] )
318 !kdeprefix? ( ${_operator}kde-base/kdebase-data${_pvn}[-kdeprefix] )" 350 !kdeprefix? ( ${_operator}kde-base/kdebase-data${_pvn}[-kdeprefix] )"
319 fi 351 fi
320 fi 352 fi
322 unset _operator _pv _pvn 354 unset _operator _pv _pvn
323fi 355fi
324 356
325# Fetch section - If the ebuild's category is not 'kde-base' and if it is not a 357# Fetch section - If the ebuild's category is not 'kde-base' and if it is not a
326# koffice ebuild, the URI should be set in the ebuild itself 358# koffice ebuild, the URI should be set in the ebuild itself
327case ${SLOT} in 359case ${BUILD_TYPE} in
328 live) 360 live)
361 SRC_URI=""
329 ESVN_MIRROR=${ESVN_MIRROR:=svn://anonsvn.kde.org/home/kde} 362 ESVN_MIRROR=${ESVN_MIRROR:=svn://anonsvn.kde.org/home/kde}
330 # Split ebuild, or extragear stuff 363 # Split ebuild, or extragear stuff
331 if [[ -n $KMNAME ]]; then 364 if [[ -n ${KMNAME} ]]; then
332 ESVN_PROJECT="${KMNAME}" 365 ESVN_PROJECT="${KMNAME}"
333 if [[ -z ${KMNOMODULE} && -z ${KMMODULE} ]]; then 366 if [[ -z ${KMNOMODULE} && -z ${KMMODULE} ]]; then
334 KMMODULE="${PN}/" 367 KMMODULE="${PN}"
335 fi 368 fi
336 # Split kde-base/ ebuilds: (they reside in trunk/KDE) 369 # Split kde-base/ ebuilds: (they reside in trunk/KDE)
337 case ${KMNAME} in 370 case ${KMNAME} in
338 kdebase-*) 371 kdebase-*)
339 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/KDE/kdebase/${KMNAME#kdebase-}/" 372 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/KDE/kdebase/${KMNAME#kdebase-}"
340 ;; 373 ;;
341 kdereview) 374 kdereview)
342 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}" 375 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
343 ;; 376 ;;
344 kde*) 377 kde*)
345 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/KDE/${KMNAME}" 378 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/KDE/${KMNAME}"
346 ;; 379 ;;
347 extragear*|playground*) 380 extragear*|playground*)
348 case ${PN} in
349 *-plasma)
350 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}" 381 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
351 ESVN_PROJECT="${KMNAME}/${KMMODULE}"
352 ;;
353 *)
354 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
355 ;;
356 esac
357 ;; 382 ;;
358 koffice) 383 koffice)
359 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}" 384 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}"
360 ;; 385 ;;
361 *) 386 *)
362 # Extragear material
363 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}/" 387 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
364 ;; 388 ;;
365 esac 389 esac
366 else 390 else
367 # kdelibs, kdepimlibs 391 # kdelibs, kdepimlibs
368 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/KDE/${PN}" 392 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/KDE/${PN}"
370 fi 394 fi
371 # limit syncing to 1 hour. 395 # limit syncing to 1 hour.
372 ESVN_UP_FREQ=${ESVN_UP_FREQ:-1} 396 ESVN_UP_FREQ=${ESVN_UP_FREQ:-1}
373 ;; 397 ;;
374 *) 398 *)
375 if [[ -n $KDEBASE ]]; then 399 if [[ -n ${KDEBASE} ]]; then
376 if [[ -n ${KMNAME} ]]; then 400 if [[ -n ${KMNAME} ]]; then
401 case ${KMNAME} in
402 kdebase-apps)
403 _kmname="kdebase" ;;
404 *)
377 _kmname=${KMNAME} 405 _kmname=${KMNAME} ;;
406 esac
378 else 407 else
379 _kmname=${PN} 408 _kmname=${PN}
380 fi 409 fi
381 _kmname_pv="${_kmname}-${PV}" 410 _kmname_pv="${_kmname}-${PV}"
382 if [[ $NEED_KDE != live ]]; then 411 if [[ $NEED_KDE != live ]]; then
383 case ${KDEBASE} in 412 case ${KDEBASE} in
384 kde-base) 413 kde-base)
385 case ${PV} in 414 case ${PV} in
386 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6* | 4.0.9* | 4.0.8*) 415 4.2.6* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6* | 4.0.9* | 4.0.8*)
387 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 416 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
388 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 417 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
389 esac 418 esac
390 ;; 419 ;;
391 koffice) 420 koffice)
392 SRC_URI="mirror://kde/unstable/${_kmname_pv}/src/${_kmname_pv}.tar.bz2" 421 SRC_URI="mirror://kde/unstable/${_kmname_pv}/src/${_kmname_pv}.tar.bz2"
393 ;; 422 ;;
394 esac 423 esac
395 fi 424 fi
396 unset _kmname _kmname_pv 425 unset _kmname _kmname_pv
397 fi 426 fi
398 ;; 427 ;;
399esac 428esac
400 429
401debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}" 430debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
402 431
415# Adds flags needed by all of KDE 4 to $QT4_BUILT_WITH_USE_CHECK. Uses 444# Adds flags needed by all of KDE 4 to $QT4_BUILT_WITH_USE_CHECK. Uses
416# kde4-functions_check_use from kde4-functions.eclass to print appropriate 445# kde4-functions_check_use from kde4-functions.eclass to print appropriate
417# errors and die if any required flags listed in $QT4_BUILT_WITH_USE_CHECK or 446# errors and die if any required flags listed in $QT4_BUILT_WITH_USE_CHECK or
418# $KDE4_BUILT_WITH_USE_CHECK are missing. 447# $KDE4_BUILT_WITH_USE_CHECK are missing.
419kde4-base_pkg_setup() { 448kde4-base_pkg_setup() {
420 debug-print-function $FUNCNAME "$@" 449 debug-print-function ${FUNCNAME} "$@"
421 450
422 # Don't set KDEHOME during compile, it will cause access violations 451 # Don't set KDEHOME during compile, it will cause access violations
423 unset KDEHOME 452 unset KDEHOME
424 453
425 # Search for best suitable kde installation for misc kde package. 454 # Search for best suitable kde installation for misc kde package.
426 # Computation based on NEED_KDE and KDE_MINIMAL 455 # Computation based on NEED_KDE and KDE_MINIMAL
427 get_latest_kdedir 456 [[ ${KDEBASE} != kde-base ]] && [[ ${NEED_KDE} = latest || ${NEED_KDE} = none ]] && get_latest_kdedir
428 457
429 if [[ $NEED_KDE != none ]]; then
430 # Set PREFIX 458 # Set PREFIX
431 if use kdeprefix; then 459 if use kdeprefix; then
432 KDEDIR="/usr/kde/${_kdedir}" 460 KDEDIR="/usr/kde/${_kdedir}"
433 KDEDIRS="/usr/local/:/usr:${KDEDIR}" 461 KDEDIRS="/usr/local/:/usr:${KDEDIR}"
434 else 462 else
435 KDEDIR="/usr" 463 KDEDIR="/usr"
436 KDEDIRS="/usr/local/:/usr" 464 KDEDIRS="/usr/local/:/usr"
437 fi
438 fi 465 fi
439 # Set the prefix based on KDEDIR 466 # Set the prefix based on KDEDIR
440 # Make it a consequence of kdeprefix 467 # Make it a consequence of kdeprefix
441 PREFIX=$KDEDIR 468 PREFIX=${KDEDIR}
442 469
443 unset _kdedir 470 unset _kdedir
444 471
445 # check if qt has correct deps 472 # check if qt has correct deps
446 [[ -n ${QT4_BUILT_WITH_USE_CHECK} || -n ${KDE4_BUILT_WITH_USE_CHECK[@]} ]] && \ 473 [[ -n ${QT4_BUILT_WITH_USE_CHECK} || -n ${KDE4_BUILT_WITH_USE_CHECK[@]} ]] && \
447 die "built_with_use illegal in this EAPI!" 474 die "built_with_use illegal in this EAPI!"
448 475
449 if [[ $BUILD_TYPE = live && -z $I_KNOW_WHAT_I_AM_DOING ]]; then 476 if [[ ${BUILD_TYPE} = live && -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
450 echo 477 echo
451 elog "WARNING! This is an experimental live ebuild of ${KMNAME:-${PN}}" 478 elog "WARNING! This is an experimental live ebuild of ${KMNAME:-${PN}}"
452 elog "Use it at your own risk." 479 elog "Use it at your own risk."
453 elog "Do _NOT_ file bugs at bugs.gentoo.org because of this ebuild!" 480 elog "Do _NOT_ file bugs at bugs.gentoo.org because of this ebuild!"
454 echo 481 echo
456} 483}
457 484
458# @FUNCTION: kde4-base_src_unpack 485# @FUNCTION: kde4-base_src_unpack
459# @DESCRIPTION: 486# @DESCRIPTION:
460# This function unpacks the source tarballs for KDE4 applications. 487# This function unpacks the source tarballs for KDE4 applications.
461#
462# If no argument is passed to this function, then standard src_unpack is
463# executed. Otherwise, options are passed to base_src_unpack.
464kde4-base_src_unpack() { 488kde4-base_src_unpack() {
465 debug-print-function $FUNCNAME "$@" 489 debug-print-function ${FUNCNAME} "$@"
466 490
467 if [[ $BUILD_TYPE = live ]]; then 491 if [[ ${BUILD_TYPE} = live ]]; then
468 local cleandir 492 migrate_store_dir
469 cleandir="${ESVN_STORE_DIR}/KDE"
470 if [[ -d "${cleandir}" ]]; then
471 ewarn "'${cleandir}' has been found. Moving contents to new location."
472 addwrite "${ESVN_STORE_DIR}"
473 # Split kdebase
474 local module
475 if pushd "${cleandir}"/kdebase/kdebase > /dev/null; then
476 for module in `find . -maxdepth 1 -type d -name [a-z0-9]\*`; do
477 module="${module#./}"
478 mkdir -p "${ESVN_STORE_DIR}/kdebase-${module}" && mv -f "${module}" "${ESVN_STORE_DIR}/kdebase-${module}" || \
479 die "Failed to move to '${ESVN_STORE_DIR}/kdebase-${module}'."
480 done
481 popd > /dev/null
482 rm -fr "${cleandir}/kdebase" || \
483 die "Failed to remove ${cleandir}/kdebase. You need to remove it manually."
484 fi
485 # Move the rest
486 local pkg
487 for pkg in "${cleandir}"/*; do
488 mv -f "${pkg}" "${ESVN_STORE_DIR}"/ || eerror "failed to move ${pkg}"
489 done
490 rmdir "${cleandir}" || die "Could not move obsolete KDE store dir. Please move '${cleandir}' contents to appropriate location (possibly ${ESVN_STORE_DIR}) and manually remove '${cleandir}' in order to continue."
491 fi
492 subversion_src_unpack 493 subversion_src_unpack
493 else 494 else
494 [[ -z $KDE_S ]] && KDE_S="${S}" 495 base_src_unpack
495 if [[ -z $* ]]; then
496 # Unpack first and deal with KDE patches after examing possible patch sets.
497 # To be picked up, patches need to conform to the guidelines stated before.
498 # Monolithic ebuilds will use the split ebuild patches.
499 [[ -d "${KDE_S}" ]] || unpack ${A}
500 fi
501 # Updated cmake dir
502 if [[ -d "${WORKDIR}/cmake" && -d "${KDE_S}/cmake" ]]; then
503 ebegin "Updating cmake/ directory..."
504 rm -rf "${KDE_S}/cmake" || die "Unable to remove old cmake/ directory"
505 ln -s "${WORKDIR}/cmake" "${KDE_S}/cmake" || die "Unable to symlink the new cmake/ directory"
506 eend 0
507 fi
508 fi 496 fi
509} 497}
510 498
511# @FUNCTION: kde4-base_src_compile 499# @FUNCTION: kde4-base_src_compile
512# @DESCRIPTION: 500# @DESCRIPTION:
515# enable_selected_linguas() in kde4-functions.eclass(5) for further details. 503# enable_selected_linguas() in kde4-functions.eclass(5) for further details.
516kde4-base_src_prepare() { 504kde4-base_src_prepare() {
517 debug-print-function ${FUNCNAME} "$@" 505 debug-print-function ${FUNCNAME} "$@"
518 506
519 # Only enable selected languages, used for KDE extragear apps. 507 # Only enable selected languages, used for KDE extragear apps.
520 if [[ -n $KDE_LINGUAS ]]; then 508 if [[ -n ${KDE_LINGUAS} ]]; then
521 enable_selected_linguas 509 enable_selected_linguas
522 fi 510 fi
523 511
524 # Autopatch 512 # Autopatch
525 base_src_prepare 513 base_src_prepare
526 514
527 # Save library dependencies 515 # Save library dependencies
528 if [[ -n $KMSAVELIBS ]] ; then 516 if [[ -n ${KMSAVELIBS} ]] ; then
529 save_library_dependencies 517 save_library_dependencies
530 fi 518 fi
531 519
532 # Inject library dependencies 520 # Inject library dependencies
533 if [[ -n $KMLOADLIBS ]] ; then 521 if [[ -n ${KMLOADLIBS} ]] ; then
534 load_library_dependencies 522 load_library_dependencies
535 fi 523 fi
536} 524}
537 525
538# @FUNCTION: kde4-base_src_configure 526# @FUNCTION: kde4-base_src_configure
557 545
558 # Build tests in src_test only, where we override this value 546 # Build tests in src_test only, where we override this value
559 mycmakeargs="${mycmakeargs} -DKDE4_BUILD_TESTS=OFF" 547 mycmakeargs="${mycmakeargs} -DKDE4_BUILD_TESTS=OFF"
560 548
561 # Set distribution name 549 # Set distribution name
562 [[ $PN = kdelibs ]] && mycmakeargs="${mycmakeargs} -DKDE_DISTRIBUTION_TEXT=Gentoo" 550 [[ ${PN} = kdelibs ]] && mycmakeargs="${mycmakeargs} -DKDE_DISTRIBUTION_TEXT=Gentoo"
563 551
564 # runpath linking 552 # runpath linking
565 mycmakeargs="${mycmakeargs} -DKDE4_USE_ALWAYS_FULL_RPATH=ON" 553 mycmakeargs="${mycmakeargs} -DKDE4_USE_ALWAYS_FULL_RPATH=ON"
566 554
567 # Here we set the install prefix 555 # Here we set the install prefix
570 # If prefix is /usr, sysconf needs to be /etc, not /usr/etc 558 # If prefix is /usr, sysconf needs to be /etc, not /usr/etc
571 use kdeprefix || mycmakeargs="${mycmakeargs} -DSYSCONF_INSTALL_DIR=/etc" 559 use kdeprefix || mycmakeargs="${mycmakeargs} -DSYSCONF_INSTALL_DIR=/etc"
572 560
573 # Set environment 561 # Set environment
574 QTEST_COLORED=1 562 QTEST_COLORED=1
575 QT_PLUGIN_PATH=${KDEDIR}/$(get_libdir)/kde4/plugins/ 563 QT_PLUGIN_PATH="${KDEDIR}/$(get_libdir)/kde4/plugins/"
576 564
577 # hardcode path to *.cmake KDE files 565 # Hardcode path to *.pc KDE files
578 PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+${PKG_CONFIG_PATH}:}${KDEDIR}/$(get_libdir)/pkgconfig" 566 export PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+${PKG_CONFIG_PATH}:}${KDEDIR}/$(get_libdir)/pkgconfig"
579 567
580 # additonal arguments for KOFFICE 568 # Override some environment variables
581 if [[ $KMNAME = koffice ]]; then 569 PATH="${KDEDIR}/bin:${PATH}"
582 case ${PN} in 570 LDPATH="${KDEDIR}/$(get_libdir):${LDPATH}"
583 koffice-data) : ;; 571
584 *) 572 # Set cmake prefixes to allow buildsystem to localize valid KDE installation when more are present
573 if use kdeprefix; then
585 mycmakeargs="${mycmakeargs} 574 mycmakeargs="${mycmakeargs}
586 -DWITH_OpenEXR=ON 575 -DCMAKE_SYSTEM_INCLUDE_PATH=${KDEDIR}/include
587 $(cmake-utils_use_with crypt QCA2) 576 -DCMAKE_SYSTEM_LIBRARY_PATH=${KDEDIR}/$(get_libdir)
588 $(cmake-utils_use_with opengl OpenGL)" 577 -DCMAKE_SYSTEM_PREFIX_PATH=${KDEDIR}
589 if use crypt; then 578 -DCMAKE_SYSTEM_PROGRAM_PATH=${KDEDIR}/bin"
590 mycmakeargs="${mycmakeargs}
591 -DQCA2_LIBRARIES=/usr/$(get_libdir)/qca2/libqca.so.2"
592 fi
593 ;;
594 esac
595 fi 579 fi
596 580
597 [ -e CMakeLists.txt ] && cmake-utils_src_configure 581 [ -e CMakeLists.txt ] && cmake-utils_src_configure
598} 582}
599 583
612# Options are passed to cmake-utils_src_make. 596# Options are passed to cmake-utils_src_make.
613kde4-base_src_make() { 597kde4-base_src_make() {
614 debug-print-function ${FUNCNAME} "$@" 598 debug-print-function ${FUNCNAME} "$@"
615 599
616 if [[ -d "$WORKDIR/${PN}_build" ]]; then 600 if [[ -d "$WORKDIR/${PN}_build" ]]; then
617 pushd "${WORKDIR}"/${PN}_build > /dev/null 601 pushd "${WORKDIR}/${PN}_build" > /dev/null
618 fi 602 fi
619 [ -e [Mm]akefile ] && cmake-utils_src_make "$@" 603 [ -e [Mm]akefile ] && cmake-utils_src_make "$@"
620} 604}
621 605
622# @FUNCTION: kde4-base_src_test 606# @FUNCTION: kde4-base_src_test
625kde4-base_src_test() { 609kde4-base_src_test() {
626 debug-print-function ${FUNCNAME} "$@" 610 debug-print-function ${FUNCNAME} "$@"
627 611
628 # Override this value, set in kde4-base_src_configure() 612 # Override this value, set in kde4-base_src_configure()
629 mycmakeargs="${mycmakeargs} -DKDE4_BUILD_TESTS=ON" 613 mycmakeargs="${mycmakeargs} -DKDE4_BUILD_TESTS=ON"
630 cmake-utils_src_compile 614 cmake-utils_src_configure
615 kde4-base_src_compile
631 616
632 cmake-utils_src_test 617 cmake-utils_src_test
633} 618}
634 619
635# @FUNCTION: kde4-base_src_install 620# @FUNCTION: kde4-base_src_install
636# @DESCRIPTION: 621# @DESCRIPTION:
637# Function for installing KDE4 applications. 622# Function for installing KDE4 applications.
638kde4-base_src_install() { 623kde4-base_src_install() {
639 debug-print-function ${FUNCNAME} "$@" 624 debug-print-function ${FUNCNAME} "$@"
640 625
641 if [[ -n $KMSAVELIBS ]] ; then 626 if [[ -n ${KMSAVELIBS} ]] ; then
642 install_library_dependencies 627 install_library_dependencies
643 fi 628 fi
644 629
645 kde4-base_src_make_doc 630 kde4-base_src_make_doc
646 if [[ -d "$WORKDIR/${PN}_build" ]]; then 631 if [[ -d "$WORKDIR/${PN}_build" ]]; then
647 pushd "${WORKDIR}"/${PN}_build > /dev/null 632 pushd "${WORKDIR}/${PN}_build" > /dev/null
648 fi 633 fi
649 [ -e [Mm]akefile ] && cmake-utils_src_install 634 [ -e [Mm]akefile ] && cmake-utils_src_install
650} 635}
651 636
652# @FUNCTION: kde4-base_src_make_doc 637# @FUNCTION: kde4-base_src_make_doc
655kde4-base_src_make_doc() { 640kde4-base_src_make_doc() {
656 debug-print-function ${FUNCNAME} "$@" 641 debug-print-function ${FUNCNAME} "$@"
657 642
658 local doc 643 local doc
659 for doc in AUTHORS ChangeLog* README* NEWS TODO; do 644 for doc in AUTHORS ChangeLog* README* NEWS TODO; do
660 [[ -s $doc ]] && dodoc ${doc} 645 [[ -s ${doc} ]] && dodoc ${doc}
661 done 646 done
662 647
663 if [[ -z $KMNAME ]]; then 648 if [[ -z ${KMNAME} ]]; then
664 for doc in {apps,runtime,workspace,.}/*/{AUTHORS,README*}; do 649 for doc in {apps,runtime,workspace,.}/*/{AUTHORS,README*}; do
665 if [[ -s $doc ]]; then 650 if [[ -s ${doc} ]]; then
666 local doc_complete=${doc} 651 local doc_complete=${doc}
667 doc="${doc#*/}" 652 doc="${doc#*/}"
668 newdoc "$doc_complete" "${doc%/*}.${doc##*/}" 653 newdoc "$doc_complete" "${doc%/*}.${doc##*/}"
669 fi 654 fi
670 done 655 done
671 fi 656 fi
672 657
673 if [[ -n ${KDEBASE} && -d "${D}/usr/share/doc/${PF}" ]]; then 658 if [[ -n ${KDEBASE} && -d "${D}/usr/share/doc/${PF}" ]]; then
674 # work around bug #97196 659 # work around bug #97196
675 dodir /usr/share/doc/kde && \ 660 dodir /usr/share/doc/kde && \
676 mv "${D}"/usr/share/doc/${PF} "${D}"/usr/share/doc/kde/ || \ 661 mv "${D}/usr/share/doc/${PF}" "${D}"/usr/share/doc/kde/ || \
677 die "Failed to move docs to kde/ failed." 662 die "Failed to move docs to kde/ failed."
678 fi 663 fi
679} 664}
680 665
681# @FUNCTION: kde4-base_pkg_postinst 666# @FUNCTION: kde4-base_pkg_postinst
682# @DESCRIPTION: 667# @DESCRIPTION:
683# Function to rebuild the KDE System Configuration Cache after an application has been installed. 668# Function to rebuild the KDE System Configuration Cache after an application has been installed.
684kde4-base_pkg_postinst() { 669kde4-base_pkg_postinst() {
670 debug-print-function ${FUNCNAME} "$@"
671
685 buildsycoca 672 buildsycoca
686} 673}
687 674
688# @FUNCTION: kde4-base_pkg_postrm 675# @FUNCTION: kde4-base_pkg_postrm
689# @DESCRIPTION: 676# @DESCRIPTION:
690# Function to rebuild the KDE System Configuration Cache after an application has been removed. 677# Function to rebuild the KDE System Configuration Cache after an application has been removed.
691kde4-base_pkg_postrm() { 678kde4-base_pkg_postrm() {
679 debug-print-function ${FUNCNAME} "$@"
680
692 buildsycoca 681 buildsycoca
693} 682}

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.30

  ViewVC Help
Powered by ViewVC 1.1.20