/[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.64 Revision 1.69
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.64 2010/06/26 01:33:21 reavertm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.69 2010/09/09 17:02:30 reavertm 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
48fi 48fi
49 49
50# @ECLASS-VARIABLE: KDE_MINIMAL 50# @ECLASS-VARIABLE: KDE_MINIMAL
51# @DESCRIPTION: 51# @DESCRIPTION:
52# This variable is used when KDE_REQUIRED is set, to specify required KDE minimal 52# 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 53# version for apps to work. Currently defaults to 4.4
54# One may override this variable to raise version requirements. 54# One may override this variable to raise version requirements.
55# For possible values look at KDE_SLOTS and KDE_LIVE_SLOTS variables. 55# For possible values look at KDE_SLOTS and KDE_LIVE_SLOTS variables.
56# Note that it is fixed to ${SLOT} for kde-base packages. 56# Note that it is fixed to ${SLOT} for kde-base packages.
57KDE_MINIMAL="${KDE_MINIMAL:-4.3}" 57KDE_MINIMAL="${KDE_MINIMAL:-4.4}"
58 58
59# Set slot for packages in kde-base, koffice and kdevelop 59# Set slot for packages in kde-base, koffice and kdevelop
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.5* | 4.4.[6-9]*) SLOT="4.5" ;; 66 4.5* | 4.4.[6-9]*) SLOT="4.5" ;;
66 4.4* | 4.3.[6-9]*) SLOT="4.4" ;; 67 4.4* | 4.3.[6-9]*) SLOT="4.4" ;;
67 4.3*) SLOT="4.3" ;;
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 ;;
73 koffice) 73 koffice)
74 SLOT="2" 74 SLOT="2"
75 ;; 75 ;;
76 kdevelop) 76 kdevelop)
77 if [[ ${BUILD_TYPE} = live ]]; then 77 if [[ ${BUILD_TYPE} = live ]]; then
78 KDEVELOP_VERSION="9999" 78 # @ECLASS-VARIABLE: KDEVELOP_VERSION
79 KDEVPLATFORM_VERSION="9999" 79 # @DESCRIPTION:
80 # Specifies KDevelop version. Default is 4.0.0 for tagged packages and 9999 for live packages.
81 # Applies to KDEBASE=kdevelop only.
82 KDEVELOP_VERSION="${KDEVELOP_VERSION:-9999}"
83 # @ECLASS-VARIABLE: KDEVPLATFORM_VERSION
84 # @DESCRIPTION:
85 # Specifies KDevplatform version. Default is 1.0.0 for tagged packages and 9999 for live packages.
86 # Applies to KDEBASE=kdevelop only.
87 KDEVPLATFORM_VERSION="${KDEVPLATFORM_VERSION:-9999}"
80 else 88 else
81 case ${PN} in 89 case ${PN} in
82 kdevelop|quanta) 90 kdevelop|quanta)
83 KDEVELOP_VERSION=${PV} 91 KDEVELOP_VERSION=${PV}
84 KDEVPLATFORM_VERSION="$(($(get_major_version)-3)).$(get_after_major_version)" 92 KDEVPLATFORM_VERSION="$(($(get_major_version)-3)).$(get_after_major_version)"
85 ;; 93 ;;
86 *) 94 kdevplatform)
87 KDEVELOP_VERSION="$(($(get_major_version)+3)).$(get_after_major_version)" 95 KDEVELOP_VERSION="$(($(get_major_version)+3)).$(get_after_major_version)"
88 KDEVPLATFORM_VERSION=${PV} 96 KDEVPLATFORM_VERSION=${PV}
97 ;;
98 *)
99 KDEVELOP_VERSION="${KDEVELOP_VERSION:-4.0.0}"
100 KDEVPLATFORM_VERSION="${KDEVPLATFORM_VERSION:-1.0.0}"
89 esac 101 esac
90 fi 102 fi
91 SLOT="4" 103 SLOT="4"
92 ;; 104 ;;
93esac 105esac
94 106
95slot_is_at_least 4.5 ${KDE_MINIMAL} && CMAKE_MIN_VERSION="2.6.4" 107slot_is_at_least 4.5 ${KDE_MINIMAL} && CMAKE_MIN_VERSION="2.8.1"
96 108
97inherit ${buildsystem_eclass} 109inherit ${buildsystem_eclass}
98 110
99EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare ${export_fns} pkg_postinst pkg_postrm 111EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare ${export_fns} pkg_postinst pkg_postrm
100 112
101unset buildsystem_eclass 113unset buildsystem_eclass
102unset export_fns 114unset export_fns
103
104case ${KDEBASE} in
105 kde-base)
106 HOMEPAGE="http://www.kde.org/"
107 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 ;;
117esac
118 115
119# @ECLASS-VARIABLE: OPENGL_REQUIRED 116# @ECLASS-VARIABLE: OPENGL_REQUIRED
120# @DESCRIPTION: 117# @DESCRIPTION:
121# Is qt-opengl required? Possible values are 'always', 'optional' and 'never'. 118# Is qt-opengl required? Possible values are 'always', 'optional' and 'never'.
122# This variable must be set before inheriting any eclasses. Defaults to 'never'. 119# This variable must be set before inheriting any eclasses. Defaults to 'never'.
146# 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'
147# 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.
148# 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'.
149KDE_REQUIRED="${KDE_REQUIRED:-always}" 146KDE_REQUIRED="${KDE_REQUIRED:-always}"
150 147
148# @ECLASS-VARIABLE: KDE_HANDBOOK
149# @DESCRIPTION:
150# Set to enable handbook in application. It adds +handbook to IUSE, handbook dirs
151# to KMEXTRA and ensures buildtime and runtime dependencies.
152[[ -n ${KDE_HANDBOOK} ]] && IUSE+=" +handbook"
153
151# Setup packages inheriting this eclass 154# Setup packages inheriting this eclass
152case ${KDEBASE} in 155case ${KDEBASE} in
153 kde-base) 156 kde-base)
157 HOMEPAGE="http://www.kde.org/"
158 LICENSE="GPL-2"
154 if [[ $BUILD_TYPE = live ]]; then 159 if [[ $BUILD_TYPE = live ]]; then
155 # Disable tests for live ebuilds 160 # Disable tests for live ebuilds
156 RESTRICT+=" test" 161 RESTRICT+=" test"
157 # Live ebuilds in kde-base default to kdeprefix by default 162 # Live ebuilds in kde-base default to kdeprefix by default
158 IUSE+=" +kdeprefix" 163 IUSE+=" +kdeprefix"
169 ;; 174 ;;
170 esac 175 esac
171 # Block installation of other SLOTS unless kdeprefix 176 # Block installation of other SLOTS unless kdeprefix
172 RDEPEND+=" $(block_other_slots)" 177 RDEPEND+=" $(block_other_slots)"
173 ;; 178 ;;
179 koffice)
180 HOMEPAGE="http://www.koffice.org/"
181 LICENSE="GPL-2"
182 ;;
183 kdevelop)
184 HOMEPAGE="http://www.kdevelop.org/"
185 LICENSE="GPL-2"
186 ;;
174esac 187esac
175 188
176# @ECLASS-VARIABLE: QT_MINIMAL 189# @ECLASS-VARIABLE: QT_MINIMAL
177# @DESCRIPTION: 190# @DESCRIPTION:
178# Determine version of qt we enforce as minimal for the package. 4.4.0 4.5.1.. 191# 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 192# 4.6.0 for 4.4 and 4.6.3 for 4.5 and later
180# or 4.6.0 for KDE 4.4 and later
181if slot_is_at_least 4.4 "${KDE_MINIMAL}"; then 193if slot_is_at_least 4.5 "${KDE_MINIMAL}"; then
194 QT_MINIMAL="${QT_MINIMAL:-4.6.3}"
195else
182 QT_MINIMAL="${QT_MINIMAL:-4.6.0}" 196 QT_MINIMAL="${QT_MINIMAL:-4.6.0}"
183fi 197fi
184
185QT_MINIMAL="${QT_MINIMAL:-4.5.1}"
186 198
187# OpenGL dependencies 199# OpenGL dependencies
188qtopengldepend=" 200qtopengldepend="
189 >=x11-libs/qt-opengl-${QT_MINIMAL}:4 201 >=x11-libs/qt-opengl-${QT_MINIMAL}:4
190" 202"
257 *) ;; 269 *) ;;
258esac 270esac
259unset cppuintdepend 271unset cppuintdepend
260 272
261# KDE dependencies 273# KDE dependencies
274# Qt accessibility classes are needed in various places, bug 325461
262kdecommondepend=" 275kdecommondepend="
263 >=x11-libs/qt-core-${QT_MINIMAL}:4[qt3support,ssl] 276 >=x11-libs/qt-core-${QT_MINIMAL}:4[qt3support,ssl]
264 >=x11-libs/qt-gui-${QT_MINIMAL}:4[accessibility,dbus] 277 >=x11-libs/qt-gui-${QT_MINIMAL}:4[accessibility,dbus]
265 >=x11-libs/qt-qt3support-${QT_MINIMAL}:4[accessibility,kde] 278 >=x11-libs/qt-qt3support-${QT_MINIMAL}:4[accessibility,kde]
266 >=x11-libs/qt-script-${QT_MINIMAL}:4 279 >=x11-libs/qt-script-${QT_MINIMAL}:4
272 x11-libs/libXt 285 x11-libs/libXt
273 x11-libs/libXxf86vm 286 x11-libs/libXxf86vm
274 ) 287 )
275" 288"
276#perl is not needed on host (+ difficult crosscompilation) 289#perl is not needed on host (+ difficult crosscompilation)
277tc-is-cross-compiler || kdecommondepend="$kdecommondepend dev-lang/perl" 290tc-is-cross-compiler || kdecommondepend+=" dev-lang/perl"
278 291
279if [[ ${PN} != kdelibs ]]; then 292if [[ ${PN} != kdelibs ]]; then
280 if [[ ${KDEBASE} = kde-base ]]; then 293 if [[ ${KDEBASE} = kde-base ]]; then
281 kdecommondepend+=" $(add_kdebase_dep kdelibs)" 294 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 295 else
286 kdecommondepend+=" 296 kdecommondepend+="
287 >=kde-base/kdelibs-${KDE_MINIMAL} 297 >=kde-base/kdelibs-${KDE_MINIMAL}
288 " 298 "
289 if [[ ${KDEBASE} = kdevelop ]]; then 299 if [[ ${KDEBASE} = kdevelop ]]; then
290 if [[ ${PN} != kdevplatform ]]; then 300 if [[ ${PN} != kdevplatform ]]; then
301 # @ECLASS-VARIABLE: KDEVPLATFORM_REQUIRED
302 # @DESCRIPTION:
303 # Specifies whether kdevplatform is required. Possible values are 'always' (default) and 'never'.
304 # Applies to KDEBASE=kdevelop only.
305 KDEVPLATFORM_REQUIRED="${KDEVPLATFORM_REQUIRED:-always}"
306 case ${KDEVPLATFORM_REQUIRED} in
307 always)
291 kdecommondepend+=" 308 kdecommondepend+="
292 >=dev-util/kdevplatform-${KDEVPLATFORM_VERSION} 309 >=dev-util/kdevplatform-${KDEVPLATFORM_VERSION}
293 " 310 "
311 ;;
312 *) ;;
313 esac
294 fi 314 fi
295 fi 315 fi
296 fi 316 fi
297fi 317fi
298kdedepend=" 318kdedepend="
301 !aqua? ( 321 !aqua? (
302 || ( >=x11-libs/libXtst-1.1.0 <x11-proto/xextproto-7.1.0 ) 322 || ( >=x11-libs/libXtst-1.1.0 <x11-proto/xextproto-7.1.0 )
303 x11-proto/xf86vidmodeproto 323 x11-proto/xf86vidmodeproto
304 ) 324 )
305" 325"
326
327# Handbook handling - dependencies
328if [[ -n ${KDE_HANDBOOK} ]]; then
329 kdedepend+="
330 handbook? (
331 app-text/docbook-xml-dtd:4.2
332 app-text/docbook-xsl-stylesheets
333 )
334 "
335 if [[ ${PN} != kdelibs ]]; then
336 if [[ ${KDEBASE} = kde-base ]]; then
337 PDEPEND+=" handbook? ( $(add_kdebase_dep kdelibs 'handbook') )"
338 else
339 PDEPEND+=" handbook? ( >=kde-base/kdelibs-${KDE_MINIMAL}[handbook] )"
340 fi
341 elif [[ ${PN} != khelpcenter ]]; then
342 if [[ ${KDEBASE} = kde-base ]]; then
343 PDEPEND+=" handbook? ( $(add_kdebase_dep khelpcenter 'handbook') )"
344 else
345 PDEPEND+=" handbook? ( >=kde-base/khelpcenter-${KDE_MINIMAL}[handbook] )"
346 fi
347 fi
348fi
349
306case ${KDE_REQUIRED} in 350case ${KDE_REQUIRED} in
307 always) 351 always)
308 IUSE+=" aqua" 352 IUSE+=" aqua"
309 COMMONDEPEND+=" ${kdecommondepend}" 353 COMMONDEPEND+=" ${kdecommondepend}"
310 DEPEND+=" ${kdedepend}" 354 DEPEND+=" ${kdedepend}"
320unset kdecommondepend kdedepend 364unset kdecommondepend kdedepend
321 365
322debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}" 366debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}"
323debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}" 367debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}"
324debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}" 368debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}"
369debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: PDEPEND is ${PDEPEND}"
325 370
326# Accumulate dependencies set by this eclass 371# Accumulate dependencies set by this eclass
327DEPEND+=" ${COMMONDEPEND}" 372DEPEND+=" ${COMMONDEPEND}"
328RDEPEND+=" ${COMMONDEPEND}" 373RDEPEND+=" ${COMMONDEPEND}"
329unset COMMONDEPEND 374unset COMMONDEPEND
432 fi 477 fi
433 _kmname_pv="${_kmname}-${PV}" 478 _kmname_pv="${_kmname}-${PV}"
434 case ${KDEBASE} in 479 case ${KDEBASE} in
435 kde-base) 480 kde-base)
436 case ${PV} in 481 case ${PV} in
437 4.[34].8[05] | 4.[34].9[0568]) 482 4.[45].8[05] | 4.[45].9[02568])
438 # block for normally packed unstable releases 483 # Normally packed unstable releases
439 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 484 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
440 4.[34].[6-9]*) 485 4.[45].[6-9]*)
441 # Repacked tarballs: need to depend on xz-utils to ensure that they can be unpacked 486 # 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" 487 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/src/${_kmname_pv}.tar.xz"
443 DEPEND+=" app-arch/xz-utils" 488 DEPEND+=" app-arch/xz-utils"
444 ;; 489 ;;
445 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 490 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
599 fi 644 fi
600 fi 645 fi
601 646
602 # Apply patches 647 # Apply patches
603 base_src_prepare 648 base_src_prepare
604 epatch_user
605 649
606 # Save library dependencies 650 # Save library dependencies
607 if [[ -n ${KMSAVELIBS} ]] ; then 651 if [[ -n ${KMSAVELIBS} ]] ; then
608 save_library_dependencies 652 save_library_dependencies
609 fi 653 fi

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.69

  ViewVC Help
Powered by ViewVC 1.1.20