commit:     35d75bb9cf78c05cb6767ca4f559d7272d6ca0be
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 16 09:46:33 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed May 12 11:21:38 2021 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=35d75bb9

Support new econf-passed parameters for EAPI 8

Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>
Closes: https://github.com/gentoo/portage/pull/637
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 bin/eapi.sh          |  8 ++++++++
 bin/phase-helpers.sh | 13 +++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/bin/eapi.sh b/bin/eapi.sh
index 29dfb008c..a93efa8cd 100644
--- a/bin/eapi.sh
+++ b/bin/eapi.sh
@@ -174,6 +174,14 @@ ___eapi_econf_passes_--disable-silent-rules() {
        [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi)$ ]]
 }
 
+___eapi_econf_passes_--datarootdir() {
+       [[ ! ${1-${EAPI-0}} =~ 
^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6|7)$ ]]
+}
+
+___eapi_econf_passes_--disable-static() {
+       [[ ! ${1-${EAPI-0}} =~ 
^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6|7)$ ]]
+}
+
 ___eapi_econf_passes_--docdir_and_--htmldir() {
        [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress)$ ]]
 }

diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index e7b0a4171..116c233fb 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -603,6 +603,12 @@ econf() {
                if ___eapi_econf_passes_--disable-dependency-tracking || 
___eapi_econf_passes_--disable-silent-rules || 
___eapi_econf_passes_--docdir_and_--htmldir || 
___eapi_econf_passes_--with-sysroot; then
                        local conf_help=$("${ECONF_SOURCE}/configure" --help 
2>/dev/null)
 
+                       if ___eapi_econf_passes_--datarootdir; then
+                               if [[ ${conf_help} == *--datarootdir* ]]; then
+                                       conf_args+=( 
--datarootdir="${EPREFIX}"/usr/share )
+                               fi
+                       fi
+
                        if ___eapi_econf_passes_--disable-dependency-tracking; 
then
                                if [[ ${conf_help} == 
*--disable-dependency-tracking* ]]; then
                                        conf_args+=( 
--disable-dependency-tracking )
@@ -615,6 +621,13 @@ econf() {
                                fi
                        fi
 
+                       if ___eapi_econf_passes_--disable-static; then
+                               if [[ ${conf_help} == *--disable-static* || \
+                                               ${conf_help} == 
*--enable-static* ]]; then
+                                       conf_args+=( --disable-static )
+                               fi
+                       fi
+
                        if ___eapi_econf_passes_--docdir_and_--htmldir; then
                                if [[ ${conf_help} == *--docdir* ]]; then
                                        conf_args+=( 
--docdir="${EPREFIX}"/usr/share/doc/${PF} )

Reply via email to