summaryrefslogtreecommitdiff
path: root/x11/xtar
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2022-01-07 12:43:14 +0000
committernia <nia@pkgsrc.org>2022-01-07 12:43:14 +0000
commit8ab2321d8c838a044777bbebfd2db1280abcf3ce (patch)
treeb7643484c5bc6574ff48a5b443a574c4bcf32603 /x11/xtar
parent82d7b63c485e2768123b43077d4a5e8da2179774 (diff)
downloadpkgsrc-8ab2321d8c838a044777bbebfd2db1280abcf3ce.tar.gz
add x11/xtar
XTar is a package for graphically viewing and manipulating files which have been archived using tar (Tape ARchive), and possibly compressed with gzip or the standard UNIX compress utility. XTar requires an ANSI C compiler and the Motif toolkit to build.
Diffstat (limited to 'x11/xtar')
-rw-r--r--x11/xtar/DESCR4
-rw-r--r--x11/xtar/Makefile17
-rw-r--r--x11/xtar/PLIST5
-rw-r--r--x11/xtar/distinfo20
-rw-r--r--x11/xtar/patches/patch-Imakefile13
-rw-r--r--x11/xtar/patches/patch-Xbr_XbrCB.c14
-rw-r--r--x11/xtar/patches/patch-Xbr_XbrGfx.c14
-rw-r--r--x11/xtar/patches/patch-Xbr_XbrList.h16
-rw-r--r--x11/xtar/patches/patch-Xbr_XbrMenu.c14
-rw-r--r--x11/xtar/patches/patch-common_ascii.c14
-rw-r--r--x11/xtar/patches/patch-common_file.c16
-rw-r--r--x11/xtar/patches/patch-common_magic.c40
-rw-r--r--x11/xtar/patches/patch-common_magic.h23
-rw-r--r--x11/xtar/patches/patch-common_nums.c15
-rw-r--r--x11/xtar/patches/patch-common_pipe.c16
-rw-r--r--x11/xtar/patches/patch-common_regexpr.c64
-rw-r--r--x11/xtar/patches/patch-common_str.c24
-rw-r--r--x11/xtar/patches/patch-common_tmpfile.c14
-rw-r--r--x11/xtar/patches/patch-xtar.c32
19 files changed, 375 insertions, 0 deletions
diff --git a/x11/xtar/DESCR b/x11/xtar/DESCR
new file mode 100644
index 00000000000..fc10bd0df72
--- /dev/null
+++ b/x11/xtar/DESCR
@@ -0,0 +1,4 @@
+XTar is a package for graphically viewing and manipulating files which have
+been archived using tar (Tape ARchive), and possibly compressed with gzip
+or the standard UNIX compress utility. XTar requires an ANSI C compiler and
+the Motif toolkit to build.
diff --git a/x11/xtar/Makefile b/x11/xtar/Makefile
new file mode 100644
index 00000000000..5e182a13071
--- /dev/null
+++ b/x11/xtar/Makefile
@@ -0,0 +1,17 @@
+# $NetBSD: Makefile,v 1.1 2022/01/07 12:43:14 nia Exp $
+
+DISTNAME= xtar-1.4
+CATEGORIES= x11
+MASTER_SITES= ${MASTER_SITE_XCONTRIB:=utilities/}
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= https://ftp.gwdg.de/pub/x11/x.org/contrib/utilities/
+COMMENT= View and manipulate the contents of a tar file
+LICENSE= modified-bsd # ish
+
+USE_IMAKE= yes
+
+MAKE_JOBS_SAFE= no
+
+.include "../../mk/motif.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/x11/xtar/PLIST b/x11/xtar/PLIST
new file mode 100644
index 00000000000..d3113d4389c
--- /dev/null
+++ b/x11/xtar/PLIST
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.1 2022/01/07 12:43:14 nia Exp $
+bin/xtar
+lib/X11/app-defaults/XTar
+lib/X11/xtar/xtar.doc
+man/man1/xtar.1
diff --git a/x11/xtar/distinfo b/x11/xtar/distinfo
new file mode 100644
index 00000000000..ad7fbf0b9b6
--- /dev/null
+++ b/x11/xtar/distinfo
@@ -0,0 +1,20 @@
+$NetBSD: distinfo,v 1.1 2022/01/07 12:43:14 nia Exp $
+
+BLAKE2s (xtar-1.4.tar.gz) = 3a2d17f4c1fd2d6d46c5f91b919d54367c1268b027984016aa6c992e0e0b070f
+SHA512 (xtar-1.4.tar.gz) = aac20f1eefcdc2401dc0fa39ba4291a56cb505ee4a6a5202ac6401e8bbc27dcf40368495e5b22669c21a30d90cf116d2dbdc67ce86273f4fd8df21f070d2f121
+Size (xtar-1.4.tar.gz) = 87506 bytes
+SHA1 (patch-Imakefile) = 6bbc68103dd399c0a744f837dbe3016d5a367424
+SHA1 (patch-Xbr_XbrCB.c) = db5544ed0ede603a53f091a47335505c2207b7d5
+SHA1 (patch-Xbr_XbrGfx.c) = 2ff219fe99837c2b0109667866b7b822312ec0c0
+SHA1 (patch-Xbr_XbrList.h) = b038bfa8b9bc1300de868994ad6e6ff2fa7e20ee
+SHA1 (patch-Xbr_XbrMenu.c) = 193673bed0d88510331bb466c1cef24840aded36
+SHA1 (patch-common_ascii.c) = 45c8d20e0e7557ff16e7984c1b18fd909c573858
+SHA1 (patch-common_file.c) = 959078bb12666c2f9970644e5f23f054abb3ae81
+SHA1 (patch-common_magic.c) = 50b27640f9e913a32db499121c2dd1f990c60902
+SHA1 (patch-common_magic.h) = 23dacfc0d3dbbca9bdadeb1f6678cefec4c640fc
+SHA1 (patch-common_nums.c) = b71fbbb3f1a956155ad06fb394f18a53c6460093
+SHA1 (patch-common_pipe.c) = 827efb75e5c49808ffbcad6fa9bbea60c8666ec0
+SHA1 (patch-common_regexpr.c) = 14ef6d96bb0f81fae929595204b4d3ac134e6d1c
+SHA1 (patch-common_str.c) = 9290827ba81b9255957a17c5df975036c1024365
+SHA1 (patch-common_tmpfile.c) = a8a5c1870fd200c437d97869fdb17e6fb65f058e
+SHA1 (patch-xtar.c) = 5b3eb5d2ee883efbd329f871f5f29189e9969072
diff --git a/x11/xtar/patches/patch-Imakefile b/x11/xtar/patches/patch-Imakefile
new file mode 100644
index 00000000000..98d2a0aa159
--- /dev/null
+++ b/x11/xtar/patches/patch-Imakefile
@@ -0,0 +1,13 @@
+$NetBSD: patch-Imakefile,v 1.1 2022/01/07 12:43:14 nia Exp $
+
+- Prevent the insertion of a space so DESTDIR is honored.
+
+--- Imakefile.orig 1995-07-17 11:28:19.000000000 +0000
++++ Imakefile
+@@ -30,5 +30,5 @@ OBJS = $(SRCS:.c=.o)
+ MakeSubdirs($(SUBDIRS))
+ ComplexProgramTarget(xtar)
+ MakeDirectories(install,$(LIBDIR)/xtar)
+-InstallNonExec(xtar.doc, $(LIBDIR)/xtar)
++InstallNonExec(xtar.doc,$(LIBDIR)/xtar)
+ InstallAppDefaults(XTar)
diff --git a/x11/xtar/patches/patch-Xbr_XbrCB.c b/x11/xtar/patches/patch-Xbr_XbrCB.c
new file mode 100644
index 00000000000..3026706cda8
--- /dev/null
+++ b/x11/xtar/patches/patch-Xbr_XbrCB.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-Xbr_XbrCB.c,v 1.1 2022/01/07 12:43:14 nia Exp $
+
+- Fix implicit declaration warnings.
+
+--- Xbr/XbrCB.c.orig 1995-05-09 08:06:46.000000000 +0000
++++ Xbr/XbrCB.c
+@@ -19,6 +19,7 @@
+ */
+
+ #include <Xm/Xm.h>
++#include <stdlib.h>
+
+ void XbrCBExitApplication(Widget, XtPointer, XtPointer);
+ void XbrCBDestroyWidget(Widget, XtPointer, XtPointer);
diff --git a/x11/xtar/patches/patch-Xbr_XbrGfx.c b/x11/xtar/patches/patch-Xbr_XbrGfx.c
new file mode 100644
index 00000000000..35d82ea49bb
--- /dev/null
+++ b/x11/xtar/patches/patch-Xbr_XbrGfx.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-Xbr_XbrGfx.c,v 1.1 2022/01/07 12:43:14 nia Exp $
+
+- Fix implicit declaration warnings.
+
+--- Xbr/XbrGfx.c.orig 1995-05-09 08:06:47.000000000 +0000
++++ Xbr/XbrGfx.c
+@@ -46,6 +46,7 @@
+ */
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <math.h>
+ #include <ctype.h>
diff --git a/x11/xtar/patches/patch-Xbr_XbrList.h b/x11/xtar/patches/patch-Xbr_XbrList.h
new file mode 100644
index 00000000000..fca0c728b2f
--- /dev/null
+++ b/x11/xtar/patches/patch-Xbr_XbrList.h
@@ -0,0 +1,16 @@
+$NetBSD: patch-Xbr_XbrList.h,v 1.1 2022/01/07 12:43:14 nia Exp $
+
+- "implicit int" may have been cool in 1995, but it now produces
+ compiler warnings.
+
+--- Xbr/XbrList.h.orig 1995-05-09 08:06:46.000000000 +0000
++++ Xbr/XbrList.h
+@@ -29,7 +29,7 @@ extern void XbrListClear(Widget);
+ extern void XbrListAddItem(Widget, char *, int);
+ extern char **XbrListGetSelection(Widget);
+ extern void XbrListSelectionFree(char **);
+-extern XbrListItemSelected(Widget, int *);
++extern int XbrListItemSelected(Widget, int *);
+ extern void XbrListTop(Widget);
+ extern int XbrListNumItems(Widget);
+
diff --git a/x11/xtar/patches/patch-Xbr_XbrMenu.c b/x11/xtar/patches/patch-Xbr_XbrMenu.c
new file mode 100644
index 00000000000..c9ca11b78d4
--- /dev/null
+++ b/x11/xtar/patches/patch-Xbr_XbrMenu.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-Xbr_XbrMenu.c,v 1.1 2022/01/07 12:43:14 nia Exp $
+
+- Fix implicit declaration warnings.
+
+--- Xbr/XbrMenu.c.orig 1995-05-09 08:06:47.000000000 +0000
++++ Xbr/XbrMenu.c
+@@ -18,6 +18,7 @@
+ *
+ */
+
++#include <stdlib.h>
+ #include <Xm/Xm.h>
+ #include <Xm/CascadeB.h>
+ #include <Xm/Label.h>
diff --git a/x11/xtar/patches/patch-common_ascii.c b/x11/xtar/patches/patch-common_ascii.c
new file mode 100644
index 00000000000..03a063f6908
--- /dev/null
+++ b/x11/xtar/patches/patch-common_ascii.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-common_ascii.c,v 1.1 2022/01/07 12:43:14 nia Exp $
+
+- Fix implicit declaration warnings.
+
+--- common/ascii.c.orig 1995-05-09 08:06:46.000000000 +0000
++++ common/ascii.c
+@@ -24,6 +24,7 @@
+ */
+
+ #include <stdio.h>
++#include <string.h>
+ #include <time.h>
+
+ #include "cdefs.h"
diff --git a/x11/xtar/patches/patch-common_file.c b/x11/xtar/patches/patch-common_file.c
new file mode 100644
index 00000000000..6c1b18c5f30
--- /dev/null
+++ b/x11/xtar/patches/patch-common_file.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-common_file.c,v 1.1 2022/01/07 12:43:14 nia Exp $
+
+- Fix implicit declaration warnings.
+
+--- common/file.c.orig 1995-05-09 08:06:46.000000000 +0000
++++ common/file.c
+@@ -22,7 +22,9 @@
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
+ #include <utime.h>
+ #include <time.h>
+
diff --git a/x11/xtar/patches/patch-common_magic.c b/x11/xtar/patches/patch-common_magic.c
new file mode 100644
index 00000000000..080f3784ee6
--- /dev/null
+++ b/x11/xtar/patches/patch-common_magic.c
@@ -0,0 +1,40 @@
+$NetBSD: patch-common_magic.c,v 1.1 2022/01/07 12:43:14 nia Exp $
+
+- Fix implicit declaration warnings.
+- Add support for bzip2 and xz archives.
+
+--- common/magic.c.orig 1995-05-09 08:06:46.000000000 +0000
++++ common/magic.c
+@@ -21,6 +21,8 @@
+
+ #include <fcntl.h>
+ #include <stdio.h>
++#include <string.h>
++#include <unistd.h>
+
+ #include "magic.h"
+
+@@ -30,6 +32,8 @@ static unsigned char jpeg[2] = { 0
+ static unsigned char gif[3] = { 0x47, 0x49, 0x46 };
+ static unsigned char compress[3] = { 0x1f, 0x9d, 0x90 };
+ static unsigned char gzip[3] = { 0x1f, 0x8b, 0x08 };
++static unsigned char bzip2[3] = { 0x42, 0x5a, 0x68 };
++static unsigned char xz[3] = { 0xfd, 0x37, 0x7a };
+ static unsigned char troff[2] = { 0x5c, 0x22 };
+ static unsigned char postscript[2] = { 0x25, 0x21 };
+
+@@ -65,6 +69,14 @@ int magic_ftype(char *filename, int type
+
+ /* Compare bytes with type we are after */
+ switch(type) {
++ case MAGIC_BZIP2:
++ if(!memcmp(buffer, bzip2, 3))
++ return(1);
++ break;
++ case MAGIC_XZ:
++ if(!memcmp(buffer, xz, 3))
++ return(1);
++ break;
+ case MAGIC_JPEG:
+ if(!memcmp(buffer, jpeg, 2))
+ return(1);
diff --git a/x11/xtar/patches/patch-common_magic.h b/x11/xtar/patches/patch-common_magic.h
new file mode 100644
index 00000000000..e78f4d2a2aa
--- /dev/null
+++ b/x11/xtar/patches/patch-common_magic.h
@@ -0,0 +1,23 @@
+$NetBSD: patch-common_magic.h,v 1.1 2022/01/07 12:43:14 nia Exp $
+
+- Add support for bzip2 and xz archives.
+
+--- common/magic.h.orig 1995-05-09 08:06:46.000000000 +0000
++++ common/magic.h
+@@ -27,13 +27,15 @@
+ #define MAGIC_GZIP 4
+ #define MAGIC_TROFF 5
+ #define MAGIC_POSTSCRIPT 6
++#define MAGIC_BZIP2 7
++#define MAGIC_XZ 8
+
+ extern int magic_ftype(char *, int);
+
+ #define is_jpeg(filename) magic_ftype(filename, MAGIC_JPEG)
+ #define is_gif(filename) magic_ftype(filename, MAGIC_GIF)
+ #define is_compressed(filename) magic_ftype(filename, MAGIC_COMPRESS)
+-#define is_gzipped(filename) magic_ftype(filename, MAGIC_GZIP)
++#define is_gzipped(filename) magic_ftype(filename, MAGIC_GZIP) || magic_ftype(filename, MAGIC_BZIP2) || magic_ftype(filename, MAGIC_XZ)
+ #define is_troff(filename) magic_ftype(filename, MAGIC_TROFF)
+ #define is_postscript(filename) magic_ftype(filename, MAGIC_POSTSCRIPT)
+
diff --git a/x11/xtar/patches/patch-common_nums.c b/x11/xtar/patches/patch-common_nums.c
new file mode 100644
index 00000000000..ccc1a801559
--- /dev/null
+++ b/x11/xtar/patches/patch-common_nums.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-common_nums.c,v 1.1 2022/01/07 12:43:14 nia Exp $
+
+- Fix implicit declaration warnings.
+
+--- common/nums.c.orig 1995-05-09 08:06:46.000000000 +0000
++++ common/nums.c
+@@ -21,6 +21,8 @@
+ */
+
+ #include <sys/time.h>
++#include <stdlib.h>
++#include <ctype.h>
+
+ int num_random();
+ long num_decimal(char *, int);
diff --git a/x11/xtar/patches/patch-common_pipe.c b/x11/xtar/patches/patch-common_pipe.c
new file mode 100644
index 00000000000..06e516a2806
--- /dev/null
+++ b/x11/xtar/patches/patch-common_pipe.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-common_pipe.c,v 1.1 2022/01/07 12:43:14 nia Exp $
+
+- Fix implicit declaration warnings.
+
+--- common/pipe.c.orig 1995-05-09 08:06:46.000000000 +0000
++++ common/pipe.c
+@@ -23,7 +23,9 @@
+
+ #include <errno.h>
+ #include <stdio.h>
++#include <string.h>
+ #include <fcntl.h>
++#include <unistd.h>
+
+ #include "magic.h"
+ #include "str.h"
diff --git a/x11/xtar/patches/patch-common_regexpr.c b/x11/xtar/patches/patch-common_regexpr.c
new file mode 100644
index 00000000000..666f7b35ca1
--- /dev/null
+++ b/x11/xtar/patches/patch-common_regexpr.c
@@ -0,0 +1,64 @@
+$NetBSD: patch-common_regexpr.c,v 1.1 2022/01/07 12:43:14 nia Exp $
+
+- Fix implicit declaration warnings.
+- Do not define own libc symbols.
+
+--- common/regexpr.c.orig 1995-05-09 08:06:46.000000000 +0000
++++ common/regexpr.c
+@@ -23,6 +23,8 @@
+ * regular-expression syntax might require a total rethink.
+ */
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+
+ #include "regexpr.h"
+
+@@ -198,7 +200,6 @@ regexpr *reg_compile(char *exp)
+ register char *longest;
+ register int len;
+ int flags;
+- extern char *malloc();
+
+ if (exp == NULL)
+ FAIL("NULL argument");
+@@ -682,7 +683,6 @@ STATIC char *regprop(char *);
+ int reg_execute(register regexpr *prog, register char *string)
+ {
+ register char *s;
+- extern char *strchr();
+
+ /* Be paranoid... */
+ if (prog == NULL || string == NULL) {
+@@ -776,7 +776,6 @@ static int regmatch(char *prog)
+ {
+ register char *scan; /* Current node. */
+ char *next; /* Next node. */
+- extern char *strchr();
+
+ scan = prog;
+ #ifdef DEBUG
+@@ -964,7 +963,6 @@ static int regrepeat(char *p)
+ register int count = 0;
+ register char *scan;
+ register char *opnd;
+- extern char *strchr();
+
+ scan = reginput;
+ opnd = OPERAND(p);
+@@ -1031,7 +1029,6 @@ void reg_substitute(regexpr *prog, char
+ register char c;
+ register int no;
+ register int len;
+- extern char *strncpy();
+
+ if (prog == NULL || source == NULL || dest == NULL) {
+ reg_error("NULL parm to reg_substitute");
+@@ -1086,7 +1083,6 @@ void regdump(regexpr *r)
+ register char *s;
+ register char op = EXACTLY; /* Arbitrary non-END op. */
+ register char *next;
+- extern char *strchr();
+
+
+ s = r->program + 1;
diff --git a/x11/xtar/patches/patch-common_str.c b/x11/xtar/patches/patch-common_str.c
new file mode 100644
index 00000000000..93caa950178
--- /dev/null
+++ b/x11/xtar/patches/patch-common_str.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-common_str.c,v 1.1 2022/01/07 12:43:14 nia Exp $
+
+- Do not define symbols that belong to libc headers.
+- Fix implicit declaration warnings.
+
+--- common/str.c.orig 1995-05-09 08:06:46.000000000 +0000
++++ common/str.c
+@@ -18,6 +18,7 @@
+ *
+ */
+
++#include <ctype.h>
+ #include <errno.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -282,8 +283,6 @@ char *str_word(char **string)
+ ---------------------------------------------------------------------------*/
+ char *str_error(int errnum)
+ {
+- extern int sys_nerr;
+- extern char *sys_errlist[];
+ static char ebuf[40]; /* 64-bit number + slop */
+
+ if ((unsigned int)errnum < sys_nerr)
diff --git a/x11/xtar/patches/patch-common_tmpfile.c b/x11/xtar/patches/patch-common_tmpfile.c
new file mode 100644
index 00000000000..158b47b9a5e
--- /dev/null
+++ b/x11/xtar/patches/patch-common_tmpfile.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-common_tmpfile.c,v 1.1 2022/01/07 12:43:14 nia Exp $
+
+- Fix implicit declaration warnings.
+
+--- common/tmpfile.c.orig 1995-05-09 08:06:46.000000000 +0000
++++ common/tmpfile.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
+
+ /* Data structure describing a temporary file */
+ typedef struct tmp_struct {
diff --git a/x11/xtar/patches/patch-xtar.c b/x11/xtar/patches/patch-xtar.c
new file mode 100644
index 00000000000..11618f50a36
--- /dev/null
+++ b/x11/xtar/patches/patch-xtar.c
@@ -0,0 +1,32 @@
+$NetBSD: patch-xtar.c,v 1.1 2022/01/07 12:43:14 nia Exp $
+
+- Fix implicit declaration warnings.
+- Remove an unused variable that assumes it knows the size of
+ a private struct.
+
+--- xtar.c.orig 1995-07-17 11:44:19.000000000 +0000
++++ xtar.c
+@@ -31,6 +31,7 @@
+ #include <sys/param.h>
+ #include <sys/wait.h>
+ #include <sys/stat.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+
+@@ -46,6 +47,7 @@
+ #include <Xm/ScrolledW.h>
+ #include <Xm/Text.h>
+ #include <Xm/TextF.h>
++#include <Xm/ToggleB.h>
+
+ #include "Xbr.h"
+ #include "xtarint.h"
+@@ -1164,7 +1166,6 @@ static int xtar_show(char *tfname, char
+ static int xtar_attributes(TAR_FILE *tf, char *filename)
+ {
+ int retval = 0;
+- struct utimbuf utimbuf;
+
+ /* If the file type is not a directory then try and set the access
+ permissions. We exclude directories because if write permission