Package: src:libtool Followup-For: Bug #960898 Please append the attached diff to the list. It fixes an error in the last commit.
>From 5784d6d6cc790db9427e76599c8a0c02c9f0883d Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <nico...@debian.org> Date: Mon, 18 May 2020 11:18:51 +0200 Subject: [PATCH 28/28] Restore execute_after_dh_auto_build target removed by 1086323b
Merging configure and build step was unwanted. Also, it is better to patch libtool before checking it, so that regressions caused by local changes are caught. --- debian/rules | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/debian/rules b/debian/rules index ca00ab3..4b675ef 100755 --- a/debian/rules +++ b/debian/rules @@ -29,6 +29,8 @@ endif # make_check = no #endif +sed_sanitize_usr_merge_path_builds := 's%/usr/bin/\(grep\|sed\|dd\)%/bin/\1%g' + %: dh $@ @@ -67,6 +69,21 @@ override_dh_auto_configure: GREP=/bin/grep \ SED=/bin/sed +execute_after_dh_auto_build: + # Patch libtool for Debian before it is tested. + sed -i debian/tmp/usr/bin/libtool \ + -e $(sed_sanitize_usr_merge_path_builds) \ + -f debian/edit_libtool.sed + + # The system libtool script in Debian must be able to support invoking + # gcc as cc. Generate a BINCC tag from the CONFIG stanza. + # FIXME: could probably be simplified if intent was more explicit. + echo '# ### BEGIN LIBTOOL TAG CONFIG: BINCC' >> debian/tmp/usr/bin/libtool + grep -B 2 -A 1 -e '^\(LT\)\?CC=' libtool.config_stanza \ + | sed '/^--/d; s/gcc/cc/g' \ + >> debian/tmp/usr/bin/libtool + echo '# ### END LIBTOOL TAG CONFIG: BINCC' >> debian/tmp/usr/bin/libtool + ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES))) cd doc && makeinfo libtool.texi cd doc && makeinfo --html --no-split libtool.texi @@ -81,24 +98,7 @@ ifeq ($(make_check),yes) @test ! -f tests-failed endif -sed_sanitize_usr_merge_path_builds := 's%/usr/bin/\(grep\|sed\|dd\)%/bin/\1%g' - -# Patch when we have the final word (for example, the install target -# generates the .la file). execute_after_dh_auto_install: - sed -i debian/tmp/usr/bin/libtool \ - -e $(sed_sanitize_usr_merge_path_builds) \ - -f debian/edit_libtool.sed - - # The system libtool script in Debian must be able to support invoking - # gcc as cc. Generate a BINCC tag from the CONFIG stanza. - # FIXME: could probably be simplified if intent was more explicit. - echo '# ### BEGIN LIBTOOL TAG CONFIG: BINCC' >> debian/tmp/usr/bin/libtool - grep -B 2 -A 1 -e '^\(LT\)\?CC=' libtool.config_stanza \ - | sed '/^--/d; s/gcc/cc/g' \ - >> debian/tmp/usr/bin/libtool - echo '# ### END LIBTOOL TAG CONFIG: BINCC' >> debian/tmp/usr/bin/libtool - sed -i debian/tmp/usr/bin/libtoolize \ -e $(sed_sanitize_usr_merge_path_builds) \ -e 's%${CURDIR}%/build/libtool-2.4.6%g' -- 2.20.1