/[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.44 Revision 1.45
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.44 2009/08/20 09:18:01 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.45 2009/09/01 09:32:08 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
86fi 86fi
87 87
88# @ECLASS-VARIABLE: KDE_MINIMAL 88# @ECLASS-VARIABLE: KDE_MINIMAL
89# @DESCRIPTION: 89# @DESCRIPTION:
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.2 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.2}"
96 96
191 4.3* | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) SLOT="4.3" ;; 191 4.3* | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) SLOT="4.3" ;;
192 4.2* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*) SLOT="4.2" ;; 192 4.2* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*) 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 195 esac
196 KDE_MINIMAL="${SLOT}"
196 _kdedir="${SLOT}" 197 _kdedir="${SLOT}"
197 _pv="-${PV}:${SLOT}" 198 _pv="-${PV}:${SLOT}"
198 _pvn="-${PV}" 199 _pvn="-${PV}"
199 200
200 # Block installation of other SLOTS unless kdeprefix 201 # Block installation of other SLOTS unless kdeprefix
227 x11-libs/libXt 228 x11-libs/libXt
228 x11-libs/libXxf86vm 229 x11-libs/libXxf86vm
229 ) 230 )
230" 231"
231if [[ ${PN} != kdelibs ]]; then 232if [[ ${PN} != kdelibs ]]; then
233 [[ ${PN} != libknotificationitem ]] && slot_is_at_least 4.3 ${KDE_MINIMAL} && local libknotificationitem_required=1
232 if [[ ${KDEBASE} = kde-base ]]; then 234 if [[ ${KDEBASE} = kde-base ]]; then
233 kdecommondepend+=" 235 kdecommondepend+="
234 kdeprefix? ( >=kde-base/kdelibs${_pv}[kdeprefix] ) 236 kdeprefix? ( >=kde-base/kdelibs${_pv}[kdeprefix] )
235 !kdeprefix? ( >=kde-base/kdelibs${_pvn}[-kdeprefix] ) 237 !kdeprefix? ( >=kde-base/kdelibs${_pvn}[-kdeprefix] )
236 " 238 "
239 [[ -n ${libknotificationitem_required} ]] && \
240 kdecommondepend+="
241 kdeprefix? ( >=kde-base/libknotificationitem${_pv}[kdeprefix] )
242 !kdeprefix? ( >=kde-base/libknotificationitem${_pvn}[-kdeprefix] )
243 "
237 else 244 else
238 kdecommondepend+=" 245 kdecommondepend+="
239 >=kde-base/kdelibs${_pv} 246 >=kde-base/kdelibs${_pv}
240 " 247 "
248 [[ -n ${libknotificationitem_required} ]] && \
249 kdecommondepend+="
250 >=kde-base/libknotificationitem${_pv}
251 "
241 fi 252 fi
242fi 253fi
243unset _pv _pvn 254unset _pv _pvn
244kdedepend=" 255kdedepend="
245 dev-util/pkgconfig 256 dev-util/pkgconfig
536 QTEST_COLORED=1 547 QTEST_COLORED=1
537 548
538 # Shadow existing /usr installations 549 # Shadow existing /usr installations
539 unset KDEDIRS 550 unset KDEDIRS
540 551
552 # Handle kdeprefix-ed KDE
541 if [[ ${KDEDIR} != "${EROOT}usr" ]]; then 553 if [[ ${KDEDIR} != "${EROOT}usr" ]]; then
542 # Override some environment variables - only when kdeprefix is different, 554 # Override some environment variables - only when kdeprefix is different,
543 # to not break ccache/distcc 555 # to not break ccache/distcc
544 PATH="${KDEDIR}/bin:${PATH}" 556 PATH="${KDEDIR}/bin:${PATH}"
545 LDPATH="${KDEDIR}/$(get_libdir):${LDPATH}" 557 LDPATH="${KDEDIR}/$(get_libdir):${LDPATH}"
546 558
547 # Append full RPATH 559 # Append full RPATH
548 cmakeargs+=" -DCMAKE_SKIP_RPATH=OFF" 560 cmakeargs+=" -DCMAKE_SKIP_RPATH=OFF"
549 fi
550 561
551 if has kdeprefix ${IUSE//+} && use kdeprefix; then
552 # Set cmake prefixes to allow buildsystem to localize valid KDE installation 562 # Set cmake prefixes to allow buildsystem to locate valid KDE installation
553 # when more are present 563 # when more are present
554 cmakeargs+=" -DCMAKE_SYSTEM_PREFIX_PATH=${KDEDIR}" 564 cmakeargs+=" -DCMAKE_SYSTEM_PREFIX_PATH=${KDEDIR}"
555 else 565 fi
566
567 # Handle kdeprefix in application itself
568 if ! has kdeprefix ${IUSE//+} || ! use kdeprefix; then
556 # If prefix is /usr, sysconf needs to be /etc, not /usr/etc 569 # If prefix is /usr, sysconf needs to be /etc, not /usr/etc
557 cmakeargs+=" -DSYSCONF_INSTALL_DIR=${EROOT}etc" 570 cmakeargs+=" -DSYSCONF_INSTALL_DIR=${EROOT}etc"
558 fi 571 fi
559 572
560 mycmakeargs="${cmakeargs} ${mycmakeargs}" 573 mycmakeargs="${cmakeargs} ${mycmakeargs}"

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

  ViewVC Help
Powered by ViewVC 1.1.20