summaryrefslogtreecommitdiff
path: root/pkgtools/pkgdiff
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2011-06-26 12:11:39 +0000
committerwiz <wiz@pkgsrc.org>2011-06-26 12:11:39 +0000
commit1c258e12ad350f7cf630790b06fda7d6a2d5f4f1 (patch)
treef895ed8e145ab717b6dd4a6378787eaec14cc3a7 /pkgtools/pkgdiff
parent63063272e4329e197210f7984589c8d39fca58fb (diff)
downloadpkgsrc-1c258e12ad350f7cf630790b06fda7d6a2d5f4f1.tar.gz
Add -w flag to mkpatches(1), which makes it look in WRKDIR instead of
WRKSRC. Needed for some ruby packages, requested by taca@ Bump version to 1.2.
Diffstat (limited to 'pkgtools/pkgdiff')
-rw-r--r--pkgtools/pkgdiff/Makefile4
-rw-r--r--pkgtools/pkgdiff/files/mkpatches.112
-rwxr-xr-xpkgtools/pkgdiff/files/mkpatches.pl15
3 files changed, 21 insertions, 10 deletions
diff --git a/pkgtools/pkgdiff/Makefile b/pkgtools/pkgdiff/Makefile
index 57f1f2dccdb..a33af19fce3 100644
--- a/pkgtools/pkgdiff/Makefile
+++ b/pkgtools/pkgdiff/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.73 2011/03/04 15:57:07 wiz Exp $
+# $NetBSD: Makefile,v 1.74 2011/06/26 12:11:39 wiz Exp $
#
-DISTNAME= pkgdiff-1.1
+DISTNAME= pkgdiff-1.2
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkgdiff/files/mkpatches.1 b/pkgtools/pkgdiff/files/mkpatches.1
index 53d515b7316..ecfe246685a 100644
--- a/pkgtools/pkgdiff/files/mkpatches.1
+++ b/pkgtools/pkgdiff/files/mkpatches.1
@@ -1,4 +1,4 @@
-.\" $NetBSD: mkpatches.1,v 1.7 2011/03/04 15:57:07 wiz Exp $
+.\" $NetBSD: mkpatches.1,v 1.8 2011/06/26 12:11:39 wiz Exp $
.\"
.\" Copyright (c) 2000-2011 by Thomas Klausner <wiz@NetBSD.org>
.\" All rights reserved.
@@ -24,7 +24,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd February 20, 2011
+.Dd June 26, 2011
.Dt MKPATCHES 1
.Os
.Sh NAME
@@ -32,7 +32,7 @@
.Nd create patch files appropriate for pkgsrc
.Sh SYNOPSIS
.Nm
-.Op Fl hv
+.Op Fl hvw
.Oo Fl c | Fl r Oc
.Op Fl D | Fl d Ar dir
.Sh DESCRIPTION
@@ -89,6 +89,12 @@ Revert the changes.
Removes the new patches and puts the original patches back.
.It Fl v
More verbose output.
+.It Fl w
+Look for changes in
+.Pa $WRKDIR
+instead of the default
+.Pa $WRKSRC .
+Usually not needed and slower.
.El
.Sh SEE ALSO
.Xr cvs 1 ,
diff --git a/pkgtools/pkgdiff/files/mkpatches.pl b/pkgtools/pkgdiff/files/mkpatches.pl
index b48af1fd51b..aaf498e1b7d 100755
--- a/pkgtools/pkgdiff/files/mkpatches.pl
+++ b/pkgtools/pkgdiff/files/mkpatches.pl
@@ -1,6 +1,6 @@
#!@PERL5@
#
-# $NetBSD: mkpatches.pl,v 1.16 2011/03/04 15:57:07 wiz Exp $
+# $NetBSD: mkpatches.pl,v 1.17 2011/06/26 12:11:39 wiz Exp $
#
# mkpatches: creates a set of patches patch-aa, patch-ab, ...
# in work/.newpatches by looking for *.orig files in and below
@@ -69,19 +69,21 @@ undef($opt_d);
undef($opt_h);
undef($opt_r);
undef($opt_v);
+undef($opt_w);
-getopts('cDd:hrv');
+getopts('cDd:hrvw');
if ($opt_h) {
($prog) = ($0 =~ /([^\/]+)$/);
print STDERR <<EOF;
-usage: $prog [-hv] [-c | -r] [-D | -d dir]
+usage: $prog [-hvw] [-c | -r] [-D | -d dir]
-c commit -- clean up old patches backups
-d dir create patches in this directory
-D create patches in \$WRKDIR/.newpatches
-h show this help
-r revert -- remove new patches, put old patches back
-v verbose - list .orig files as processed
+ -w look for changes in \$WRKDIR instead of \$WRKSRC
EOF
exit 0;
};
@@ -143,7 +145,6 @@ if ($opt_r) {
create_patchdir();
-
move_away_old_patches();
analyze_old_patches();
@@ -152,7 +153,11 @@ chdir $wrksrc or die ("can't cd to WRKSRC ($wrksrc)");
# find files
-open(HANDLE, "find ${wrksrc} -type f -name \\\*.orig |");
+if ($opt_w) {
+ open(HANDLE, "find ${wrkdir} -type f -name \\\*.orig |");
+} else {
+ open(HANDLE, "find ${wrksrc} -type f -name \\\*.orig |");
+}
# create patches