From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Rjesk-0005eX-BJ for garchives@archives.gentoo.org; Sat, 07 Jan 2012 22:36:58 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6A09921C042; Sat, 7 Jan 2012 22:36:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 3B5AF21C042 for ; Sat, 7 Jan 2012 22:36:41 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BB5E01B4019 for ; Sat, 7 Jan 2012 22:36:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id A9E2880052 for ; Sat, 7 Jan 2012 22:36:39 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <07d1b26c5e93402b270c7746ea92955edc3f4479.mgorny@gentoo> Subject: [gentoo-commits] dev/mgorny:master commit in: eclass/ X-VCS-Repository: dev/mgorny X-VCS-Files: eclass/autotools-utils.eclass X-VCS-Directories: eclass/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 07d1b26c5e93402b270c7746ea92955edc3f4479 Date: Sat, 7 Jan 2012 22:36:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 1a6dadb2-52e3-48fc-9de0-fcca3c9e015e X-Archives-Hash: 26aae014eb0041e09bf9d0c3879bc0c4 commit: 07d1b26c5e93402b270c7746ea92955edc3f4479 Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Fri Jan 6 21:57:27 2012 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Fri Jan 6 22:06:23 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Ddev/mgorny.git;a=3D= commit;h=3D07d1b26c Autoreconfigure packages when user patches need it. If (user) patches modify either configure.{ac,in} or Makefile.am files, autoreconfigure the package for user. --- eclass/autotools-utils.eclass | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclas= s index 87f8b4d..1b19ed2 100644 --- a/eclass/autotools-utils.eclass +++ b/eclass/autotools-utils.eclass @@ -99,6 +99,11 @@ esac # Set to a non-empty value in order to enable running autoreconf # in src_prepare() and adding autotools dependencies. # +# This is usually necessary when using live sources or applying patches +# modifying configure.ac or Makefile.am files. Note that in the latter c= ase +# setting this variable is obligatory even though the eclass will work w= ithout +# it (to add the necessary dependencies). +# # The eclass will try to determine the correct autotools to run includin= g a few # external tools: gettext, glib-gettext, intltool, gtk-doc, gnome-doc-pr= epare. # If your tool is not supported, please open a bug and we'll add support= for it. @@ -354,8 +359,19 @@ autotools-utils_src_prepare() { =20 local want_autoreconf=3D${AUTOTOOLS_AUTORECONF} =20 + touch "${T}"/.autotools-utils.timestamp || die [[ ${PATCHES} ]] && epatch "${PATCHES[@]}" 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 + einfo 'Will autoreconfigure due to patches applied.' + want_autoreconf=3Dyep + fi + fi =20 [[ ${want_autoreconf} ]] && autotools-utils_autoreconf elibtoolize --patch-only