public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: hasufell <hasufell@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] New eclass: autotools-multilib-minimal
Date: Sat, 02 Mar 2013 03:50:11 +0100	[thread overview]
Message-ID: <513168E3.9070904@gentoo.org> (raw)
In-Reply-To: <20130228093014.62d3e9ce@pomiocik.lan>

[-- Attachment #1: Type: text/plain, Size: 138 bytes --]

On 02/28/2013 09:30 AM, Michał Górny wrote:
> 
> Setting that variable would invalidate metadata cache.
> 

different approach attached

[-- Attachment #2: multilib-build.eclass.patch --]
[-- Type: text/x-patch, Size: 2104 bytes --]

--- eclass/multilib-minimal.eclass
+++ eclass/multilib-minimal.eclass
@@ -18,12 +18,6 @@
 #
 # If you need generic install rules, use multilib_src_install_all function.
 
-# @ECLASS-VARIABLE: DISABLE_MULTILIB
-# @DESCRIPTION:
-# set to ON to disable multilib entirely
-# this is not meant to be set in the ebuild
-: ${DISABLE_MULTILIB:=OFF}
-
 
 # EAPI=5 is required for meaningful MULTILIB_USEDEP.
 case ${EAPI:-0} in
@@ -31,22 +25,28 @@
 	*) die "EAPI=${EAPI} is not supported" ;;
 esac
 
-_multilib_inherit=
-if [[ ${DISABLE_MULTILIB} == "OFF" ]] ; then
-	_multilib_inherit="multilib-build"
-fi
 
-inherit ${_multilib_inherit}
+inherit multilib-build
 
 EXPORT_FUNCTIONS src_configure src_compile src_test src_install
 
+
+unset DISABLE_MULTILIB
+_multilib-minimal_set_globals() {
+	if [[ $(multilib_get_enabled_abis) == ${DEFAULT_ABI} ]] ; then
+		DISABLE_MULTILIB="ON"
+	fi
+}
+_multilib-minimal_set_globals
+
+
 multilib_copy_sources() {
 	_abi_copy_sources() {
 		einfo "${ABI}: copying to ${BUILD_DIR}"
 		cp -pR "${S}" "${BUILD_DIR}" || die "failed to copy sources"
 	}
 
-	if [[ ${DISABLE_MULTILIB} == "OFF" ]] ; then
+	if [[ -z ${DISABLE_MULTILIB} ]] ; then
 		einfo "Will copy sources to abi-specific dirs"
 		multilib_foreach_abi _abi_copy_sources
 	fi
@@ -70,7 +70,7 @@
 		popd >/dev/null || die
 	}
 
-	if [[ ${DISABLE_MULTILIB} == "OFF" ]] ; then
+	if [[ -z ${DISABLE_MULTILIB} ]] ; then
 		multilib_foreach_abi _abi_src_configure
 	else
 		_common_src_configure
@@ -94,7 +94,7 @@
 		popd >/dev/null || die
 	}
 
-	if [[ ${DISABLE_MULTILIB} == "OFF" ]] ; then
+	if [[ -z ${DISABLE_MULTILIB} ]] ; then
 		multilib_foreach_abi _abi_src_compile
 	else
 		_common_src_compile
@@ -118,7 +118,7 @@
 		popd >/dev/null || die
 	}
 
-	if [[ ${DISABLE_MULTILIB} == "OFF" ]] ; then
+	if [[ -z ${DISABLE_MULTILIB} ]] ; then
 		multilib_foreach_abi _abi_src_test
 	else
 		_common_src_test
@@ -143,7 +143,7 @@
 		popd >/dev/null || die
 	}
 
-	if [[ ${DISABLE_MULTILIB} == "OFF" ]] ; then
+	if [[ -z ${DISABLE_MULTILIB} ]] ; then
 		multilib_foreach_abi _abi_src_install
 	else
 		_common_src_install

  parent reply	other threads:[~2013-03-02  2:50 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-24  0:34 [gentoo-dev] New eclass: autotools-multilib-minimal hasufell
2013-02-24  4:22 ` hasufell
2013-02-24 10:06   ` Michał Górny
2013-02-24 10:11     ` Diego Elio Pettenò
2013-02-24 14:17       ` hasufell
2013-02-24 14:33         ` Pacho Ramos
2013-02-27 13:01         ` Samuli Suominen
2013-02-27 20:13           ` Michał Górny
2013-02-27 20:15           ` Pacho Ramos
2013-02-24 14:57   ` Michał Górny
2013-02-24 15:12     ` hasufell
2013-02-24 15:12     ` Pacho Ramos
2013-02-24 15:53       ` Michał Górny
2013-02-24 16:21         ` Pacho Ramos
2013-02-24 16:28         ` Alexis Ballier
2013-02-24 16:58         ` Samuli Suominen
2013-02-24 18:56           ` Michał Górny
2013-02-24 19:40             ` hasufell
2013-02-24 18:05         ` [gentoo-dev] " Jonathan Callen
2013-02-24 18:18           ` Michał Górny
2013-02-24 16:22 ` [gentoo-dev] " Alexis Ballier
2013-02-24 16:42   ` hasufell
2013-02-24 18:46     ` Alexis Ballier
2013-02-24 22:39 ` Samuli Suominen
2013-02-28  1:06   ` hasufell
2013-02-28  8:30     ` Michał Górny
2013-02-28 15:16       ` hasufell
2013-03-02  2:50       ` hasufell [this message]
2013-03-02 15:07         ` Michał Górny
2013-03-02 15:13           ` hasufell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=513168E3.9070904@gentoo.org \
    --to=hasufell@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox