/[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.53 Revision 1.54
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-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.53 2009/11/25 19:51:11 tampakrap Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.54 2009/12/01 10:56:17 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
17# @DESCRIPTION: 17# @DESCRIPTION:
18# Specify if cmake buildsystem is being used. Possible values are 'always' and 'never'. 18# Specify if cmake buildsystem is being used. Possible values are 'always' and 'never'.
19# Please note that if it's set to 'never' you need to explicitly override following phases: 19# Please note that if it's set to 'never' you need to explicitly override following phases:
20# src_configure, src_compile, src_test and src_install. 20# src_configure, src_compile, src_test and src_install.
21# Defaults to 'always'. 21# Defaults to 'always'.
22CMAKE_REQUIRED="${CMAKE_REQUIRED:-${CMAKE_REQUIRED:-always}}" 22: ${CMAKE_REQUIRED:=always}
23if [[ ${CMAKE_REQUIRED} = false || ${CMAKE_REQUIRED} = never ]]; then 23if [[ ${CMAKE_REQUIRED} = false || ${CMAKE_REQUIRED} = never ]]; then
24 buildsystem_eclass="" 24 buildsystem_eclass=""
25 export_fns="" 25 export_fns=""
26else 26else
27 buildsystem_eclass="cmake-utils" 27 buildsystem_eclass="cmake-utils"
142 142
143# @ECLASS-VARIABLE: QT_MINIMAL 143# @ECLASS-VARIABLE: QT_MINIMAL
144# @DESCRIPTION: 144# @DESCRIPTION:
145# Determine version of qt we enforce as minimal for the package. 4.4.0 4.5.1.. 145# Determine version of qt we enforce as minimal for the package. 4.4.0 4.5.1..
146# Currently defaults to 4.5.1 for KDE 4.3 and earlier 146# Currently defaults to 4.5.1 for KDE 4.3 and earlier
147# or 4.6.0_beta for KDE 4.4 and later 147# or 4.6.0_rc1 for KDE 4.4 and later
148if slot_is_at_least 4.4 "${KDE_MINIMAL}"; then 148if slot_is_at_least 4.4 "${KDE_MINIMAL}"; then
149 QT_MINIMAL="${QT_MINIMAL:-4.6.0_beta}" 149 QT_MINIMAL="${QT_MINIMAL:-4.6.0_rc1}"
150fi 150fi
151 151
152QT_MINIMAL="${QT_MINIMAL:-4.5.1}" 152QT_MINIMAL="${QT_MINIMAL:-4.5.1}"
153 153
154# OpenGL dependencies 154# OpenGL dependencies
237 " 237 "
238 fi 238 fi
239fi 239fi
240kdedepend=" 240kdedepend="
241 dev-util/pkgconfig 241 dev-util/pkgconfig
242 !aqua? (
243 x11-proto/xextproto
244 x11-proto/xf86vidmodeproto
245 )
242" 246"
243case ${KDE_REQUIRED} in 247case ${KDE_REQUIRED} in
244 always) 248 always)
245 IUSE+=" aqua" 249 IUSE+=" aqua"
246 COMMONDEPEND+=" ${kdecommondepend}" 250 COMMONDEPEND+=" ${kdecommondepend}"
251 COMMONDEPEND+=" kde? ( ${kdecommondepend} )" 255 COMMONDEPEND+=" kde? ( ${kdecommondepend} )"
252 DEPEND+=" kde? ( ${kdedepend} )" 256 DEPEND+=" kde? ( ${kdedepend} )"
253 ;; 257 ;;
254 *) ;; 258 *) ;;
255esac 259esac
260
256unset kdecommondepend kdedepend 261unset kdecommondepend kdedepend
257 262
258debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}" 263debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}"
259debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}" 264debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}"
260debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}" 265debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}"
261 266
262# Accumulate dependencies set by this eclass 267# Accumulate dependencies set by this eclass
263DEPEND+=" ${COMMONDEPEND}" 268DEPEND+=" ${COMMONDEPEND}"
264RDEPEND+=" ${COMMONDEPEND}" 269RDEPEND+=" ${COMMONDEPEND}"
265unset COMMONDEPEND 270unset COMMONDEPEND
271
272# Add experimental kdeenablefinal, disabled by default
273IUSE+=" kdeenablefinal"
266 274
267# Fetch section - If the ebuild's category is not 'kde-base' and if it is not a 275# Fetch section - If the ebuild's category is not 'kde-base' and if it is not a
268# koffice ebuild, the URI should be set in the ebuild itself 276# koffice ebuild, the URI should be set in the ebuild itself
269case ${BUILD_TYPE} in 277case ${BUILD_TYPE} in
270 live) 278 live)
303 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdebase/${KMNAME#kdebase-}" 311 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdebase/${KMNAME#kdebase-}"
304 ;; 312 ;;
305 kdelibs-*) 313 kdelibs-*)
306 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdelibs/${KMNAME#kdelibs-}" 314 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdelibs/${KMNAME#kdelibs-}"
307 ;; 315 ;;
308 kdereview) 316 kdereview*)
309 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}" 317 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
310 ;; 318 ;;
311 kdesupport) 319 kdesupport)
312 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}" 320 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
313 ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}" 321 ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}"
358 case ${PV} in 366 case ${PV} in
359 4.3.85 | 4.3.9[0568]) 367 4.3.85 | 4.3.9[0568])
360 # block for normally packed unstable releases 368 # block for normally packed unstable releases
361 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 369 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
362 4.3.[6-9]*) 370 4.3.[6-9]*)
371 # Repacked tarballs: need to depend on xz-utils to ensure that they can be unpacked
363 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.lzma" ;; 372 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.xz"
373 DEPEND+=" app-arch/xz-utils"
374 ;;
364 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 375 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
365 esac 376 esac
366 ;; 377 ;;
367 koffice) 378 koffice)
368 case ${PV} in 379 case ${PV} in
452 debug-print-function ${FUNCNAME} "$@" 463 debug-print-function ${FUNCNAME} "$@"
453 464
454 if [[ ${BUILD_TYPE} = live ]]; then 465 if [[ ${BUILD_TYPE} = live ]]; then
455 migrate_store_dir 466 migrate_store_dir
456 subversion_src_unpack 467 subversion_src_unpack
468 elif [[ ${EAPI} == 2 ]]; then
469 local file
470 for file in ${A}; do
471 # This setup is because EAPI <= 2 cannot unpack *.tar.xz files
472 # directly, so we do it ourselves (using the exact same code as portage)
473 case ${file} in
474 *.tar.xz)
475 echo ">>> Unpacking ${file} to ${PWD}"
476 xz -dc "${DISTDIR}"/${file} | tar xof -
477 assert "failed unpacking ${file}"
478 ;;
479 *)
480 unpack ${file}
481 ;;
482 esac
483 done
457 else 484 else
458 base_src_unpack 485 # For EAPI >= 3, we can just use unpack() directly
486 unpack ${A}
459 fi 487 fi
460} 488}
461 489
462# @FUNCTION: kde4-base_src_prepare 490# @FUNCTION: kde4-base_src_prepare
463# @DESCRIPTION: 491# @DESCRIPTION:
498# @DESCRIPTION: 526# @DESCRIPTION:
499# Function for configuring the build of KDE4 applications. 527# Function for configuring the build of KDE4 applications.
500kde4-base_src_configure() { 528kde4-base_src_configure() {
501 debug-print-function ${FUNCNAME} "$@" 529 debug-print-function ${FUNCNAME} "$@"
502 530
503 # Handle common release builds
504 if ! has debug ${IUSE//+} || ! use debug; then
505 append-cppflags -DQT_NO_DEBUG
506 fi
507
508 # Build tests in src_test only, where we override this value 531 # Build tests in src_test only, where we override this value
509 local cmakeargs="-DKDE4_BUILD_TESTS=OFF" 532 local cmakeargs="-DKDE4_BUILD_TESTS=OFF"
510 533
511 # set "real" debug mode 534 if has kdeenablefinal ${IUSE//+} && use kdeenablefinal; then
535 cmakeargs+=" -DKDE4_ENABLE_FINAL=ON"
536 fi
537
512 if has debug ${IUSE//+} && use debug; then 538 if has debug ${IUSE//+} && use debug; then
539 # Set "real" debug mode
513 CMAKE_BUILD_TYPE="Debugfull" 540 CMAKE_BUILD_TYPE="Debugfull"
541 else
542 # Handle common release builds
543 append-cppflags -DQT_NO_DEBUG
514 fi 544 fi
515 545
516 # Set distribution name 546 # Set distribution name
517 [[ ${PN} = kdelibs ]] && cmakeargs+=" -DKDE_DISTRIBUTION_TEXT=Gentoo" 547 [[ ${PN} = kdelibs ]] && cmakeargs+=" -DKDE_DISTRIBUTION_TEXT=Gentoo"
518 548

Legend:
Removed from v.1.53  
changed lines
  Added in v.1.54

  ViewVC Help
Powered by ViewVC 1.1.20