pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
x11/mgdiff: import mgdiff-1.0 as wip/mgdiff.
Module Name: pkgsrc-wip
Committed By: Paolo Vincenzo Olivo <vms%retrobsd.ddns.net@localhost>
Pushed By: vms
Date: Tue Dec 20 00:00:43 2022 +0100
Changeset: d0f8c0ab0602dab1c9d37dd94e94004d633f7690
Added Files:
mgdiff/DESCR
mgdiff/Makefile
mgdiff/PLIST
mgdiff/distinfo
mgdiff/patches/patch-Imakefile
mgdiff/patches/patch-mgdiff.c
mgdiff/patches/patch-rundiff.c
Log Message:
x11/mgdiff: import mgdiff-1.0 as wip/mgdiff.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d0f8c0ab0602dab1c9d37dd94e94004d633f7690
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
mgdiff/DESCR | 5 +++
mgdiff/Makefile | 30 +++++++++++++
mgdiff/PLIST | 6 +++
mgdiff/distinfo | 8 ++++
mgdiff/patches/patch-Imakefile | 14 ++++++
mgdiff/patches/patch-mgdiff.c | 28 ++++++++++++
mgdiff/patches/patch-rundiff.c | 96 ++++++++++++++++++++++++++++++++++++++++++
7 files changed, 187 insertions(+)
diffs:
diff --git a/mgdiff/DESCR b/mgdiff/DESCR
new file mode 100644
index 0000000000..2de3c9b6eb
--- /dev/null
+++ b/mgdiff/DESCR
@@ -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.
diff --git a/mgdiff/Makefile b/mgdiff/Makefile
new file mode 100644
index 0000000000..e66e61fa9c
--- /dev/null
+++ b/mgdiff/Makefile
@@ -0,0 +1,30 @@
+# $NetBSD$
+
+DISTNAME= mgdiff
+PKGNAME= ${DISTNAME}-1.0
+CATEGORIES= x11 devel
+MASTER_SITES= ${MASTER_SITE_XCONTRIB:=applications/}
+
+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}
+
+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"
diff --git a/mgdiff/PLIST b/mgdiff/PLIST
new file mode 100644
index 0000000000..11c85d0cfb
--- /dev/null
+++ b/mgdiff/PLIST
@@ -0,0 +1,6 @@
+@comment $NetBSD$
+bin/mgdiff
+lib/X11/app-defaults/Mgdiff
+lib/X11/mgdiff/mgdiff.xbm
+lib/X11/mgdiff/mgdiff.xpm
+man/man1/mgdiff.1
diff --git a/mgdiff/distinfo b/mgdiff/distinfo
new file mode 100644
index 0000000000..4c018b6b12
--- /dev/null
+++ b/mgdiff/distinfo
@@ -0,0 +1,8 @@
+$NetBSD$
+
+BLAKE2s (mgdiff.tar.gz) = 7c90e00f9646d41e5e822055340fa41440acaa5ec0352606ccec1e14b43188de
+SHA512 (mgdiff.tar.gz) = bf5ab4b2a9d42ff2edb73a6dda68a4d17d88f61c63f5ec8366cc49d372a56f3c6812d473a95d86bcb61680d1f91ce4ab7ad87a26748b45e2edd27b73044492a5
+Size (mgdiff.tar.gz) = 41187 bytes
+SHA1 (patch-Imakefile) = adb4de928befcb92c498a5dde513358c1fa244ba
+SHA1 (patch-mgdiff.c) = f2789be4b26b28391cd21cdf6eea4bbed62ebe06
+SHA1 (patch-rundiff.c) = 4ead16932bbf480d8da283b335a93418108926f2
diff --git a/mgdiff/patches/patch-Imakefile b/mgdiff/patches/patch-Imakefile
new file mode 100644
index 0000000000..e47d09b580
--- /dev/null
+++ b/mgdiff/patches/patch-Imakefile
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Do not require libucb/SUNWscpu.
+
+--- Imakefile.orig 1994-05-19 02:01:00.000000000 +0000
++++ Imakefile
+@@ -8,7 +8,6 @@ XMLIB = -lXm
+ 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
diff --git a/mgdiff/patches/patch-mgdiff.c b/mgdiff/patches/patch-mgdiff.c
new file mode 100644
index 0000000000..2ad5db900f
--- /dev/null
+++ b/mgdiff/patches/patch-mgdiff.c
@@ -0,0 +1,28 @@
+$NetBSD$
+
+Prevent unsafe use of tmpnam().
+
+--- mgdiff.c.orig 1994-09-29 01:56:53.000000000 +0000
++++ mgdiff.c
+@@ -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)) {
diff --git a/mgdiff/patches/patch-rundiff.c b/mgdiff/patches/patch-rundiff.c
new file mode 100644
index 0000000000..1b82b2c5e9
--- /dev/null
+++ b/mgdiff/patches/patch-rundiff.c
@@ -0,0 +1,96 @@
+$NetBSD$
+
+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