[Midnightbsd-cvs] mports [15859] trunk/sysutils: add dirdiff, gui diff utility

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Feb 19 12:59:28 EST 2014


Revision: 15859
          http://svnweb.midnightbsd.org/mports/?rev=15859
Author:   laffer1
Date:     2014-02-19 12:59:27 -0500 (Wed, 19 Feb 2014)
Log Message:
-----------
add dirdiff, gui diff utility

Modified Paths:
--------------
    trunk/sysutils/Makefile

Added Paths:
-----------
    trunk/sysutils/dirdiff/
    trunk/sysutils/dirdiff/Makefile
    trunk/sysutils/dirdiff/distinfo
    trunk/sysutils/dirdiff/files/
    trunk/sysutils/dirdiff/files/patch-filecmp.c
    trunk/sysutils/dirdiff/pkg-descr

Modified: trunk/sysutils/Makefile
===================================================================
--- trunk/sysutils/Makefile	2014-02-19 16:50:45 UTC (rev 15858)
+++ trunk/sysutils/Makefile	2014-02-19 17:59:27 UTC (rev 15859)
@@ -23,6 +23,7 @@
 SUBDIR += coreutils
 SUBDIR += devcpu
 SUBDIR += devcpu-data
+SUBDIR += dirdiff
 SUBDIR += dmidecode
 SUBDIR += dvd+rw-tools
 SUBDIR += dvdbackup

Added: trunk/sysutils/dirdiff/Makefile
===================================================================
--- trunk/sysutils/dirdiff/Makefile	                        (rev 0)
+++ trunk/sysutils/dirdiff/Makefile	2014-02-19 17:59:27 UTC (rev 15859)
@@ -0,0 +1,32 @@
+# $MidnightBSD$
+
+PORTNAME=	dirdiff
+PORTVERSION=	2.1
+CATEGORIES=	sysutils tcl tk
+MASTER_SITES=	ftp://ftp.samba.org/pub/paulus/
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	Graphical diff tool
+
+LICENSE=	gpl2
+
+USE_TK=		yes
+USE_LDCONFIG=	yes
+
+PLIST_FILES=	bin/dirdiff lib/libfilecmp.so.0
+
+CFLAGS+=	-fPIC -I${TCL_INCLUDEDIR}
+
+NO_STAGE=	yes
+post-patch:
+	@${REINPLACE_CMD} -e \
+		's|.0.0|.0|g ; \
+		 s|^CFLAGS=|CFLAGS?=|g' ${WRKSRC}/Makefile
+	@${REINPLACE_CMD} -e \
+		's|^exec wish |exec ${WISH:T} |' ${WRKSRC}/dirdiff
+
+do-install:
+	${INSTALL_SCRIPT} ${WRKSRC}/dirdiff ${PREFIX}/bin
+	${INSTALL_DATA} ${WRKSRC}/libfilecmp.so.0 ${PREFIX}/lib
+
+.include <bsd.port.mk>

Added: trunk/sysutils/dirdiff/distinfo
===================================================================
--- trunk/sysutils/dirdiff/distinfo	                        (rev 0)
+++ trunk/sysutils/dirdiff/distinfo	2014-02-19 17:59:27 UTC (rev 15859)
@@ -0,0 +1,2 @@
+SHA256 (dirdiff-2.1.tar.gz) = cb373654d5788027804355e355df0695862c3bfc1f6a3fc6014722b3156a9252
+SIZE (dirdiff-2.1.tar.gz) = 43105

Added: trunk/sysutils/dirdiff/files/patch-filecmp.c
===================================================================
--- trunk/sysutils/dirdiff/files/patch-filecmp.c	                        (rev 0)
+++ trunk/sysutils/dirdiff/files/patch-filecmp.c	2014-02-19 17:59:27 UTC (rev 15859)
@@ -0,0 +1,46 @@
+--- filecmp.c.orig	2005-04-19 12:22:01.000000000 +0200
++++ filecmp.c	2013-05-13 17:00:44.000000000 +0200
+@@ -9,6 +9,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <ctype.h>
++#include <unistd.h>
+ #include <tcl.h>
+ #include <sys/fcntl.h>
+ 
+@@ -125,7 +126,7 @@
+ 	p2 += i;
+ 	k2 -= i;
+ 	/* 4 == strlen("<dollar>Id<dollar>") */
+-	if (k1 < 4 && !e1 || k2 < 4 && !e2)
++	if ((k1 < 4 && !e1) || (k2 < 4 && !e2))
+ 	    break;
+ 	if (k1 < 4 || k2 < 4) {
+ 	    /* near the end of one or both files */
+@@ -195,7 +196,7 @@
+ 		k2 -= i;
+ 		if (match < BKTAGLEN) {
+ 			/* we have run out of one or other buffer */
+-			if (k1 == 0 && e1 || k2 == 0 && e2) {
++			if ((k1 == 0 && e1) ||( k2 == 0 && e2)) {
+ 				if (k1 == k2)
+ 					break;
+ 				return 0;
+@@ -219,7 +220,7 @@
+ 			continue;
+ 		}
+ 		/* ran out before eol on one or both files */
+-		if (t1 == k1 && e1 || t2 == k2 && e2) {
++		if ((t1 == k1 && e1) || (t2 == k2 && e2)) {
+ 			k1 -= t1;
+ 			k2 -= t2;
+ 			if (k1 == k2)
+@@ -341,7 +342,7 @@
+     if (n1 < 0 || n2 < 0)
+ 	return TCL_ERROR;
+ 
+-    sprintf(interp->result, "%d", same);
++    Tcl_SetObjResult(interp, Tcl_NewIntObj(same));
+     return TCL_OK;
+ }
+ 

Added: trunk/sysutils/dirdiff/pkg-descr
===================================================================
--- trunk/sysutils/dirdiff/pkg-descr	                        (rev 0)
+++ trunk/sysutils/dirdiff/pkg-descr	2014-02-19 17:59:27 UTC (rev 15859)
@@ -0,0 +1,10 @@
+Dirdiff is a graphical tool for displaying the differences between
+directory trees and for merging changes from one tree into another.
+Dirdiff can handle up to 5 trees.  It displays a main window with a
+list of the files which are different between the trees, with colored
+squares to indicate the relative ages of the versions.  A menu allows
+you to display the differences between any two of the versions in
+another window.  Another menu allows you to copy the file from one
+tree to another.
+
+WWW: http://freecode.com/projects/dirdiff/



More information about the Midnightbsd-cvs mailing list