/[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.9 Revision 1.10
1# Copyright 2007-2008 Gentoo Foundation 1# Copyright 2007-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-base.eclass,v 1.9 2008/04/06 21:36:53 zlin Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.10 2008/04/14 13:23:14 zlin 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.0 ebuilds 8# @BLURB: This eclass provides functions for kde 4.0 ebuilds
351# @CODE 351# @CODE
352# 352#
353# If ${PATCHES} is non-zero all patches in it get applied. If there is more 353# If ${PATCHES} is non-zero all patches in it get applied. If there is more
354# than one patch please make ${PATCHES} an array for proper quoting. 354# than one patch please make ${PATCHES} an array for proper quoting.
355kde4-base_apply_patches() { 355kde4-base_apply_patches() {
356 local _patchdir _packages _p 356 local _patchdir _packages _p _f
357 _patchdir="${WORKDIR}/patches/" 357 _patchdir="${WORKDIR}/patches/"
358 if [[ -d "${_patchdir}" ]]; then 358 if [[ -d "${_patchdir}" ]]; then
359 if is-parent-package ${CATEGORY}/${PN} ; then 359 if is-parent-package ${CATEGORY}/${PN} ; then
360 _packages="$(get-child-packages ${CATEGORY}/${PN})" 360 _packages="$(get-child-packages ${CATEGORY}/${PN})"
361 _packages="${_packages//${CATEGORY}\//} ${PN}" 361 _packages="${_packages//${CATEGORY}\//} ${PN}"
362 else 362 else
363 _packages="${PN}" 363 _packages="${PN}"
364 fi 364 fi
365 if [[ ${#PATCHES[@]} -gt 1 ]]; then 365 if [[ $(declare -p PATCHES) != 'declare -a '* ]]; then
366 PATCHES=(${PATCHES})
367 fi
366 for _p in ${_packages}; do 368 for _p in ${_packages}; do
367 PATCHES=( "${PATCHES[@]}" $(ls ${_patchdir}/${_p}-${PV}-*{diff,patch} 2>/dev/null) ) 369 for _f in "${_patchdir}"/${_p}-${PV}-*{diff,patch}; do
368 if [[ -n "${KDEBASE}" ]]; then 370 [[ -e ${_f} ]] && PATCHES+=("${_f}")
369 PATCHES=( "${PATCHES[@]}" $(ls ${_patchdir}/${_p}-${SLOT}-*{diff,patch} 2>/dev/null) )
370 fi
371 done 371 done
372 else
373 for _p in ${_packages}; do
374 PATCHES=(${PATCHES} $(ls ${_patchdir}/${_p}-${PV}-*{diff,patch} 2>/dev/null))
375 if [[ -n "${KDEBASE}" ]]; then 372 if [[ -n "${KDEBASE}" ]]; then
376 PATCHES=(${PATCHES} $(ls ${_patchdir}/${_p}-${SLOT}-*{diff,patch} 2>/dev/null)) 373 for _f in "${_patchdir}"/${_p}-${SLOT}-*{diff,patch}; do
377 fi 374 [[ -e ${_f} ]] && PATCHES+=("${_f}")
378 done 375 done
379 fi 376 fi
377 done
380 fi 378 fi
381 [[ -n ${PATCHES[@]} ]] && base_src_unpack autopatch 379 [[ -n ${PATCHES[@]} ]] && base_src_unpack autopatch
382} 380}
383 381
384# @FUNCTION: kde4-base_src_unpack 382# @FUNCTION: kde4-base_src_unpack

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.20