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.
This commit is contained in:
parent
ecedb55f87
commit
2ccfc49bb7
20 changed files with 377 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.948 2021/12/26 18:21:44 gutteridge Exp $
|
||||
# $NetBSD: Makefile,v 1.949 2022/01/07 12:43:14 nia Exp $
|
||||
#
|
||||
|
||||
COMMENT= Packages to support the X Window System
|
||||
|
@ -679,6 +679,7 @@ SUBDIR+= xsm
|
|||
SUBDIR+= xsnow
|
||||
SUBDIR+= xst
|
||||
SUBDIR+= xstdcmap
|
||||
SUBDIR+= xtar
|
||||
SUBDIR+= xteddy
|
||||
SUBDIR+= xteddy2
|
||||
SUBDIR+= xterm
|
||||
|
|
4
x11/xtar/DESCR
Normal file
4
x11/xtar/DESCR
Normal file
|
@ -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.
|
17
x11/xtar/Makefile
Normal file
17
x11/xtar/Makefile
Normal file
|
@ -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"
|
5
x11/xtar/PLIST
Normal file
5
x11/xtar/PLIST
Normal file
|
@ -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
|
20
x11/xtar/distinfo
Normal file
20
x11/xtar/distinfo
Normal file
|
@ -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
|
13
x11/xtar/patches/patch-Imakefile
Normal file
13
x11/xtar/patches/patch-Imakefile
Normal file
|
@ -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)
|
14
x11/xtar/patches/patch-Xbr_XbrCB.c
Normal file
14
x11/xtar/patches/patch-Xbr_XbrCB.c
Normal file
|
@ -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);
|
14
x11/xtar/patches/patch-Xbr_XbrGfx.c
Normal file
14
x11/xtar/patches/patch-Xbr_XbrGfx.c
Normal file
|
@ -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>
|
16
x11/xtar/patches/patch-Xbr_XbrList.h
Normal file
16
x11/xtar/patches/patch-Xbr_XbrList.h
Normal file
|
@ -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);
|
||||
|
14
x11/xtar/patches/patch-Xbr_XbrMenu.c
Normal file
14
x11/xtar/patches/patch-Xbr_XbrMenu.c
Normal file
|
@ -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>
|
14
x11/xtar/patches/patch-common_ascii.c
Normal file
14
x11/xtar/patches/patch-common_ascii.c
Normal file
|
@ -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"
|
16
x11/xtar/patches/patch-common_file.c
Normal file
16
x11/xtar/patches/patch-common_file.c
Normal file
|
@ -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>
|
||||
|
40
x11/xtar/patches/patch-common_magic.c
Normal file
40
x11/xtar/patches/patch-common_magic.c
Normal file
|
@ -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);
|
23
x11/xtar/patches/patch-common_magic.h
Normal file
23
x11/xtar/patches/patch-common_magic.h
Normal file
|
@ -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)
|
||||
|
15
x11/xtar/patches/patch-common_nums.c
Normal file
15
x11/xtar/patches/patch-common_nums.c
Normal file
|
@ -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);
|
16
x11/xtar/patches/patch-common_pipe.c
Normal file
16
x11/xtar/patches/patch-common_pipe.c
Normal file
|
@ -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"
|
64
x11/xtar/patches/patch-common_regexpr.c
Normal file
64
x11/xtar/patches/patch-common_regexpr.c
Normal file
|
@ -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;
|
24
x11/xtar/patches/patch-common_str.c
Normal file
24
x11/xtar/patches/patch-common_str.c
Normal file
|
@ -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)
|
14
x11/xtar/patches/patch-common_tmpfile.c
Normal file
14
x11/xtar/patches/patch-common_tmpfile.c
Normal file
|
@ -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 {
|
32
x11/xtar/patches/patch-xtar.c
Normal file
32
x11/xtar/patches/patch-xtar.c
Normal file
|
@ -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
|
Loading…
Reference in a new issue