/[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.71 Revision 1.76
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.71 2010/09/11 04:37:07 reavertm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.76 2010/10/27 21:24:22 dilfridge 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
60case ${KDEBASE} in 60case ${KDEBASE} in
61 kde-base) 61 kde-base)
62 # Determine SLOT from PVs 62 # Determine SLOT from PVs
63 case ${PV} in 63 case ${PV} in
64 *.9999*) SLOT="${PV/.9999*/}" ;; # stable live 64 *.9999*) SLOT="${PV/.9999*/}" ;; # stable live
65 4.6* | 4.5.[6-9]*) SLOT="4.6" ;; 65 4.6* | 4.5.[6-9][0-9]*) SLOT="4.6" ;;
66 4.5* | 4.4.[6-9]*) SLOT="4.5" ;; 66 4.5* | 4.4.[6-9][0-9]*) SLOT="4.5" ;;
67 4.4* | 4.3.[6-9]*) SLOT="4.4" ;; 67 4.4* | 4.3.[6-9][0-9]*) SLOT="4.4" ;;
68 9999*) SLOT="live" ;; # regular live 68 9999*) SLOT="live" ;; # regular live
69 *) die "Unsupported ${PV}" ;; 69 *) die "Unsupported ${PV}" ;;
70 esac 70 esac
71 KDE_MINIMAL="${SLOT}" 71 KDE_MINIMAL="${SLOT}"
72 ;; 72 ;;
139 139
140# @ECLASS-VARIABLE: KDE_REQUIRED 140# @ECLASS-VARIABLE: KDE_REQUIRED
141# @DESCRIPTION: 141# @DESCRIPTION:
142# Is kde required? Possible values are 'always', 'optional' and 'never'. 142# Is kde required? Possible values are 'always', 'optional' and 'never'.
143# This variable must be set before inheriting any eclasses. Defaults to 'always' 143# This variable must be set before inheriting any eclasses. Defaults to 'always'
144# If set to always or optional, KDE_MINIMAL may be overriden as well. 144# If set to 'always' or 'optional', KDE_MINIMAL may be overriden as well.
145# Note that for kde-base packages this variable is fixed to 'always'. 145# Note that for kde-base packages this variable is fixed to 'always'.
146KDE_REQUIRED="${KDE_REQUIRED:-always}" 146KDE_REQUIRED="${KDE_REQUIRED:-always}"
147 147
148# @ECLASS-VARIABLE: KDE_HANDBOOK 148# @ECLASS-VARIABLE: KDE_HANDBOOK
149# @DESCRIPTION: 149# @DESCRIPTION:
150# Set to enable handbook in application. It adds +handbook to IUSE, handbook dirs 150# Set to enable handbook in application. Possible values are 'always', 'optional'
151# (handbook USE flag) and 'never'.
152# This variable must be set before inheriting any eclasses. Defaults to 'never'.
153# It adds default handbook dirs for kde-base packages to KMEXTRA and in any case it
151# to KMEXTRA and ensures buildtime and runtime dependencies. 154# ensures buildtime and runtime dependencies.
152[[ -n ${KDE_HANDBOOK} ]] && IUSE+=" +handbook" 155KDE_HANDBOOK="${KDE_HANDBOOK:-never}"
153 156
154# Setup packages inheriting this eclass 157# Setup packages inheriting this eclass
155case ${KDEBASE} in 158case ${KDEBASE} in
156 kde-base) 159 kde-base)
157 HOMEPAGE="http://www.kde.org/" 160 HOMEPAGE="http://www.kde.org/"
271unset cppuintdepend 274unset cppuintdepend
272 275
273# KDE dependencies 276# KDE dependencies
274# Qt accessibility classes are needed in various places, bug 325461 277# Qt accessibility classes are needed in various places, bug 325461
275kdecommondepend=" 278kdecommondepend="
279 dev-lang/perl
276 >=x11-libs/qt-core-${QT_MINIMAL}:4[qt3support,ssl] 280 >=x11-libs/qt-core-${QT_MINIMAL}:4[qt3support,ssl]
277 >=x11-libs/qt-gui-${QT_MINIMAL}:4[accessibility,dbus] 281 >=x11-libs/qt-gui-${QT_MINIMAL}:4[accessibility,dbus]
278 >=x11-libs/qt-qt3support-${QT_MINIMAL}:4[accessibility,kde] 282 >=x11-libs/qt-qt3support-${QT_MINIMAL}:4[accessibility,kde]
279 >=x11-libs/qt-script-${QT_MINIMAL}:4 283 >=x11-libs/qt-script-${QT_MINIMAL}:4
280 >=x11-libs/qt-sql-${QT_MINIMAL}:4[qt3support] 284 >=x11-libs/qt-sql-${QT_MINIMAL}:4[qt3support]
284 x11-libs/libXext 288 x11-libs/libXext
285 x11-libs/libXt 289 x11-libs/libXt
286 x11-libs/libXxf86vm 290 x11-libs/libXxf86vm
287 ) 291 )
288" 292"
289#perl is not needed on host (+ difficult crosscompilation)
290tc-is-cross-compiler || kdecommondepend+=" dev-lang/perl"
291 293
292if [[ ${PN} != kdelibs ]]; then 294if [[ ${PN} != kdelibs ]]; then
293 if [[ ${KDEBASE} = kde-base ]]; then
294 kdecommondepend+=" $(add_kdebase_dep kdelibs)" 295 kdecommondepend+=" $(add_kdebase_dep kdelibs)"
295 else
296 kdecommondepend+="
297 >=kde-base/kdelibs-${KDE_MINIMAL}
298 "
299 if [[ ${KDEBASE} = kdevelop ]]; then 296 if [[ ${KDEBASE} = kdevelop ]]; then
300 if [[ ${PN} != kdevplatform ]]; then 297 if [[ ${PN} != kdevplatform ]]; then
301 # @ECLASS-VARIABLE: KDEVPLATFORM_REQUIRED 298 # @ECLASS-VARIABLE: KDEVPLATFORM_REQUIRED
302 # @DESCRIPTION: 299 # @DESCRIPTION:
303 # Specifies whether kdevplatform is required. Possible values are 'always' (default) and 'never'. 300 # Specifies whether kdevplatform is required. Possible values are 'always' (default) and 'never'.
304 # Applies to KDEBASE=kdevelop only. 301 # Applies to KDEBASE=kdevelop only.
305 KDEVPLATFORM_REQUIRED="${KDEVPLATFORM_REQUIRED:-always}" 302 KDEVPLATFORM_REQUIRED="${KDEVPLATFORM_REQUIRED:-always}"
306 case ${KDEVPLATFORM_REQUIRED} in 303 case ${KDEVPLATFORM_REQUIRED} in
307 always) 304 always)
308 kdecommondepend+=" 305 kdecommondepend+="
309 >=dev-util/kdevplatform-${KDEVPLATFORM_VERSION} 306 >=dev-util/kdevplatform-${KDEVPLATFORM_VERSION}
310 " 307 "
311 ;; 308 ;;
312 *) ;; 309 *) ;;
313 esac 310 esac
314 fi
315 fi 311 fi
316 fi 312 fi
317fi 313fi
318kdedepend=" 314kdedepend="
319 dev-util/automoc 315 dev-util/automoc
321 !aqua? ( 317 !aqua? (
322 || ( >=x11-libs/libXtst-1.1.0 <x11-proto/xextproto-7.1.0 ) 318 || ( >=x11-libs/libXtst-1.1.0 <x11-proto/xextproto-7.1.0 )
323 x11-proto/xf86vidmodeproto 319 x11-proto/xf86vidmodeproto
324 ) 320 )
325" 321"
326
327# Handbook handling - dependencies
328if [[ -n ${KDE_HANDBOOK} ]]; then
329 kdedepend+=" 322kderdepend=""
330 handbook? ( 323
324kdehandbookdepend="
331 app-text/docbook-xml-dtd:4.2 325 app-text/docbook-xml-dtd:4.2
332 app-text/docbook-xsl-stylesheets 326 app-text/docbook-xsl-stylesheets
333 ) 327"
334 " 328kdehandbookrdepend="
335 if [[ ${PN} != kdelibs ]]; then 329 $(add_kdebase_dep kdelibs 'handbook')
336 if [[ ${KDEBASE} = kde-base ]]; then 330"
337 PDEPEND+=" handbook? ( $(add_kdebase_dep kdelibs 'handbook') )" 331case ${KDE_HANDBOOK} in
338 else 332 always)
339 PDEPEND+=" handbook? ( >=kde-base/kdelibs-${KDE_MINIMAL}[handbook] )" 333 kdedepend+=" ${kdehandbookdepend}"
340 fi 334 [[ ${PN} != kdelibs ]] && kderdepend+=" ${kdehandbookrdepend}"
341 elif [[ ${PN} != khelpcenter ]]; then 335 ;;
342 if [[ ${KDEBASE} = kde-base ]]; then 336 optional)
343 PDEPEND+=" handbook? ( $(add_kdebase_dep khelpcenter 'handbook') )" 337 IUSE+=" +handbook"
344 else 338 kdedepend+=" handbook? ( ${kdehandbookdepend} )"
345 PDEPEND+=" handbook? ( >=kde-base/khelpcenter-${KDE_MINIMAL}[handbook] )" 339 [[ ${PN} != kdelibs ]] && kderdepend+=" handbook? ( ${kdehandbookrdepend} )"
346 fi 340 ;;
347 fi 341 *) ;;
348fi 342esac
343unset kdehandbookdepend kdehandbookrdepend
349 344
350case ${KDE_REQUIRED} in 345case ${KDE_REQUIRED} in
351 always) 346 always)
352 IUSE+=" aqua" 347 IUSE+=" aqua"
353 COMMONDEPEND+=" ${kdecommondepend}" 348 [[ -n ${kdecommondepend} ]] && COMMONDEPEND+=" ${kdecommondepend}"
354 DEPEND+=" ${kdedepend}" 349 [[ -n ${kdedepend} ]] && DEPEND+=" ${kdedepend}"
350 [[ -n ${kderdepend} ]] && RDEPEND+=" ${kderdepend}"
355 ;; 351 ;;
356 optional) 352 optional)
357 IUSE+=" aqua kde" 353 IUSE+=" aqua kde"
358 COMMONDEPEND+=" kde? ( ${kdecommondepend} )" 354 [[ -n ${kdecommondepend} ]] && COMMONDEPEND+=" kde? ( ${kdecommondepend} )"
359 DEPEND+=" kde? ( ${kdedepend} )" 355 [[ -n ${kdedepend} ]] && DEPEND+=" kde? ( ${kdedepend} )"
356 [[ -n ${kderdepend} ]] && RDEPEND+=" kde? ( ${kderdepend} )"
360 ;; 357 ;;
361 *) ;; 358 *) ;;
362esac 359esac
363 360
364unset kdecommondepend kdedepend 361unset kdecommondepend kdedepend kderdepend
365 362
366debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}" 363debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}"
367debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}" 364debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}"
368debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}" 365debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}"
369debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: PDEPEND is ${PDEPEND}"
370 366
371# Accumulate dependencies set by this eclass 367# Accumulate dependencies set by this eclass
372DEPEND+=" ${COMMONDEPEND}" 368DEPEND+=" ${COMMONDEPEND}"
373RDEPEND+=" ${COMMONDEPEND}" 369RDEPEND+=" ${COMMONDEPEND}"
374unset COMMONDEPEND 370unset COMMONDEPEND
481 case ${PV} in 477 case ${PV} in
482 4.[456].8[05] | 4.[456].9[023568]) 478 4.[456].8[05] | 4.[456].9[023568])
483 # Unstable KDE SC releases 479 # Unstable KDE SC releases
484 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" 480 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2"
485 ;; 481 ;;
486 4.4.6) 482 4.4.6 | 4.4.7)
487 # Only kdepim here 483 # Only kdepim here
488 SRC_URI="mirror://kde/stable/kdepim-${PV}/src/${_kmname_pv}.tar.bz2" 484 SRC_URI="mirror://kde/stable/kdepim-${PV}/src/${_kmname_pv}.tar.bz2"
489 ;; 485 ;;
490 *) 486 *)
491 # Stable KDE SC releases 487 # Stable KDE SC releases
657 653
658 # Inject library dependencies 654 # Inject library dependencies
659 if [[ -n ${KMLOADLIBS} ]] ; then 655 if [[ -n ${KMLOADLIBS} ]] ; then
660 load_library_dependencies 656 load_library_dependencies
661 fi 657 fi
658
659 # Hack for manuals relying on outdated DTD
660 find "${S}" -name "*.docbook" \
661 -exec sed -i -r \
662 -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' {} + \
663 || die 'failed to fix DocBook variant version'
662} 664}
663 665
664# @FUNCTION: kde4-base_src_configure 666# @FUNCTION: kde4-base_src_configure
665# @DESCRIPTION: 667# @DESCRIPTION:
666# Function for configuring the build of KDE4 applications. 668# Function for configuring the build of KDE4 applications.

Legend:
Removed from v.1.71  
changed lines
  Added in v.1.76

  ViewVC Help
Powered by ViewVC 1.1.20