/[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.37 Revision 1.44
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.37 2010/05/17 01:16:39 reavertm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.44 2010/12/02 21:49:54 alexxy 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.
22case ${KMNAME} in 22case ${KMNAME} in
23 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphics) 23 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphics)
24 COMMONDEPEND+=" >=media-libs/qimageblitz-0.0.4" 24 COMMONDEPEND+=" >=media-libs/qimageblitz-0.0.4"
25 ;; 25 ;;
26 kdepim|kdepim-runtime) 26 kdepim|kdepim-runtime)
27 ! slot_is_at_least 4.4 ${SLOT} && COMMONDEPEND+=" $(add_kdebase_dep kdepimlibs)"
28 case ${PN} in 27 case ${PN} in
29 akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker) 28 akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker)
30 IUSE+=" +kontact" 29 IUSE+=" +kontact"
31 RDEPEND+=" kontact? ( $(add_kdebase_dep kontact) )" 30 RDEPEND+=" kontact? ( $(add_kdebase_dep kontact) )"
32 ;; 31 ;;
99# If set to "true", $KMMODULE doesn't have to be defined. 98# If set to "true", $KMMODULE doesn't have to be defined.
100# 99#
101# 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,
102# you mark the top subdirectory (containing the package) as $KMEXTRACTONLY, and 101# you mark the top subdirectory (containing the package) as $KMEXTRACTONLY, and
103# set KMNOMODULE="true". 102# set KMNOMODULE="true".
104if [[ -z ${KMMODULE} && ${KMNOMODULE} != true ]]; then 103if [[ -z ${KMMODULE} ]] && [[ ${KMNOMODULE} != true ]]; then
105 KMMODULE=${PN} 104 KMMODULE=${PN}
106fi 105fi
107 106
108# @ECLASS-VARIABLE: KMEXTRA 107# @ECLASS-VARIABLE: KMEXTRA
109# @DESCRIPTION: 108# @DESCRIPTION:
110# All subdirectories listed here will be extracted, compiled & installed. 109# All subdirectories listed here will be extracted, compiled & installed.
111# $KMMODULE is always added to $KMEXTRA. 110# $KMMODULE is always added to $KMEXTRA.
112# 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
113# 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
114# handled in the ebuild.
115# 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..
116 114
117# @ECLASS-VARIABLE: KMCOMPILEONLY 115# @ECLASS-VARIABLE: KMCOMPILEONLY
118# @DESCRIPTION: 116# @DESCRIPTION:
119# All subdirectories listed here will be extracted & compiled, but not installed. 117# All subdirectories listed here will be extracted & compiled, but not installed.
120 118
202 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed" 200 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed"
203 fi 201 fi
204 else 202 else
205 local abort tarball tarfile f extractlist moduleprefix postfix 203 local abort tarball tarfile f extractlist moduleprefix postfix
206 case ${PV} in 204 case ${PV} in
207 4.[34].8[05] | 4.[34].9[0568]) 205 4.[45].8[05] | 4.[45].9[023568])
208 # block for normally packed upstream unstable snapshots 206 # Block for normally packed upstream unstable snapshots
209 KMTARPARAMS+=" --bzip2" # bz2 207 KMTARPARAMS+=" --bzip2" # bz2
210 postfix="bz2" 208 postfix="bz2"
211 ;;
212 4.[34].[6-9]*)
213 # Not passing --xz, as it doesn't work with stable tar
214 KMTARPARAMS+=" --use-compress-program=xz" # xz
215 postfix="xz"
216 ;; 209 ;;
217 *) 210 *)
218 KMTARPARAMS+=" --bzip2" # bz2 211 KMTARPARAMS+=" --bzip2" # bz2
219 postfix="bz2" 212 postfix="bz2"
220 ;; 213 ;;
286# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY, 279# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY,
287# KMEXTRACTONLY and KMTARPARAMS. 280# KMEXTRACTONLY and KMTARPARAMS.
288kde4-meta_create_extractlists() { 281kde4-meta_create_extractlists() {
289 debug-print-function ${FUNCNAME} "$@" 282 debug-print-function ${FUNCNAME} "$@"
290 283
291 # TODO change to KMEXTRA for more strict check 284 # Add default handbook locations
285 # FIXME - legacy code - remove when 4.4.5 is gone or preferrably port 4.4.5.
292 if has handbook ${IUSE//+} && use handbook && [[ -n ${KMMODULE} ]]; then 286 if ! slot_is_at_least 4.5 ${SLOT} && has handbook ${IUSE//+} && use handbook && [[ -z ${KMNOMODULE} ]]; then
293 # We use the basename of $KMMODULE because $KMMODULE can contain 287 # We use the basename of $KMMODULE because $KMMODULE can contain
294 # the path to the module subdirectory. 288 # the path to the module subdirectory.
295 KMEXTRA_NONFATAL+=" 289 KMEXTRA_NONFATAL+="
296 doc/${KMMODULE##*/}" 290 doc/${KMMODULE##*/}"
291 fi
292
293 # Add default handbook locations
294 if [[ -z ${KMNOMODULE} ]] && { [[ ${KDE_HANDBOOK} = always ]] || { [[ ${KDE_HANDBOOK} = optional ]] && use handbook; }; }; then
295 KMEXTRA_NONFATAL+=" doc/${KMMODULE##*/}"
297 fi 296 fi
298 297
299 # Add some CMake-files to KMEXTRACTONLY. 298 # Add some CMake-files to KMEXTRACTONLY.
300 # Note that this actually doesn't include KMEXTRA handling. 299 # Note that this actually doesn't include KMEXTRA handling.
301 # In those cases you should care to add the relevant files to KMEXTRACTONLY 300 # In those cases you should care to add the relevant files to KMEXTRACTONLY
347 kdepim-version.h" 346 kdepim-version.h"
348 fi 347 fi
349 if has kontact ${IUSE//+} && use kontact; then 348 if has kontact ${IUSE//+} && use kontact; then
350 KMEXTRA+=" 349 KMEXTRA+="
351 kontact/plugins/${PLUGINNAME:-${PN}}/" 350 kontact/plugins/${PLUGINNAME:-${PN}}/"
352 if ! slot_is_at_least 4.4 ${SLOT}; then
353 KMEXTRACTONLY+="
354 kontactinterfaces/"
355 fi
356 fi 351 fi
357 ;; 352 ;;
358 kdeutils) 353 kdeutils)
359 KMEXTRACTONLY+=" 354 KMEXTRACTONLY+="
360 kdeutils-version.h" 355 kdeutils-version.h"
361 ;; 356 ;;
362 koffice) 357 koffice)
363 KMEXTRACTONLY+=" 358 KMEXTRACTONLY+="
364 config-endian.h.cmake
365 filters/config-filters.h.cmake 359 filters/config-filters.h.cmake
366 config-openexr.h.cmake
367 config-opengl.h.cmake
368 config-prefix.h.cmake
369 " 360 "
370 case ${PV} in 361 case ${PV} in
371 2.0.*) 362 2.0.*)
372 KMEXTRACTONLY+=" 363 KMEXTRACTONLY+="
373 config-openctl.h.cmake" 364 config-openctl.h.cmake
365 config-endian.h.cmake
366 config-openexr.h.cmake
367 config-opengl.h.cmake
368 config-prefix.h.cmake"
369 ;;
370 2.[12].*)
371 KMEXTRACTONLY+="
372 config-endian.h.cmake
373 config-openexr.h.cmake
374 config-opengl.h.cmake
375 config-prefix.h.cmake"
374 ;; 376 ;;
375 esac 377 esac
376 ;; 378 ;;
377 esac 379 esac
378 # Don't install cmake modules for split ebuilds, to avoid collisions. 380 # Don't install cmake modules for split ebuilds, to avoid collisions.
712 debug-print-function $FUNCNAME "$@" 714 debug-print-function $FUNCNAME "$@"
713 715
714 # Search ${S}/${KMMODULE} and install common documentation files found 716 # Search ${S}/${KMMODULE} and install common documentation files found
715 local doc 717 local doc
716 for doc in "${S}/${KMMODULE}"/{AUTHORS,CHANGELOG,ChangeLog*,README*,NEWS,TODO,HACKING}; do 718 for doc in "${S}/${KMMODULE}"/{AUTHORS,CHANGELOG,ChangeLog*,README*,NEWS,TODO,HACKING}; do
717 [[ -s "${doc}" ]] && dodoc "${doc}" 719 [[ -f "${doc}" ]] && [[ -s "${doc}" ]] && dodoc "${doc}"
718 done 720 done
719 721
720 kde4-base_src_install 722 kde4-base_src_install
721} 723}
722 724

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.44

  ViewVC Help
Powered by ViewVC 1.1.20