[gentoo-dev] [PATCH multilib-build] Add multilib_is_native_abi() helper.

2013-06-29 Thread Michał Górny
We've been so far inlining the snippet into ebuilds. This meant that
some people didn't know how to do this, some more did it improperly and
in the end -- if it failed not good enough -- changing it will require
changing all the ebuilds.
---
 gx86/eclass/multilib-build.eclass | 16 
 1 file changed, 16 insertions(+)

diff --git a/gx86/eclass/multilib-build.eclass 
b/gx86/eclass/multilib-build.eclass
index a4b7c01..22a471e 100644
--- a/gx86/eclass/multilib-build.eclass
+++ b/gx86/eclass/multilib-build.eclass
@@ -338,5 +338,21 @@ multilib_install_wrappers() {
fi
 }
 
+# @FUNCTION: multilib_is_native_abi
+# @DESCRIPTION:
+# Determine whether the currently built ABI is the profile native.
+# Return true status (0) if that is true, otherwise false (1).
+#
+# This is often useful for configure calls when some of the options are
+# supposed to be disabled for multilib ABIs (like those used for
+# executables only).
+multilib_is_native_abi() {
+   debug-print-function ${FUNCNAME} ${@}
+
+   [[ ${#} -eq 0 ]] || die ${FUNCNAME}: too many arguments
+
+   [[ ${ABI} == ${DEFAULT_ABI} ]]
+}
+
 _MULTILIB_BUILD=1
 fi
-- 
1.8.2.1




Re: [gentoo-dev] [PATCH multilib-build] Add multilib_is_native_abi() helper.

2013-06-29 Thread Michael Weber
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 06/29/2013 10:35 AM, Michał Górny wrote:
 We've been so far inlining the snippet into ebuilds. This meant
 that some people didn't know how to do this, some more did it
 improperly and in the end -- if it failed not good enough --
 changing it will require changing all the ebuilds.

Thanks and ++

- -- 
Michael Weber
Gentoo Developer
web: https://xmw.de/
mailto: Michael Weber x...@gentoo.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iF4EAREIAAYFAlHOvIEACgkQknrdDGLu8JAlOQD/e/fGHrInLAX95nv8/xO/PP2M
Mq4rKvPiRrGObo1y8rUBAI/UadjWs0FqaB9surBew543YlhP2iBk9QZGvDs45jao
=qdHE
-END PGP SIGNATURE-



Re: [gentoo-dev] [PATCH multilib-build] Add multilib_is_native_abi() helper.

2013-06-29 Thread Michael Weber
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 06/29/2013 12:52 PM, Michael Weber wrote:
 On 06/29/2013 10:35 AM, Michał Górny wrote:
 We've been so far inlining the snippet into ebuilds. This meant 
 that some people didn't know how to do this, some more did it 
 improperly and in the end -- if it failed not good enough -- 
 changing it will require changing all the ebuilds.
 
 Thanks and ++

12:55:39 @xmw
  mgorny: my email response to your proposed patch was to quick.
  i want to suggest naming it multilib_is_default_abi in
  accordance with the variable name DEFAULT_ABI. but that
  DEFAULT_ is a remnant of multibuild, so i could understand the
  native.

- -- 
Michael Weber
Gentoo Developer
web: https://xmw.de/
mailto: Michael Weber x...@gentoo.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iF4EAREIAAYFAlHOvy4ACgkQknrdDGLu8JDN1gD/YPFRo2miPGSpVdCwmQzVB8hJ
O/OCNi6f9FE7YvkBjXABAJgW3/rxmVYJJWYDJomNem/KU2xhdTtvpjXJAc9xJoGo
=667Q
-END PGP SIGNATURE-



Re: [gentoo-dev] [PATCH multilib-build] Add multilib_is_native_abi() helper.

2013-06-29 Thread Alexis Ballier
On Sat, 29 Jun 2013 10:35:45 +0200
Michał Górny mgo...@gentoo.org wrote:

 +# @FUNCTION: multilib_is_native_abi
 +# @DESCRIPTION:
 +# Determine whether the currently built ABI is the profile native.
 +# Return true status (0) if that is true, otherwise false (1).
 +#
 +# This is often useful for configure calls when some of the options
 are +# supposed to be disabled for multilib ABIs (like those used for
 +# executables only).
 +multilib_is_native_abi() {
 + debug-print-function ${FUNCNAME} ${@}
 +
 + [[ ${#} -eq 0 ]] || die ${FUNCNAME}: too many arguments


Just add @USAGE and stop babysitting people I'd say :)


Looks good, thanks

Alexis.