1 |
If (user) patches modify either configure.{ac,in} or Makefile.am files, |
2 |
autoreconfigure the package for user. |
3 |
--- |
4 |
eclass/autotools-utils.eclass | 16 ++++++++++++++++ |
5 |
1 files changed, 16 insertions(+), 0 deletions(-) |
6 |
|
7 |
diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass |
8 |
index 87f8b4d..1b19ed2 100644 |
9 |
--- a/eclass/autotools-utils.eclass |
10 |
+++ b/eclass/autotools-utils.eclass |
11 |
@@ -99,6 +99,11 @@ esac |
12 |
# Set to a non-empty value in order to enable running autoreconf |
13 |
# in src_prepare() and adding autotools dependencies. |
14 |
# |
15 |
+# This is usually necessary when using live sources or applying patches |
16 |
+# modifying configure.ac or Makefile.am files. Note that in the latter case |
17 |
+# setting this variable is obligatory even though the eclass will work without |
18 |
+# it (to add the necessary dependencies). |
19 |
+# |
20 |
# The eclass will try to determine the correct autotools to run including a few |
21 |
# external tools: gettext, glib-gettext, intltool, gtk-doc, gnome-doc-prepare. |
22 |
# If your tool is not supported, please open a bug and we'll add support for it. |
23 |
@@ -354,8 +359,19 @@ autotools-utils_src_prepare() { |
24 |
|
25 |
local want_autoreconf=${AUTOTOOLS_AUTORECONF} |
26 |
|
27 |
+ touch "${T}"/.autotools-utils.timestamp || die |
28 |
[[ ${PATCHES} ]] && epatch "${PATCHES[@]}" |
29 |
epatch_user |
30 |
+ if [[ ! ${want_autoreconf} ]]; then |
31 |
+ if [[ $(find . -newer "${T}"/.autotools-utils.timestamp \ |
32 |
+ -a '(' -name 'Makefile.am' \ |
33 |
+ -o -name 'configure.ac' \ |
34 |
+ -o -name 'configure.in' ')' \ |
35 |
+ -print -quit) ]]; then |
36 |
+ einfo 'Will autoreconfigure due to patches applied.' |
37 |
+ want_autoreconf=yep |
38 |
+ fi |
39 |
+ fi |
40 |
|
41 |
[[ ${want_autoreconf} ]] && autotools-utils_autoreconf |
42 |
elibtoolize --patch-only |
43 |
-- |
44 |
1.7.8.2 |