diff -Nru dh-autoreconf-2~blueyedppa1~lucid/autoreconf.mk dh-autoreconf-5ubuntu2~lucid1/autoreconf.mk --- dh-autoreconf-2~blueyedppa1~lucid/autoreconf.mk 2010-07-23 11:25:07.000000000 +0000 +++ dh-autoreconf-5ubuntu2~lucid1/autoreconf.mk 2012-02-07 04:07:39.000000000 +0000 @@ -1,7 +1,12 @@ # autoreconf.mk - dh-autoreconf integration for CDBS. -post-patches:: +CDBS_BUILD_DEPENDS_rules_autoreconf := dh-autoreconf +CDBS_BUILD_DEPENDS += , $(CDBS_BUILD_DEPENDS_rules_autoreconf) + +post-patches:: debian/autoreconf.after + +debian/autoreconf.after: dh_autoreconf $(DEB_DH_AUTORECONF_ARGS) -clean:: +reverse-config:: dh_autoreconf_clean $(DEB_DH_AUTORECONF_CLEAN_ARGS) diff -Nru dh-autoreconf-2~blueyedppa1~lucid/debian/changelog dh-autoreconf-5ubuntu2~lucid1/debian/changelog --- dh-autoreconf-2~blueyedppa1~lucid/debian/changelog 2011-03-11 19:50:22.000000000 +0000 +++ dh-autoreconf-5ubuntu2~lucid1/debian/changelog 2014-06-10 20:42:23.000000000 +0000 @@ -1,8 +1,51 @@ -dh-autoreconf (2~blueyedppa1~lucid) lucid; urgency=low +dh-autoreconf (5ubuntu2~lucid1) lucid; urgency=low - * Rebuild for Lucid. + * Launchpad build for Lucid - -- Daniel Hahler Fri, 11 Mar 2011 20:49:55 +0100 + -- Jerome Villeneuve Larouche Tue, 10 Jun 2014 16:41:25 -0400 + +dh-autoreconf (5ubuntu1) precise; urgency=low + + * Mark dh-autoreconf Multi-Arch: foreign. Closes: #658969. + + -- Steve Langasek Mon, 06 Feb 2012 20:09:44 -0800 + +dh-autoreconf (5) unstable; urgency=low + + * ltmain-as-needed.diff: Rebase against libtool 2.4.2 (Closes: #647070) + + -- Julian Andres Klode Sun, 30 Oct 2011 14:36:09 +0100 + +dh-autoreconf (4) unstable; urgency=low + + [ Julian Andres Klode ] + * autoreconf.mk: Run _clean in reverse-config (Closes: #596099) + * dh_autoreconf: Add --as-needed for automatic patching of ltmain.sh + * debian/control: Increase Standards-Version to 3.9.2 + + [ Ari Pollak ] + * dh_autoreconf: support parameters passed to custom program (Closes: #623229) + + -- Julian Andres Klode Tue, 14 Jun 2011 19:32:29 +0200 + +dh-autoreconf (3) unstable; urgency=low + + [ Cyril Brulebois ] + * dh-autoreconf.pod: Update rules example for debhelper 8 (Closes: #611414) + + [ Julian Andres Klode ] + * autoreconf.mk: Run dh_autoreconf only once (Closes: #618580) + * Make it possible to run on sub directories only (Closes: #582114) + * autoreconf.mk: Add to CDBS_BUILD_DEPENDS (Closes: #610163) + * autoreconf.mk: Run dh_autoreconf_clean before clean (Closes: #596099) + * debian/control: Set Standards-Version to 3.9.1 + * dh_autoreconf: Ignore common VCS directories (Closes: #611864) + * dh_autoreconf_clean: Remove 'before' file even if autoreconf failed + + [ Marcin Owsiany ] + * dh-autoreconf.pod: Document conflict with autotools-dev (Closes: #587102) + + -- Julian Andres Klode Mon, 04 Apr 2011 16:06:13 +0200 dh-autoreconf (2) unstable; urgency=low diff -Nru dh-autoreconf-2~blueyedppa1~lucid/debian/control dh-autoreconf-5ubuntu2~lucid1/debian/control --- dh-autoreconf-2~blueyedppa1~lucid/debian/control 2010-07-23 11:25:07.000000000 +0000 +++ dh-autoreconf-5ubuntu2~lucid1/debian/control 2012-02-07 04:09:38.000000000 +0000 @@ -1,14 +1,16 @@ Source: dh-autoreconf Section: devel Priority: optional -Maintainer: Julian Andres Klode +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Julian Andres Klode Build-Depends: debhelper (>= 7.0.50~) -Standards-Version: 3.9.0 +Standards-Version: 3.9.2 Vcs-Git: git://git.debian.org/collab-maint/dh-autoreconf.git Vcs-Browser: http://git.debian.org/?p=collab-maint/dh-autoreconf.git Package: dh-autoreconf Architecture: all +Multi-Arch: foreign Depends: ${perl:Depends}, ${misc:Depends}, debhelper, autoconf, automake | automaken, libtool Enhances: debhelper, cdbs diff -Nru dh-autoreconf-2~blueyedppa1~lucid/debian/install dh-autoreconf-5ubuntu2~lucid1/debian/install --- dh-autoreconf-2~blueyedppa1~lucid/debian/install 2010-07-23 11:25:07.000000000 +0000 +++ dh-autoreconf-5ubuntu2~lucid1/debian/install 2012-02-07 04:07:39.000000000 +0000 @@ -2,3 +2,4 @@ dh_autoreconf_clean usr/bin autoreconf.pm /usr/share/perl5/Debian/Debhelper/Sequence autoreconf.mk /usr/share/cdbs/1/rules +ltmain-as-needed.diff /usr/share/dh-autoreconf diff -Nru dh-autoreconf-2~blueyedppa1~lucid/debian/NEWS dh-autoreconf-5ubuntu2~lucid1/debian/NEWS --- dh-autoreconf-2~blueyedppa1~lucid/debian/NEWS 1970-01-01 00:00:00.000000000 +0000 +++ dh-autoreconf-5ubuntu2~lucid1/debian/NEWS 2012-02-07 04:07:39.000000000 +0000 @@ -0,0 +1,7 @@ +dh-autoreconf (4) unstable; urgency=low + + dh_autoreconf now supports automatic patching of ltmain.sh files + for adding -Wl,--as-needed support to them. See the manual pages + dh-autoreconf(7) and dh_autoreconf(1) for more information. + + -- Julian Andres Klode Tue, 14 Jun 2011 19:32:29 +0200 diff -Nru dh-autoreconf-2~blueyedppa1~lucid/dh_autoreconf dh-autoreconf-5ubuntu2~lucid1/dh_autoreconf --- dh-autoreconf-2~blueyedppa1~lucid/dh_autoreconf 2010-07-23 11:25:07.000000000 +0000 +++ dh-autoreconf-5ubuntu2~lucid1/dh_autoreconf 2012-02-07 04:07:39.000000000 +0000 @@ -21,6 +21,19 @@ of all files before/after the build. It is complemented by dh_autoreconf_clean which creates a list of all changed and added files and removes them. +=head1 FILES + +=over 4 + +=item debian/autoreconf + +This file can contain a list of directories. If present, dh_autoreconf will +only scan the given directories for changes. If no special command is given +to dh_autoreconf, it will also forward the directory list to autoreconf +which causes it to be run only on those sub directories. + +=back + =head1 OPTIONS =over 4 @@ -32,12 +45,23 @@ C even if there are changes. You may use this option multiple times to build up a list of things to exclude. +Starting with version 3, the directories of common version control systems +such as cvs, git, hg, svn, and bzr are excluded automatically. + =item B<--mode=>I Change the way in which modifications to files are detected. The default mode is I for using MD5 checksums, but there is also I for using the time of the last modification and the file size. +=item B<--as-needed> + +Enable support for -Wl,--as-needed in all ltmain.sh files identical to +the one of the libtool package. This only works in the MD5 mode (the +default one). The changes are reverted in dh_autoreconf_clean. You should +not prevent LIBTOOLIZE from running with this, as it only works correctly +with libtoolize running. + =item I B<--> I Run the program given by I with the arguments given by I @@ -59,16 +83,33 @@ export AUTOMAKE = automake1.10 export LIBTOOLIZE = true - =cut -init(options => { "mode=s" => \$dh{MODE}}); +init(options => { "mode=s" => \$dh{MODE}, + "as-needed" => \$dh{AS_NEEDED}}); +my @directories; my $find_options='! -ipath "./debian/*" -a '; +my @exclude_default = ("'*/.git/*'", "'*/.hg/*'", "'*/.bzr/*'", "'*/.svn/*'", + "'*/CVS/*'"); + +$find_options .= ("! \\( -path " . join(" -o -path ", @exclude_default) . + " \\) -a "); + if (defined($dh{EXCLUDE_FIND}) && $dh{EXCLUDE_FIND} ne '') { - $find_options .= "! \\( $dh{EXCLUDE_FIND} \\) -a"; + $find_options .= "! \\( $dh{EXCLUDE_FIND} \\) -a "; +} + +if ($dh{AS_NEEDED}) { + $find_options = "/usr/share/libtool/config/ltmain.sh . " . $find_options; } +if (-e "debian/autoreconf") { + @directories=filearray("debian/autoreconf", "."); + $find_options = join(" ",@directories)." ".$find_options; +} + + my %modes = ( 'md5' => "find $find_options -type f -exec md5sum {} \\;", 'timesize' => "find $find_options -type f -printf \"%s|%T@ %p\n\"" @@ -80,10 +121,28 @@ complex_doit("$find > debian/autoreconf.before"); # Run autoreconf to recreate the needed files. -@ARGV ? doit(@ARGV) : doit('autoreconf', '-f', '-i'); +@ARGV ? doit(@ARGV, @{$dh{U_PARAMS}}) : doit('autoreconf', '-f', '-i', @directories); complex_doit("$find > debian/autoreconf.after"); +# Fix ltmain.sh to support -Wl,--as-needed +if ($dh{AS_NEEDED}) { + open(FILE, 'debian/autoreconf.after') or die($!); + my $ltcheck = ""; + while() { + chomp($_); + my ($checksum, $filename) = split; + if ($filename eq "/usr/share/libtool/config/ltmain.sh") { + $ltcheck = $checksum; + } elsif ($filename =~ m/\/ltmain.sh$/ and $checksum eq $ltcheck) { + doit("patch", "-f", "--no-backup-if-mismatch", "-i", + "/usr/share/dh-autoreconf/ltmain-as-needed.diff", + $filename); + } + } + close(FILE); +} + =head1 SEE ALSO L, L, L diff -Nru dh-autoreconf-2~blueyedppa1~lucid/dh_autoreconf_clean dh-autoreconf-5ubuntu2~lucid1/dh_autoreconf_clean --- dh-autoreconf-2~blueyedppa1~lucid/dh_autoreconf_clean 2010-07-23 11:25:07.000000000 +0000 +++ dh-autoreconf-5ubuntu2~lucid1/dh_autoreconf_clean 2012-02-07 04:07:39.000000000 +0000 @@ -16,12 +16,19 @@ =head1 DESCRIPTION dh_autoreconf_clean removes all files which have been created or changed -during the autoreconf call executed by L. +during the autoreconf call executed by L. It also reverts +any ltmain.sh patch applied by dh_autoreconf. =cut init(); +# autoreconf failed, just remove the 'before' file. +if (-r 'debian/autoreconf.before' && ! -r 'debian/autoreconf.after') { + doit("rm", "debian/autoreconf.before"); + exit 0; +} + if (! -r 'debian/autoreconf.before' || ! -r 'debian/autoreconf.after') { exit 0; } @@ -46,13 +53,22 @@ # Read the new files open(FILE, 'debian/autoreconf.after') or die($!); +my $ltcheck = ""; while() { chomp($_); my ($checksum, $filename) = split; - # Mark file for deletion if its new or if it has changed and only if it is - # not excluded and not inside debian/. - push @delete, $filename if (!defined($file{$filename}) || - $file{$filename} ne $checksum); + + if ($filename eq "/usr/share/libtool/config/ltmain.sh") { + $ltcheck = $checksum; + } elsif (!defined($file{$filename}) || $file{$filename} ne $checksum) { + # Remove non-excluded, changed files + push @delete, $filename; + } elsif ($checksum eq $ltcheck) { + # A valid ltmain.sh, reverse patch + doit("patch", "-R", "-f", "--no-backup-if-mismatch", "-i", + "/usr/share/dh-autoreconf/ltmain-as-needed.diff", + $filename); + } } close(FILE); diff -Nru dh-autoreconf-2~blueyedppa1~lucid/dh-autoreconf.pod dh-autoreconf-5ubuntu2~lucid1/dh-autoreconf.pod --- dh-autoreconf-2~blueyedppa1~lucid/dh-autoreconf.pod 2010-07-23 11:25:07.000000000 +0000 +++ dh-autoreconf-5ubuntu2~lucid1/dh-autoreconf.pod 2012-02-07 04:07:39.000000000 +0000 @@ -9,7 +9,7 @@ #!/usr/bin/make -f %: - dh --with autoreconf $@ + dh $@ --with autoreconf This will call dh_autoreconf prior to dh_auto_configure and will call dh_autoreconf_clean before dh_clean. @@ -26,6 +26,35 @@ C to pass arguments to dh_autoreconf_clean. See their manual pages for information on available arguments. +=head1 PATCHING LTMAIN.SH FOR AS-NEEDED LINKER FLAGS + +You can add support for -Wl,--as-needed to ltmain.sh (at least for those +ltmain.sh scripts changed during autoreconf) by passing the argument +B<--as-needed> to dh_autoreconf, as demonstrated in the following example: + + #!/usr/bin/make -f + %: + dh $@ --with autoreconf + override_dh_autoreconf: + dh_autoreconf --as-needed + +and for CDBS, by adding it to the correct variable such as: + + DEB_DH_AUTORECONF_ARGS = --as-needed + +For more information about this feature, see L + +=head1 CAVEATS + +dh_autoreconf is a superset of the autotools-dev debhelper addons, so +you do not need --with=autotools_dev if you use --with=autoreconf. In +fact, in most cases they should not be used together, as it may lead to +unpredictable behaviour. + +From time to time, there might be a short breakage for those using +automatic ltmain.sh patching, when the patch now longer applies to +the ltmain.sh. + =head1 SEE ALSO L, L, L, L diff -Nru dh-autoreconf-2~blueyedppa1~lucid/ltmain-as-needed.diff dh-autoreconf-5ubuntu2~lucid1/ltmain-as-needed.diff --- dh-autoreconf-2~blueyedppa1~lucid/ltmain-as-needed.diff 1970-01-01 00:00:00.000000000 +0000 +++ dh-autoreconf-5ubuntu2~lucid1/ltmain-as-needed.diff 2012-02-07 04:07:39.000000000 +0000 @@ -0,0 +1,33 @@ +Bug-Debian: http://bugs.debian.org/347650 +Last-Update: 2011-06-14 + +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -5800,6 +5800,11 @@ func_mode_link () + arg=$func_stripname_result + ;; + ++ -Wl,--as-needed|-Wl,--no-as-needed) ++ deplibs="$deplibs $arg" ++ continue ++ ;; ++ + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result +@@ -6163,6 +6168,15 @@ func_mode_link () + lib= + found=no + case $deplib in ++ -Wl,--as-needed|-Wl,--no-as-needed) ++ if test "$linkmode,$pass" = "prog,link"; then ++ compile_deplibs="$deplib $compile_deplibs" ++ finalize_deplibs="$deplib $finalize_deplibs" ++ else ++ deplibs="$deplib $deplibs" ++ fi ++ continue ++ ;; + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + if test "$linkmode,$pass" = "prog,link"; then