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

Diff of /eclass/kde4-base.eclass

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

Revision 1.30 Revision 1.31
1# Copyright 2007-2009 Gentoo Foundation 1# Copyright 2007-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-base.eclass,v 1.30 2009/03/01 11:44:09 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.31 2009/03/09 19:41:26 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
11# and KDE4 applications. 11# and KDE4 applications.
12# 12#
13# NOTE: KDE 4 ebuilds by default define EAPI="2", this can be redefined but 13# NOTE: KDE 4 ebuilds by default define EAPI="2", this can be redefined but
14# eclass will fail with version older than 2. 14# eclass will fail with version older than 2.
15 15
16inherit base cmake-utils eutils multilib kde4-functions 16inherit base cmake-utils eutils kde4-functions
17 17
18get_build_type 18get_build_type
19if [[ ${BUILD_TYPE} = live ]]; then 19if [[ ${BUILD_TYPE} = live ]]; then
20 inherit subversion 20 inherit subversion
21fi 21fi
34 x11-libs/qt-qt3support:4[accessibility] 34 x11-libs/qt-qt3support:4[accessibility]
35 x11-libs/qt-script:4 35 x11-libs/qt-script:4
36 x11-libs/qt-sql:4[qt3support] 36 x11-libs/qt-sql:4[qt3support]
37 x11-libs/qt-svg:4 37 x11-libs/qt-svg:4
38 x11-libs/qt-test:4 38 x11-libs/qt-test:4
39 "
40 qtwebkitdepend="
39 x11-libs/qt-webkit:4" 41 x11-libs/qt-webkit:4
40 qtopengldepend="x11-libs/qt-opengl:4" 42 "
43 qtopengldepend="
44 x11-libs/qt-opengl:4
45 "
41 46
47 case ${WEBKIT_REQUIRED} in
48 always)
49 qtdepend="${qtdepend}
50 ${qtwebkitdepend}"
51 ;;
52 optional)
53 IUSE="${IUSE} webkit"
54 qtdepend="${qtdepend}
55 webkit? ( ${qtwebkitdepend} )
56 "
57 ;;
58 *) WEBKIT_REQUIRED="never" ;;
59 esac
42 # opengl dependencies 60 # opengl dependencies
43 case ${OPENGL_REQUIRED} in 61 case ${OPENGL_REQUIRED} in
44 always) 62 always)
45 qtdepend="${qtdepend} 63 qtdepend="${qtdepend}
46 ${qtopengldepend}" 64 ${qtopengldepend}
65 "
47 ;; 66 ;;
48 optional) 67 optional)
49 IUSE="${IUSE} opengl" 68 IUSE="${IUSE} opengl"
50 qtdepend="${qtdepend} 69 qtdepend="${qtdepend}
51 opengl? ( ${qtopengldepend} )" 70 opengl? ( ${qtopengldepend} )
71 "
52 ;; 72 ;;
53 *)
54 OPENGL_REQUIRED="never" 73 *) OPENGL_REQUIRED="never" ;;
55 ;;
56 esac 74 esac
57 75
58 COMMONDEPEND="${COMMONDEPEND} ${qtdepend}" 76 COMMONDEPEND="${COMMONDEPEND} ${qtdepend}"
59} 77}
78
79if [[ ${NEED_KDE} != "none" ]] ; then
80 # Qt
60kde4-base_set_qt_dependencies 81 kde4-base_set_qt_dependencies
61 82
62# Xorg 83 # Xorg
63COMMONDEPEND="${COMMONDEPEND} 84 COMMONDEPEND="${COMMONDEPEND}
64 >=x11-base/xorg-server-1.5.2 85 >=x11-base/xorg-server-1.5.2
65" 86 "
66 87
67# X11 libs 88 # X11 libs
68COMMONDEPEND="${COMMONDEPEND} 89 COMMONDEPEND="${COMMONDEPEND}
69 x11-libs/libXext 90 x11-libs/libXext
70 x11-libs/libXt 91 x11-libs/libXt
71 x11-libs/libXxf86vm 92 x11-libs/libXxf86vm
72" 93 "
73 94
74# localization deps 95 # localization deps
75# DISABLED UNTIL PMS decide correct approach :( 96 # DISABLED UNTIL PMS decide correct approach :(
76if [[ -n ${KDE_LINGUAS} ]]; then 97 if [[ -n ${KDE_LINGUAS} ]]; then
77 LNG_DEP="" 98 LNG_DEP=""
78 for _lng in ${KDE_LINGUAS}; do 99 for _lng in ${KDE_LINGUAS}; do
79 # there must be or due to issue if lingua is not present in kde-l10n so 100 # there must be or due to issue if lingua is not present in kde-l10n so
80 # it wont die but pick kde-l10n as-is. 101 # it wont die but pick kde-l10n as-is.
81 LNG_DEP="${LNG_DEP} 102 LNG_DEP="${LNG_DEP}
82 || ( kde-base/kde-l10n[linguas_${_lng},kdeprefix=] kde-base/kde-l10n[kdeprefix=] )" 103 || ( kde-base/kde-l10n[linguas_${_lng},kdeprefix=] kde-base/kde-l10n[kdeprefix=] )"
83 done 104 done
84fi 105 fi
85 106
86# Set common dependencies for all ebuilds that inherit this eclass 107 # Set common dependencies for all ebuilds that inherit this eclass
87DEPEND="${DEPEND} ${COMMONDEPEND} 108 DEPEND="${DEPEND} ${COMMONDEPEND}
88 >=dev-util/cmake-2.6.2 109 >=dev-util/cmake-2.6.2
89 dev-util/pkgconfig 110 dev-util/pkgconfig
90 >=sys-apps/sandbox-1.3.2 111 >=sys-apps/sandbox-1.3.2
91" 112 "
92RDEPEND="${RDEPEND} ${COMMONDEPEND}" 113 RDEPEND="${RDEPEND} ${COMMONDEPEND}"
114fi # NEED_KDE != NONE block
93 115
94if [[ $BUILD_TYPE = live ]]; then 116if [[ $BUILD_TYPE = live ]]; then
95 # Disable tests for live ebuilds 117 # Disable tests for live ebuilds
96 RESTRICT="${RESTRICT} test" 118 RESTRICT="${RESTRICT} test"
97 # Live ebuilds in kde-base default to kdeprefix by default 119 # Live ebuilds in kde-base default to kdeprefix by default
105# @DESCRIPTION: 127# @DESCRIPTION:
106# Is qt-opengl required? Possible values are 'always', 'optional' and 'never'. 128# Is qt-opengl required? Possible values are 'always', 'optional' and 'never'.
107# This variable must be set before inheriting any eclasses. Defaults to 'never'. 129# This variable must be set before inheriting any eclasses. Defaults to 'never'.
108OPENGL_REQUIRED="${OPENGL_REQUIRED:-never}" 130OPENGL_REQUIRED="${OPENGL_REQUIRED:-never}"
109 131
132# @ECLASS-VARIABLE: WEBKIT_REQUIRED
133# @DESCRIPTION:
134# Is qt-webkit requred? Possible values are 'always', 'optional' and 'never'.
135# This variable must be set before inheriting any eclasses. Defaults to 'never'.
136WEBKIT_REQUIRED="${WEBKIT_REQUIRED:-never}"
137
110# @ECLASS-VARIABLE: CPPUNIT_REQUIRED 138# @ECLASS-VARIABLE: CPPUNIT_REQUIRED
111# @DESCRIPTION: 139# @DESCRIPTION:
112# Is cppunit required for tests? Possible values are 'always', 'optional' and 'never'. 140# Is cppunit required for tests? Possible values are 'always', 'optional' and 'never'.
113# This variable must be set before inheriting any eclasses. Defaults to 'never'. 141# This variable must be set before inheriting any eclasses. Defaults to 'never'.
114CPPUNIT_REQUIRED="${CPPUNIT_REQUIRED:-never}" 142CPPUNIT_REQUIRED="${CPPUNIT_REQUIRED:-never}"
115 143
116case ${CPPUNIT_REQUIRED} in 144case ${CPPUNIT_REQUIRED} in
117 always) 145 always)
118 DEPEND="${DEPEND} dev-util/cppunit" 146 DEPEND="${DEPEND}
147 dev-util/cppunit
148 "
119 ;; 149 ;;
120 optional) 150 optional)
121 IUSE="${IUSE} test" 151 IUSE="${IUSE} test"
122 DEPEND="${DEPEND} 152 DEPEND="${DEPEND}
123 test? ( dev-util/cppunit )" 153 test? ( dev-util/cppunit )
154 "
124 ;; 155 ;;
125 *) 156 *)
126 CPPUNIT_REQUIRED="never" 157 CPPUNIT_REQUIRED="never"
127 ;; 158 ;;
128esac 159esac
319 # Block installation of other SLOTS unless kdeprefix 350 # Block installation of other SLOTS unless kdeprefix
320 for KDE_SLOT in ${KDE_SLOTS[@]}; do 351 for KDE_SLOT in ${KDE_SLOTS[@]}; do
321 # block non kdeprefix ${PN} on other slots 352 # block non kdeprefix ${PN} on other slots
322 # we do this only if we do not depend on any version of kde 353 # we do this only if we do not depend on any version of kde
323 if [[ ${SLOT} != ${KDE_SLOT} ]]; then 354 if [[ ${SLOT} != ${KDE_SLOT} ]]; then
324 DEPEND="${DEPEND}
325 !kdeprefix? ( !kde-base/${PN}:${KDE_SLOT}[-kdeprefix] )"
326 RDEPEND="${RDEPEND} 355 RDEPEND="${RDEPEND}
327 !kdeprefix? ( !kde-base/${PN}:${KDE_SLOT}[-kdeprefix] )" 356 !kdeprefix? ( !kde-base/${PN}:${KDE_SLOT}[-kdeprefix] )
357 "
328 fi 358 fi
329 done 359 done
330 360
331 # Adding kdelibs, kdepimlibs and kdebase-data deps to all other packages. 361 # Adding kdelibs and kdebase-data deps to all other packages.
332 # We only need to add the dependencies if ${PN} is not "kdelibs" or "kdepimlibs"
333 if [[ ${PN} != kdelibs ]]; then 362 if [[ ${PN} != kdelibs ]]; then
334 DEPEND="${DEPEND} 363 DEPEND="${DEPEND}
335 kdeprefix? ( ${_operator}kde-base/kdelibs${_pv}[kdeprefix] ) 364 kdeprefix? ( ${_operator}kde-base/kdelibs${_pv}[kdeprefix] )
336 !kdeprefix? ( ${_operator}kde-base/kdelibs${_pvn}[-kdeprefix] )" 365 !kdeprefix? ( ${_operator}kde-base/kdelibs${_pvn}[-kdeprefix] )
366 "
337 RDEPEND="${RDEPEND} 367 RDEPEND="${RDEPEND}
338 kdeprefix? ( ${_operator}kde-base/kdelibs${_pv}[kdeprefix] ) 368 kdeprefix? ( ${_operator}kde-base/kdelibs${_pv}[kdeprefix] )
339 !kdeprefix? ( ${_operator}kde-base/kdelibs${_pvn}[-kdeprefix] )" 369 !kdeprefix? ( ${_operator}kde-base/kdelibs${_pvn}[-kdeprefix] )
340 if [[ ${PN} != kdepimlibs ]]; then 370 "
341 DEPEND="${DEPEND} 371 if [[ ${PN} != kdepimlibs && ${PN} != kdebase-data ]]; then
342 kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pv}[kdeprefix] )
343 !kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pvn}[-kdeprefix] )"
344 RDEPEND="${RDEPEND} 372 RDEPEND="${RDEPEND}
345 kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pv}[kdeprefix] )
346 !kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pvn}[-kdeprefix] )"
347 if [[ ${PN} != kdebase-data ]]; then
348 RDEPEND="${RDEPEND}
349 kdeprefix? ( ${_operator}kde-base/kdebase-data${_pv}[kdeprefix] ) 373 kdeprefix? ( ${_operator}kde-base/kdebase-data${_pv}[kdeprefix] )
350 !kdeprefix? ( ${_operator}kde-base/kdebase-data${_pvn}[-kdeprefix] )" 374 !kdeprefix? ( ${_operator}kde-base/kdebase-data${_pvn}[-kdeprefix] )
351 fi 375 "
352 fi 376 fi
353 fi 377 fi
354 unset _operator _pv _pvn 378 unset _operator _pv _pvn
355fi 379fi
356 380
410 _kmname_pv="${_kmname}-${PV}" 434 _kmname_pv="${_kmname}-${PV}"
411 if [[ $NEED_KDE != live ]]; then 435 if [[ $NEED_KDE != live ]]; then
412 case ${KDEBASE} in 436 case ${KDEBASE} in
413 kde-base) 437 kde-base)
414 case ${PV} in 438 case ${PV} in
439 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*)
440 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.lzma" ;;
415 4.2.6* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6* | 4.0.9* | 4.0.8*) 441 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6* | 4.0.9* | 4.0.8*)
416 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 442 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
417 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 443 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
418 esac 444 esac
419 ;; 445 ;;
420 koffice) 446 koffice)
507 # Only enable selected languages, used for KDE extragear apps. 533 # Only enable selected languages, used for KDE extragear apps.
508 if [[ -n ${KDE_LINGUAS} ]]; then 534 if [[ -n ${KDE_LINGUAS} ]]; then
509 enable_selected_linguas 535 enable_selected_linguas
510 fi 536 fi
511 537
512 # Autopatch
513 base_src_prepare 538 base_src_prepare
514 539
515 # Save library dependencies 540 # Save library dependencies
516 if [[ -n ${KMSAVELIBS} ]] ; then 541 if [[ -n ${KMSAVELIBS} ]] ; then
517 save_library_dependencies 542 save_library_dependencies
527# @DESCRIPTION: 552# @DESCRIPTION:
528# Function for configuring the build of KDE4 applications. 553# Function for configuring the build of KDE4 applications.
529kde4-base_src_configure() { 554kde4-base_src_configure() {
530 debug-print-function ${FUNCNAME} "$@" 555 debug-print-function ${FUNCNAME} "$@"
531 556
532 # We prefer KDE's own Debugfull mode over the standard Debug 557 # Handle common release builds
533 if has debug ${IUSE//+} && use debug ; then 558 if ! has debug ${IUSE//+} || ! use debug; then
534 ebegin "Enabling debug flag" 559 append-cppflags -DQT_NO_DEBUG
535 mycmakeargs="${mycmakeargs} -DCMAKE_BUILD_TYPE=Debugfull"
536 eend $?
537 fi 560 fi
538 561
539 # Enable generation of HTML handbook 562 # Enable generation of HTML handbook
540 if has htmlhandbook ${IUSE//+} && use htmlhandbook; then 563 if has htmlhandbook ${IUSE//+} && use htmlhandbook; then
541 ebegin "Enabling building of HTML handbook" 564 ebegin "Enabling building of HTML handbook"

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

  ViewVC Help
Powered by ViewVC 1.1.20