/[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.45 Revision 1.46
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.45 2009/09/01 09:32:08 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.46 2009/10/06 18:02:12 alexxy 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
90# This variable is used when KDE_REQUIRED is set, to specify required KDE minimal 90# This variable is used when KDE_REQUIRED is set, to specify required KDE minimal
91# version for apps to work. Currently defaults to 4.3 91# version for apps to work. Currently defaults to 4.3
92# One may override this variable to raise version requirements. 92# One may override this variable to raise version requirements.
93# For possible values look at KDE_SLOTS and KDE_LIVE_SLOTS variables. 93# For possible values look at KDE_SLOTS and KDE_LIVE_SLOTS variables.
94# Note that it is fixed to ${SLOT} for kde-base packages. 94# Note that it is fixed to ${SLOT} for kde-base packages.
95KDE_MINIMAL="${KDE_MINIMAL:-4.2}" 95KDE_MINIMAL="${KDE_MINIMAL:-4.3}"
96 96
97# Fallback behaviour (for now) 97# Fallback behaviour (for now)
98# TODO Remove when tree is clean 98# TODO Remove when tree is clean
99if [[ -n ${NEED_KDE} ]]; then 99if [[ -n ${NEED_KDE} ]]; then
100 case ${NEED_KDE} in 100 case ${NEED_KDE} in
185 IUSE+=" kdeprefix" 185 IUSE+=" kdeprefix"
186 fi 186 fi
187 # Determine SLOT from PVs 187 # Determine SLOT from PVs
188 case ${PV} in 188 case ${PV} in
189 *.9999*) SLOT="${PV/.9999*/}" ;; # stable live 189 *.9999*) SLOT="${PV/.9999*/}" ;; # stable live
190 4.4* | 4.3.9* | 4.3.8* | 4.3.7* | 4.3.6*) SLOT="4.4" ;; 190 4.4* | 4.3.[6-9]*) SLOT="4.4" ;;
191 4.3* | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) SLOT="4.3" ;; 191 4.3*) SLOT="4.3" ;;
192 4.2* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*) SLOT="4.2" ;; 192 4.2*) SLOT="4.2" ;;
193 9999*) SLOT="live" ;; # regular live 193 9999*) SLOT="live" ;; # regular live
194 *) die "Unsupported ${PV}" ;; 194 *) die "Unsupported ${PV}" ;;
195 esac
196 # This code is to prevent portage from searching GENTOO_MIRRORS for
197 # packages that will never be mirrored. (As they only will ever be in
198 # the overlay).
199 case ${PV} in
200 *9999* | 4.?.[6-9]?)
201 RESTRICT+=" mirror"
202 ;;
195 esac 203 esac
196 KDE_MINIMAL="${SLOT}" 204 KDE_MINIMAL="${SLOT}"
197 _kdedir="${SLOT}" 205 _kdedir="${SLOT}"
198 _pv="-${PV}:${SLOT}" 206 _pv="-${PV}:${SLOT}"
199 _pvn="-${PV}" 207 _pvn="-${PV}"
228 x11-libs/libXt 236 x11-libs/libXt
229 x11-libs/libXxf86vm 237 x11-libs/libXxf86vm
230 ) 238 )
231" 239"
232if [[ ${PN} != kdelibs ]]; then 240if [[ ${PN} != kdelibs ]]; then
233 [[ ${PN} != libknotificationitem ]] && slot_is_at_least 4.3 ${KDE_MINIMAL} && local libknotificationitem_required=1
234 if [[ ${KDEBASE} = kde-base ]]; then 241 if [[ ${KDEBASE} = kde-base ]]; then
242 # libknotificationitem only when SLOT is 4.3
243 [[ ${PN} != libknotificationitem ]] && [[ ${SLOT} = 4.3 ]] && local libknotificationitem_required=1
235 kdecommondepend+=" 244 kdecommondepend+="
236 kdeprefix? ( >=kde-base/kdelibs${_pv}[kdeprefix] ) 245 kdeprefix? ( >=kde-base/kdelibs${_pv}[kdeprefix] )
237 !kdeprefix? ( >=kde-base/kdelibs${_pvn}[-kdeprefix] ) 246 !kdeprefix? ( >=kde-base/kdelibs${_pvn}[-kdeprefix] )
238 " 247 "
239 [[ -n ${libknotificationitem_required} ]] && \ 248 [[ -n ${libknotificationitem_required} ]] && \
243 " 252 "
244 else 253 else
245 kdecommondepend+=" 254 kdecommondepend+="
246 >=kde-base/kdelibs${_pv} 255 >=kde-base/kdelibs${_pv}
247 " 256 "
248 [[ -n ${libknotificationitem_required} ]] && \
249 kdecommondepend+="
250 >=kde-base/libknotificationitem${_pv}
251 "
252 fi 257 fi
253fi 258fi
254unset _pv _pvn 259unset _pv _pvn
255kdedepend=" 260kdedepend="
256 dev-util/pkgconfig 261 dev-util/pkgconfig
370 _kmname_pv="${_kmname}-${PV}" 375 _kmname_pv="${_kmname}-${PV}"
371 if [[ $NEED_KDE != live ]]; then 376 if [[ $NEED_KDE != live ]]; then
372 case ${KDEBASE} in 377 case ${KDEBASE} in
373 kde-base) 378 kde-base)
374 case ${PV} in 379 case ${PV} in
375 4.3.85 | 4.3.90 | 4.3.95 | 4.3.96) 380 4.3.85 | 4.3.9[0568])
376 # block for normally packed unstable releases
377 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
378 4.3.9* | 4.3.8* | 4.3.7* | 4.3.6*)
379 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.lzma" ;;
380 4.2.85 | 4.2.90 | 4.2.95 | 4.2.96 | 4.2.98)
381 # block for normally packed unstable releases 381 # block for normally packed unstable releases
382 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 382 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
383 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) 383 4.3.[6-9]*)
384 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.lzma" ;; 384 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.lzma" ;;
385 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6* | 4.0.9* | 4.0.8*)
386 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
387 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 385 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
388 esac 386 esac
389 ;; 387 ;;
390 koffice) 388 koffice)
391 case ${PV} in 389 case ${PV} in
392 1.9*)
393 SRC_URI="mirror://kde/unstable/${_kmname_pv}/src/${_kmname_pv}.tar.bz2" 390 2.0.[6-9]*) SRC_URI="mirror://kde/unstable/${_kmname_pv}/src/${_kmname_pv}.tar.bz2" ;;
394 ;;
395 *) SRC_URI="mirror://kde/stable/${_kmname_pv}/src/${_kmname_pv}.tar.bz2" ;; 391 *) SRC_URI="mirror://kde/stable/${_kmname_pv}/src/${_kmname_pv}.tar.bz2" ;;
396 esac 392 esac
397 ;;
398 esac 393 esac
399 fi 394 fi
400 unset _kmname _kmname_pv 395 unset _kmname _kmname_pv
401 fi 396 fi
402 ;; 397 ;;
634 fi 629 fi
635 630
636 if [[ -n ${KDEBASE} ]] && [[ -d "${D}${EROOT}usr/share/doc/${PF}" ]]; then 631 if [[ -n ${KDEBASE} ]] && [[ -d "${D}${EROOT}usr/share/doc/${PF}" ]]; then
637 # work around bug #97196 632 # work around bug #97196
638 dodir /usr/share/doc/KDE4 && \ 633 dodir /usr/share/doc/KDE4 && \
639 mv -f "${D}${EROOT}usr/share/doc/${PF}" "${D}${EROOT}usr/share/doc/KDE4/" || \ 634 cp -r "${D}${EROOT}usr/share/doc/${PF}" "${D}${EROOT}usr/share/doc/KDE4/" || \
640 die "Failed to move docs to KDE4/." 635 die "Failed to move docs to KDE4/."
636 rm -rf "${D}${EROOT}usr/share/doc/${PF}"
641 fi 637 fi
642} 638}
643 639
644# @FUNCTION: kde4-base_pkg_postinst 640# @FUNCTION: kde4-base_pkg_postinst
645# @DESCRIPTION: 641# @DESCRIPTION:

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

  ViewVC Help
Powered by ViewVC 1.1.20