/[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.54 Revision 1.60
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2012 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.54 2011/06/15 22:03:13 abcd Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.60 2012/08/01 19:38:52 johu Exp $
4 4
5inherit versionator 5inherit versionator
6 6
7# @ECLASS: kde4-functions.eclass 7# @ECLASS: kde4-functions.eclass
8# @MAINTAINER: 8# @MAINTAINER:
44 KDEBASE=kdevelop 44 KDEBASE=kdevelop
45fi 45fi
46 46
47# determine the build type 47# determine the build type
48if [[ ${PV} = *9999* ]]; then 48if [[ ${PV} = *9999* ]]; then
49 BUILD_TYPE="live" 49 KDE_BUILD_TYPE="live"
50else 50else
51 BUILD_TYPE="release" 51 KDE_BUILD_TYPE="release"
52fi 52fi
53export BUILD_TYPE 53export KDE_BUILD_TYPE
54 54
55# Set reponame and SCM for moduleses that have fully migrated to git 55# Set reponame and SCM for modules that have fully migrated to git
56# (hack - it's here because it needs to be before SCM inherits from kde4-base) 56# (hack - it's here because it needs to be before SCM inherits from kde4-base)
57if [[ ${BUILD_TYPE} == live ]]; then 57if [[ ${KDE_BUILD_TYPE} == live ]]; then
58 case "${KMNAME}" in 58 case "${KMNAME}" in
59 kdebase-workspace) 59 kdebase-workspace)
60 KDE_SCM="git" 60 KDE_SCM="git"
61 EGIT_REPONAME=${EGIT_REPONAME:=kde-workspace} 61 EGIT_REPONAME=${EGIT_REPONAME:=kde-workspace}
62 ;; 62 ;;
91# this variable before inheriting any eclasses. To enable only selected 91# this variable before inheriting any eclasses. To enable only selected
92# translations, ebuilds must call enable_selected_linguas(). kde4-{base,meta}.eclass does 92# translations, ebuilds must call enable_selected_linguas(). kde4-{base,meta}.eclass does
93# this for you. 93# this for you.
94# 94#
95# Example: KDE_LINGUAS="en_GB de nl" 95# Example: KDE_LINGUAS="en_GB de nl"
96if [[ ${BUILD_TYPE} != live || -n ${KDE_LINGUAS_LIVE_OVERRIDE} ]]; then 96if [[ ${KDE_BUILD_TYPE} != live || -n ${KDE_LINGUAS_LIVE_OVERRIDE} ]]; then
97 for _lingua in ${KDE_LINGUAS}; do 97 for _lingua in ${KDE_LINGUAS}; do
98 IUSE="${IUSE} linguas_${_lingua}" 98 IUSE="${IUSE} linguas_${_lingua}"
99 done 99 done
100fi 100fi
101 101
181# @DESCRIPTION: 181# @DESCRIPTION:
182# Enable only selected linguas enabled doc folders. 182# Enable only selected linguas enabled doc folders.
183enable_selected_doc_linguas() { 183enable_selected_doc_linguas() {
184 debug-print-function ${FUNCNAME} "$@" 184 debug-print-function ${FUNCNAME} "$@"
185 185
186 # if there is no linguas defined we enable everything
187 if ! $(env | grep -q "^LINGUAS="); then
188 return 0
189 fi
190
191 # @ECLASS-VARIABLE: KDE_DOC_DIRS 186 # @ECLASS-VARIABLE: KDE_DOC_DIRS
192 # @DESCRIPTION: 187 # @DESCRIPTION:
193 # Variable specifying whitespace separated patterns for documentation locations. 188 # Variable specifying whitespace separated patterns for documentation locations.
194 # Default is "doc/%lingua" 189 # Default is "doc/%lingua"
195 KDE_DOC_DIRS=${KDE_DOC_DIRS:='doc/%lingua'} 190 KDE_DOC_DIRS=${KDE_DOC_DIRS:='doc/%lingua'}
206 # Disable whole directory 201 # Disable whole directory
207 sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${handbookdir}[[:space:]]*)/s/^/#DONOTCOMPILE /" \ 202 sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${handbookdir}[[:space:]]*)/s/^/#DONOTCOMPILE /" \
208 -e "/ADD_SUBDIRECTORY[[:space:]]*([[:space:]]*${handbookdir}[[:space:]]*)/s/^/#DONOTCOMPILE /" \ 203 -e "/ADD_SUBDIRECTORY[[:space:]]*([[:space:]]*${handbookdir}[[:space:]]*)/s/^/#DONOTCOMPILE /" \
209 -i CMakeLists.txt || die 'failed to comment out all handbooks' 204 -i CMakeLists.txt || die 'failed to comment out all handbooks'
210 else 205 else
206 # if there is no linguas defined we enable everything (i.e. comment out nothing)
207 if ! $(env | grep -q "^LINGUAS="); then
208 return 0
209 fi
210
211 # Disable subdirectories recursively 211 # Disable subdirectories recursively
212 comment_all_add_subdirectory "${handbookdir}" 212 comment_all_add_subdirectory "${handbookdir}"
213 # Add requested translations 213 # Add requested translations
214 local lingua 214 local lingua
215 for lingua in en ${KDE_LINGUAS}; do 215 for lingua in en ${KDE_LINGUAS}; do
260 mv -f "${pkg}" "${ESVN_STORE_DIR}"/ || eerror "Failed to move '${pkg}'" 260 mv -f "${pkg}" "${ESVN_STORE_DIR}"/ || eerror "Failed to move '${pkg}'"
261 done 261 done
262 rmdir "${cleandir}" || die "Could not move obsolete KDE store dir. Please move '${cleandir}' contents to appropriate location (possibly ${ESVN_STORE_DIR}) and manually remove '${cleandir}' in order to continue." 262 rmdir "${cleandir}" || die "Could not move obsolete KDE store dir. Please move '${cleandir}' contents to appropriate location (possibly ${ESVN_STORE_DIR}) and manually remove '${cleandir}' in order to continue."
263 fi 263 fi
264 264
265 if ! hasq kde4-meta ${INHERITED}; then 265 if ! has kde4-meta ${INHERITED}; then
266 case ${KMNAME} in 266 case ${KMNAME} in
267 extragear*|playground*) 267 extragear*|playground*)
268 local scmlocalpath="${ESVN_STORE_DIR}"/"${KMNAME}"/"${PN}" 268 local scmlocalpath="${ESVN_STORE_DIR}"/"${KMNAME}"/"${PN}"
269 if [[ -d "${scmlocalpath}" ]]; then 269 if [[ -d "${scmlocalpath}" ]]; then
270 local destdir="${ESVN_STORE_DIR}"/"${ESVN_PROJECT}"/"`basename "${ESVN_REPO_URI}"`" 270 local destdir="${ESVN_STORE_DIR}"/"${ESVN_PROJECT}"/"`basename "${ESVN_REPO_URI}"`"
470 470
471 popd > /dev/null 471 popd > /dev/null
472} 472}
473 473
474# @FUNCTION: get_kde_version 474# @FUNCTION: get_kde_version
475# @DESCRIPTION:
475# Translates an ebuild version into a major.minor KDE SC 476# Translates an ebuild version into a major.minor KDE SC
476# release version. If no version is specified, ${PV} is used. 477# release version. If no version is specified, ${PV} is used.
477get_kde_version() { 478get_kde_version() {
478 local ver=${1:-${PV}} 479 local ver=${1:-${PV}}
479 local major=$(get_major_version ${ver}) 480 local major=$(get_major_version ${ver})

Legend:
Removed from v.1.54  
changed lines
  Added in v.1.60

  ViewVC Help
Powered by ViewVC 1.1.20