/[gentoo-x86]/eclass/xorg-2.eclass
Gentoo

Diff of /eclass/xorg-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.60 Revision 1.61
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 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/xorg-2.eclass,v 1.60 2013/01/31 14:12:12 chithanh Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/xorg-2.eclass,v 1.61 2013/02/24 21:05:08 mgorny Exp $
4 4
5# @ECLASS: xorg-2.eclass 5# @ECLASS: xorg-2.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# x11@gentoo.org 7# x11@gentoo.org
8# @AUTHOR: 8# @AUTHOR:
35 # Activate font code in the rest of the eclass 35 # Activate font code in the rest of the eclass
36 FONT="yes" 36 FONT="yes"
37 FONT_ECLASS="font" 37 FONT_ECLASS="font"
38fi 38fi
39 39
40# @ECLASS-VARIABLE: XORG_MULTILIB
41# @DESCRIPTION:
42# If set to 'yes', the multilib support for package will be enabled. Set
43# before inheriting this eclass.
44: ${XORG_MULTILIB:="no"}
45
40# we need to inherit autotools first to get the deps 46# we need to inherit autotools first to get the deps
41inherit autotools autotools-utils eutils libtool multilib toolchain-funcs \ 47inherit autotools autotools-utils eutils libtool multilib toolchain-funcs \
42 flag-o-matic ${FONT_ECLASS} ${GIT_ECLASS} 48 flag-o-matic ${FONT_ECLASS} ${GIT_ECLASS}
49
50if [[ ${XORG_MULTILIB} == yes ]]; then
51 inherit autotools-multilib
52fi
43 53
44EXPORTED_FUNCTIONS="src_unpack src_compile src_install pkg_postinst pkg_postrm" 54EXPORTED_FUNCTIONS="src_unpack src_compile src_install pkg_postinst pkg_postrm"
45case "${EAPI:-0}" in 55case "${EAPI:-0}" in
46 3|4|5) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure" ;; 56 3|4|5) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure" ;;
47 *) die "EAPI=${EAPI} is not supported" ;; 57 *) die "EAPI=${EAPI} is not supported" ;;
294 304
295DEPEND+=" ${COMMON_DEPEND}" 305DEPEND+=" ${COMMON_DEPEND}"
296RDEPEND+=" ${COMMON_DEPEND}" 306RDEPEND+=" ${COMMON_DEPEND}"
297unset COMMON_DEPEND 307unset COMMON_DEPEND
298 308
309if [[ ${XORG_MULTILIB} == yes ]]; then
310 RDEPEND+=" abi_x86_32? ( !<=app-emulation/emul-linux-x86-xlibs-20121202 )"
311fi
312
299debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND=${DEPEND}" 313debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND=${DEPEND}"
300debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND=${RDEPEND}" 314debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND=${RDEPEND}"
301debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: PDEPEND=${PDEPEND}" 315debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: PDEPEND=${PDEPEND}"
302 316
303# @FUNCTION: xorg-2_pkg_setup 317# @FUNCTION: xorg-2_pkg_setup
458 ${dep_track} 472 ${dep_track}
459 ${FONT_OPTIONS} 473 ${FONT_OPTIONS}
460 "${xorgconfadd[@]}" 474 "${xorgconfadd[@]}"
461 ) 475 )
462 476
477 if [[ ${XORG_MULTILIB} == yes ]]; then
478 autotools-multilib_src_configure "$@"
479 else
463 autotools-utils_src_configure "$@" 480 autotools-utils_src_configure "$@"
481 fi
464} 482}
465 483
466# @FUNCTION: xorg-2_src_compile 484# @FUNCTION: xorg-2_src_compile
467# @DESCRIPTION: 485# @DESCRIPTION:
468# Compile a package, performing all X-related tasks. 486# Compile a package, performing all X-related tasks.
469xorg-2_src_compile() { 487xorg-2_src_compile() {
470 debug-print-function ${FUNCNAME} "$@" 488 debug-print-function ${FUNCNAME} "$@"
471 489
490 if [[ ${XORG_MULTILIB} == yes ]]; then
491 autotools-multilib_src_compile "$@"
492 else
472 autotools-utils_src_compile "$@" 493 autotools-utils_src_compile "$@"
494 fi
473} 495}
474 496
475# @FUNCTION: xorg-2_src_install 497# @FUNCTION: xorg-2_src_install
476# @DESCRIPTION: 498# @DESCRIPTION:
477# Install a built package to ${D}, performing any necessary steps. 499# Install a built package to ${D}, performing any necessary steps.
478# Creates a ChangeLog from git if using live ebuilds. 500# Creates a ChangeLog from git if using live ebuilds.
479xorg-2_src_install() { 501xorg-2_src_install() {
480 debug-print-function ${FUNCNAME} "$@" 502 debug-print-function ${FUNCNAME} "$@"
481 503
504 local install_args=( docdir="${EPREFIX}/usr/share/doc/${PF}" )
505
482 if [[ ${CATEGORY} == x11-proto ]]; then 506 if [[ ${CATEGORY} == x11-proto ]]; then
483 autotools-utils_src_install \ 507 install_args+=(
484 ${PN/proto/}docdir="${EPREFIX}/usr/share/doc/${PF}" \ 508 ${PN/proto/}docdir="${EPREFIX}/usr/share/doc/${PF}"
485 docdir="${EPREFIX}/usr/share/doc/${PF}" 509 )
510 fi
511
512 if [[ ${XORG_MULTILIB} == yes ]]; then
513 autotools-multilib_src_install "${install_args[@]}"
486 else 514 else
487 autotools-utils_src_install \ 515 autotools-utils_src_install "${install_args[@]}"
488 docdir="${EPREFIX}/usr/share/doc/${PF}"
489 fi 516 fi
490 517
491 if [[ -n ${GIT_ECLASS} ]]; then 518 if [[ -n ${GIT_ECLASS} ]]; then
492 pushd "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" > /dev/null 519 pushd "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" > /dev/null
493 git log ${EGIT_COMMIT} > "${S}"/ChangeLog 520 git log ${EGIT_COMMIT} > "${S}"/ChangeLog

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61

  ViewVC Help
Powered by ViewVC 1.1.20