/[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.36 Revision 1.37
1# Copyright 2007-2009 Gentoo Foundation 1# Copyright 2007-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.36 2009/04/18 21:33:08 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.37 2009/05/09 13:23:15 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
51# Verify KDE_MINIMAL (display QA notice in pkg_setup, still we need to fix it here) 51# Verify KDE_MINIMAL (display QA notice in pkg_setup, still we need to fix it here)
52if [[ -n ${KDE_MINIMAL} ]]; then 52if [[ -n ${KDE_MINIMAL} ]]; then
53 for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do 53 for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do
54 [[ ${KDE_MINIMAL} = ${slot} ]] && KDE_MINIMAL_VALID=1 && break 54 [[ ${KDE_MINIMAL} = ${slot} ]] && KDE_MINIMAL_VALID=1 && break
55 done 55 done
56 unset slot
56 [[ -z ${KDE_MINIMAL_VALID} ]] && unset KDE_MINIMAL 57 [[ -z ${KDE_MINIMAL_VALID} ]] && unset KDE_MINIMAL
57else 58else
58 KDE_MINIMAL_VALID=1 59 KDE_MINIMAL_VALID=1
59fi 60fi
60 61
165 IUSE="${IUSE} +kdeprefix" 166 IUSE="${IUSE} +kdeprefix"
166 else 167 else
167 # All other ebuild types default to -kdeprefix as before 168 # All other ebuild types default to -kdeprefix as before
168 IUSE="${IUSE} kdeprefix" 169 IUSE="${IUSE} kdeprefix"
169 fi 170 fi
170 # Determine SLOT from PV 171 # Determine SLOT from PVs
171 case ${PV} in 172 case ${PV} in
173 *.9999*) SLOT="${PV/.9999*/}" ;; # stable live
172 4.3* | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) SLOT="4.3" ;; 174 4.3* | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) SLOT="4.3" ;;
173 4.2* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*) SLOT="4.2" ;; 175 4.2* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*) SLOT="4.2" ;;
174 *9999*) SLOT="live" ;; 176 9999*) SLOT="live" ;; # regular live
175 *) die "Unsupported ${PV}" ;; 177 *) die "Unsupported ${PV}" ;;
176 esac 178 esac
177 _kdedir="${SLOT}" 179 _kdedir="${SLOT}"
178 _pv="-${PV}:${SLOT}" 180 _pv="-${PV}:${SLOT}"
179 _pvn="-${PV}" 181 _pvn="-${PV}"
185 RDEPEND="${RDEPEND} 187 RDEPEND="${RDEPEND}
186 !kdeprefix? ( !kde-base/${PN}:${slot}[-kdeprefix] ) 188 !kdeprefix? ( !kde-base/${PN}:${slot}[-kdeprefix] )
187 " 189 "
188 fi 190 fi
189 done 191 done
192 unset slot
190 ;; 193 ;;
191 194
192 koffice) 195 koffice)
193 SLOT="2" 196 SLOT="2"
194 _pv="-${KDE_MINIMAL}" 197 _pv="-${KDE_MINIMAL}"
228 " 231 "
229 fi 232 fi
230fi 233fi
231unset _pv _pvn 234unset _pv _pvn
232kdedepend=" 235kdedepend="
233 >=dev-util/cmake-2.6.2
234 dev-util/pkgconfig 236 dev-util/pkgconfig
235 >=sys-apps/sandbox-1.3.2 237 >=sys-apps/sandbox-1.3.2
236" 238"
237case ${KDE_REQUIRED} in 239case ${KDE_REQUIRED} in
238 always) 240 always)
260 262
261# Fetch section - If the ebuild's category is not 'kde-base' and if it is not a 263# Fetch section - If the ebuild's category is not 'kde-base' and if it is not a
262# koffice ebuild, the URI should be set in the ebuild itself 264# koffice ebuild, the URI should be set in the ebuild itself
263case ${BUILD_TYPE} in 265case ${BUILD_TYPE} in
264 live) 266 live)
267 # Determine branch URL based on live type
268 local branch_prefix
269 case ${PV} in
270 9999*)
271 # trunk
272 branch_prefix="trunk/KDE"
273 ;;
274 *)
275 # branch
276 branch_prefix="branches/KDE/${SLOT}"
277 # @ECLASS-VARIABLE: ESVN_PROJECT_SUFFIX
278 # @DESCRIPTION
279 # Suffix appended to ESVN_PROJECT depending on fetched branch.
280 # Defaults is empty (for -9999 = trunk), and "-${PV}" otherwise.
281 ESVN_PROJECT_SUFFIX="-${PV}"
282 ;;
283 esac
265 SRC_URI="" 284 SRC_URI=""
266 # @ECLASS-VARIABLE: ESVN_MIRROR 285 # @ECLASS-VARIABLE: ESVN_MIRROR
267 # @DESCRIPTION: 286 # @DESCRIPTION:
268 # This variable allows easy overriding of default kde mirror service 287 # This variable allows easy overriding of default kde mirror service
269 # (anonsvn) with anything else you might want to use. 288 # (anonsvn) with anything else you might want to use.
270 ESVN_MIRROR=${ESVN_MIRROR:=svn://anonsvn.kde.org/home/kde} 289 ESVN_MIRROR=${ESVN_MIRROR:=svn://anonsvn.kde.org/home/kde}
271 # Split ebuild, or extragear stuff 290 # Split ebuild, or extragear stuff
272 if [[ -n ${KMNAME} ]]; then 291 if [[ -n ${KMNAME} ]]; then
273 ESVN_PROJECT="${KMNAME}" 292 ESVN_PROJECT="${KMNAME}${ESVN_PROJECT_SUFFIX}"
274 if [[ -z ${KMNOMODULE} ]] && [[ -z ${KMMODULE} ]]; then 293 if [[ -z ${KMNOMODULE} ]] && [[ -z ${KMMODULE} ]]; then
275 KMMODULE="${PN}" 294 KMMODULE="${PN}"
276 fi 295 fi
277 # Split kde-base/ ebuilds: (they reside in trunk/KDE) 296 # Split kde-base/ ebuilds: (they reside in trunk/KDE)
278 case ${KMNAME} in 297 case ${KMNAME} in
279 kdebase-*) 298 kdebase-*)
280 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/KDE/kdebase/${KMNAME#kdebase-}" 299 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdebase/${KMNAME#kdebase-}"
281 ;; 300 ;;
282 kdereview) 301 kdereview)
283 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}" 302 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
284 ;; 303 ;;
285 kdesupport) 304 kdesupport)
286 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}" 305 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
287 ESVN_PROJECT="${PN}" 306 ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}"
288 ;; 307 ;;
289 kde*) 308 kde*)
290 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/KDE/${KMNAME}" 309 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/${KMNAME}"
291 ;; 310 ;;
292 extragear*|playground*) 311 extragear*|playground*)
293 # Unpack them in toplevel dir, so that they won't conflict with kde4-meta 312 # Unpack them in toplevel dir, so that they won't conflict with kde4-meta
294 # build packages from same svn location. 313 # build packages from same svn location.
295 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}" 314 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
296 ESVN_PROJECT="${PN}" 315 ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}"
297 ;; 316 ;;
298 koffice) 317 koffice)
299 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}" 318 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}"
300 ;; 319 ;;
301 *) 320 *)
302 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}" 321 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
303 ;; 322 ;;
304 esac 323 esac
305 else 324 else
306 # kdelibs, kdepimlibs 325 # kdelibs, kdepimlibs
307 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/KDE/${PN}" 326 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/${PN}"
308 ESVN_PROJECT="${PN}" 327 ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}"
309 fi 328 fi
310 # limit syncing to 1 hour. 329 # limit syncing to 1 hour.
311 ESVN_UP_FREQ=${ESVN_UP_FREQ:-1} 330 ESVN_UP_FREQ=${ESVN_UP_FREQ:-1}
312 ;; 331 ;;
313 *) 332 *)
325 _kmname_pv="${_kmname}-${PV}" 344 _kmname_pv="${_kmname}-${PV}"
326 if [[ $NEED_KDE != live ]]; then 345 if [[ $NEED_KDE != live ]]; then
327 case ${KDEBASE} in 346 case ${KDEBASE} in
328 kde-base) 347 kde-base)
329 case ${PV} in 348 case ${PV} in
349 4.2.85)
350 # block for normally packed unstable releases
351 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
330 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) 352 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*)
331 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.lzma" ;; 353 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.lzma" ;;
332 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6* | 4.0.9* | 4.0.8*) 354 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6* | 4.0.9* | 4.0.8*)
333 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 355 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
334 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 356 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
389 KDEDIR="/usr" 411 KDEDIR="/usr"
390 fi 412 fi
391 break; 413 break;
392 fi 414 fi
393 done 415 done
416 unset slot
394 [[ -z KDEDIR ]] && die "Failed to determine KDEDIR!" 417 [[ -z KDEDIR ]] && die "Failed to determine KDEDIR!"
395 PREFIX="${PREFIX:-/usr}" 418 PREFIX="${PREFIX:-/usr}"
396 fi 419 fi
397 420
398 # Not needed anymore 421 # Not needed anymore
425 if [[ -n ${KDE_LINGUAS} ]]; then 448 if [[ -n ${KDE_LINGUAS} ]]; then
426 enable_selected_linguas 449 enable_selected_linguas
427 fi 450 fi
428 451
429 base_src_prepare 452 base_src_prepare
453 [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare
430 454
431 # Save library dependencies 455 # Save library dependencies
432 if [[ -n ${KMSAVELIBS} ]] ; then 456 if [[ -n ${KMSAVELIBS} ]] ; then
433 save_library_dependencies 457 save_library_dependencies
434 fi 458 fi
461 485
462 # Set environment 486 # Set environment
463 QTEST_COLORED=1 487 QTEST_COLORED=1
464 QT_PLUGIN_PATH="${KDEDIR}/$(get_libdir)/kde4/plugins/" 488 QT_PLUGIN_PATH="${KDEDIR}/$(get_libdir)/kde4/plugins/"
465 489
466 # Hardcode path to *.pc KDE files 490 # Point pkg-config path to KDE *.pc files
467 export PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+${PKG_CONFIG_PATH}:}${KDEDIR}/$(get_libdir)/pkgconfig" 491 export PKG_CONFIG_PATH="${KDEDIR}/$(get_libdir)/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
468 492
469 # Shadow existing /usr installations 493 # Shadow existing /usr installations
470 unset KDEDIRS 494 unset KDEDIRS
471 495
472 # Override some environment variables - only when kdeprefix is different,
473 # to not break ccache/distcc
474 if [[ ${KDEDIR} != /usr ]]; then 496 if [[ ${KDEDIR} != /usr ]]; then
497 # Override some environment variables - only when kdeprefix is different,
498 # to not break ccache/distcc
475 PATH="${KDEDIR}/bin:${PATH}" 499 PATH="${KDEDIR}/bin:${PATH}"
476 LDPATH="${KDEDIR}/$(get_libdir):${LDPATH}" 500 LDPATH="${KDEDIR}/$(get_libdir):${LDPATH}"
501
502 # Append full RPATH
503 cmakeargs="${cmakeargs} -DCMAKE_SKIP_RPATH=OFF"
477 fi 504 fi
478 505
479 if has kdeprefix ${IUSE//+} && use kdeprefix; then 506 if has kdeprefix ${IUSE//+} && use kdeprefix; then
480 # Set cmake prefixes to allow buildsystem to localize valid KDE installation 507 # Set cmake prefixes to allow buildsystem to localize valid KDE installation
481 # when more are present 508 # when more are present

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

  ViewVC Help
Powered by ViewVC 1.1.20