commit:     ec26ad9b5eedb96d8b10d1bae438e8355b44c978
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 11 17:18:03 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Jan 11 18:33:25 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec26ad9b

autotools.eclass: Introduce AT_NOEAUTOHEADER variable

Sometimes packages get their headers being broken by autoheader (see
media-libs/freetype for example) or get unwanted defines added (see
media-libs/libsdl2). In that case we want to run eautoreconf without
call to eautoheader.

Bug: https://bugs.gentoo.org/764959
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 eclass/autotools.eclass | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index d7ce23bfdf3..b1d36540199 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: autotools.eclass
@@ -136,6 +136,12 @@ unset _automake_atom _autoconf_atom
 # Additional options to pass to automake during
 # eautoreconf call.
 
+# @ECLASS-VARIABLE: AT_NOEAUTOHEADER
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Don't run eautoheader command if set to 'yes'; only used to work around
+# packages that don't want their headers being modified.
+
 # @ECLASS-VARIABLE: AT_NOEAUTOMAKE
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -236,7 +242,7 @@ eautoreconf() {
        else
                eautoconf --force
        fi
-       eautoheader
+       [[ ${AT_NOEAUTOHEADER} != "yes" ]] && eautoheader
        [[ ${AT_NOEAUTOMAKE} != "yes" ]] && FROM_EAUTORECONF="yes" eautomake 
${AM_OPTS}
 
        if [[ ${AT_NOELIBTOOLIZE} != "yes" ]] ; then

Reply via email to