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

Diff of /eclass/kde4-meta.eclass

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

Revision 1.40 Revision 1.48
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2010 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-meta.eclass,v 1.40 2010/09/11 04:25:23 reavertm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.48 2011/01/12 21:24:58 dilfridge Exp $
4# 4#
5# @ECLASS: kde4-meta.eclass 5# @ECLASS: kde4-meta.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# kde@gentoo.org 7# kde@gentoo.org
8# @BLURB: Eclass for writing "split" KDE packages. 8# @BLURB: Eclass for writing "split" KDE packages.
98# If set to "true", $KMMODULE doesn't have to be defined. 98# If set to "true", $KMMODULE doesn't have to be defined.
99# 99#
100# Example usage: If you're installing subdirectories of a package, like plugins, 100# Example usage: If you're installing subdirectories of a package, like plugins,
101# you mark the top subdirectory (containing the package) as $KMEXTRACTONLY, and 101# you mark the top subdirectory (containing the package) as $KMEXTRACTONLY, and
102# set KMNOMODULE="true". 102# set KMNOMODULE="true".
103if [[ -z ${KMMODULE} && ${KMNOMODULE} != true ]]; then 103if [[ -z ${KMMODULE} ]] && [[ ${KMNOMODULE} != true ]]; then
104 KMMODULE=${PN} 104 KMMODULE=${PN}
105fi 105fi
106 106
107# @ECLASS-VARIABLE: KMEXTRA 107# @ECLASS-VARIABLE: KMEXTRA
108# @DESCRIPTION: 108# @DESCRIPTION:
109# All subdirectories listed here will be extracted, compiled & installed. 109# All subdirectories listed here will be extracted, compiled & installed.
110# $KMMODULE is always added to $KMEXTRA. 110# $KMMODULE is always added to $KMEXTRA.
111# If the handbook USE-flag is set, and if this directory exists, 111# If KDE_HANDBOOK is 'always' or 'optional' and handbook USE-flag is set, and if this
112# then "doc/$KMMODULE" is added to $KMEXTRA. In other cases, this should be 112# directory exists, then "doc/$KMMODULE" is added to $KMEXTRA. If there's additional
113# handled in the ebuild.
114# If the documentation is in a different subdirectory, you should add it to KMEXTRA. 113# documentation in different subdirectories, it should be added to KMEXTRA manually..
115 114
116# @ECLASS-VARIABLE: KMCOMPILEONLY 115# @ECLASS-VARIABLE: KMCOMPILEONLY
117# @DESCRIPTION: 116# @DESCRIPTION:
118# All subdirectories listed here will be extracted & compiled, but not installed. 117# All subdirectories listed here will be extracted & compiled, but not installed.
119 118
219 tarball="kdebase-${PV}.tar.${postfix}" 218 tarball="kdebase-${PV}.tar.${postfix}"
220 # Go one level deeper for kdebase-apps in tarballs 219 # Go one level deeper for kdebase-apps in tarballs
221 moduleprefix=apps/ 220 moduleprefix=apps/
222 KMTARPARAMS+=" --transform=s|apps/||" 221 KMTARPARAMS+=" --transform=s|apps/||"
223 ;; 222 ;;
223 kdepim)
224 if [[ ${PV} == 4.5.93 ]] ; then
225 tarball="kdepim-4.6beta3.tar.${postfix}"
226 else
227 tarball="${KMNAME}-${PV}.tar.${postfix}"
228 fi
229 ;;
224 *) 230 *)
225 # Create tarball name from module name (this is the default) 231 # Create tarball name from module name (this is the default)
226 tarball="${KMNAME}-${PV}.tar.${postfix}" 232 tarball="${KMNAME}-${PV}.tar.${postfix}"
227 ;; 233 ;;
228 esac 234 esac
244 extractlist+=" ${topdir}${moduleprefix}${f}" 250 extractlist+=" ${topdir}${moduleprefix}${f}"
245 done 251 done
246 extractlist+=" $(__list_needed_subdirectories)" 252 extractlist+=" $(__list_needed_subdirectories)"
247 253
248 pushd "${WORKDIR}" > /dev/null 254 pushd "${WORKDIR}" > /dev/null
249 [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} >&2 255 [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist}
250 tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null 256 if [[ ${I_KNOW_WHAT_I_AM_DOING} ]]; then
257 # to make the devs happy - bug 338397
258 tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} || ewarn "tar extract command failed at least partially - continuing anyway"
259 else
260 tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null || echo "tar extract command failed at least partially - continuing anyway"
261 fi
251 262
252 # Default $S is based on $P; rename the extracted directory to match $S if necessary 263 # Default $S is based on $P; rename the extracted directory to match $S if necessary
253 mv ${topdir} ${P} || die "Died while moving \"${topdir}\" to \"${P}\"" 264 mv ${topdir} ${P} || die "Died while moving \"${topdir}\" to \"${P}\""
254 265
255 popd > /dev/null 266 popd > /dev/null
280# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY, 291# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY,
281# KMEXTRACTONLY and KMTARPARAMS. 292# KMEXTRACTONLY and KMTARPARAMS.
282kde4-meta_create_extractlists() { 293kde4-meta_create_extractlists() {
283 debug-print-function ${FUNCNAME} "$@" 294 debug-print-function ${FUNCNAME} "$@"
284 295
285 # TODO change to KMEXTRA for more strict check 296 # Add default handbook locations
297 # FIXME - legacy code - remove when 4.4.5 is gone or preferrably port 4.4.5.
286 if has handbook ${IUSE//+} && use handbook && [[ -n ${KMMODULE} ]]; then 298 if ! slot_is_at_least 4.5 ${SLOT} && has handbook ${IUSE//+} && use handbook && [[ -z ${KMNOMODULE} ]]; then
287 # We use the basename of $KMMODULE because $KMMODULE can contain 299 # We use the basename of $KMMODULE because $KMMODULE can contain
288 # the path to the module subdirectory. 300 # the path to the module subdirectory.
289 KMEXTRA_NONFATAL+=" 301 KMEXTRA_NONFATAL+="
290 doc/${KMMODULE##*/}" 302 doc/${KMMODULE##*/}"
303 fi
304
305 # Add default handbook locations
306 if [[ -z ${KMNOMODULE} ]] && { [[ ${KDE_HANDBOOK} = always ]] || { [[ ${KDE_HANDBOOK} = optional ]] && use handbook; }; }; then
307 KMEXTRA_NONFATAL+=" doc/${KMMODULE##*/}"
291 fi 308 fi
292 309
293 # Add some CMake-files to KMEXTRACTONLY. 310 # Add some CMake-files to KMEXTRACTONLY.
294 # Note that this actually doesn't include KMEXTRA handling. 311 # Note that this actually doesn't include KMEXTRA handling.
295 # In those cases you should care to add the relevant files to KMEXTRACTONLY 312 # In those cases you should care to add the relevant files to KMEXTRACTONLY
349 KMEXTRACTONLY+=" 366 KMEXTRACTONLY+="
350 kdeutils-version.h" 367 kdeutils-version.h"
351 ;; 368 ;;
352 koffice) 369 koffice)
353 KMEXTRACTONLY+=" 370 KMEXTRACTONLY+="
354 config-endian.h.cmake
355 filters/config-filters.h.cmake 371 filters/config-filters.h.cmake
356 config-openexr.h.cmake
357 config-opengl.h.cmake
358 config-prefix.h.cmake
359 " 372 "
360 case ${PV} in 373 case ${PV} in
361 2.0.*) 374 2.0.*)
362 KMEXTRACTONLY+=" 375 KMEXTRACTONLY+="
363 config-openctl.h.cmake" 376 config-openctl.h.cmake
377 config-endian.h.cmake
378 config-openexr.h.cmake
379 config-opengl.h.cmake
380 config-prefix.h.cmake"
381 ;;
382 2.[12].*)
383 KMEXTRACTONLY+="
384 config-endian.h.cmake
385 config-openexr.h.cmake
386 config-opengl.h.cmake
387 config-prefix.h.cmake"
364 ;; 388 ;;
365 esac 389 esac
366 ;; 390 ;;
367 esac 391 esac
368 # Don't install cmake modules for split ebuilds, to avoid collisions. 392 # Don't install cmake modules for split ebuilds, to avoid collisions.

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.48

  ViewVC Help
Powered by ViewVC 1.1.20