/[gentoo-x86]/eclass/multilib-build.eclass
Gentoo

Diff of /eclass/multilib-build.eclass

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

Revision 1.34 Revision 1.35
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2014 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/multilib-build.eclass,v 1.34 2014/04/03 22:09:36 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.35 2014/04/21 07:17:55 mgorny Exp $
4 4
5# @ECLASS: multilib-build.eclass 5# @ECLASS: multilib-build.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# gx86-multilib team <multilib@gentoo.org> 7# gx86-multilib team <multilib@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
460 [[ ${#} -eq 0 ]] || die "${FUNCNAME}: too many arguments" 460 [[ ${#} -eq 0 ]] || die "${FUNCNAME}: too many arguments"
461 461
462 [[ ${COMPLETE_MULTILIB} == yes ]] || multilib_is_native_abi 462 [[ ${COMPLETE_MULTILIB} == yes ]] || multilib_is_native_abi
463} 463}
464 464
465# @FUNCTION: multilib_native_use_with
466# @USAGE: <flag> [<opt-name> [<opt-value>]]
467# @DESCRIPTION:
468# Output --with configure option alike use_with if USE <flag> is enabled
469# and executables are being built (multilib_build_binaries is true).
470# Otherwise, outputs --without configure option. Arguments are the same
471# as for use_with in the EAPI.
472multilib_native_use_with() {
473 if multilib_build_binaries; then
474 use_with "${@}"
475 else
476 echo "--without-${2:-${1}}"
477 fi
478}
479
480# @FUNCTION: multilib_native_use_enable
481# @USAGE: <flag> [<opt-name> [<opt-value>]]
482# @DESCRIPTION:
483# Output --enable configure option alike use_with if USE <flag>
484# is enabled and executables are being built (multilib_build_binaries
485# is true). Otherwise, outputs --disable configure option. Arguments are
486# the same as for use_enable in the EAPI.
487multilib_native_use_enable() {
488 if multilib_build_binaries; then
489 use_enable "${@}"
490 else
491 echo "--disable-${2:-${1}}"
492 fi
493}
494
495# @FUNCTION: multilib_native_usex
496# @USAGE: <flag> [<true1> [<false1> [<true2> [<false2>]]]]
497# @DESCRIPTION:
498# Output the concatenation of <true1> (or 'yes' if unspecified)
499# and <true2> if USE <flag> is enabled and executables are being built
500# (multilib_build_binaries is true). Otherwise, output the concatenation
501# of <false1> (or 'no' if unspecified) and <false2>. Arguments
502# are the same as for usex in the EAPI.
503#
504# Note: in EAPI 4 you need to inherit eutils to use this function.
505multilib_native_usex() {
506 if multilib_build_binaries; then
507 usex "${@}"
508 else
509 echo "${3-no}${5}"
510 fi
511}
512
465_MULTILIB_BUILD=1 513_MULTILIB_BUILD=1
466fi 514fi

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

  ViewVC Help
Powered by ViewVC 1.1.20