public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/mgorny:master commit in: eclass/
Date: Sat,  7 Jan 2012 22:36:39 +0000 (UTC)	[thread overview]
Message-ID: <07d1b26c5e93402b270c7746ea92955edc3f4479.mgorny@gentoo> (raw)

commit:     07d1b26c5e93402b270c7746ea92955edc3f4479
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jan  6 21:57:27 2012 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jan  6 22:06:23 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=07d1b26c

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.eclass
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 case
+# setting this variable is obligatory even though the eclass will work without
+# it (to add the necessary dependencies).
+#
 # The eclass will try to determine the correct autotools to run including a few
 # external tools: gettext, glib-gettext, intltool, gtk-doc, gnome-doc-prepare.
 # 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() {
 
 	local want_autoreconf=${AUTOTOOLS_AUTORECONF}
 
+	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=yep
+		fi
+	fi
 
 	[[ ${want_autoreconf} ]] && autotools-utils_autoreconf
 	elibtoolize --patch-only



             reply	other threads:[~2012-01-07 22:36 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-07 22:36 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-05-21 17:32 [gentoo-commits] dev/mgorny:master commit in: eclass/ Michał Górny
2012-01-14 21:22 Michał Górny
2012-01-14 21:22 Michał Górny
2012-01-14 21:22 Michał Górny
2012-01-08 16:32 Michał Górny
2012-01-07 22:36 Michał Górny
2012-01-07 22:36 Michał Górny
2012-01-07 22:36 Michał Górny
2011-12-29 20:25 Michał Górny
2011-12-05  8:38 Michał Górny
2011-12-05  8:38 Michał Górny
2011-12-05  8:38 Michał Górny
2011-12-05  8:38 Michał Górny
2011-12-05  8:38 Michał Górny
2011-12-05  8:38 Michał Górny
2011-12-05  8:38 Michał Górny
2011-12-05  8:36 Michał Górny
2011-11-29 21:41 Michał Górny
2011-11-29 21:41 Michał Górny
2011-09-18  9:42 Michał Górny
2011-04-30 21:14 Michał Górny
2011-04-30  6:45 Michał Górny
2011-04-30  6:45 Michał Górny
2011-04-30  6:45 Michał Górny
2011-04-30  6:45 Michał Górny
2011-04-28 16:33 Michał Górny
2011-04-28 14:33 Michał Górny
2011-04-28 14:33 Michał Górny
2011-04-28 14:02 Michał Górny
2011-04-17 19:41 Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=07d1b26c5e93402b270c7746ea92955edc3f4479.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox