From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 2581D198005 for ; Sun, 10 Mar 2013 10:20:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 924C7E07BA; Sun, 10 Mar 2013 10:17:56 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A12A5E07AE for ; Sun, 10 Mar 2013 10:17:50 +0000 (UTC) Received: from pomiocik.lan (77-255-9-250.adsl.inetia.pl [77.255.9.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 9171C33D132; Sun, 10 Mar 2013 10:17:48 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: hasufell@gentoo.org, python@gentoo.org, =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH 5/7] multilib-minimal: reuse multibuild phase function handlers. Date: Sun, 10 Mar 2013 11:18:09 +0100 Message-Id: <1362910691-8439-5-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <20130310111644.0840d935@pomiocik.lan> References: <20130310111644.0840d935@pomiocik.lan> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: 94e624b4-c3c6-429c-abbc-e73b453618ea X-Archives-Hash: 2dd53bebff05bcb082bcde56f2092fe5 --- gx86/eclass/multilib-minimal.eclass | 54 ++++++++++++------------------------- 1 file changed, 17 insertions(+), 37 deletions(-) diff --git a/gx86/eclass/multilib-minimal.eclass b/gx86/eclass/multilib-minimal.eclass index 2510578..2a707b1 100644 --- a/gx86/eclass/multilib-minimal.eclass +++ b/gx86/eclass/multilib-minimal.eclass @@ -45,53 +45,33 @@ multilib-minimal_src_configure() { } multilib_foreach_abi _multilib-minimal_mkdir - multilib-minimal_abi_src_configure() { - if declare -f multilib_src_configure >/dev/null ; then - multilib_src_configure - else - default_src_configure - fi - } - - multilib_foreach_abi _multilib-minimal_wrap_phase multilib-minimal_abi_src_configure + local phase=$(multibuild_get_phase_function multilib_src_configure) + multilib_foreach_abi \ + _multilib-minimal_wrap_phase "${phase:-default_src_configure}" } multilib-minimal_src_compile() { - multilib-minimal_abi_src_compile() { - if declare -f multilib_src_compile >/dev/null ; then - multilib_src_compile - else - default_src_compile - fi - } - - multilib_foreach_abi _multilib-minimal_wrap_phase multilib-minimal_abi_src_compile + local phase=$(multibuild_get_phase_function multilib_src_compile) + multilib_foreach_abi \ + _multilib-minimal_wrap_phase "${phase:-default_src_compile}" } multilib-minimal_src_test() { - multilib-minimal_abi_src_test() { - if declare -f multilib_src_test >/dev/null ; then - multilib_src_test - else - default_src_test - fi - } - - multilib_foreach_abi _multilib-minimal_wrap_phase multilib-minimal_abi_src_test + local phase=$(multibuild_get_phase_function multilib_src_test) + multilib_foreach_abi \ + _multilib-minimal_wrap_phase "${phase:-default_src_test}" } multilib-minimal_src_install() { - multilib-minimal_abi_src_install() { - if declare -f multilib_src_install >/dev/null ; then - multilib_src_install - else - default_src_install - fi + _multilib-minimal_wrap_install_phase() { + _multilib-minimal_wrap_phase "${@}" multilib_check_headers } - multilib_foreach_abi _multilib-minimal_wrap_phase multilib-minimal_abi_src_install - if declare -f multilib_src_install_all >/dev/null ; then - multilib_src_install_all - fi + local phase=$(multibuild_get_phase_function multilib_src_install) + multilib_foreach_abi \ + _multilib-minimal_wrap_install_phase "${phase:-default_src_install}" + + phase=$(multibuild_get_phase_function multilib_src_install_all) + [[ ${phase} ]] && "${phase}" } -- 1.8.1.5