/[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.128 Revision 1.137
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2014 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.128 2013/08/15 14:52:58 kensington Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.137 2014/07/04 08:01:51 ulm 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
32# For proper description see virtualx.eclass manpage. 32# For proper description see virtualx.eclass manpage.
33# Here we redefine default value to be manual, if your package needs virtualx 33# Here we redefine default value to be manual, if your package needs virtualx
34# for tests you should proceed with setting VIRTUALX_REQUIRED=test. 34# for tests you should proceed with setting VIRTUALX_REQUIRED=test.
35: ${VIRTUALX_REQUIRED:=manual} 35: ${VIRTUALX_REQUIRED:=manual}
36 36
37inherit kde4-functions toolchain-funcs fdo-mime flag-o-matic gnome2-utils base virtualx versionator eutils multilib 37inherit kde4-functions toolchain-funcs fdo-mime flag-o-matic gnome2-utils virtualx versionator eutils multilib
38 38
39if [[ ${KDE_BUILD_TYPE} = live ]]; then 39if [[ ${KDE_BUILD_TYPE} = live ]]; then
40 case ${KDE_SCM} in 40 case ${KDE_SCM} in
41 svn) inherit subversion ;; 41 svn) inherit subversion ;;
42 git) inherit git-2 ;; 42 git) inherit git-r3 ;;
43 esac 43 esac
44fi 44fi
45 45
46# @ECLASS-VARIABLE: CMAKE_REQUIRED 46# @ECLASS-VARIABLE: CMAKE_REQUIRED
47# @DESCRIPTION: 47# @DESCRIPTION:
64KDE_MINIMAL="${KDE_MINIMAL:-4.4}" 64KDE_MINIMAL="${KDE_MINIMAL:-4.4}"
65 65
66# Set slot for KDEBASE known packages 66# Set slot for KDEBASE known packages
67case ${KDEBASE} in 67case ${KDEBASE} in
68 kde-base) 68 kde-base)
69 case ${EAPI} in
70 5)
71 SLOT=4/$(get_version_component_range 1-2)
72 ;;
73 *)
69 SLOT=4 74 SLOT=4
75 ;;
76 esac
70 KDE_MINIMAL="${PV}" 77 KDE_MINIMAL="${PV}"
71 ;; 78 ;;
72 kdevelop) 79 kdevelop)
73 if [[ ${KDE_BUILD_TYPE} = live ]]; then 80 if [[ ${KDE_BUILD_TYPE} = live ]]; then
74 # @ECLASS-VARIABLE: KDEVELOP_VERSION 81 # @ECLASS-VARIABLE: KDEVELOP_VERSION
75 # @DESCRIPTION: 82 # @DESCRIPTION:
76 # Specifies KDevelop version. Default is 4.0.0 for tagged packages and 9999 for live packages. 83 # Specifies KDevelop version. Default is 4.0.0 for tagged packages and 9999 for live packages.
77 # Applies to KDEBASE=kdevelop only. 84 # Applies to KDEBASE=kdevelop only.
78 KDEVELOP_VERSION="${KDEVELOP_VERSION:-9999}" 85 KDEVELOP_VERSION="${KDEVELOP_VERSION:-4.9999}"
79 # @ECLASS-VARIABLE: KDEVPLATFORM_VERSION 86 # @ECLASS-VARIABLE: KDEVPLATFORM_VERSION
80 # @DESCRIPTION: 87 # @DESCRIPTION:
81 # Specifies KDevplatform version. Default is 1.0.0 for tagged packages and 9999 for live packages. 88 # Specifies KDevplatform version. Default is 1.0.0 for tagged packages and 9999 for live packages.
82 # Applies to KDEBASE=kdevelop only. 89 # Applies to KDEBASE=kdevelop only.
83 KDEVPLATFORM_VERSION="${KDEVPLATFORM_VERSION:-9999}" 90 KDEVPLATFORM_VERSION="${KDEVPLATFORM_VERSION:-4.9999}"
84 else 91 else
85 case ${PN} in 92 case ${PN} in
86 kdevelop|quanta) 93 kdevelop)
87 KDEVELOP_VERSION=${PV} 94 KDEVELOP_VERSION=${PV}
88 KDEVPLATFORM_VERSION="$(($(get_major_version)-3)).$(get_after_major_version)" 95 KDEVPLATFORM_VERSION="$(($(get_major_version)-3)).$(get_after_major_version)"
89 ;; 96 ;;
90 kdevplatform|kdevelop-php*) 97 kdevplatform|kdevelop-php*|kdevelop-python)
91 KDEVELOP_VERSION="$(($(get_major_version)+3)).$(get_after_major_version)" 98 KDEVELOP_VERSION="$(($(get_major_version)+3)).$(get_after_major_version)"
92 KDEVPLATFORM_VERSION=${PV} 99 KDEVPLATFORM_VERSION=${PV}
93 ;; 100 ;;
94 *) 101 *)
95 KDEVELOP_VERSION="${KDEVELOP_VERSION:-4.0.0}" 102 KDEVELOP_VERSION="${KDEVELOP_VERSION:-4.0.0}"
191esac 198esac
192 199
193# @ECLASS-VARIABLE: QT_MINIMAL 200# @ECLASS-VARIABLE: QT_MINIMAL
194# @DESCRIPTION: 201# @DESCRIPTION:
195# Determine version of qt we enforce as minimal for the package. 202# Determine version of qt we enforce as minimal for the package.
196QT_MINIMAL="${QT_MINIMAL:-4.8.0}" 203QT_MINIMAL="${QT_MINIMAL:-4.8.5}"
197 204
198# Declarative dependencies 205# Declarative dependencies
199qtdeclarativedepend=" 206qtdeclarativedepend="
200 >=dev-qt/qtdeclarative-${QT_MINIMAL}:4 207 >=dev-qt/qtdeclarative-${QT_MINIMAL}:4
201" 208"
279kdecommondepend=" 286kdecommondepend="
280 dev-lang/perl 287 dev-lang/perl
281 >=dev-qt/qt3support-${QT_MINIMAL}:4[accessibility] 288 >=dev-qt/qt3support-${QT_MINIMAL}:4[accessibility]
282 >=dev-qt/qtcore-${QT_MINIMAL}:4[qt3support,ssl] 289 >=dev-qt/qtcore-${QT_MINIMAL}:4[qt3support,ssl]
283 >=dev-qt/qtdbus-${QT_MINIMAL}:4 290 >=dev-qt/qtdbus-${QT_MINIMAL}:4
284 || ( 291 >=dev-qt/designer-${QT_MINIMAL}:4[-phonon]
285 ( >=dev-qt/qtgui-4.8.5:4[accessibility,dbus(+)] dev-qt/designer:4[-phonon] )
286 <dev-qt/qtgui-4.8.5:4[accessibility,dbus(+)] 292 >=dev-qt/qtgui-${QT_MINIMAL}:4[accessibility,dbus(+)]
287 )
288 >=dev-qt/qtscript-${QT_MINIMAL}:4 293 >=dev-qt/qtscript-${QT_MINIMAL}:4
289 >=dev-qt/qtsql-${QT_MINIMAL}:4[qt3support] 294 >=dev-qt/qtsql-${QT_MINIMAL}:4[qt3support]
290 >=dev-qt/qtsvg-${QT_MINIMAL}:4 295 >=dev-qt/qtsvg-${QT_MINIMAL}:4
291 >=dev-qt/qttest-${QT_MINIMAL}:4 296 >=dev-qt/qttest-${QT_MINIMAL}:4
292 >=dev-qt/qtwebkit-${QT_MINIMAL}:4 297 >=dev-qt/qtwebkit-${QT_MINIMAL}:4
293 !aqua? (
294 x11-libs/libXext
295 x11-libs/libXt
296 x11-libs/libXxf86vm
297 x11-libs/libXcomposite
298 x11-libs/libxkbfile
299 )
300" 298"
301 299
302if [[ ${PN} != kdelibs ]]; then 300if [[ ${PN} != kdelibs ]]; then
303 kdecommondepend+=" $(add_kdebase_dep kdelibs)" 301 kdecommondepend+=" $(add_kdebase_dep kdelibs)"
304 if [[ ${KDEBASE} = kdevelop ]]; then 302 if [[ ${KDEBASE} = kdevelop ]]; then
309 # Applies to KDEBASE=kdevelop only. 307 # Applies to KDEBASE=kdevelop only.
310 KDEVPLATFORM_REQUIRED="${KDEVPLATFORM_REQUIRED:-always}" 308 KDEVPLATFORM_REQUIRED="${KDEVPLATFORM_REQUIRED:-always}"
311 case ${KDEVPLATFORM_REQUIRED} in 309 case ${KDEVPLATFORM_REQUIRED} in
312 always) 310 always)
313 kdecommondepend+=" 311 kdecommondepend+="
314 >=dev-util/kdevplatform-${KDEVPLATFORM_VERSION} 312 >=dev-util/kdevplatform-${KDEVPLATFORM_VERSION}:4
315 " 313 "
316 ;; 314 ;;
317 *) ;; 315 *) ;;
318 esac 316 esac
319 fi 317 fi
334# all packages needs oxygen icons for basic iconset 332# all packages needs oxygen icons for basic iconset
335if [[ ${PN} != oxygen-icons ]]; then 333if [[ ${PN} != oxygen-icons ]]; then
336 kderdepend+=" $(add_kdebase_dep oxygen-icons)" 334 kderdepend+=" $(add_kdebase_dep oxygen-icons)"
337fi 335fi
338 336
337# add a dependency over kde-l10n
339if [[ ${KDEBASE} != "kde-base" && -n ${KDE_LINGUAS} ]]; then 338if [[ ${KDEBASE} != "kde-base" && -n ${KDE_LINGUAS} ]]; then
340 for _lingua in ${KDE_LINGUAS}; do 339 for _lingua in ${KDE_LINGUAS}; do
341 # if our package has lignuas, pull in kde-l10n with selected lingua enabled, 340 # if our package has lignuas, pull in kde-l10n with selected lingua enabled,
342 # but only for selected ones. 341 # but only for selected ones.
343 # this can't be done on one line because if user doesn't use any localisation 342 # this can't be done on one line because if user doesn't use any localisation
376 IUSE+=" selinux" 375 IUSE+=" selinux"
377 kdecommondepend+=" selinux? ( sec-policy/selinux-${KDE_SELINUX_MODULE} )" 376 kdecommondepend+=" selinux? ( sec-policy/selinux-${KDE_SELINUX_MODULE} )"
378 ;; 377 ;;
379esac 378esac
380 379
381# These dependencies are added as they are unconditionally required by kde-workspace.
382# They are not necessarily required by individual applications but are pulled in to prevent
383# bugs like bug #444438. This list is subject to change in the future so do not rely on it
384# in ebuilds - always set correct dependencies.
385case ${KMNAME} in
386 kde-workspace)
387 kdedepend+="
388 x11-libs/xcb-util
389 x11-libs/libX11
390 x11-libs/libXcomposite
391 x11-libs/libXcursor
392 x11-libs/libXdamage
393 x11-libs/libXfixes
394 x11-libs/libxkbfile
395 x11-libs/libXrandr
396 x11-libs/libXrender
397 "
398 ;;
399 *)
400 ;;
401esac
402
403# We always need the aqua useflag because otherwise we cannot = refer to it inside 380# We always need the aqua useflag because otherwise we cannot = refer to it inside
404# add_kdebase_dep. This was always kind of a bug, but came to light with EAPI=5 381# add_kdebase_dep. This was always kind of a bug, but came to light with EAPI=5
405# (where referring to a use flag not in IUSE masks the ebuild). 382# (where referring to a use flag not in IUSE masks the ebuild).
406# The only alternative would be to prohibit using add_kdebase_dep if KDE_REQUIRED=never 383# The only alternative would be to prohibit using add_kdebase_dep if KDE_REQUIRED=never
407IUSE+=" aqua" 384IUSE+=" aqua"
442 # we calculate URI only for known KDEBASE modules 419 # we calculate URI only for known KDEBASE modules
443 [[ -n ${KDEBASE} ]] || return 420 [[ -n ${KDEBASE} ]] || return
444 421
445 # calculate tarball module name 422 # calculate tarball module name
446 if [[ -n ${KMNAME} ]]; then 423 if [[ -n ${KMNAME} ]]; then
447 # fixup kdebase-apps name
448 case ${KMNAME} in
449 kdebase-apps)
450 _kmname="kdebase" ;;
451 *)
452 _kmname="${KMNAME}" ;; 424 _kmname="${KMNAME}"
453 esac
454 else 425 else
455 _kmname=${PN} 426 _kmname=${PN}
456 fi 427 fi
457 _kmname_pv="${_kmname}-${PV}" 428 _kmname_pv="${_kmname}-${PV}"
458 case ${KDEBASE} in 429 case ${KDEBASE} in
466 # Unstable KDE SC releases 437 # Unstable KDE SC releases
467 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;; 438 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;;
468 4.[1-7].[12345]) 439 4.[1-7].[12345])
469 # Stable KDE SC with old .bz2 support 440 # Stable KDE SC with old .bz2 support
470 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 441 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
442 4.11.7)
443 # Part of 4.12 actually, sigh. Not stable for next release!
444 SRC_URI="mirror://kde/stable/4.12.3/src/${_kmname_pv}.tar.xz" ;;
445 4.11.8)
446 # Part of 4.12 actually, sigh. Not stable for next release!
447 SRC_URI="mirror://kde/stable/4.12.4/src/${_kmname_pv}.tar.xz" ;;
448 4.11.9)
449 # Part of 4.12 actually, sigh. Not stable for next release!
450 SRC_URI="mirror://kde/stable/4.12.5/src/${_kmname_pv}.tar.xz" ;;
451 4.11.10)
452 # Part of 4.13 actually, sigh. Not stable for next release!
453 SRC_URI="mirror://kde/stable/4.13.2/src/${_kmname_pv}.tar.xz" ;;
471 *) 454 *)
472 # Stable KDE SC releases 455 # Stable KDE SC releases
473 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;; 456 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;;
474 esac 457 esac
475 ;; 458 ;;
489 case ${KDE_SCM} in 472 case ${KDE_SCM} in
490 svn) 473 svn)
491 # Determine branch URL based on live type 474 # Determine branch URL based on live type
492 local branch_prefix 475 local branch_prefix
493 case ${PV} in 476 case ${PV} in
494 9999*) 477 4.9999*)
495 # trunk 478 # trunk
496 branch_prefix="trunk/KDE" 479 branch_prefix="trunk/KDE"
497 ;; 480 ;;
498 *) 481 *)
499 # branch 482 # branch
576 else 559 else
577 _kmname=${PN} 560 _kmname=${PN}
578 fi 561 fi
579 562
580 # default branching 563 # default branching
581 [[ ${PV} != 9999* && ${KDEBASE} == kde-base ]] && \ 564 [[ ${PV} != 4.9999* && ${KDEBASE} == kde-base ]] && \
582 EGIT_BRANCH="KDE/$(get_kde_version)" 565 EGIT_BRANCH="KDE/$(get_kde_version)"
583 566
584 # default repo uri 567 # default repo uri
585 EGIT_REPO_URI="${EGIT_MIRROR}/${_kmname}" 568 EGIT_REPO_URI+=( "${EGIT_MIRROR}/${_kmname}" )
586 569
587 debug-print "${FUNCNAME}: Repository: ${EGIT_REPO_URI}" 570 debug-print "${FUNCNAME}: Repository: ${EGIT_REPO_URI}"
588 debug-print "${FUNCNAME}: Branch: ${EGIT_BRANCH}" 571 debug-print "${FUNCNAME}: Branch: ${EGIT_BRANCH}"
589 ;; 572 ;;
590 esac 573 esac
645 debug-print-function ${FUNCNAME} "$@" 628 debug-print-function ${FUNCNAME} "$@"
646 629
647 if [[ ${KDE_BUILD_TYPE} = live ]]; then 630 if [[ ${KDE_BUILD_TYPE} = live ]]; then
648 case ${KDE_SCM} in 631 case ${KDE_SCM} in
649 svn) 632 svn)
650 migrate_store_dir
651 subversion_src_unpack 633 subversion_src_unpack
652 ;; 634 ;;
653 git) 635 git)
654 git-2_src_unpack 636 git-r3_src_unpack
655 ;; 637 ;;
656 esac 638 esac
657 else 639 else
658 unpack ${A} 640 unpack ${A}
659 fi 641 fi
702 case ${KDE_SCM} in 684 case ${KDE_SCM} in
703 svn) subversion_src_prepare ;; 685 svn) subversion_src_prepare ;;
704 esac 686 esac
705 fi 687 fi
706 688
707 # Apply patches 689 # Apply patches, cmake-utils does the job already
708 base_src_prepare 690 cmake-utils_src_prepare
709 691
710 # Save library dependencies 692 # Save library dependencies
711 if [[ -n ${KMSAVELIBS} ]] ; then 693 if [[ -n ${KMSAVELIBS} ]] ; then
712 save_library_dependencies 694 save_library_dependencies
713 fi 695 fi
798 kded4 2>&1 > /dev/null & 780 kded4 2>&1 > /dev/null &
799 kded4_pid=$! 781 kded4_pid=$!
800 fi 782 fi
801 783
802 cmake-utils_src_test 784 cmake-utils_src_test
803 } 785 }
804 786
805 # When run as normal user during ebuild development with the ebuild command, the 787 # When run as normal user during ebuild development with the ebuild command, the
806 # kde tests tend to access the session DBUS. This however is not possible in a real 788 # kde tests tend to access the session DBUS. This however is not possible in a real
807 # emerge or on the tinderbox. 789 # emerge or on the tinderbox.
808 # > make sure it does not happen, so bad tests can be recognized and disabled 790 # > make sure it does not happen, so bad tests can be recognized and disabled

Legend:
Removed from v.1.128  
changed lines
  Added in v.1.137

  ViewVC Help
Powered by ViewVC 1.1.20