summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2002-03-10 22:04:01 +0000
committerwiz <wiz@pkgsrc.org>2002-03-10 22:04:01 +0000
commit559b7f04519bfe93a7fe6159108feee7353697b3 (patch)
treebedaac5b6e42958cf3738f30dd4f94f65ed81052 /pkgtools
parent2f0126a2ae95e47eabef35bdb8d999c78420b12d (diff)
downloadpkgsrc-559b7f04519bfe93a7fe6159108feee7353697b3.tar.gz
Make pkgdiff smarter re: configure patches: avoid most parts that only
change the line number in the configure script. Mostly by Stoned Elipot, with slight changes by me. Bump to 0.104.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkgdiff/Makefile4
-rwxr-xr-xpkgtools/pkgdiff/files/pkgdiff18
2 files changed, 16 insertions, 6 deletions
diff --git a/pkgtools/pkgdiff/Makefile b/pkgtools/pkgdiff/Makefile
index c20a4b3bcda..7d99c73ca40 100644
--- a/pkgtools/pkgdiff/Makefile
+++ b/pkgtools/pkgdiff/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.22 2001/12/15 20:25:39 agc Exp $
+# $NetBSD: Makefile,v 1.23 2002/03/10 22:04:01 wiz Exp $
#
-DISTNAME= pkgdiff-0.103
+DISTNAME= pkgdiff-0.104
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkgdiff/files/pkgdiff b/pkgtools/pkgdiff/files/pkgdiff
index 50301c638b9..3943b43fcdc 100755
--- a/pkgtools/pkgdiff/files/pkgdiff
+++ b/pkgtools/pkgdiff/files/pkgdiff
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: pkgdiff,v 1.5 2001/10/08 15:59:52 seb Exp $
+# $NetBSD: pkgdiff,v 1.6 2002/03/10 22:04:02 wiz Exp $
#
# Usage: pkgdiff newfile
# pkgdiff oldfile newfile
@@ -27,8 +27,18 @@ else
new="$2"
fi
+dodiff() {
+ case x$new in
+ xconfigure)
+ @DIFF@ -I '\(echo .*as_me:[0-9]+:\|echo .*configure:[0-9]+:\|line [0-9]+ \"configure\)' $*
+ ;;
+ *)
+ @DIFF@ $*
+ esac
+}
+
lines=3
-while [ `@DIFF@ -u -$lines "$old" "$new" | egrep -c '\\$(NetBSD|Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State)'` != 0 ]
+while [ `dodiff -u -$lines "$old" "$new" | egrep -c '\\$(NetBSD|Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State)'` != 0 ]
do
lines=`expr $lines - 1`
if [ $lines = 0 ]; then
@@ -37,7 +47,7 @@ do
fi
done
-if @DIFF@ -qu -$lines "$old" "$new" > /dev/null
+if dodiff -qu -$lines "$old" "$new" > /dev/null
then
:
else
@@ -45,5 +55,5 @@ else
echo ''
# Strip out the date on the +++ line to reduce needless
# differences in regenerated patches
- @DIFF@ -u -$lines "$old" "$new" | sed -e 's:^\(+++ [^ ]*\) .*:\1:'
+ dodiff -u -$lines "$old" "$new" | sed -e 's:^\(+++ [^ ]*\) .*:\1:'
fi