/[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.63 Revision 1.64
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.63 2014/07/04 13:02:21 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.64 2014/08/17 03:34:32 jcallen 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:
565 565
566# @FUNCTION: multilib_is_native_abi 566# @FUNCTION: multilib_is_native_abi
567# @DESCRIPTION: 567# @DESCRIPTION:
568# Determine whether the currently built ABI is the profile native. 568# Determine whether the currently built ABI is the profile native.
569# Return true status (0) if that is true, otherwise false (1). 569# Return true status (0) if that is true, otherwise false (1).
570#
571# This function is not intended to be used directly. Please use
572# multilib_build_binaries instead.
573multilib_is_native_abi() { 570multilib_is_native_abi() {
574 debug-print-function ${FUNCNAME} "${@}" 571 debug-print-function ${FUNCNAME} "${@}"
575 572
576 [[ ${#} -eq 0 ]] || die "${FUNCNAME}: too many arguments" 573 [[ ${#} -eq 0 ]] || die "${FUNCNAME}: too many arguments"
577 574
578 [[ ${COMPLETE_MULTILIB} == yes || ${ABI} == ${DEFAULT_ABI} ]] 575 [[ ${COMPLETE_MULTILIB} == yes || ${ABI} == ${DEFAULT_ABI} ]]
579} 576}
580 577
581# @FUNCTION: multilib_build_binaries 578# @FUNCTION: multilib_build_binaries
582# @DESCRIPTION: 579# @DESCRIPTION:
583# Determine whether to build binaries for the currently built ABI. 580# Deprecated synonym for multilib_is_native_abi
584# Returns true status (0) if the currently built ABI is the profile
585# native or COMPLETE_MULTILIB variable is set to 'yes', otherwise
586# false (1).
587#
588# This is often useful for configure calls when some of the options are
589# supposed to be disabled for multilib ABIs (like those used for
590# executables only).
591multilib_build_binaries() { 581multilib_build_binaries() {
592 debug-print-function ${FUNCNAME} "${@}" 582 debug-print-function ${FUNCNAME} "${@}"
593 583
594 eqawarn "QA warning: multilib_build_binaries is deprecated. Please use the equivalent" 584 eqawarn "QA warning: multilib_build_binaries is deprecated. Please use the equivalent"
595 eqawarn "multilib_is_native_abi function instead." 585 eqawarn "multilib_is_native_abi function instead."
613} 603}
614 604
615# @FUNCTION: multilib_native_use_enable 605# @FUNCTION: multilib_native_use_enable
616# @USAGE: <flag> [<opt-name> [<opt-value>]] 606# @USAGE: <flag> [<opt-name> [<opt-value>]]
617# @DESCRIPTION: 607# @DESCRIPTION:
618# Output --enable configure option alike use_with if USE <flag> 608# Output --enable configure option alike use_enable if USE <flag>
619# is enabled and executables are being built (multilib_is_native_abi 609# is enabled and executables are being built (multilib_is_native_abi
620# is true). Otherwise, outputs --disable configure option. Arguments are 610# is true). Otherwise, outputs --disable configure option. Arguments are
621# the same as for use_enable in the EAPI. 611# the same as for use_enable in the EAPI.
622multilib_native_use_enable() { 612multilib_native_use_enable() {
623 if multilib_is_native_abi; then 613 if multilib_is_native_abi; then
625 else 615 else
626 echo "--disable-${2:-${1}}" 616 echo "--disable-${2:-${1}}"
627 fi 617 fi
628} 618}
629 619
620# @FUNCTION: multilib_native_enable
621# @USAGE: <opt-name> [<opt-value>]
622# @DESCRIPTION:
623# Output --enable configure option if executables are being built
624# (multilib_is_native_abi is true). Otherwise, output --disable configure
625# option.
626multilib_native_enable() {
627 if multilib_is_native_abi; then
628 echo "--enable-${1}${2+=${2}}"
629 else
630 echo "--disable-${1}"
631 fi
632}
633
634# @FUNCTION: multilib_native_with
635# @USAGE: <opt-name> [<opt-value>]
636# @DESCRIPTION:
637# Output --with configure option if executables are being built
638# (multilib_is_native_abi is true). Otherwise, output --without configure
639# option.
640multilib_native_with() {
641 if multilib_is_native_abi; then
642 echo "--with-${1}${2+=${2}}"
643 else
644 echo "--without-${1}"
645 fi
646}
647
630# @FUNCTION: multilib_native_usex 648# @FUNCTION: multilib_native_usex
631# @USAGE: <flag> [<true1> [<false1> [<true2> [<false2>]]]] 649# @USAGE: <flag> [<true1> [<false1> [<true2> [<false2>]]]]
632# @DESCRIPTION: 650# @DESCRIPTION:
633# Output the concatenation of <true1> (or 'yes' if unspecified) 651# Output the concatenation of <true1> (or 'yes' if unspecified)
634# and <true2> if USE <flag> is enabled and executables are being built 652# and <true2> if USE <flag> is enabled and executables are being built

Legend:
Removed from v.1.63  
changed lines
  Added in v.1.64

  ViewVC Help
Powered by ViewVC 1.1.20