/[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.65 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.65 2010/06/26 16:02:18 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 ;;
102 fi 102 fi
103 SLOT="4" 103 SLOT="4"
104 ;; 104 ;;
105esac 105esac
106 106
107slot_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"
108 108
109inherit ${buildsystem_eclass} 109inherit ${buildsystem_eclass}
110 110
111EXPORT_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
112 112
113unset buildsystem_eclass 113unset buildsystem_eclass
114unset export_fns 114unset export_fns
115
116case ${KDEBASE} in
117 kde-base)
118 HOMEPAGE="http://www.kde.org/"
119 LICENSE="GPL-2"
120 ;;
121 koffice)
122 HOMEPAGE="http://www.koffice.org/"
123 LICENSE="GPL-2"
124 ;;
125 kdevelop)
126 HOMEPAGE="http://www.kdevelop.org/"
127 LICENSE="GPL-2"
128 ;;
129esac
130 115
131# @ECLASS-VARIABLE: OPENGL_REQUIRED 116# @ECLASS-VARIABLE: OPENGL_REQUIRED
132# @DESCRIPTION: 117# @DESCRIPTION:
133# Is qt-opengl required? Possible values are 'always', 'optional' and 'never'. 118# Is qt-opengl required? Possible values are 'always', 'optional' and 'never'.
134# 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'.
158# 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'
159# 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.
160# 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'.
161KDE_REQUIRED="${KDE_REQUIRED:-always}" 146KDE_REQUIRED="${KDE_REQUIRED:-always}"
162 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
163# Setup packages inheriting this eclass 154# Setup packages inheriting this eclass
164case ${KDEBASE} in 155case ${KDEBASE} in
165 kde-base) 156 kde-base)
157 HOMEPAGE="http://www.kde.org/"
158 LICENSE="GPL-2"
166 if [[ $BUILD_TYPE = live ]]; then 159 if [[ $BUILD_TYPE = live ]]; then
167 # Disable tests for live ebuilds 160 # Disable tests for live ebuilds
168 RESTRICT+=" test" 161 RESTRICT+=" test"
169 # Live ebuilds in kde-base default to kdeprefix by default 162 # Live ebuilds in kde-base default to kdeprefix by default
170 IUSE+=" +kdeprefix" 163 IUSE+=" +kdeprefix"
181 ;; 174 ;;
182 esac 175 esac
183 # Block installation of other SLOTS unless kdeprefix 176 # Block installation of other SLOTS unless kdeprefix
184 RDEPEND+=" $(block_other_slots)" 177 RDEPEND+=" $(block_other_slots)"
185 ;; 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 ;;
186esac 187esac
187 188
188# @ECLASS-VARIABLE: QT_MINIMAL 189# @ECLASS-VARIABLE: QT_MINIMAL
189# @DESCRIPTION: 190# @DESCRIPTION:
190# 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...
191# 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
192# or 4.6.0 for KDE 4.4 and later
193if 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
194 QT_MINIMAL="${QT_MINIMAL:-4.6.0}" 196 QT_MINIMAL="${QT_MINIMAL:-4.6.0}"
195fi 197fi
196
197QT_MINIMAL="${QT_MINIMAL:-4.5.1}"
198 198
199# OpenGL dependencies 199# OpenGL dependencies
200qtopengldepend=" 200qtopengldepend="
201 >=x11-libs/qt-opengl-${QT_MINIMAL}:4 201 >=x11-libs/qt-opengl-${QT_MINIMAL}:4
202" 202"
285 x11-libs/libXt 285 x11-libs/libXt
286 x11-libs/libXxf86vm 286 x11-libs/libXxf86vm
287 ) 287 )
288" 288"
289#perl is not needed on host (+ difficult crosscompilation) 289#perl is not needed on host (+ difficult crosscompilation)
290tc-is-cross-compiler || kdecommondepend="$kdecommondepend dev-lang/perl" 290tc-is-cross-compiler || kdecommondepend+=" dev-lang/perl"
291 291
292if [[ ${PN} != kdelibs ]]; then 292if [[ ${PN} != kdelibs ]]; then
293 if [[ ${KDEBASE} = kde-base ]]; then 293 if [[ ${KDEBASE} = kde-base ]]; then
294 kdecommondepend+=" $(add_kdebase_dep kdelibs)" 294 kdecommondepend+=" $(add_kdebase_dep kdelibs)"
295 # libknotificationitem only when SLOT is 4.3
296 [[ ${PN} != libknotificationitem ]] && [[ ${SLOT} = 4.3 ]] && \
297 kdecommondepend+=" $(add_kdebase_dep libknotificationitem)"
298 else 295 else
299 kdecommondepend+=" 296 kdecommondepend+="
300 >=kde-base/kdelibs-${KDE_MINIMAL} 297 >=kde-base/kdelibs-${KDE_MINIMAL}
301 " 298 "
302 if [[ ${KDEBASE} = kdevelop ]]; then 299 if [[ ${KDEBASE} = kdevelop ]]; then
324 !aqua? ( 321 !aqua? (
325 || ( >=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 )
326 x11-proto/xf86vidmodeproto 323 x11-proto/xf86vidmodeproto
327 ) 324 )
328" 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
329case ${KDE_REQUIRED} in 350case ${KDE_REQUIRED} in
330 always) 351 always)
331 IUSE+=" aqua" 352 IUSE+=" aqua"
332 COMMONDEPEND+=" ${kdecommondepend}" 353 COMMONDEPEND+=" ${kdecommondepend}"
333 DEPEND+=" ${kdedepend}" 354 DEPEND+=" ${kdedepend}"
343unset kdecommondepend kdedepend 364unset kdecommondepend kdedepend
344 365
345debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}" 366debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}"
346debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}" 367debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}"
347debug-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}"
348 370
349# Accumulate dependencies set by this eclass 371# Accumulate dependencies set by this eclass
350DEPEND+=" ${COMMONDEPEND}" 372DEPEND+=" ${COMMONDEPEND}"
351RDEPEND+=" ${COMMONDEPEND}" 373RDEPEND+=" ${COMMONDEPEND}"
352unset COMMONDEPEND 374unset COMMONDEPEND
455 fi 477 fi
456 _kmname_pv="${_kmname}-${PV}" 478 _kmname_pv="${_kmname}-${PV}"
457 case ${KDEBASE} in 479 case ${KDEBASE} in
458 kde-base) 480 kde-base)
459 case ${PV} in 481 case ${PV} in
460 4.[34].8[05] | 4.[34].9[0568]) 482 4.[45].8[05] | 4.[45].9[02568])
461 # block for normally packed unstable releases 483 # Normally packed unstable releases
462 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 484 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
463 4.[34].[6-9]*) 485 4.[45].[6-9]*)
464 # 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
465 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"
466 DEPEND+=" app-arch/xz-utils" 488 DEPEND+=" app-arch/xz-utils"
467 ;; 489 ;;
468 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 490 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
622 fi 644 fi
623 fi 645 fi
624 646
625 # Apply patches 647 # Apply patches
626 base_src_prepare 648 base_src_prepare
627 epatch_user
628 649
629 # Save library dependencies 650 # Save library dependencies
630 if [[ -n ${KMSAVELIBS} ]] ; then 651 if [[ -n ${KMSAVELIBS} ]] ; then
631 save_library_dependencies 652 save_library_dependencies
632 fi 653 fi

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

  ViewVC Help
Powered by ViewVC 1.1.20