Fixes: https://bugs.gentoo.org/show_bug.cgi?id=399641
---
 autotools-utils.eclass |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/autotools-utils.eclass b/autotools-utils.eclass
index 7ed6856..5d2a987 100644
--- a/autotools-utils.eclass
+++ b/autotools-utils.eclass
@@ -362,14 +362,17 @@ autotools-utils_src_prepare() {
 
        [[ ${PATCHES} ]] && epatch "${PATCHES[@]}"
 
-       touch "${T}"/.autotools-utils.timestamp || die
+       at_checksum() {
+               find '(' -name 'Makefile.am' \
+                       -o -name 'configure.ac' \
+                       -o -name 'configure.in' ')' \
+                       -exec cksum {} + | sort -k2
+       }
+
+       [[ ! ${want_autoreconf} ]] && local checksum=$(at_checksum)
        epatch_user
        if [[ ! ${want_autoreconf} ]]; then
-               if [[ $(find . -newer "${T}"/.autotools-utils.timestamp \
-                               -a '(' -name 'Makefile.am' \
-                               -o -name 'configure.ac' \
-                               -o -name 'configure.in' ')' \
-                               -print -quit) ]]; then
+               if [[ ${checksum} != $(at_checksum) ]]; then
                        einfo 'Will autoreconfigure due to user patches 
applied.'
                        want_autoreconf=yep
                fi
-- 
1.7.8.4


Reply via email to