summaryrefslogtreecommitdiff
path: root/pkgtools/pkgdiff
diff options
context:
space:
mode:
authorseb <seb@pkgsrc.org>2001-10-08 15:59:52 +0000
committerseb <seb@pkgsrc.org>2001-10-08 15:59:52 +0000
commitf706acd969656e6488b01e03f30185527176db04 (patch)
tree6947ff11f5fa6eb3e117eb48e947c133df6ce3b3 /pkgtools/pkgdiff
parent2ae41a07efc0814e86e0d92ec2fa8919034e610a (diff)
downloadpkgsrc-f706acd969656e6488b01e03f30185527176db04.tar.gz
Update to 0.102: Use GNU diff on Solaris for pkgdiff script (close PR pkg/13988).
Diffstat (limited to 'pkgtools/pkgdiff')
-rw-r--r--pkgtools/pkgdiff/Makefile11
-rwxr-xr-xpkgtools/pkgdiff/files/pkgdiff10
2 files changed, 14 insertions, 7 deletions
diff --git a/pkgtools/pkgdiff/Makefile b/pkgtools/pkgdiff/Makefile
index eb445fc990e..22746fb61fe 100644
--- a/pkgtools/pkgdiff/Makefile
+++ b/pkgtools/pkgdiff/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.17 2001/09/27 23:18:35 jlam Exp $
+# $NetBSD: Makefile,v 1.18 2001/10/08 15:59:52 seb Exp $
#
-DISTNAME= pkgdiff-0.101
+DISTNAME= pkgdiff-0.102
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
@@ -24,10 +24,13 @@ MAKE_ENV= PKGSRCDIR=${PKGSRCDIR}
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "SunOS"
+DEPENDS+= diffutils-[0-9]*:../../devel/diffutils
BUILD_DEPENDS+= groff-[0-9]*:../../textproc/groff
NROFF= gnroff
+DIFF?= gdiff
.else
NROFF= nroff
+DIFF?= diff
.endif
do-build:
@@ -37,7 +40,9 @@ do-build:
< ${FILESDIR}/${FILE}.pl \
> ${WRKSRC}/${FILE}
.endfor
- ${CP} ${FILESDIR}/pkgdiff ${WRKSRC}
+ ${SED} -e 's|@DIFF@|${DIFF}|g' \
+ < ${FILESDIR}/pkgdiff \
+ > ${WRKSRC}/pkgdiff
${CP} ${FILESDIR}/pkgvi ${WRKSRC}
.for FILE in mkpatches patchdiff pkgdiff pkgvi
${SED} -e 's|@PREFIX@|${PREFIX}|g' \
diff --git a/pkgtools/pkgdiff/files/pkgdiff b/pkgtools/pkgdiff/files/pkgdiff
index 8954ff24843..50301c638b9 100755
--- a/pkgtools/pkgdiff/files/pkgdiff
+++ b/pkgtools/pkgdiff/files/pkgdiff
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: pkgdiff,v 1.4 2000/08/26 04:40:28 hubertf Exp $
+# $NetBSD: pkgdiff,v 1.5 2001/10/08 15:59:52 seb Exp $
#
# Usage: pkgdiff newfile
# pkgdiff oldfile newfile
@@ -28,7 +28,7 @@ else
fi
lines=3
-while [ `diff -u -$lines "$old" "$new" | egrep -c '\\$(NetBSD|Author|Date|Header|Id|Locker|Log|Name|RCSfile|Revision|Source|State)'` != 0 ]
+while [ `@DIFF@ -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,11 +37,13 @@ do
fi
done
-if ! diff -qu -$lines "$old" "$new" > /dev/null
+if @DIFF@ -qu -$lines "$old" "$new" > /dev/null
then
+ :
+else
echo '$'NetBSD'$'
echo ''
# Strip out the date on the +++ line to reduce needless
# differences in regenerated patches
- diff -u -$lines "$old" "$new" | sed -e 's:^\(+++ [^ ]*\) .*:\1:'
+ @DIFF@ -u -$lines "$old" "$new" | sed -e 's:^\(+++ [^ ]*\) .*:\1:'
fi