mgorny      14/04/21 07:17:55

  Modified:             ChangeLog multilib-build.eclass
  Log:
  Introduce extra multilib_native_use* wrappers encapulsating 
multilib_build_binaries & use* functions.

Revision  Changes    Path
1.1215               eclass/ChangeLog

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1215&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1215&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1214&r2=1.1215

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1214
retrieving revision 1.1215
diff -u -r1.1214 -r1.1215
--- ChangeLog   21 Apr 2014 00:08:15 -0000      1.1214
+++ ChangeLog   21 Apr 2014 07:17:55 -0000      1.1215
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1214 2014/04/21 
00:08:15 mpagano Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1215 2014/04/21 
07:17:55 mgorny Exp $
+
+  21 Apr 2014; Michał Górny <[email protected]> multilib-build.eclass:
+  Introduce extra multilib_native_use* wrappers encapulsating
+  multilib_build_binaries & use* functions.
 
   21 Apr 2014; Michael Pagano <[email protected]> kernel-2.eclass:
   Update 3.15-rcX temporary fix. See bug #507656.



1.35                 eclass/multilib-build.eclass

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/multilib-build.eclass?rev=1.35&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/multilib-build.eclass?rev=1.35&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/multilib-build.eclass?r1=1.34&r2=1.35

Index: multilib-build.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- multilib-build.eclass       3 Apr 2014 22:09:36 -0000       1.34
+++ multilib-build.eclass       21 Apr 2014 07:17:55 -0000      1.35
@@ -1,6 +1,6 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.34 
2014/04/03 22:09:36 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.35 
2014/04/21 07:17:55 mgorny Exp $
 
 # @ECLASS: multilib-build.eclass
 # @MAINTAINER:
@@ -462,5 +462,53 @@
        [[ ${COMPLETE_MULTILIB} == yes ]] || multilib_is_native_abi
 }
 
+# @FUNCTION: multilib_native_use_with
+# @USAGE: <flag> [<opt-name> [<opt-value>]]
+# @DESCRIPTION:
+# Output --with configure option alike use_with if USE <flag> is enabled
+# and executables are being built (multilib_build_binaries is true).
+# Otherwise, outputs --without configure option. Arguments are the same
+# as for use_with in the EAPI.
+multilib_native_use_with() {
+       if multilib_build_binaries; then
+               use_with "${@}"
+       else
+               echo "--without-${2:-${1}}"
+       fi
+}
+
+# @FUNCTION: multilib_native_use_enable
+# @USAGE: <flag> [<opt-name> [<opt-value>]]
+# @DESCRIPTION:
+# Output --enable configure option alike use_with if USE <flag>
+# is enabled and executables are being built (multilib_build_binaries
+# is true). Otherwise, outputs --disable configure option. Arguments are
+# the same as for use_enable in the EAPI.
+multilib_native_use_enable() {
+       if multilib_build_binaries; then
+               use_enable "${@}"
+       else
+               echo "--disable-${2:-${1}}"
+       fi
+}
+
+# @FUNCTION: multilib_native_usex
+# @USAGE: <flag> [<true1> [<false1> [<true2> [<false2>]]]]
+# @DESCRIPTION:
+# Output the concatenation of <true1> (or 'yes' if unspecified)
+# and <true2> if USE <flag> is enabled and executables are being built
+# (multilib_build_binaries is true). Otherwise, output the concatenation
+# of <false1> (or 'no' if unspecified) and <false2>. Arguments
+# are the same as for usex in the EAPI.
+#
+# Note: in EAPI 4 you need to inherit eutils to use this function.
+multilib_native_usex() {
+       if multilib_build_binaries; then
+               usex "${@}"
+       else
+               echo "${3-no}${5}"
+       fi
+}
+
 _MULTILIB_BUILD=1
 fi




Reply via email to