FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 01-06-2012, 09:06 PM
Michał Górny
 
Default 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
--
1.7.8.2
 

Thread Tools




All times are GMT. The time now is 12:43 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org