/[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.143 Revision 1.157
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2015 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.143 2014/11/13 04:19:51 kensington Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.157 2015/07/01 11:28:23 mrueg 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 EAPIs 4 and 5. This will be 13# NOTE: KDE 4 ebuilds currently support EAPI 5. This will be
14# reviewed over time as new EAPI versions are approved. 14# reviewed over time as new EAPI versions are approved.
15 15
16if [[ -z ${_KDE4_BASE_ECLASS} ]]; then 16if [[ -z ${_KDE4_BASE_ECLASS} ]]; then
17_KDE4_BASE_ECLASS=1 17_KDE4_BASE_ECLASS=1
18 18
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) 69 SLOT=4/$(get_version_component_range 1-2)
72 ;;
73 *)
74 SLOT=4
75 ;;
76 esac
77 KDE_MINIMAL="${PV}" 70 KDE_MINIMAL="${PV}"
78 ;; 71 ;;
79 kdevelop) 72 kdevelop)
80 if [[ ${KDE_BUILD_TYPE} = live ]]; then 73 if [[ ${KDE_BUILD_TYPE} = live ]]; then
81 # @ECLASS-VARIABLE: KDEVELOP_VERSION 74 # @ECLASS-VARIABLE: KDEVELOP_VERSION
184 177
185 # This code is to prevent portage from searching GENTOO_MIRRORS for 178 # This code is to prevent portage from searching GENTOO_MIRRORS for
186 # 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
187 # the overlay). 180 # the overlay).
188 case ${PV} in 181 case ${PV} in
189 *9999* | 4.?.[6-9]? | 4.??.[6-9]?) 182 *9999* | 4.?.[6-9]? | 4.??.[6-9]? | ??.?.[6-9]? | ??.??.[6-9]?)
190 RESTRICT+=" mirror" 183 RESTRICT+=" mirror"
191 ;; 184 ;;
192 esac 185 esac
193 ;; 186 ;;
194 kdevelop) 187 kdevelop)
286kdecommondepend=" 279kdecommondepend="
287 dev-lang/perl 280 dev-lang/perl
288 >=dev-qt/qt3support-${QT_MINIMAL}:4[accessibility] 281 >=dev-qt/qt3support-${QT_MINIMAL}:4[accessibility]
289 >=dev-qt/qtcore-${QT_MINIMAL}:4[qt3support,ssl] 282 >=dev-qt/qtcore-${QT_MINIMAL}:4[qt3support,ssl]
290 >=dev-qt/qtdbus-${QT_MINIMAL}:4 283 >=dev-qt/qtdbus-${QT_MINIMAL}:4
291 >=dev-qt/designer-${QT_MINIMAL}:4[-phonon] 284 >=dev-qt/designer-${QT_MINIMAL}:4
292 >=dev-qt/qtgui-${QT_MINIMAL}:4[accessibility,dbus(+)] 285 >=dev-qt/qtgui-${QT_MINIMAL}:4[accessibility,dbus(+)]
293 >=dev-qt/qtscript-${QT_MINIMAL}:4 286 >=dev-qt/qtscript-${QT_MINIMAL}:4
294 >=dev-qt/qtsql-${QT_MINIMAL}:4[qt3support] 287 >=dev-qt/qtsql-${QT_MINIMAL}:4[qt3support]
295 >=dev-qt/qtsvg-${QT_MINIMAL}:4 288 >=dev-qt/qtsvg-${QT_MINIMAL}:4
296 >=dev-qt/qttest-${QT_MINIMAL}:4 289 >=dev-qt/qttest-${QT_MINIMAL}:4
327 ) 320 )
328" 321"
329 322
330kderdepend="" 323kderdepend=""
331 324
325if [[ ${CATEGORY} == kde-apps ]]; then
326 kderdepend+=" !kde-base/${PN}"
327fi
328
332# all packages needs oxygen icons for basic iconset 329# all packages needs oxygen icons for basic iconset
333if [[ ${PN} != oxygen-icons ]]; then 330if [[ ${PN} != oxygen-icons ]]; then
334 kderdepend+=" $(add_kdebase_dep oxygen-icons)" 331 kderdepend+=" kde-apps/oxygen-icons"
335fi 332fi
336 333
337# add a dependency over kde-l10n 334# add a dependency over kde-l10n
338if [[ ${KDEBASE} != "kde-base" && -n ${KDE_LINGUAS} ]]; then 335if [[ ${KDEBASE} != "kde-base" && -n ${KDE_LINGUAS} ]]; then
339 for _lingua in ${KDE_LINGUAS}; do 336 for _lingua in ${KDE_LINGUAS}; do
340 # if our package has lignuas, pull in kde-l10n with selected lingua enabled, 337 # if our package has linguas, pull in kde-l10n with selected lingua enabled,
341 # but only for selected ones. 338 # but only for selected ones.
342 # this can't be done on one line because if user doesn't use any localisation 339 # this can't be done on one line because if user doesn't use any localisation
343 # then he is probably not interested in kde-l10n at all. 340 # then he is probably not interested in kde-l10n at all.
344 kderdepend+=" 341 kderdepend+="
345 linguas_${_lingua}? ( $(add_kdebase_dep kde-l10n "linguas_${_lingua}(+)") ) 342 linguas_${_lingua}? ( $(add_kdeapps_dep kde4-l10n "linguas_${_lingua}(+)") )
346 " 343 "
347 done 344 done
348 unset _lingua 345 unset _lingua
349fi 346fi
350 347
371 368
372case ${KDE_SELINUX_MODULE} in 369case ${KDE_SELINUX_MODULE} in
373 none) ;; 370 none) ;;
374 *) 371 *)
375 IUSE+=" selinux" 372 IUSE+=" selinux"
376 kdecommondepend+=" selinux? ( sec-policy/selinux-${KDE_SELINUX_MODULE} )" 373 kderdepend+=" selinux? ( sec-policy/selinux-${KDE_SELINUX_MODULE} )"
377 ;; 374 ;;
378esac 375esac
379 376
380# We always need the aqua useflag because otherwise we cannot = refer to it inside 377# We always need the aqua useflag because otherwise we cannot = refer to it inside
381# add_kdebase_dep. This was always kind of a bug, but came to light with EAPI=5 378# add_kdebase_dep. This was always kind of a bug, but came to light with EAPI=5
431 case ${PV} in 428 case ${PV} in
432 4.4.11.1) 429 4.4.11.1)
433 # KDEPIM 4.4, special case 430 # KDEPIM 4.4, special case
434 # TODO: Remove this part when KDEPIM 4.4 gets out of the tree 431 # TODO: Remove this part when KDEPIM 4.4 gets out of the tree
435 SRC_URI="mirror://kde/stable/kdepim-${PV}/src/${_kmname_pv}.tar.bz2" ;; 432 SRC_URI="mirror://kde/stable/kdepim-${PV}/src/${_kmname_pv}.tar.bz2" ;;
433 4.4.20*)
434 # KDEPIM 4.4 no-akonadi branch, special case
435 # TODO: Remove this part when KDEPIM 4.4 gets out of the tree
436 SRC_URI="http://dev.gentoo.org/~dilfridge/distfiles/${_kmname_pv}.tar.xz" ;;
436 4.?.[6-9]? | 4.??.[6-9]?) 437 4.?.[6-9]? | 4.??.[6-9]?)
437 # Unstable KDE SC releases 438 # Unstable KDE SC releases
438 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;; 439 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;;
439 4.[1-7].[12345])
440 # Stable KDE SC with old .bz2 support
441 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
442 4.11.9)
443 # Part of 4.12 actually, sigh. Not stable for next release!
444 SRC_URI="mirror://kde/stable/4.12.5/src/${_kmname_pv}.tar.xz" ;;
445 4.11.11)
446 # Part of 4.13 actually, sigh. Not stable for next release!
447 SRC_URI="mirror://kde/stable/4.13.3/src/${_kmname_pv}.tar.xz" ;;
448 4.11.12)
449 # Part of 4.14 actually, sigh. Not stable for next release!
450 SRC_URI="mirror://kde/stable/4.14.1/src/${_kmname_pv}.tar.xz" ;;
451 4.11.13)
452 # Part of 4.14 actually, sigh. Not stable for next release!
453 SRC_URI="mirror://kde/stable/4.14.2/src/${_kmname_pv}.tar.xz" ;;
454 4.11.14) 440 4.11.14)
455 # Part of 4.14 actually, sigh. Not stable for next release! 441 # Part of 4.14 actually, sigh. Not stable for next release!
456 SRC_URI="mirror://kde/stable/4.14.3/src/${_kmname_pv}.tar.xz" ;; 442 SRC_URI="mirror://kde/stable/4.14.3/src/${_kmname_pv}.tar.xz" ;;
443 4.11.17)
444 # Part of 14.12.3 actually, sigh. Not stable for next release!
445 SRC_URI="mirror://kde/stable/applications/14.12.3/src/${_kmname_pv}.tar.xz" ;;
446 4.11.18)
447 # Part of 15.04.0 actually, sigh. Not stable for next release!
448 SRC_URI="mirror://kde/stable/applications/15.04.0/src/${_kmname_pv}.tar.xz" ;;
449 4.11.19)
450 # Part of 15.04.1 actually, sigh. Not stable for next release!
451 SRC_URI="mirror://kde/stable/applications/15.04.1/src/${_kmname_pv}.tar.xz" ;;
452 4.11.20)
453 # Part of 15.04.2 actually, sigh. Not stable for next release!
454 SRC_URI="mirror://kde/stable/applications/15.04.2/src/${_kmname_pv}.tar.xz" ;;
455 4.11.21)
456 # Part of 15.04.3 actually, sigh. Not stable for next release!
457 SRC_URI="mirror://kde/stable/applications/15.04.3/src/${_kmname_pv}.tar.xz" ;;
458 4.14.3)
459 # Last SC release
460 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;;
461 4.14.6)
462 # Part of 14.12.3 actually, sigh. Not stable for next release!
463 SRC_URI="mirror://kde/stable/applications/14.12.3/src/${_kmname_pv}.tar.xz" ;;
464 4.14.7)
465 # Part of 15.04.0 actually, sigh. Not stable for next release!
466 SRC_URI="mirror://kde/stable/applications/15.04.0/src/${_kmname_pv}.tar.xz" ;;
467 4.14.8)
468 # Part of 15.04.1 actually, sigh. Not stable for next release!
469 SRC_URI="mirror://kde/stable/applications/15.04.1/src/${_kmname_pv}.tar.xz" ;;
470 4.14.9)
471 # Part of 15.04.2 actually, sigh. Not stable for next release!
472 SRC_URI="mirror://kde/stable/applications/15.04.2/src/${_kmname_pv}.tar.xz" ;;
473 4.14.10)
474 # Part of 15.04.3 actually, sigh. Not stable for next release!
475 SRC_URI="mirror://kde/stable/applications/15.04.3/src/${_kmname_pv}.tar.xz" ;;
476 ??.?.[6-9]? | ??.??.[4-9]?)
477 # Unstable KDE Applications releases
478 SRC_URI="mirror://kde/unstable/applications/${PV}/src/${_kmname}-${PV}.tar.xz" ;;
457 *) 479 *)
458 # Stable KDE SC releases 480 # Stable KDE Applications releases
459 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;; 481 SRC_URI="mirror://kde/stable/applications/${PV}/src/${_kmname}-${PV}.tar.xz"
482 ;;
460 esac 483 esac
461 ;; 484 ;;
462 kdevelop|kdevelop-php*|kdevplatform) 485 kdevelop|kdevelop-php*|kdevplatform)
463 case ${KDEVELOP_VERSION} in 486 case ${KDEVELOP_VERSION} in
464 4.[123].[6-9]*) SRC_URI="mirror://kde/unstable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.bz2" ;; 487 4.[123].[6-9]*) SRC_URI="mirror://kde/unstable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.xz" ;;
465 *) SRC_URI="mirror://kde/stable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.bz2" ;; 488 *) SRC_URI="mirror://kde/stable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.xz" ;;
466 esac 489 esac
467 ;; 490 ;;
468 esac 491 esac
469} 492}
470 493
475 case ${KDE_SCM} in 498 case ${KDE_SCM} in
476 svn) 499 svn)
477 # Determine branch URL based on live type 500 # Determine branch URL based on live type
478 local branch_prefix 501 local branch_prefix
479 case ${PV} in 502 case ${PV} in
480 4.9999*) 503 9999*)
481 # trunk 504 # trunk
482 branch_prefix="trunk/KDE" 505 branch_prefix="trunk/KDE"
483 ;; 506 ;;
484 *) 507 *)
485 # branch 508 # branch
562 else 585 else
563 _kmname=${PN} 586 _kmname=${PN}
564 fi 587 fi
565 588
566 # default branching 589 # default branching
567 [[ ${PV} != 4.9999* && ${KDEBASE} == kde-base ]] && \ 590 [[ ${PV} != 4.9999* && ${PV} != 9999 && ${KDEBASE} == kde-base ]] && \
568 EGIT_BRANCH="KDE/$(get_kde_version)" 591 EGIT_BRANCH="KDE/$(get_kde_version)"
592
593 # Applications branching
594 [[ ${PV} == ??.??.49.9999 && ${KDEBASE} == kde-base ]] && \
595 EGIT_BRANCH="Applications/$(get_kde_version)"
569 596
570 # default repo uri 597 # default repo uri
571 EGIT_REPO_URI+=( "${EGIT_MIRROR}/${_kmname}" ) 598 EGIT_REPO_URI+=( "${EGIT_MIRROR}/${_kmname}" )
572 599
573 debug-print "${FUNCNAME}: Repository: ${EGIT_REPO_URI}" 600 debug-print "${FUNCNAME}: Repository: ${EGIT_REPO_URI}"
883 einfo "Do _NOT_ file bugs at bugs.gentoo.org because of this ebuild!" 910 einfo "Do _NOT_ file bugs at bugs.gentoo.org because of this ebuild!"
884 echo 911 echo
885 fi 912 fi
886 # for all 3rd party soft tell user that he SHOULD install kdebase-startkde or kdebase-runtime-meta 913 # for all 3rd party soft tell user that he SHOULD install kdebase-startkde or kdebase-runtime-meta
887 if [[ ${KDEBASE} != kde-base ]] && \ 914 if [[ ${KDEBASE} != kde-base ]] && \
888 ! has_version 'kde-base/kdebase-runtime-meta' && \ 915 ! has_version 'kde-apps/kdebase-runtime-meta' && \
889 ! has_version 'kde-base/kdebase-startkde'; then 916 ! has_version 'kde-base/kdebase-startkde'; then
890 if [[ ${KDE_REQUIRED} == always ]] || ( [[ ${KDE_REQUIRED} == optional ]] && use kde ); then 917 if [[ ${KDE_REQUIRED} == always ]] || ( [[ ${KDE_REQUIRED} == optional ]] && use kde ); then
891 echo 918 echo
892 ewarn "WARNING! Your system configuration contains neither \"kde-base/kdebase-runtime-meta\"" 919 ewarn "WARNING! Your system configuration contains neither \"kde-base/kdebase-runtime-meta\""
893 ewarn "nor \"kde-base/kdebase-startkde\". You need one of above." 920 ewarn "nor \"kde-base/kdebase-startkde\". You need one of above."

Legend:
Removed from v.1.143  
changed lines
  Added in v.1.157

  ViewVC Help
Powered by ViewVC 1.1.20