| 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.18 2008/11/22 01:23:31 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 |
| … | |
… | |
| 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 |
| … | |
… | |
| 520 | if [[ -n ${KDE_LINGUAS} ]]; then |
531 | if [[ -n ${KDE_LINGUAS} ]]; then |
| 521 | enable_selected_linguas |
532 | enable_selected_linguas |
| 522 | fi |
533 | fi |
| 523 | } |
534 | } |
| 524 | |
535 | |
|
|
536 | |
|
|
537 | # transition function so we will be compatible with soon to come eclasses |
|
|
538 | kde4-base_src_prepare() { |
|
|
539 | echo |
|
|
540 | } |
|
|
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. |
| 528 | kde4-base_src_compile() { |
545 | kde4-base_src_compile() { |
| 529 | debug-print-function ${FUNCNAME} "$@" |
546 | debug-print-function ${FUNCNAME} "$@" |