| 1 | # Copyright 2007-2008 Gentoo Foundation |
1 | # Copyright 2007-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-base.eclass,v 1.15 2008/10/11 03:05:37 jmbsvicetto Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.20 2009/01/03 18:20:00 scarabeus Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: kde4-base.eclass |
5 | # @ECLASS: kde4-base.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # kde@gentoo.org |
7 | # kde@gentoo.org |
| 8 | # @BLURB: This eclass provides functions for kde 4.X ebuilds |
8 | # @BLURB: This eclass provides functions for kde 4.X ebuilds |
| … | |
… | |
| 16 | |
16 | |
| 17 | inherit base cmake-utils eutils kde4-functions multilib |
17 | inherit base cmake-utils eutils kde4-functions multilib |
| 18 | |
18 | |
| 19 | case "${EAPI}" in |
19 | case "${EAPI}" in |
| 20 | 2) |
20 | 2) |
| 21 | EXPORT_FUNCTIONS pkg_setup src_unpack src_configure src_compile src_test src_install pkg_postinst pkg_postrm |
21 | EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm |
| 22 | ;; |
22 | ;; |
| 23 | *) |
23 | *) |
| 24 | EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_test src_install pkg_postinst pkg_postrm |
24 | EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_test src_install pkg_postinst pkg_postrm |
| 25 | ;; |
25 | ;; |
| 26 | esac |
26 | esac |
| … | |
… | |
| 82 | *) |
82 | *) |
| 83 | OPENGL_REQUIRED="never" |
83 | OPENGL_REQUIRED="never" |
| 84 | ;; |
84 | ;; |
| 85 | esac |
85 | esac |
| 86 | |
86 | |
| 87 | COMMONDEPEND="${COMMONDEPEND} ${qtdepend}" |
87 | COMMONDEPEND="${COMMONDEPEND} ${qtdepend} !x11-libs/qt-phonon" |
| 88 | } |
88 | } |
| 89 | kde4-base_set_qt_dependencies |
89 | kde4-base_set_qt_dependencies |
| 90 | |
90 | |
| 91 | # Set the cmake dependencies |
91 | # Set the cmake dependencies |
| 92 | case "${PV}" in |
92 | case "${PV}" in |
| … | |
… | |
| 289 | fi |
289 | fi |
| 290 | done |
290 | done |
| 291 | ;; |
291 | ;; |
| 292 | esac |
292 | esac |
| 293 | |
293 | |
|
|
294 | # Adding kdelibs, kdepimlibs and kdebase-data deps to all other packages. |
| 294 | # We only need to add the dependencies if ${PN} is not "kdelibs" or "kdepimlibs" |
295 | # We only need to add the dependencies if ${PN} is not "kdelibs" or "kdepimlibs" |
| 295 | if [[ ${PN} != "kdelibs" ]]; then |
296 | if [[ ${PN} != "kdelibs" ]]; then |
| 296 | case "${EAPI}" in |
297 | case "${EAPI}" in |
| 297 | 2 | 2_pre3 | 2_pre2 | 2_pre1) |
298 | 2 | 2_pre3 | 2_pre2 | 2_pre1) |
| 298 | DEPEND="${DEPEND} ${_operator}kde-base/kdelibs${_pv}[kdeprefix=]" |
299 | DEPEND="${DEPEND} ${_operator}kde-base/kdelibs${_pv}[kdeprefix=]" |
| … | |
… | |
| 310 | RDEPEND="${RDEPEND} ${_operator}kde-base/kdepimlibs${_pv}[kdeprefix=]" |
311 | RDEPEND="${RDEPEND} ${_operator}kde-base/kdepimlibs${_pv}[kdeprefix=]" |
| 311 | ;; |
312 | ;; |
| 312 | *) |
313 | *) |
| 313 | DEPEND="${DEPEND} ${_operator}kde-base/kdepimlibs${_pv}" |
314 | DEPEND="${DEPEND} ${_operator}kde-base/kdepimlibs${_pv}" |
| 314 | RDEPEND="${RDEPEND} ${_operator}kde-base/kdepimlibs${_pv}" |
315 | RDEPEND="${RDEPEND} ${_operator}kde-base/kdepimlibs${_pv}" |
|
|
316 | esac |
|
|
317 | if [[ ${PN} != "kdebase-data" ]]; then |
|
|
318 | case "${EAPI}" in |
|
|
319 | 2) |
|
|
320 | RDEPEND="${RDEPEND} ${_operator}kde-base/kdebase-data${_pv}[kdeprefix=]" |
|
|
321 | ;; |
|
|
322 | *) |
|
|
323 | RDEPEND="${RDEPEND} ${_operator}kde-base/kdebase-data${_pv}" |
|
|
324 | ;; |
| 315 | esac |
325 | esac |
|
|
326 | fi |
| 316 | fi |
327 | fi |
| 317 | fi |
328 | fi |
| 318 | |
329 | |
| 319 | unset _operator _pv |
330 | unset _operator _pv |
| 320 | fi |
331 | fi |
| … | |
… | |
| 499 | if [[ -z $* ]]; then |
510 | if [[ -z $* ]]; then |
| 500 | # Unpack first and deal with KDE patches after examing possible patch sets. |
511 | # Unpack first and deal with KDE patches after examing possible patch sets. |
| 501 | # To be picked up, patches need to conform to the guidelines stated before. |
512 | # To be picked up, patches need to conform to the guidelines stated before. |
| 502 | # Monolithic ebuilds will use the split ebuild patches. |
513 | # Monolithic ebuilds will use the split ebuild patches. |
| 503 | [[ -d "${KDE_S}" ]] || unpack ${A} |
514 | [[ -d "${KDE_S}" ]] || unpack ${A} |
| 504 | kde4-base_apply_patches |
515 | base_src_unpack $* |
| 505 | else |
516 | else |
| 506 | # Call base_src_unpack, which unpacks and patches |
517 | # Call base_src_unpack, which unpacks and patches |
| 507 | # step by step transparently as defined in the ebuild. |
518 | # step by step transparently as defined in the ebuild. |
| 508 | base_src_unpack $* |
519 | base_src_unpack $* |
| 509 | fi |
520 | fi |
| … | |
… | |
| 518 | |
529 | |
| 519 | # Only enable selected languages, used for KDE extragear apps. |
530 | # Only enable selected languages, used for KDE extragear apps. |
| 520 | if [[ -n ${KDE_LINGUAS} ]]; then |
531 | if [[ -n ${KDE_LINGUAS} ]]; then |
| 521 | enable_selected_linguas |
532 | enable_selected_linguas |
| 522 | fi |
533 | fi |
|
|
534 | } |
|
|
535 | |
|
|
536 | |
|
|
537 | # transition function so we will be compatible with soon to come eclasses |
|
|
538 | kde4-base_src_prepare() { |
|
|
539 | echo |
| 523 | } |
540 | } |
| 524 | |
541 | |
| 525 | # @FUNCTION: kde4-base_src_compile |
542 | # @FUNCTION: kde4-base_src_compile |
| 526 | # @DESCRIPTION: |
543 | # @DESCRIPTION: |
| 527 | # General function for compiling KDE4 applications. |
544 | # General function for compiling KDE4 applications. |