pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/mgdiff



Module Name:    pkgsrc
Committed By:   vins
Date:           Mon Jan  2 22:43:53 UTC 2023

Added Files:
        pkgsrc/devel/mgdiff: DESCR Makefile PLIST distinfo
        pkgsrc/devel/mgdiff/patches: patch-Imakefile patch-mgdiff.c
            patch-rundiff.c

Log Message:
devel/mgdiff: import package from wip.

mgdiff is a graphical front-end to the UNIX diff based upon
the Motif widget set.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/mgdiff/DESCR pkgsrc/devel/mgdiff/Makefile \
    pkgsrc/devel/mgdiff/PLIST pkgsrc/devel/mgdiff/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/mgdiff/patches/patch-Imakefile \
    pkgsrc/devel/mgdiff/patches/patch-mgdiff.c \
    pkgsrc/devel/mgdiff/patches/patch-rundiff.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/devel/mgdiff/DESCR
diff -u /dev/null pkgsrc/devel/mgdiff/DESCR:1.1
--- /dev/null   Mon Jan  2 22:43:53 2023
+++ pkgsrc/devel/mgdiff/DESCR   Mon Jan  2 22:43:52 2023
@@ -0,0 +1,5 @@
+mgdiff is a graphical front-end to the UNIX diff command based upon
+X11R[456] and the Motif widget set. It allows the user to select two
+files for comparison, runs the diff command, parses the output, and
+presents the results graphically. This presentation can also be used to
+generate a user-specified merge of the two files into a third file.
Index: pkgsrc/devel/mgdiff/Makefile
diff -u /dev/null pkgsrc/devel/mgdiff/Makefile:1.1
--- /dev/null   Mon Jan  2 22:43:53 2023
+++ pkgsrc/devel/mgdiff/Makefile        Mon Jan  2 22:43:52 2023
@@ -0,0 +1,34 @@
+# $NetBSD: Makefile,v 1.1 2023/01/02 22:43:52 vins Exp $
+
+DISTNAME=      mgdiff
+PKGNAME=       ${DISTNAME}-1.0
+CATEGORIES=    devel x11
+MASTER_SITES=  ${MASTER_SITE_XCONTRIB:=applications/}
+DIST_SUBDIR=   ${PKGNAME_NOREV}
+
+MAINTAINER=    vins%NetBSD.org@localhost
+HOMEPAGE=      https://bsdforge.com/projects/textproc/mgdiff/
+COMMENT=       Graphical front end to Unix diff
+LICENSE=       mit
+
+USE_IMAKE=     yes
+
+LIBDIR=        lib/X11/${PKGBASE}
+
+MAKE_FLAGS+=   CCOPTIONS=${CFLAGS:Q}
+MAKE_FLAGS+=   LOCAL_LDFLAGS=${LDFLAGS:Q}
+
+INSTALLATION_DIRS+=    ${LIBDIR}
+
+post-install:
+       ${INSTALL_DATA} ${WRKSRC}/mgdiff.x[bp]m ${DESTDIR}${PREFIX}/${LIBDIR}
+
+.include "../../x11/libXext/buildlink3.mk"
+.include "../../x11/libXmu/buildlink3.mk"
+.include "../../x11/libXt/buildlink3.mk"
+.include "../../x11/libSM/buildlink3.mk"
+.include "../../x11/libICE/buildlink3.mk"
+.include "../../x11/libXau/buildlink3.mk"
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../mk/motif.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/devel/mgdiff/PLIST
diff -u /dev/null pkgsrc/devel/mgdiff/PLIST:1.1
--- /dev/null   Mon Jan  2 22:43:53 2023
+++ pkgsrc/devel/mgdiff/PLIST   Mon Jan  2 22:43:52 2023
@@ -0,0 +1,6 @@
+@comment $NetBSD: PLIST,v 1.1 2023/01/02 22:43:52 vins Exp $
+bin/mgdiff
+lib/X11/app-defaults/Mgdiff
+lib/X11/mgdiff/mgdiff.xbm
+lib/X11/mgdiff/mgdiff.xpm
+man/man1/mgdiff.1
Index: pkgsrc/devel/mgdiff/distinfo
diff -u /dev/null pkgsrc/devel/mgdiff/distinfo:1.1
--- /dev/null   Mon Jan  2 22:43:53 2023
+++ pkgsrc/devel/mgdiff/distinfo        Mon Jan  2 22:43:52 2023
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2023/01/02 22:43:52 vins Exp $
+
+BLAKE2s (mgdiff-1.0/mgdiff.tar.gz) = 7c90e00f9646d41e5e822055340fa41440acaa5ec0352606ccec1e14b43188de
+SHA512 (mgdiff-1.0/mgdiff.tar.gz) = bf5ab4b2a9d42ff2edb73a6dda68a4d17d88f61c63f5ec8366cc49d372a56f3c6812d473a95d86bcb61680d1f91ce4ab7ad87a26748b45e2edd27b73044492a5
+Size (mgdiff-1.0/mgdiff.tar.gz) = 41187 bytes
+SHA1 (patch-Imakefile) = 6a29ed061ea0b54396269707acd7f53a9a5c32ce
+SHA1 (patch-mgdiff.c) = fe9ac9874a1b4a50b97eddfc766c4b8aae258897
+SHA1 (patch-rundiff.c) = 4ead16932bbf480d8da283b335a93418108926f2

