/[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.122 Revision 1.125
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2013 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.122 2013/02/02 16:58:00 dilfridge Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.125 2013/04/07 17:30:35 kensington 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
9# @DESCRIPTION: 9# @DESCRIPTION:
10# The kde4-base.eclass provides support for building KDE4 based ebuilds 10# The kde4-base.eclass provides support for building KDE4 based ebuilds
11# and KDE4 applications. 11# and KDE4 applications.
12# 12#
13# NOTE: KDE 4 ebuilds currently support EAPI "3". This will be reviewed 13# NOTE: KDE 4 ebuilds currently support EAPIs 3, 4, and 5. This will be
14# over time as new EAPI versions are approved. 14# reviewed over time as new EAPI versions are approved.
15
16if [[ ${___ECLASS_ONCE_KDE4_BASE} != "recur -_+^+_- spank" ]] ; then
17___ECLASS_ONCE_KDE4_BASE="recur -_+^+_- spank"
15 18
16# @ECLASS-VARIABLE: KDE_SELINUX_MODULE 19# @ECLASS-VARIABLE: KDE_SELINUX_MODULE
17# @DESCRIPTION: 20# @DESCRIPTION:
18# If set to "none", do nothing. 21# If set to "none", do nothing.
19# For any other value, add selinux to IUSE, and depending on that useflag 22# For any other value, add selinux to IUSE, and depending on that useflag
104unset buildsystem_eclass 107unset buildsystem_eclass
105unset export_fns 108unset export_fns
106 109
107# @ECLASS-VARIABLE: DECLARATIVE_REQUIRED 110# @ECLASS-VARIABLE: DECLARATIVE_REQUIRED
108# @DESCRIPTION: 111# @DESCRIPTION:
109# Is qt-declarative required? Possible values are 'always', 'optional' and 'never'. 112# Is qtdeclarative required? Possible values are 'always', 'optional' and 'never'.
110# This variable must be set before inheriting any eclasses. Defaults to 'never'. 113# This variable must be set before inheriting any eclasses. Defaults to 'never'.
111DECLARATIVE_REQUIRED="${DECLARATIVE_REQUIRED:-never}" 114DECLARATIVE_REQUIRED="${DECLARATIVE_REQUIRED:-never}"
112 115
113# @ECLASS-VARIABLE: QTHELP_REQUIRED 116# @ECLASS-VARIABLE: QTHELP_REQUIRED
114# @DESCRIPTION: 117# @DESCRIPTION:
115# Is qt-assistant required? Possible values are 'always', 'optional' and 'never'. 118# Is qthelp required? Possible values are 'always', 'optional' and 'never'.
116# This variable must be set before inheriting any eclasses. Defaults to 'never'. 119# This variable must be set before inheriting any eclasses. Defaults to 'never'.
117QTHELP_REQUIRED="${QTHELP_REQUIRED:-never}" 120QTHELP_REQUIRED="${QTHELP_REQUIRED:-never}"
118 121
119# @ECLASS-VARIABLE: OPENGL_REQUIRED 122# @ECLASS-VARIABLE: OPENGL_REQUIRED
120# @DESCRIPTION: 123# @DESCRIPTION:
121# Is qt-opengl required? Possible values are 'always', 'optional' and 'never'. 124# Is qtopengl required? Possible values are 'always', 'optional' and 'never'.
122# This variable must be set before inheriting any eclasses. Defaults to 'never'. 125# This variable must be set before inheriting any eclasses. Defaults to 'never'.
123OPENGL_REQUIRED="${OPENGL_REQUIRED:-never}" 126OPENGL_REQUIRED="${OPENGL_REQUIRED:-never}"
124 127
125# @ECLASS-VARIABLE: MULTIMEDIA_REQUIRED 128# @ECLASS-VARIABLE: MULTIMEDIA_REQUIRED
126# @DESCRIPTION: 129# @DESCRIPTION:
127# Is qt-multimedia required? Possible values are 'always', 'optional' and 'never'. 130# Is qtmultimedia required? Possible values are 'always', 'optional' and 'never'.
128# This variable must be set before inheriting any eclasses. Defaults to 'never'. 131# This variable must be set before inheriting any eclasses. Defaults to 'never'.
129MULTIMEDIA_REQUIRED="${MULTIMEDIA_REQUIRED:-never}" 132MULTIMEDIA_REQUIRED="${MULTIMEDIA_REQUIRED:-never}"
130 133
131# @ECLASS-VARIABLE: CPPUNIT_REQUIRED 134# @ECLASS-VARIABLE: CPPUNIT_REQUIRED
132# @DESCRIPTION: 135# @DESCRIPTION:
174 177
175 # This code is to prevent portage from searching GENTOO_MIRRORS for 178 # This code is to prevent portage from searching GENTOO_MIRRORS for
176 # packages that will never be mirrored. (As they only will ever be in 179 # packages that will never be mirrored. (As they only will ever be in
177 # the overlay). 180 # the overlay).
178 case ${PV} in 181 case ${PV} in
179 *9999* | 4.?.[6-9]?) 182 *9999* | 4.?.[6-9]? | 4.??.[6-9]?)
180 RESTRICT+=" mirror" 183 RESTRICT+=" mirror"
181 ;; 184 ;;
182 esac 185 esac
183 ;; 186 ;;
184 kdevelop) 187 kdevelop)
188esac 191esac
189 192
190# @ECLASS-VARIABLE: QT_MINIMAL 193# @ECLASS-VARIABLE: QT_MINIMAL
191# @DESCRIPTION: 194# @DESCRIPTION:
192# Determine version of qt we enforce as minimal for the package. 195# Determine version of qt we enforce as minimal for the package.
193if version_is_at_least 4.8.50 "${KDE_MINIMAL}"; then
194 # Upstream has added an *undeclared* dependency on Qt 4.8...
195 QT_MINIMAL="${QT_MINIMAL:-4.8.0}" 196QT_MINIMAL="${QT_MINIMAL:-4.8.0}"
196else
197 QT_MINIMAL="${QT_MINIMAL:-4.7.4}"
198fi
199 197
200# Declarative dependencies 198# Declarative dependencies
201qtdeclarativedepend=" 199qtdeclarativedepend="
202 >=x11-libs/qt-declarative-${QT_MINIMAL}:4 200 >=dev-qt/qtdeclarative-${QT_MINIMAL}:4
203" 201"
204case ${DECLARATIVE_REQUIRED} in 202case ${DECLARATIVE_REQUIRED} in
205 always) 203 always)
206 COMMONDEPEND+=" ${qtdeclarativedepend}" 204 COMMONDEPEND+=" ${qtdeclarativedepend}"
207 ;; 205 ;;
213esac 211esac
214unset qtdeclarativedepend 212unset qtdeclarativedepend
215 213
216# QtHelp dependencies 214# QtHelp dependencies
217qthelpdepend=" 215qthelpdepend="
218 >=x11-libs/qt-assistant-${QT_MINIMAL}:4 216 >=dev-qt/qthelp-${QT_MINIMAL}:4
219" 217"
220case ${QTHELP_REQUIRED} in 218case ${QTHELP_REQUIRED} in
221 always) 219 always)
222 COMMONDEPEND+=" ${qthelpdepend}" 220 COMMONDEPEND+=" ${qthelpdepend}"
223 ;; 221 ;;
228esac 226esac
229unset qthelpdepend 227unset qthelpdepend
230 228
231# OpenGL dependencies 229# OpenGL dependencies
232qtopengldepend=" 230qtopengldepend="
233 >=x11-libs/qt-opengl-${QT_MINIMAL}:4 231 >=dev-qt/qtopengl-${QT_MINIMAL}:4
234" 232"
235case ${OPENGL_REQUIRED} in 233case ${OPENGL_REQUIRED} in
236 always) 234 always)
237 COMMONDEPEND+=" ${qtopengldepend}" 235 COMMONDEPEND+=" ${qtopengldepend}"
238 ;; 236 ;;
244esac 242esac
245unset qtopengldepend 243unset qtopengldepend
246 244
247# MultiMedia dependencies 245# MultiMedia dependencies
248qtmultimediadepend=" 246qtmultimediadepend="
249 >=x11-libs/qt-multimedia-${QT_MINIMAL}:4 247 >=dev-qt/qtmultimedia-${QT_MINIMAL}:4
250" 248"
251case ${MULTIMEDIA_REQUIRED} in 249case ${MULTIMEDIA_REQUIRED} in
252 always) 250 always)
253 COMMONDEPEND+=" ${qtmultimediadepend}" 251 COMMONDEPEND+=" ${qtmultimediadepend}"
254 ;; 252 ;;
278 276
279# KDE dependencies 277# KDE dependencies
280# Qt accessibility classes are needed in various places, bug 325461 278# Qt accessibility classes are needed in various places, bug 325461
281kdecommondepend=" 279kdecommondepend="
282 dev-lang/perl 280 dev-lang/perl
283 >=x11-libs/qt-core-${QT_MINIMAL}:4[qt3support,ssl]
284 >=x11-libs/qt-dbus-${QT_MINIMAL}:4
285 >=x11-libs/qt-gui-${QT_MINIMAL}:4[accessibility,dbus]
286 >=x11-libs/qt-qt3support-${QT_MINIMAL}:4[accessibility] 281 >=dev-qt/qt3support-${QT_MINIMAL}:4[accessibility]
282 >=dev-qt/qtcore-${QT_MINIMAL}:4[qt3support,ssl]
283 >=dev-qt/qtdbus-${QT_MINIMAL}:4
284 >=dev-qt/qtgui-${QT_MINIMAL}:4[accessibility,dbus]
287 >=x11-libs/qt-script-${QT_MINIMAL}:4 285 >=dev-qt/qtscript-${QT_MINIMAL}:4
288 >=x11-libs/qt-sql-${QT_MINIMAL}:4[qt3support] 286 >=dev-qt/qtsql-${QT_MINIMAL}:4[qt3support]
289 >=x11-libs/qt-svg-${QT_MINIMAL}:4 287 >=dev-qt/qtsvg-${QT_MINIMAL}:4
290 >=x11-libs/qt-test-${QT_MINIMAL}:4 288 >=dev-qt/qttest-${QT_MINIMAL}:4
291 >=x11-libs/qt-webkit-${QT_MINIMAL}:4 289 >=dev-qt/qtwebkit-${QT_MINIMAL}:4
292 !aqua? ( 290 !aqua? (
293 x11-libs/libXext 291 x11-libs/libXext
294 x11-libs/libXt 292 x11-libs/libXt
295 x11-libs/libXxf86vm 293 x11-libs/libXxf86vm
296 x11-libs/libXcomposite 294 x11-libs/libXcomposite
376 IUSE+=" selinux" 374 IUSE+=" selinux"
377 kdecommondepend+=" selinux? ( sec-policy/selinux-${KDE_SELINUX_MODULE} )" 375 kdecommondepend+=" selinux? ( sec-policy/selinux-${KDE_SELINUX_MODULE} )"
378 ;; 376 ;;
379esac 377esac
380 378
379# These dependencies are added as they are unconditionally required by kde-workspace.
380# They are not necessarily required by individual applications but are pulled in to prevent
381# bugs like bug #444438. This list is subject to change in the future so do not rely on it
382# in ebuilds - always set correct dependencies.
383case ${KMNAME} in
384 kde-workspace)
385 kdedepend+="
386 x11-libs/xcb-util
387 x11-libs/libX11
388 x11-libs/libXcomposite
389 x11-libs/libXcursor
390 x11-libs/libXdamage
391 x11-libs/libXfixes
392 x11-libs/libxkbfile
393 x11-libs/libXrandr
394 x11-libs/libXrender
395 "
396 ;;
397 *)
398 ;;
399esac
400
401# We always need the aqua useflag because otherwise we cannot = refer to it inside
402# add_kdebase_dep. This was always kind of a bug, but came to light with EAPI=5
403# (where referring to a use flag not in IUSE masks the ebuild).
404# The only alternative would be to prohibit using add_kdebase_dep if KDE_REQUIRED=never
405IUSE+=" aqua"
406
381case ${KDE_REQUIRED} in 407case ${KDE_REQUIRED} in
382 always) 408 always)
383 IUSE+=" aqua"
384 [[ -n ${kdecommondepend} ]] && COMMONDEPEND+=" ${kdecommondepend}" 409 [[ -n ${kdecommondepend} ]] && COMMONDEPEND+=" ${kdecommondepend}"
385 [[ -n ${kdedepend} ]] && DEPEND+=" ${kdedepend}" 410 [[ -n ${kdedepend} ]] && DEPEND+=" ${kdedepend}"
386 [[ -n ${kderdepend} ]] && RDEPEND+=" ${kderdepend}" 411 [[ -n ${kderdepend} ]] && RDEPEND+=" ${kderdepend}"
387 ;; 412 ;;
388 optional) 413 optional)
389 IUSE+=" aqua kde" 414 IUSE+=" kde"
390 [[ -n ${kdecommondepend} ]] && COMMONDEPEND+=" kde? ( ${kdecommondepend} )" 415 [[ -n ${kdecommondepend} ]] && COMMONDEPEND+=" kde? ( ${kdecommondepend} )"
391 [[ -n ${kdedepend} ]] && DEPEND+=" kde? ( ${kdedepend} )" 416 [[ -n ${kdedepend} ]] && DEPEND+=" kde? ( ${kdedepend} )"
392 [[ -n ${kderdepend} ]] && RDEPEND+=" kde? ( ${kderdepend} )" 417 [[ -n ${kderdepend} ]] && RDEPEND+=" kde? ( ${kderdepend} )"
393 ;; 418 ;;
394 *) ;; 419 *) ;;
433 case ${PV} in 458 case ${PV} in
434 4.4.11.1) 459 4.4.11.1)
435 # KDEPIM 4.4, special case 460 # KDEPIM 4.4, special case
436 # TODO: Remove this part when KDEPIM 4.4 gets out of the tree 461 # TODO: Remove this part when KDEPIM 4.4 gets out of the tree
437 SRC_URI="mirror://kde/stable/kdepim-${PV}/src/${_kmname_pv}.tar.bz2" ;; 462 SRC_URI="mirror://kde/stable/kdepim-${PV}/src/${_kmname_pv}.tar.bz2" ;;
438 4.[89].8[05] | 4.[89].9[0235678]) 463 4.?.[6-9]? | 4.??.[6-9]?)
439 # Unstable KDE SC releases 464 # Unstable KDE SC releases
440 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;; 465 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;;
441 4.[1234567].[12345]) 466 4.[1-7].[12345])
442 # Stable KDE SC with old .bz2 support 467 # Stable KDE SC with old .bz2 support
443 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 468 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
444 *) 469 *)
445 # Stable KDE SC releases 470 # Stable KDE SC releases
446 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;; 471 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;;
447 esac 472 esac
448 ;; 473 ;;
449 kdevelop|kdevelop-php*|kdevplatform) 474 kdevelop|kdevelop-php*|kdevplatform)
450 case ${KDEVELOP_VERSION} in 475 case ${KDEVELOP_VERSION} in
451 4.[12].[6-9]*) SRC_URI="mirror://kde/unstable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.bz2" ;; 476 4.[123].[6-9]*) SRC_URI="mirror://kde/unstable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.bz2" ;;
452 *) SRC_URI="mirror://kde/stable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.bz2" ;; 477 *) SRC_URI="mirror://kde/stable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.bz2" ;;
453 esac 478 esac
454 ;; 479 ;;
455 esac 480 esac
456} 481}
899 gnome2_icon_cache_update 924 gnome2_icon_cache_update
900 fdo-mime_desktop_database_update 925 fdo-mime_desktop_database_update
901 fdo-mime_mime_database_update 926 fdo-mime_mime_database_update
902 buildsycoca 927 buildsycoca
903} 928}
929
930fi

Legend:
Removed from v.1.122  
changed lines
  Added in v.1.125

  ViewVC Help
Powered by ViewVC 1.1.20