/[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.120 Revision 1.122
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 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.120 2012/08/01 19:38:52 johu Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.122 2013/02/02 16:58:00 dilfridge 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
63# Set slot for KDEBASE known packages 63# Set slot for KDEBASE known packages
64case ${KDEBASE} in 64case ${KDEBASE} in
65 kde-base) 65 kde-base)
66 SLOT=4 66 SLOT=4
67 KDE_MINIMAL="${PV}" 67 KDE_MINIMAL="${PV}"
68 ;;
69 koffice)
70 SLOT="2"
71 ;; 68 ;;
72 kdevelop) 69 kdevelop)
73 if [[ ${KDE_BUILD_TYPE} = live ]]; then 70 if [[ ${KDE_BUILD_TYPE} = live ]]; then
74 # @ECLASS-VARIABLE: KDEVELOP_VERSION 71 # @ECLASS-VARIABLE: KDEVELOP_VERSION
75 # @DESCRIPTION: 72 # @DESCRIPTION:
173 if [[ ${KDE_BUILD_TYPE} = live && -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then 170 if [[ ${KDE_BUILD_TYPE} = live && -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
174 # Disable tests for live ebuilds by default 171 # Disable tests for live ebuilds by default
175 RESTRICT+=" test" 172 RESTRICT+=" test"
176 fi 173 fi
177 174
178 # Only add the kdeprefix USE flag for older versions, to help
179 # non-portage package managers handle the upgrade
180 if [[ ${PV} < 4.6.4 && ( ( ${KMNAME} != kdepim && ${PN} != kdepim-runtime ) || ${PV} < 4.6 ) ]]; then
181 IUSE+=" kdeprefix"
182 fi
183
184 # This code is to prevent portage from searching GENTOO_MIRRORS for 175 # This code is to prevent portage from searching GENTOO_MIRRORS for
185 # packages that will never be mirrored. (As they only will ever be in 176 # packages that will never be mirrored. (As they only will ever be in
186 # the overlay). 177 # the overlay).
187 case ${PV} in 178 case ${PV} in
188 *9999* | 4.?.[6-9]?) 179 *9999* | 4.?.[6-9]?)
189 RESTRICT+=" mirror" 180 RESTRICT+=" mirror"
190 ;; 181 ;;
191 esac 182 esac
192 ;; 183 ;;
193 koffice)
194 HOMEPAGE="http://www.koffice.org/"
195 LICENSE="GPL-2"
196 ;;
197 kdevelop) 184 kdevelop)
198 HOMEPAGE="http://www.kdevelop.org/" 185 HOMEPAGE="http://www.kdevelop.org/"
199 LICENSE="GPL-2" 186 LICENSE="GPL-2"
200 ;; 187 ;;
201esac 188esac
204# @DESCRIPTION: 191# @DESCRIPTION:
205# Determine version of qt we enforce as minimal for the package. 192# Determine version of qt we enforce as minimal for the package.
206if version_is_at_least 4.8.50 "${KDE_MINIMAL}"; then 193if version_is_at_least 4.8.50 "${KDE_MINIMAL}"; then
207 # Upstream has added an *undeclared* dependency on Qt 4.8... 194 # Upstream has added an *undeclared* dependency on Qt 4.8...
208 QT_MINIMAL="${QT_MINIMAL:-4.8.0}" 195 QT_MINIMAL="${QT_MINIMAL:-4.8.0}"
209elif version_is_at_least 4.7.80 "${KDE_MINIMAL}"; then 196else
210 QT_MINIMAL="${QT_MINIMAL:-4.7.4}" 197 QT_MINIMAL="${QT_MINIMAL:-4.7.4}"
211else
212 QT_MINIMAL="${QT_MINIMAL:-4.7.0}"
213fi 198fi
214 199
215# Declarative dependencies 200# Declarative dependencies
216qtdeclarativedepend=" 201qtdeclarativedepend="
217 >=x11-libs/qt-declarative-${QT_MINIMAL}:4 202 >=x11-libs/qt-declarative-${QT_MINIMAL}:4
419DEPEND+=" ${COMMONDEPEND}" 404DEPEND+=" ${COMMONDEPEND}"
420RDEPEND+=" ${COMMONDEPEND}" 405RDEPEND+=" ${COMMONDEPEND}"
421unset COMMONDEPEND 406unset COMMONDEPEND
422 407
423# Fetch section - If the ebuild's category is not 'kde-base' and if it is not a 408# Fetch section - If the ebuild's category is not 'kde-base' and if it is not a
424# koffice ebuild, the URI should be set in the ebuild itself 409# kdevelop ebuild, the URI should be set in the ebuild itself
425_calculate_src_uri() { 410_calculate_src_uri() {
426 debug-print-function ${FUNCNAME} "$@" 411 debug-print-function ${FUNCNAME} "$@"
427 412
428 local _kmname _kmname_pv 413 local _kmname _kmname_pv
429 414
454 # Unstable KDE SC releases 439 # Unstable KDE SC releases
455 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;; 440 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;;
456 4.[1234567].[12345]) 441 4.[1234567].[12345])
457 # Stable KDE SC with old .bz2 support 442 # Stable KDE SC with old .bz2 support
458 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 443 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
459 4.[89].8[05] | 4.[89].9[0235678])
460 # Unstable KDE SC releases
461 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;;
462 *) 444 *)
463 # Stable KDE SC releases 445 # Stable KDE SC releases
464 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;; 446 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;;
465 esac
466 ;;
467 koffice)
468 case ${PV} in
469 2.[1234].[6-9]*) SRC_URI="mirror://kde/unstable/${_kmname_pv}/${_kmname_pv}.tar.bz2" ;;
470 *) SRC_URI="mirror://kde/stable/${_kmname_pv}/${_kmname_pv}.tar.bz2" ;;
471 esac 447 esac
472 ;; 448 ;;
473 kdevelop|kdevelop-php*|kdevplatform) 449 kdevelop|kdevelop-php*|kdevplatform)
474 case ${KDEVELOP_VERSION} in 450 case ${KDEVELOP_VERSION} in
475 4.[12].[6-9]*) SRC_URI="mirror://kde/unstable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.bz2" ;; 451 4.[12].[6-9]*) SRC_URI="mirror://kde/unstable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.bz2" ;;
535 # Unpack them in toplevel dir, so that they won't conflict with kde4-meta 511 # Unpack them in toplevel dir, so that they won't conflict with kde4-meta
536 # build packages from same svn location. 512 # build packages from same svn location.
537 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}" 513 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
538 ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}" 514 ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}"
539 ;; 515 ;;
540 koffice)
541 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}"
542 ;;
543 *) 516 *)
544 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}" 517 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
545 ;; 518 ;;
546 esac 519 esac
547 else 520 else
550 ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}" 523 ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}"
551 fi 524 fi
552 # @ECLASS-VARIABLE: ESVN_UP_FREQ 525 # @ECLASS-VARIABLE: ESVN_UP_FREQ
553 # @DESCRIPTION: 526 # @DESCRIPTION:
554 # This variable is used for specifying the timeout between svn synces 527 # This variable is used for specifying the timeout between svn synces
555 # for kde-base and koffice modules. Does not affect misc apps. 528 # for kde-base modules. Does not affect misc apps.
556 # Default value is 1 hour. 529 # Default value is 1 hour.
557 [[ ${KDEBASE} = kde-base || ${KDEBASE} = koffice ]] && ESVN_UP_FREQ=${ESVN_UP_FREQ:-1} 530 [[ ${KDEBASE} = kde-base ]] && ESVN_UP_FREQ=${ESVN_UP_FREQ:-1}
558 ;; 531 ;;
559 git) 532 git)
560 local _kmname 533 local _kmname
561 # @ECLASS-VARIABLE: EGIT_MIRROR 534 # @ECLASS-VARIABLE: EGIT_MIRROR
562 # @DESCRIPTION: 535 # @DESCRIPTION:
610 debug-print-function ${FUNCNAME} "$@" 583 debug-print-function ${FUNCNAME} "$@"
611 584
612 if has handbook ${IUSE} || has "+handbook" ${IUSE} && [ "${KDE_HANDBOOK}" != optional ] ; then 585 if has handbook ${IUSE} || has "+handbook" ${IUSE} && [ "${KDE_HANDBOOK}" != optional ] ; then
613 eqawarn "Handbook support is enabled via KDE_HANDBOOK=optional in the ebuild." 586 eqawarn "Handbook support is enabled via KDE_HANDBOOK=optional in the ebuild."
614 eqawarn "Please do not just set IUSE=handbook, as this leads to dependency errors." 587 eqawarn "Please do not just set IUSE=handbook, as this leads to dependency errors."
615 fi
616
617 if use_if_iuse kdeprefix; then
618 eerror "Sorry, kdeprefix support has been removed."
619 eerror "Please remove kdeprefix from your USE variable."
620 die "kdeprefix support has been removed"
621 fi
622
623 if [[ ${CATEGORY}/${PN} != kde-base/kdelibs && ${CATEGORY}/${PN} != kde-base/kde-env ]] && \
624 { [[ ${KDE_REQUIRED} == always ]] || { [[ ${KDE_REQUIRED} == optional ]] && use kde; }; } && \
625 has_version kde-base/kdelibs[kdeprefix]; then
626 eerror "Sorry, kdeprefix support has been removed."
627 eerror "Please rebuild kdelibs without kdeprefix support."
628 die "kdeprefix support has been removed"
629 fi 588 fi
630 589
631 # Don't set KDEHOME during compilation, it will cause access violations 590 # Don't set KDEHOME during compilation, it will cause access violations
632 unset KDEHOME 591 unset KDEHOME
633 592
733 # Inject library dependencies 692 # Inject library dependencies
734 if [[ -n ${KMLOADLIBS} ]] ; then 693 if [[ -n ${KMLOADLIBS} ]] ; then
735 load_library_dependencies 694 load_library_dependencies
736 fi 695 fi
737 696
738 # Hack for manuals relying on outdated DTD, only outside kde-base/koffice/... 697 # Hack for manuals relying on outdated DTD, only outside kde-base/...
739 if [[ -z ${KDEBASE} ]]; then 698 if [[ -z ${KDEBASE} ]]; then
740 find "${S}" -name "*.docbook" \ 699 find "${S}" -name "*.docbook" \
741 -exec sed -i -r \ 700 -exec sed -i -r \
742 -e 's:-//KDE//DTD DocBook XML V4\.1(\..)?-Based Variant V1\.[01]//EN:-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN:g' {} + \ 701 -e 's:-//KDE//DTD DocBook XML V4\.1(\..)?-Based Variant V1\.[01]//EN:-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN:g' {} + \
743 || die 'failed to fix DocBook variant version' 702 || die 'failed to fix DocBook variant version'

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

  ViewVC Help
Powered by ViewVC 1.1.20