/[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.4 Revision 1.5
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.4 2008/03/13 17:57:51 ingmar Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.5 2008/04/04 22:15:24 zlin Exp $
4 4
5# @ECLASS: kde4-functions.eclass 5# @ECLASS: kde4-functions.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# kde@gentoo.org 7# kde@gentoo.org
8# @BLURB: Common ebuild functions for monolithic and split KDE 4 packages 8# @BLURB: Common ebuild functions for monolithic and split KDE 4 packages
399 find "$@" -name CMakeLists.txt -print0 | grep -vFzZ "./cmake" | \ 399 find "$@" -name CMakeLists.txt -print0 | grep -vFzZ "./cmake" | \
400 xargs -0 sed -i -e '/add_subdirectory/s/^/#DONOTCOMPILE /' || \ 400 xargs -0 sed -i -e '/add_subdirectory/s/^/#DONOTCOMPILE /' || \
401 die "${LINENO}: Initial sed died" 401 die "${LINENO}: Initial sed died"
402} 402}
403 403
404# @ECLASS-VARIABLE: KDE_LINGUAS
405# @DESCRIPTION:
406# This is a whitespace-separated list of translations that this ebuild supports.
407# These translations automatically get added to IUSE. Therefore ebuilds must set
408# this variable before inheriting any eclasses. To only enable selected
409# translations ebuilds must call enable_selected_linguas(). kde4-base.eclass does
410# this for you.
411#
412# Example: KDE_LINGUAS="en_GB de nl"
413for _lingua in ${KDE_LINGUAS}; do
414 IUSE="${IUSE} linguas_${_lingua}"
415done
416
417# @FUNCTION: enable_selected_linguas
418# @DESCRIPTION:
419# Enable translations based on LINGUAS settings and what translations are
420# supported (see KDE_LINGUAS). By default translations are found in "${S}"/po
421# but this default can be overridden by defining KDE_LINGUAS_DIR.
422enable_selected_linguas() {
423 local lingua
424 comment_all_add_subdirectory "${KDE_LINGUAS_DIR:-${S}/po}"
425 for lingua in ${KDE_LINGUAS}; do
426 if use linguas_${lingua}; then
427 sed -e "/add_subdirectory(\s*${lingua}\s*)\s*$/ s/^#DONOTCOMPILE //" \
428 -i "${KDE_LINGUAS_DIR:-${S}/po}"/CMakeLists.txt || die "Sed to uncomment linguas_${lingua} failed."
429 fi
430 done
431}
432
404# @ECLASS-VARIABLE: QT4_BUILT_WITH_USE_CHECK 433# @ECLASS-VARIABLE: QT4_BUILT_WITH_USE_CHECK
405# @DESCRIPTION: 434# @DESCRIPTION:
406# A list of USE flags that x11-libs/qt:4 needs to be built with. 435# A list of USE flags that x11-libs/qt:4 needs to be built with.
407# 436#
408# This list is automatically appended to KDE4_BUILT_WITH_USE_CHECK, 437# This list is automatically appended to KDE4_BUILT_WITH_USE_CHECK,

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.20