/[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.16 Revision 1.26
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 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.16 2009/03/15 15:27:13 alexxy Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.26 2009/10/06 18:02:12 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.
18 18
19if [[ -z ${KMNAME} ]]; then 19if [[ -z ${KMNAME} ]]; then
20 die "kde4-meta.eclass inherited but KMNAME not defined - broken ebuild" 20 die "kde4-meta.eclass inherited but KMNAME not defined - broken ebuild"
21fi 21fi
22 22
23case ${KDEBASE} in 23# Add khelpcenter dependency when installing handbooks
24 kde-base) 24if [[ ${PN} != khelpcenter ]] && has handbook ${IUSE//+}; then
25 HOMEPAGE="http://www.kde.org/" 25 RDEPEND+=" handbook? ( >=kde-base/khelpcenter-${PV}:${SLOT}[kdeprefix=] )"
26 LICENSE="GPL-2" 26fi
27 ;;
28 koffice)
29 HOMEPAGE="http://www.koffice.org/"
30 LICENSE="GPL-2"
31 ;;
32esac
33 27
34# Add dependencies that all packages in a certain module share. 28# Add dependencies that all packages in a certain module share.
35case ${KMNAME} in 29case ${KMNAME} in
36 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphic) 30 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphics)
37 DEPEND="${DEPEND}
38 >=kde-base/qimageblitz-0.0.4 31 COMMONDEPEND+=" >=kde-base/qimageblitz-0.0.4"
39 "
40 RDEPEND="${RDEPEND}
41 >=kde-base/qimageblitz-0.0.4
42 "
43 ;; 32 ;;
44 kdenetwork) 33 kdenetwork)
45 DEPEND="${DEPEND}
46 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=] 34 COMMONDEPEND+=" >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]"
47 "
48 RDEPEND="${RDEPEND}
49 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]
50 "
51 ;; 35 ;;
52 kdepim) 36 kdepim|kdepim-runtime)
53 DEPEND="${DEPEND} 37 COMMONDEPEND+="
54 dev-libs/boost
55 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]
56 "
57 RDEPEND="${RDEPEND}
58 dev-libs/boost 38 dev-libs/boost
59 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=] 39 >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]
60 " 40 "
61 case ${PN} in 41 case ${PN} in
62 akregator|kaddressbook|kjots|kmail|kmobiletools|knode|knotes|korganizer|ktimetracker) 42 akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker)
63 IUSE="+kontact" 43 IUSE+=" +kontact"
64 RDEPEND="${RDEPEND} 44 if ! slot_is_at_least 4.4 ${SLOT} || [[ ${SLOT} == 4.4 && ${PV} < 4.3.68 ]]; then
65 kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT}[kdeprefix=] ) 45 RDEPEND+=" kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT}[kdeprefix=] )"
66 " 46 fi
67 ;; 47 ;;
68 esac 48 esac
69 ;; 49 ;;
70 kdegames) 50 kdegames)
71 if [[ ${PN} != libkdegames ]]; then 51 if [[ ${PN} != libkdegames ]]; then
72 DEPEND="${DEPEND}
73 >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=] 52 COMMONDEPEND+=" >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=] "
74 "
75 RDEPEND="${RDEPEND}
76 >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=]
77 "
78 fi 53 fi
79 ;; 54 ;;
80 koffice) 55 koffice)
81 [[ ${PN} != koffice-data ]] && IUSE="debug" 56 [[ ${PN} != koffice-data ]] && IUSE+=" debug"
82 case ${PV} in 57 RDEPEND+="
83 9999*)
84 DEPEND="${DEPEND}
85 !app-office/${PN}:2
86 "
87 ;;
88 1.9*|2*)
89 DEPEND="${DEPEND}
90 !app-office/${PN}:live
91 "
92 ;;
93 esac
94 DEPEND="${DEPEND}
95 !app-office/${PN}:0 58 !app-office/${PN}:0
96 !app-office/koffice:0 59 !app-office/koffice:0
97 !app-office/koffice-meta:0 60 !app-office/koffice-meta:0
98 " 61 "
99 case ${PN} in 62 if has openexr ${IUSE//+}; then
100 koffice-data) 63 COMMONDEPEND+=" media-gfx/imagemagick[openexr?]"
101 DEPEND="${DEPEND} 64 else
102 media-libs/lcms 65 COMMONDEPEND+=" media-gfx/imagemagick"
103 " 66 fi
104 RDEPEND="${RDEPEND} 67
105 media-libs/lcms
106 "
107 ;;
108 *)
109 COMMON_DEPEND=" 68 COMMONDEPEND+="
110 dev-cpp/eigen:2 69 dev-cpp/eigen:2
111 media-gfx/imagemagick[openexr?]
112 media-libs/fontconfig 70 media-libs/fontconfig
113 media-libs/freetype:2 71 media-libs/freetype:2
114 " 72 "
115 DEPEND="${DEPEND} ${COMMON_DEPEND}"
116 RDEPEND="${RDEPEND} ${COMMON_DEPEND}"
117 unset COMMON_DEPEND
118 if [[ ${PN} != koffice-libs && ${PN} != koffice-data ]]; then 73 if [[ ${PN} != koffice-libs && ${PN} != koffice-data ]]; then
119 DEPEND="${DEPEND} 74 COMMONDEPEND+=" >=app-office/koffice-libs-${PV}:${SLOT}"
120 >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=]
121 "
122 RDEPEND="${RDEPEND}
123 >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=]
124 "
125 fi 75 fi
126 ;;
127 esac
128 ;; 76 ;;
129esac 77esac
78
79DEPEND+=" ${COMMONDEPEND}"
80RDEPEND+=" ${COMMONDEPEND}"
81unset COMMONDEPEND
130 82
131debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after metapackage-specific dependencies" 83debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after metapackage-specific dependencies"
132debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-specific dependencies" 84debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-specific dependencies"
133 85
134# Useful to build kde4-meta style stuff from extragear/playground (plasmoids etc) 86# Useful to build kde4-meta style stuff from extragear/playground (plasmoids etc)
135case ${BUILD_TYPE} in 87case ${BUILD_TYPE} in
136 live) 88 live)
137 case ${KMNAME} in 89 case ${KMNAME} in
138 extragear*|playground*) 90 extragear*|playground*)
139 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}" 91 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}"
92 ESVN_PROJECT="${KMNAME}${ESVN_PROJECT_SUFFIX}"
140 ;; 93 ;;
141 esac 94 esac
142 ;; 95 ;;
143 *) ;;
144esac 96esac
145 97
146# @ECLASS-VARIABLE: KMNAME 98# @ECLASS-VARIABLE: KMNAME
147# @DESCRIPTION: 99# @DESCRIPTION:
148# Name of the parent-module (e.g. kdebase, kdepim, ...). You _must_ set it 100# Name of the parent-module (e.g. kdebase, kdepim, ...). You _must_ set it
170 122
171# @ECLASS-VARIABLE: KMEXTRA 123# @ECLASS-VARIABLE: KMEXTRA
172# @DESCRIPTION: 124# @DESCRIPTION:
173# All subdirectories listed here will be extracted, compiled & installed. 125# All subdirectories listed here will be extracted, compiled & installed.
174# $KMMODULE is always added to $KMEXTRA. 126# $KMMODULE is always added to $KMEXTRA.
175# If the htmlhandbook USE-flag is set, and if this directory exists, 127# If the handbook USE-flag is set, and if this directory exists,
176# then "doc/$KMMODULE" is added to $KMEXTRA. In other cases, this should be 128# then "doc/$KMMODULE" is added to $KMEXTRA. In other cases, this should be
177# handled in the ebuild. 129# handled in the ebuild.
178# If the documentation is in a different subdirectory, you should add it to KMEXTRA. 130# If the documentation is in a different subdirectory, you should add it to KMEXTRA.
179 131
180# @ECLASS-VARIABLE: KMCOMPILEONLY 132# @ECLASS-VARIABLE: KMCOMPILEONLY
265 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed" 217 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed"
266 fi 218 fi
267 else 219 else
268 local abort tarball tarfile f extractlist moduleprefix postfix 220 local abort tarball tarfile f extractlist moduleprefix postfix
269 case ${PV} in 221 case ${PV} in
270 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) 222 4.3.85 | 4.3.9[0568])
223 # block for normally packed upstream unstable snapshots
224 KMTARPARAMS+=" --bzip2" # bz2
225 postfix="bz2"
226 ;;
227 4.3.[6-9]*)
271 KMTARPARAMS="${KMTARPARAMS} --lzma" # lzma 228 KMTARPARAMS+=" --lzma" # lzma
272 postfix="lzma" 229 postfix="lzma"
273 ;; 230 ;;
274 *) 231 *)
275 KMTARPARAMS="${KMTARPARAMS} --bzip2" # bz2 232 KMTARPARAMS+=" --bzip2" # bz2
276 postfix="bz2" 233 postfix="bz2"
277 ;; 234 ;;
278 esac 235 esac
279 case ${KMNAME} in 236 case ${KMNAME} in
280 kdebase-apps) 237 kdebase-apps)
281 # kdebase/apps -> kdebasa-apps 238 # kdebase/apps -> kdebase-apps
282 tarball="kdebase-${PV}.tar.${postfix}" 239 tarball="kdebase-${PV}.tar.${postfix}"
283 # Go one level deeper for kdebase-apps in tarballs 240 # Go one level deeper for kdebase-apps in tarballs
284 moduleprefix=apps/ 241 moduleprefix=apps/
285 KMTARPARAMS="${KMTARPARAMS} --transform=s|apps/||" 242 KMTARPARAMS+=" --transform=s|apps/||"
286 ;; 243 ;;
287 *) 244 *)
288 # Create tarball name from module name (this is the default) 245 # Create tarball name from module name (this is the default)
289 tarball="${KMNAME}-${PV}.tar.${postfix}" 246 tarball="${KMNAME}-${PV}.tar.${postfix}"
290 ;; 247 ;;
291 esac 248 esac
292 249
293 # Full patch to source tarball 250 # Full path to source tarball
294 tarfile="${DISTDIR}/${tarball}" 251 tarfile="${DISTDIR}/${tarball}"
295 252
296 # Detect real toplevel dir from tarball name - it will be used upon extraction 253 # Detect real toplevel dir from tarball name - it will be used upon extraction
297 # and in __list_needed_subdirectories 254 # and in __list_needed_subdirectories
298 topdir="${tarball%.tar.*}/" 255 topdir="${tarball%.tar.*}/"
302 kde4-meta_create_extractlists 259 kde4-meta_create_extractlists
303 260
304 for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake \ 261 for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake \
305 AUTHORS COPYING INSTALL README NEWS ChangeLog 262 AUTHORS COPYING INSTALL README NEWS ChangeLog
306 do 263 do
307 extractlist="${extractlist} ${topdir}${moduleprefix}${f}" 264 extractlist+=" ${topdir}${moduleprefix}${f}"
308 done 265 done
309 extractlist="${extractlist} $(__list_needed_subdirectories)" 266 extractlist+=" $(__list_needed_subdirectories)"
310 267
311 pushd "${WORKDIR}" > /dev/null 268 pushd "${WORKDIR}" > /dev/null
312 [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} >&2 269 [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} >&2
313 tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null 270 tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null
314 271
343# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY, 300# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY,
344# KMEXTRACTONLY and KMTARPARAMS. 301# KMEXTRACTONLY and KMTARPARAMS.
345kde4-meta_create_extractlists() { 302kde4-meta_create_extractlists() {
346 debug-print-function ${FUNCNAME} "$@" 303 debug-print-function ${FUNCNAME} "$@"
347 304
305 # TODO change to KMEXTRA for more strict check
348 if has htmlhandbook ${IUSE//+} && use htmlhandbook; then 306 if has handbook ${IUSE//+} && use handbook && [[ -n ${KMMODULE} ]]; then
349 # We use the basename of $KMMODULE because $KMMODULE can contain 307 # We use the basename of $KMMODULE because $KMMODULE can contain
350 # the path to the module subdirectory. 308 # the path to the module subdirectory.
351 KMEXTRA_NONFATAL="${KMEXTRA_NONFATAL} doc/${KMMODULE##*/}" 309 KMEXTRA_NONFATAL+="
310 doc/${KMMODULE##*/}"
352 fi 311 fi
353 312
354 # Add some CMake-files to KMEXTRACTONLY. 313 # Add some CMake-files to KMEXTRACTONLY.
355 # Note that this actually doesn't include KMEXTRA handling. 314 # Note that this actually doesn't include KMEXTRA handling.
356 # In those cases you should care to add the relevant files to KMEXTRACTONLY 315 # In those cases you should care to add the relevant files to KMEXTRACTONLY
357 case ${KMNAME} in 316 case ${KMNAME} in
358 kdebase) 317 kdebase)
359 KMEXTRACTONLY="${KMEXTRACTONLY} 318 KMEXTRACTONLY+="
360 apps/config-apps.h.cmake 319 apps/config-apps.h.cmake
361 apps/ConfigureChecks.cmake" 320 apps/ConfigureChecks.cmake"
362 ;; 321 ;;
363 kdebase-apps) 322 kdebase-apps)
364 KMEXTRACTONLY="${KMEXTRACTONLY} 323 KMEXTRACTONLY+="
365 config-apps.h.cmake 324 config-apps.h.cmake
366 ConfigureChecks.cmake" 325 ConfigureChecks.cmake"
367 ;; 326 ;;
368 kdebase-runtime) 327 kdebase-runtime)
369 KMEXTRACTONLY="${KMEXTRACTONLY} 328 KMEXTRACTONLY+="
370 config-runtime.h.cmake" 329 config-runtime.h.cmake"
371 ;; 330 ;;
372 kdebase-workspace) 331 kdebase-workspace)
373 KMEXTRACTONLY="${KMEXTRACTONLY} 332 KMEXTRACTONLY+="
374 config-unix.h.cmake 333 config-unix.h.cmake
375 ConfigureChecks.cmake 334 ConfigureChecks.cmake
376 config-workspace.h.cmake 335 config-workspace.h.cmake
377 config-X11.h.cmake 336 config-X11.h.cmake
378 startkde.cmake 337 startkde.cmake
379 KDE4WorkspaceConfig.cmake.in" 338 KDE4WorkspaceConfig.cmake.in"
380 ;; 339 ;;
381 kdegames) 340 kdegames)
382 if [[ ${PN} != libkdegames ]]; then 341 if [[ ${PN} != libkdegames ]]; then
383 KMEXTRACTONLY="${KMEXTRACTONLY} 342 KMEXTRACTONLY+="
384 libkdegames" 343 libkdegames/"
385 fi 344 fi
386 ;; 345 ;;
387 kdepim) 346 kdepim)
388 if [[ ${PN} != libkdepim ]]; then 347 if [[ ${PN} != libkdepim ]]; then
389 KMEXTRACTONLY="${KMEXTRACTONLY} 348 KMEXTRACTONLY+="
390 libkdepim" 349 libkdepim/"
391 fi 350 fi
392 case ${SLOT} in 351 case ${SLOT} in
393 4.3|live) 352 4.3|4.4|live)
394 KMEXTRACTONLY="${KMEXTRACTONLY} 353 KMEXTRACTONLY+="
395 kdepim-version.h 354 kdepim-version.h
396 config-enterprise.h.cmake" 355 config-enterprise.h.cmake"
397 ;; 356 ;;
398 esac 357 esac
399 KMEXTRACTONLY="${KMEXTRACTONLY} 358 KMEXTRACTONLY+="
400 kleopatra/ConfigureChecks.cmake" 359 kleopatra/ConfigureChecks.cmake"
401 if has kontact ${IUSE//+} && use kontact; then 360 if has kontact ${IUSE//+} && use kontact; then
361 KMEXTRA+="
402 KMEXTRA="${KMEXTRA} kontact/plugins/${PLUGINNAME:-${PN}}" 362 kontact/plugins/${PLUGINNAME:-${PN}}/"
403 KMEXTRACTONLY="${KMEXTRACTONLY} kontactinterfaces/" 363 if ! slot_is_at_least 4.4 ${SLOT} || [[ ${SLOT} == 4.4 && ${PV} < 4.3.68 ]]; then
364 KMEXTRACTONLY+="
365 kontactinterfaces/"
366 fi
404 fi 367 fi
405 ;; 368 ;;
369 kdeutils)
370 case ${SLOT} in
371 4.3|4.4|live)
372 KMEXTRACTONLY+="
373 kdeutils-version.h"
374 ;;
375 esac
376 ;;
406 koffice) 377 koffice)
407 KMEXTRACTONLY="${KMEXTRACTONLY} 378 KMEXTRACTONLY+="
408 config-endian.h.cmake 379 config-endian.h.cmake
409 filters/config-filters.h.cmake 380 filters/config-filters.h.cmake
410 config-openctl.h.cmake
411 config-openexr.h.cmake 381 config-openexr.h.cmake
412 config-opengl.h.cmake 382 config-opengl.h.cmake
413 config-prefix.h.cmake" 383 config-prefix.h.cmake
384 "
385 case ${PV} in
386 2.0.*)
387 KMEXTRACTONLY+="
388 config-openctl.h.cmake"
389 ;;
390 esac
414 ;; 391 ;;
415 esac 392 esac
416 # Don't install cmake modules for split ebuilds, to avoid collisions. 393 # Don't install cmake modules for split ebuilds, to avoid collisions.
417 case ${KMNAME} in 394 case ${KMNAME} in
395 kdepim)
396 # No need for unpack since 4.2.86
397 # Remove when 4.2 is wiped out from the tree
398 case ${PV} in
399 4.2.[0-4])
400 KMCOMPILEONLY+="
401 cmake/modules/"
402 ;;
403 esac
404 ;;
418 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics|kdepim) 405 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics)
419 case ${PN} in 406 case ${PN} in
420 libkdegames|libkdeedu|marble|libkworkspace) 407 libkdegames|libkdeedu|libkworkspace)
421 KMEXTRA="${KMEXTRA} 408 KMEXTRA+="
422 cmake/modules/" 409 cmake/modules/"
423 ;; 410 ;;
424 *) 411 *)
425 KMCOMPILEONLY="${KMCOMPILEONLY} 412 KMCOMPILEONLY+="
426 cmake/modules/" 413 cmake/modules/"
427 ;; 414 ;;
428 esac 415 esac
429 ;; 416 ;;
430 esac 417 esac
435__list_needed_subdirectories() { 422__list_needed_subdirectories() {
436 local i j kmextra kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist 423 local i j kmextra kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist
437 424
438 # We expand KMEXTRA by adding CMakeLists.txt files 425 # We expand KMEXTRA by adding CMakeLists.txt files
439 kmextra="${KMEXTRA}" 426 kmextra="${KMEXTRA}"
440 [[ ${1} != fatal ]] && kmextra="${kmextra} ${KMEXTRA_NONFATAL}" 427 [[ ${1} != fatal ]] && kmextra+=" ${KMEXTRA_NONFATAL}"
441 for i in ${kmextra}; do 428 for i in ${kmextra}; do
442 kmextra_expanded="${kmextra_expanded} ${i}" 429 kmextra_expanded+=" ${i}"
443 j=$(dirname ${i}) 430 j=$(dirname ${i})
444 while [[ ${j} != "." ]]; do 431 while [[ ${j} != "." ]]; do
445 kmextra_expanded="${kmextra_expanded} ${j}/CMakeLists.txt"; 432 kmextra_expanded+=" ${j}/CMakeLists.txt";
446 j=$(dirname ${j}) 433 j=$(dirname ${j})
447 done 434 done
448 done 435 done
449 436
450 # Expand KMMODULE 437 # Expand KMMODULE
451 if [[ -n ${KMMODULE} ]]; then 438 if [[ -n ${KMMODULE} ]]; then
452 kmmodule_expanded="${KMMODULE}" 439 kmmodule_expanded="${KMMODULE}"
453 j=$(dirname ${KMMODULE}) 440 j=$(dirname ${KMMODULE})
454 while [[ ${j} != "." ]]; do 441 while [[ ${j} != "." ]]; do
455 kmmodule_expanded="${kmmodule_expanded} ${j}/CMakeLists.txt"; 442 kmmodule_expanded+=" ${j}/CMakeLists.txt";
456 j=$(dirname ${j}) 443 j=$(dirname ${j})
457 done 444 done
458 fi 445 fi
459 446
460 # Expand KMCOMPILEONLY 447 # Expand KMCOMPILEONLY
461 for i in ${KMCOMPILEONLY}; do 448 for i in ${KMCOMPILEONLY}; do
462 kmcompileonly_expanded="${kmcompileonly_expanded} ${i}" 449 kmcompileonly_expanded+=" ${i}"
463 j=$(dirname ${i}) 450 j=$(dirname ${i})
464 while [[ ${j} != "." ]]; do 451 while [[ ${j} != "." ]]; do
465 kmcompileonly_expanded="${kmcompileonly_expanded} ${j}/CMakeLists.txt"; 452 kmcompileonly_expanded+=" ${j}/CMakeLists.txt";
466 j=$(dirname ${j}) 453 j=$(dirname ${j})
467 done 454 done
468 done 455 done
469 456
470 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmextra_expanded: ${kmextra_expanded}" 457 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmextra_expanded: ${kmextra_expanded}"
474 # Create final list of stuff to extract 461 # Create final list of stuff to extract
475 # We append topdir only when specified (usually for tarballs) 462 # We append topdir only when specified (usually for tarballs)
476 for i in ${kmmodule_expanded} ${kmextra_expanded} ${kmcompileonly_expanded} \ 463 for i in ${kmmodule_expanded} ${kmextra_expanded} ${kmcompileonly_expanded} \
477 ${KMEXTRACTONLY} 464 ${KMEXTRACTONLY}
478 do 465 do
479 extractlist="${extractlist} ${topdir}${moduleprefix}${i}" 466 extractlist+=" ${topdir}${moduleprefix}${i}"
480 done 467 done
481 468
482 echo ${extractlist} 469 echo ${extractlist}
483} 470}
484 471
586 sed -i -e '/startkde/s/^/#DONOTINSTALL /' "${S}"/CMakeLists.txt || \ 573 sed -i -e '/startkde/s/^/#DONOTINSTALL /' "${S}"/CMakeLists.txt || \
587 die "${LINENO}: sed died in the kdebase-startkde collision prevention section" 574 die "${LINENO}: sed died in the kdebase-startkde collision prevention section"
588 fi 575 fi
589 # Strip EXPORT feature section from workspace for KDE4 versions > 4.1.82 576 # Strip EXPORT feature section from workspace for KDE4 versions > 4.1.82
590 if [[ ${PN} != libkworkspace ]]; then 577 if [[ ${PN} != libkworkspace ]]; then
578 sed -i \
591 sed -i -e '/install(FILES ${CMAKE_CURRENT_BINARY_DIR}\/KDE4WorkspaceConfig.cmake/,/^[[:space:]]*FILE KDE4WorkspaceLibraryTargets.cmake )[[:space:]]*^/d' \ 579 -e '/install(FILES ${CMAKE_CURRENT_BINARY_DIR}\/KDE4WorkspaceConfig.cmake/,/^[[:space:]]*FILE KDE4WorkspaceLibraryTargets.cmake )[[:space:]]*^/d' \
592 CMakeLists.txt || die "${LINENO}: sed died in kdebase-workspace strip EXPORT section" 580 CMakeLists.txt || die "${LINENO}: sed died in kdebase-workspace strip config install and fix EXPORT section"
593 fi 581 fi
594 ;; 582 ;;
595 kdebase-runtime) 583 kdebase-runtime)
596 # COLLISION PROTECT section 584 # COLLISION PROTECT section
597 # Only install the kde4 script as part of kde-base/kdebase-data 585 # Only install the kde4 script as part of kde-base/kdebase-data
607 -e '/add_custom_target(kmail_xml /,/)/p' "${S}"/kmail/CMakeLists.txt || die "uncommenting xml failed" 595 -e '/add_custom_target(kmail_xml /,/)/p' "${S}"/kmail/CMakeLists.txt || die "uncommenting xml failed"
608 _change_cmakelists_parent_dirs kmail 596 _change_cmakelists_parent_dirs kmail
609 ;; 597 ;;
610 esac 598 esac
611 ;; 599 ;;
600 kdewebdev)
601 # Disable hardcoded kdepimlibs check
602 sed -e 's/find_package(KdepimLibs REQUIRED)/macro_optional_find_package(KdepimLibs)/' \
603 -e 's/find_package(LibXml2 REQUIRED)/macro_optional_find_package(LibXml2)/' \
604 -e 's/find_package(LibXslt REQUIRED)/macro_optional_find_package(LibXslt)/' \
605 -e 's/find_package(Boost REQUIRED)/macro_optional_find_package(Boost)/' \
606 -i CMakeLists.txt || die "failed to disable hardcoded checks"
607 ;;
612 koffice) 608 koffice)
613 # prevent collisions 609 # prevent collisions
614 if [[ ${PN} != koffice-data ]]; then 610 if [[ ${PN} != koffice-data ]]; then
615 sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \ 611 sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \
616 "${S}"/cmake/modules/CMakeLists.txt || \ 612 "${S}"/cmake/modules/CMakeLists.txt || \
617 die "${LINENO}: sed died in collision prevention section" 613 die "${LINENO}: sed died in collision prevention section"
618 sed -i -n -e '1h;1!H;${g;s/install(.\+config-openexr.h.\+)//;p}' \ 614 sed -i -e '/install(.\+config-openexr\.h.\+)/d' \
619 "${S}"/CMakeLists.txt || \ 615 "${S}"//CMakeLists.txt || \
620 die "${LINENO}: sed died in collision prevention section" 616 die "${LINENO}: sed died in collision prevention section"
621 fi 617 fi
622 esac 618 esac
623 619
624 popd > /dev/null 620 popd > /dev/null
629# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split 625# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split
630# ebuilds. 626# ebuilds.
631kde4-meta_src_configure() { 627kde4-meta_src_configure() {
632 debug-print-function ${FUNCNAME} "$@" 628 debug-print-function ${FUNCNAME} "$@"
633 629
630 # Set some cmake default values here (usually workarounds for automagic deps)
631 case ${KMNAME} in
632 kdewebdev)
633 mycmakeargs="
634 -DWITH_KdepimLibs=OFF
635 -DWITH_LibXml2=OFF
636 -DWITH_LibXslt=OFF
637 -DWITH_Boost=OFF
638 -DWITH_LibTidy=OFF
639 ${mycmakeargs}"
640 ;;
641 esac
642
634 kde4-base_src_configure 643 kde4-base_src_configure
635} 644}
636 645
637# @FUNCTION: kde4-meta_src_compile 646# @FUNCTION: kde4-meta_src_compile
638# @DESCRIPTION: 647# @DESCRIPTION:
639# General function for compiling split KDE4 applications. 648# General function for compiling split KDE4 applications.
640# Overrides kde4-base_src_compile. 649# Overrides kde4-base_src_compile.
641kde4-meta_src_compile() { 650kde4-meta_src_compile() {
642 debug-print-function ${FUNCNAME} "$@" 651 debug-print-function ${FUNCNAME} "$@"
643 652
644 kde4-base_src_compile 653 kde4-base_src_compile "$@"
645} 654}
646 655
647# @FUNCTION: kde4-meta_src_test 656# @FUNCTION: kde4-meta_src_test
648# @DESCRIPTION: 657# @DESCRIPTION:
649# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split 658# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split
658# @DESCRIPTION: 667# @DESCRIPTION:
659# Function for installing KDE4 split applications. 668# Function for installing KDE4 split applications.
660kde4-meta_src_install() { 669kde4-meta_src_install() {
661 debug-print-function $FUNCNAME "$@" 670 debug-print-function $FUNCNAME "$@"
662 671
663 kde4-meta_src_make_doc 672 kde4-base_src_install
664 cmake-utils_src_install
665
666 if [[ -n ${KMSAVELIBS} ]]; then
667 install_library_dependencies
668 fi
669} 673}
670 674
671# @FUNCTION: kde4-meta_src_make_doc 675# @FUNCTION: kde4-meta_src_make_doc
672# @DESCRIPTION: 676# @DESCRIPTION:
673# This function searches in ${S}/${KMMODULE}, 677# This function searches in ${S}/${KMMODULE},
674# and tries to install "AUTHORS ChangeLog* README* NEWS todo" if these files exist. 678# and tries to install "AUTHORS ChangeLog* README* NEWS TODO" if these files exist.
675kde4-meta_src_make_doc() { 679kde4-meta_src_make_doc() {
676 debug-print-function ${FUNCNAME} "$@" 680 debug-print-function ${FUNCNAME} "$@"
677 681
678 local doc 682 local doc
679 for doc in AUTHORS ChangeLog* README* NEWS TODO; do 683 for doc in AUTHORS ChangeLog* README* NEWS TODO; do
683 kde4-base_src_make_doc 687 kde4-base_src_make_doc
684} 688}
685 689
686# @FUNCTION: kde4-meta_pkg_postinst 690# @FUNCTION: kde4-meta_pkg_postinst
687# @DESCRIPTION: 691# @DESCRIPTION:
688# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split 692# Display information about application handbook and invoke kbuildsycoca4.
689# ebuilds.
690kde4-meta_pkg_postinst() { 693kde4-meta_pkg_postinst() {
691 debug-print-function ${FUNCNAME} "$@" 694 debug-print-function ${FUNCNAME} "$@"
695
696 if has handbook ${IUSE//+} && ! use handbook; then
697 echo
698 einfo "Application handbook for ${PN} has not been installed."
699 einfo "To install handbook, reemerge =${CATEGORY}/${PF} with 'handbook' USE flag."
700 echo
701 fi
692 702
693 kde4-base_pkg_postinst 703 kde4-base_pkg_postinst
694} 704}
695 705
696# @FUNCTION: kde4-meta_pkg_postrm 706# @FUNCTION: kde4-meta_pkg_postrm

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.26

  ViewVC Help
Powered by ViewVC 1.1.20