Index: pkgsrc/devel/mgdiff/patches/patch-Imakefile
diff -u /dev/null pkgsrc/devel/mgdiff/patches/patch-Imakefile:1.1
--- /dev/null   Mon Jan  2 22:43:53 2023
+++ pkgsrc/devel/mgdiff/patches/patch-Imakefile Mon Jan  2 22:43:53 2023
@@ -0,0 +1,19 @@
+$NetBSD: patch-Imakefile,v 1.1 2023/01/02 22:43:53 vins Exp $
+
+Do not require libucb/SUNWscpu.
+
+--- Imakefile.orig     1994-05-19 02:01:00.000000000 +0000
++++ Imakefile
+@@ -4,11 +4,10 @@
+ 
+ XCOMM Imakefile,v 2.0 1994/05/19 02:01:00 dan Exp
+ 
+-XMLIB = -lXm
++XMLIB =       ${MOTIFLIB} -lm
+ XCOMM
+ XCOMM for Dell SVR4
+ XCOMM
+-EXTRA_LIBRARIES = -lc -lucb
+ 
+ SRCS = mgdiff.c rundiff.c misc.c files.c spawn.c manual.c modal.c legend.c
+ OBJS = mgdiff.o rundiff.o misc.o files.o spawn.o manual.o modal.o legend.o
Index: pkgsrc/devel/mgdiff/patches/patch-mgdiff.c
diff -u /dev/null pkgsrc/devel/mgdiff/patches/patch-mgdiff.c:1.1
--- /dev/null   Mon Jan  2 22:43:53 2023
+++ pkgsrc/devel/mgdiff/patches/patch-mgdiff.c  Mon Jan  2 22:43:53 2023
@@ -0,0 +1,73 @@
+$NetBSD: patch-mgdiff.c,v 1.1 2023/01/02 22:43:53 vins Exp $
+
+Prevent unsafe use of tmpnam(). 
+
+--- mgdiff.c.orig      1994-09-29 01:56:53.000000000 +0000
++++ mgdiff.c
+@@ -520,7 +520,7 @@ static void drawit (Widget w, XtPointer 
+ /* ARGSUSED */
+ static void file_cb (Widget w, XtPointer closure, XtPointer call_data)
+ {
+-    switch ((int) closure) {
++    switch ((uintptr_t) closure) {
+     case 0:                   /* open */
+       toggle_open_sensitive (False);
+       set_cursor (toplevel);
+@@ -560,7 +560,7 @@ static void file_cb (Widget w, XtPointer
+ /* ARGSUSED */
+ static void view_cb (Widget w, XtPointer closure, XtPointer call_data)
+ {
+-    switch ((int) closure) {
++    switch ((uintptr_t) closure) {
+     case 0:                   /* previous */
+       prev_diff (NULL, NULL, NULL);
+       break;
+@@ -582,7 +582,7 @@ static void view_cb (Widget w, XtPointer
+ /* ARGSUSED */
+ static void select_cb (Widget w, XtPointer closure, XtPointer call_data)
+ {
+-    switch ((int) closure) {
++    switch ((uintptr_t) closure) {
+     case 0:                   /* left */
+       select_all (LEFT);
+       break;
+@@ -604,7 +604,7 @@ static void select_cb (Widget w, XtPoint
+ /* ARGSUSED */
+ static void options_cb (Widget w, XtPointer closure, XtPointer call_data)
+ {
+-    switch ((int) closure) {
++    switch ((uintptr_t) closure) {
+     case 0:                   /* toggle overview area */
+       overview_flag = !overview_flag;
+       if (overview_flag) {
+@@ -660,7 +660,7 @@ static void options_cb (Widget w, XtPoin
+ /* ARGSUSED */
+ static void helpmenu_cb (Widget w, XtPointer closure, XtPointer call_data)
+ {
+-    switch ((int) closure) {
++    switch ((uintptr_t) closure) {
+     case 0:                   /* version */
+       show_version (toplevel);
+       break;
+@@ -1110,7 +1110,9 @@ int main (int argc, char *argv[])
+        */
+     case 3:
+       if (strcmp (argv[1], "-") == 0) {
+-          tempfname = tempnam (NULL, "mgdif");
++          char xxx[20];
++          sprintf(tempfname, "mgdif.XXXXXXXX");
++          close(mkstemp (tempfname));
+           str_fnamel = strdup (tempfname);
+           str_snamel = strdup (user_filename);
+           if (!copy_to_file (stdin, tempfname)) {
+@@ -1131,7 +1133,9 @@ int main (int argc, char *argv[])
+       }
+ 
+       if (strcmp (argv[2], "-") == 0) {
+-          tempfname = tempnam (NULL, "mgdif");
++         char xxx[20];
++            sprintf(tempfname, "mgdif.XXXXXXXX");
++            close(mkstemp (tempfname));
+           str_fnamer = strdup (tempfname);
+           str_snamer = strdup (user_filename);
+           if (!copy_to_file (stdin, tempfname)) {
Index: pkgsrc/devel/mgdiff/patches/patch-rundiff.c
diff -u /dev/null pkgsrc/devel/mgdiff/patches/patch-rundiff.c:1.1
--- /dev/null   Mon Jan  2 22:43:53 2023
+++ pkgsrc/devel/mgdiff/patches/patch-rundiff.c Mon Jan  2 22:43:53 2023
@@ -0,0 +1,96 @@
+$NetBSD: patch-rundiff.c,v 1.1 2023/01/02 22:43:53 vins Exp $
+
+Avoid conflicting getline() type definition.
+
+--- rundiff.c.orig     1994-05-19 02:01:22.000000000 +0000
++++ rundiff.c
+@@ -63,7 +63,7 @@ typedef enum { ADD = 1, CHANGE, DELETE, 
+ static char *duplicate (char *s, int *flag);
+ static DiffType parse_diff_line (char *buf, int *f1n1, int *f1n2, int *f2n1, int *f2n2);
+ static int eatline (FILE *f);
+-static void getline (FILE *f, char **cooked, char **raw);
++static void get_line (FILE *f, char **cooked, char **raw);
+ static void reset_blist (void);
+ static Block *get_blist (void);
+ static void add_blist (Block *b);
+@@ -271,7 +271,7 @@ DiffInfo *build_diff_info (char *prog, c
+               b->arr[LEFT].wtext = (char **) calloc (b->arr[LEFT].fsize, sizeof (char *));
+               b->arr[LEFT].tlen = (short *) calloc (b->arr[LEFT].fsize, sizeof (short));
+               for (i = 0; i < b->arr[LEFT].fsize; i++) {
+-                  getline (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
++                  get_line (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
+                   b->arr[LEFT].tlen[i] = strlen (b->arr[LEFT].text[i]);
+                   if (di->maxcols < b->arr[LEFT].tlen[i]) {
+                       di->maxcols = b->arr[LEFT].tlen[i];
+@@ -300,7 +300,7 @@ DiffInfo *build_diff_info (char *prog, c
+           b->arr[RIGHT].wtext = (char **) calloc (b->arr[RIGHT].fsize, sizeof (char *));
+           b->arr[RIGHT].tlen = (short *) calloc (b->arr[RIGHT].fsize, sizeof (short));
+           for (i = 0; i < b->arr[RIGHT].fsize; i++) {
+-              getline (file2, &b->arr[RIGHT].text[i], &b->arr[RIGHT].wtext[i]);
++              get_line (file2, &b->arr[RIGHT].text[i], &b->arr[RIGHT].wtext[i]);
+               b->arr[RIGHT].tlen[i] = strlen (b->arr[RIGHT].text[i]);
+               if (di->maxcols < b->arr[RIGHT].tlen[i]) {
+                   di->maxcols = b->arr[RIGHT].tlen[i];
+@@ -331,7 +331,7 @@ DiffInfo *build_diff_info (char *prog, c
+               b->arr[LEFT].wtext = (char **) calloc (b->arr[LEFT].fsize, sizeof (char *));
+               b->arr[LEFT].tlen = (short *) calloc (b->arr[LEFT].fsize, sizeof (short));
+               for (i = 0; i < b->arr[LEFT].fsize; i++) {
+-                  getline (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
++                  get_line (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
+                   b->arr[LEFT].tlen[i] = strlen (b->arr[LEFT].text[i]);
+                   if (di->maxcols < b->arr[LEFT].tlen[i]) {
+                       di->maxcols = b->arr[LEFT].tlen[i];
+@@ -358,7 +358,7 @@ DiffInfo *build_diff_info (char *prog, c
+           b->arr[LEFT].wtext = (char **) calloc (b->arr[LEFT].fsize, sizeof (char *));
+           b->arr[LEFT].tlen = (short *) calloc (b->arr[LEFT].fsize, sizeof (short));
+           for (i = 0; i < b->arr[LEFT].fsize; i++) {
+-              getline (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
++              get_line (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
+               b->arr[LEFT].tlen[i] = strlen (b->arr[LEFT].text[i]);
+               if (di->maxcols < b->arr[LEFT].tlen[i]) {
+                   di->maxcols = b->arr[LEFT].tlen[i];
+@@ -371,7 +371,7 @@ DiffInfo *build_diff_info (char *prog, c
+           b->arr[RIGHT].wtext = (char **) calloc (b->arr[RIGHT].fsize, sizeof (char *));
+           b->arr[RIGHT].tlen = (short *) calloc (b->arr[RIGHT].fsize, sizeof (short));
+           for (i = 0; i < b->arr[RIGHT].fsize; i++) {
+-              getline (file2, &b->arr[RIGHT].text[i], &b->arr[RIGHT].wtext[i]);
++              get_line (file2, &b->arr[RIGHT].text[i], &b->arr[RIGHT].wtext[i]);
+               b->arr[RIGHT].tlen[i] = strlen (b->arr[RIGHT].text[i]);
+               if (di->maxcols < b->arr[RIGHT].tlen[i]) {
+                   di->maxcols = b->arr[RIGHT].tlen[i];
+@@ -399,7 +399,7 @@ DiffInfo *build_diff_info (char *prog, c
+               b->arr[LEFT].wtext = (char **) calloc (b->arr[LEFT].fsize, sizeof (char *));
+               b->arr[LEFT].tlen = (short *) calloc (b->arr[LEFT].fsize, sizeof (short));
+               for (i = 0; i < b->arr[LEFT].fsize; i++) {
+-                  getline (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
++                  get_line (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
+                   b->arr[LEFT].tlen[i] = strlen (b->arr[LEFT].text[i]);
+                   if (di->maxcols < b->arr[LEFT].tlen[i]) {
+                       di->maxcols = b->arr[LEFT].tlen[i];
+@@ -428,7 +428,7 @@ DiffInfo *build_diff_info (char *prog, c
+           b->arr[LEFT].wtext = (char **) calloc (b->arr[LEFT].fsize, sizeof (char *));
+           b->arr[LEFT].tlen = (short *) calloc (b->arr[LEFT].fsize, sizeof (short));
+           for (i = 0; i < b->arr[LEFT].fsize; i++) {
+-              getline (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
++              get_line (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
+               b->arr[LEFT].tlen[i] = strlen (b->arr[LEFT].text[i]);
+               if (di->maxcols < b->arr[LEFT].tlen[i]) {
+                   di->maxcols = b->arr[LEFT].tlen[i];
+@@ -491,7 +491,7 @@ DiffInfo *build_diff_info (char *prog, c
+       b->arr[LEFT].wtext = (char **) calloc (b->arr[LEFT].fsize, sizeof (char *));
+       b->arr[LEFT].tlen = (short *) calloc (b->arr[LEFT].fsize, sizeof (short));
+       for (i = 0; i < b->arr[LEFT].fsize; i++) {
+-          getline (file2, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
++          get_line (file2, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
+           b->arr[LEFT].tlen[i] = strlen (b->arr[LEFT].text[i]);
+           if (di->maxcols < b->arr[LEFT].tlen[i]) {
+               di->maxcols = b->arr[LEFT].tlen[i];
+@@ -663,7 +663,7 @@ static int eatline (FILE *f)
+  * printable) if necessary.  Silently truncate input lines at BUFSIZ
+  * characters.
+  */
+-static void getline (FILE *f, char **cooked, char **raw)
++static void get_line (FILE *f, char **cooked, char **raw)
+ {
+     char buffer[BUFSIZ+1];
+     char *s;



Home | Main Index | Thread Index | Old Index