/[gentoo-x86]/eclass/kde4-functions.eclass
Gentoo

Diff of /eclass/kde4-functions.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.22 Revision 1.23
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 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-functions.eclass,v 1.22 2009/08/03 21:59:53 wired Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.23 2009/08/20 09:18:01 scarabeus Exp $
4 4
5# Prefix compat: 5# Prefix compat:
6: ${EROOT:=${ROOT}} 6: ${EROOT:=${ROOT}}
7# Append missing trailing slash character
8[[ ${EROOT} = */ ]] || EROOT+="/"
7 9
8# @ECLASS: kde4-functions.eclass 10# @ECLASS: kde4-functions.eclass
9# @MAINTAINER: 11# @MAINTAINER:
10# kde@gentoo.org 12# kde@gentoo.org
11# @BLURB: Common ebuild functions for KDE 4 packages 13# @BLURB: Common ebuild functions for KDE 4 packages
350 sed -i -e "${i}iINCLUDE(\"${depsfile}\")" "${S}/CMakeLists.txt" || \ 352 sed -i -e "${i}iINCLUDE(\"${depsfile}\")" "${S}/CMakeLists.txt" || \
351 die "Failed to include library dependencies for ${pn}" 353 die "Failed to include library dependencies for ${pn}"
352 done 354 done
353 eend $? 355 eend $?
354} 356}
357
358# @FUNCTION: block_other_slots
359# @DESCRIPTION:
360# Create blocks for the current package in other slots when
361# installed with USE=-kdeprefix
362block_other_slots() {
363 local slot
364
365 debug-print-function ${FUNCNAME} "$@"
366
367 for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do
368 # Block non kdeprefix ${PN} on other slots
369 if [[ ${SLOT} != ${slot} ]]; then
370 echo "!kdeprefix? ( !kde-base/${PN}:${slot}[-kdeprefix] )"
371 fi
372 done
373}
374
375# @FUNCTION: add_blocker
376# @DESCRIPTION:
377# Create correct RDEPEND value for blocking correct package.
378# Usefull for file-collision blocks.
379# Parameters are package and version to block.
380# add_blocker kde-base/kdelibs 4.2.4
381add_blocker() {
382 local slot
383
384 debug-print-function ${FUNCNAME} "$@"
385
386 [[ ${1} = "" || ${2} = "" ]] && die "Missing parameter"
387 for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do
388 # on -kdeprefix we block every slot
389 RDEPEND+=" !kdeprefix? ( !<=${1}-${2}:${slot}[-kdeprefix] )"
390 done
391 # on kdeprefix we block only our slot
392 RDEPEND+=" kdeprefix? ( !<=${1}-${2}:${SLOT}[kdeprefix] )"
393}

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

  ViewVC Help
Powered by ViewVC 1.1.20