From 23b89cca6b96266eea166b30ac8d1591ffbf7b2f Mon Sep 17 00:00:00 2001 From: Yves-Alexis Perez Date: Thu, 15 Mar 2012 11:06:51 +0100 Subject: [PATCH] rebuild waf script * debian/rules: - rebuild waf script before using it. closes: #645191 --- debian/changelog | 2 ++ debian/rules | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 055fa28b..deede9d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ midori (0.4.4-1) UNRELEASED; urgency=low * debian/midori.maintscript: - handle the /etc/xdg/midori/extensions/libadblock.so removal there. closes: #660303 + * debian/rules: + - rebuild waf script before using it. closes: #645191 -- Yves-Alexis Perez Thu, 08 Mar 2012 23:42:54 +0100 diff --git a/debian/rules b/debian/rules index a528fdf7..b36a2f1c 100755 --- a/debian/rules +++ b/debian/rules @@ -23,7 +23,16 @@ endif %: dh $@ -WAF=./waf +WAF=./waf.regen + +$(WAF): waf + # rebuild the waf script + sed < waf -e '1,/^#==>$$/ d' -e '/^#<==$$/ d' | tr -d '\n' | sed -e 's/.//' -e 's/#[*]/\n/g' -e 's/#%/\r/g' > waf.orig.tar.bz2 + (sed -n < waf -e '1,/^#==>$$/ p'; echo REPLACED BY ENCODED TAR.BZ2; sed -n < waf -e '/^#<==$$/ p') > waf.hdr + (sed -n < waf.hdr -e '1,/^#==>$$/ p'; printf '#'; perl -pe < waf.orig.tar.bz2 's/\n/#*/g; s/\r/#%/g;'; echo; sed -n < waf.hdr -e '/^#<==$$/ p') > waf.regen + chmod 755 waf.regen + # ensure both scripts are the same + cmp waf waf.regen && (rm waf.hdr waf.orig.tar.bz2) debian/presubj: debian/presubj.in @echo "presubj parameters:" @@ -37,13 +46,14 @@ debian/presubj: debian/presubj.in override_dh_install: debian/presubj $(CMD) --fail-missing -override_dh_auto_clean: +override_dh_auto_clean: $(WAF) $(WAF) --nocache distclean rm -rf _build_ rm -rf .waf* rm -rf .lock-wscript + rm -f $(WAF) -override_dh_auto_configure: +override_dh_auto_configure: $(WAF) $(WAF) --nocache configure --debug-level=none --prefix /usr override_dh_auto_build: