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 A829A13877A for ; Mon, 18 Aug 2014 17:56:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 20349E0B95; Mon, 18 Aug 2014 17:56:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9B8F2E0B93 for ; Mon, 18 Aug 2014 17:56:07 +0000 (UTC) Received: from pomiot.lan (77-253-136-53.adsl.inetia.pl [77.253.136.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 2533A34012F; Mon, 18 Aug 2014 17:56:05 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-portage-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-portage-dev] [PATCH 03/13] Add tentative support for EAPI6 get_libdir() Date: Mon, 18 Aug 2014 19:56:42 +0200 Message-Id: <1408384612-14713-4-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 2.0.4 In-Reply-To: <1408384612-14713-1-git-send-email-mgorny@gentoo.org> References: <1408384612-14713-1-git-send-email-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Archives-Salt: 39103e07-d509-44d6-84b5-4a5a263f1be9 X-Archives-Hash: 7d70872519833b4ca148c63a9a3bc0ab Add get_libdir() function to obtain the basename of libdir using the same algorithm that econf uses. --- bin/eapi.sh | 4 ++++ bin/phase-helpers.sh | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/bin/eapi.sh b/bin/eapi.sh index 5f96c3b..6ace20d 100644 --- a/bin/eapi.sh +++ b/bin/eapi.sh @@ -64,6 +64,10 @@ ___eapi_has_usex() { [[ ! ${1-${EAPI}} =~ ^(0|1|2|3|4|4-python|4-slot-abi)$ ]] } +___eapi_has_get_libdir() { + [[ ! ${1-${EAPI}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]] +} + ___eapi_has_master_repositories() { [[ ${1-${EAPI}} =~ ^(5-progress)$ ]] } diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index c2161f6..8edbc07 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -842,6 +842,17 @@ best_version() { esac } +if ___eapi_has_get_libdir; then + get_libdir() { + local libdir_var="LIBDIR_${ABI}" + local libdir="lib" + + [[ -n ${ABI} && -n ${!libdir_var} ]] && libdir=${!libdir_var} + + echo "${libdir}" + } +fi + if ___eapi_has_master_repositories; then master_repositories() { local output repository=$1 retval -- 2.0.4