# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= arc VERSION= 5.21q KEYWORDS= archivers VARIANTS= standard SDESC[standard]= Archiver for MS-DOS ARC Format Files HOMEPAGE= https://sourceforge.net/projects/arc/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= GITHUB/ani6al:arc:5.21q DISTFILE[1]= generated:main DF_INDEX= 1 SPKGS[standard]= single OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none LICENSE= GPLv2:single LICENSE_TERMS= single:{{WRKSRC}}/LICENSE LICENSE_FILE= GPLv2:{{WRKSRC}}/COPYING LICENSE_SCHEME= solo FPC_EQUIVALENT= archivers/arc do-install: ${INSTALL_PROGRAM} ${WRKSRC}/arc ${WRKSRC}/marc\ ${STAGEDIR}/${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/arc.1 ${STAGEDIR}/${MANPREFIX}/man/man1 [FILE:225:descriptions/desc.single] This package creates and extracts-from ARC archives. An ARC archive contains files which are compressed according to the most efficient of three algorithms. ARC archives are usually only used for compatibility with MS-DOS. [FILE:102:distinfo] bde44648d0c451852612da2256f5a7e48b97d0d625ba88b903d7f223959528cc 79366 ani6al-arc-5.21q.tar.gz [FILE:40:manifests/plist.single] bin/ arc marc share/man/man1/arc.1.gz [FILE:486:patches/patch-Makefile] --- Makefile.orig 2013-06-27 02:00:19 UTC +++ Makefile @@ -43,14 +43,14 @@ SYSTEM = -DSYSV=1 OPT = -O -Wall # For MWC 3.0 on the Atari ST, use: #CFLAGS = -VCOMPAC -VPEEP -CFLAGS = $(OPT) $(SYSTEM) +CFLAGS+=$(SYSTEM) # GNU's gcc is very nice, if you've got it. Otherwise just cc. #CC = cgcc -mshort -mbaserel -CC = cc +#CC = cc # tmclock is only needed on Unix systems... -TMCLOCK = tmclock.o +TMCLOCK = #tmclock.o # Integer-only stdio routines for Atari ST. #LIBS=-liio16 [FILE:638:patches/patch-arc.c] --- arc.c.orig 2013-06-27 02:00:19 UTC +++ arc.c @@ -280,7 +280,7 @@ main(num, arg) /* system entry point * keepbak = 1; else if (*a == 'W') /* suppress warnings */ - warn = 0; + arcwarn = 0; #if !DOS else if (*a == 'I') /* image mode, no ASCII/EBCDIC x-late */ image = !image; @@ -416,7 +416,7 @@ static VOID expandlst(n) /* expand an indirect reference */ int n; /* number of entry to expand */ { - FILE *lf, *fopen(); /* list file, opener */ + FILE *lf; /* list file, opener */ char buf[100]; /* input buffer */ int x; /* index */ char *p = lst[n] + 1; /* filename pointer */ [FILE:858:patches/patch-arc.h] --- arc.h.orig 2013-06-27 02:00:19 UTC +++ arc.h @@ -104,7 +104,7 @@ extern char tmpchr[2]; /* Temporary #if GEMDOS extern int hold; /* hold screen before exiting */ #endif -extern int warn; /* true to print warnings */ +extern int arcwarn; /* true to print warnings */ extern int note; /* true to print comments */ extern int bose; /* true to be verbose */ extern int nocomp; /* true to suppress compression */ @@ -127,4 +127,8 @@ extern u_short arctime; /* archive time extern u_short olddate; /* old archive date stamp */ extern u_short oldtime; /* old archive time stamp */ extern int dosquash; /* squash instead of crunch */ +extern long stdlen; /* bytes to read */ +extern u_char *outbuf; +extern u_char *outend; +extern short crcval; /* CRC check value */ #endif /* DONT_DEFINE */ [FILE:1152:patches/patch-arcadd.c] --- arcadd.c.orig 2013-06-27 02:00:19 UTC +++ arcadd.c @@ -117,7 +117,7 @@ int fresh; /* true if fresh } #endif } - if (notemp && warn) + if (notemp && arcwarn) printf("No files match: %s\n", arg[n]); } @@ -131,7 +131,7 @@ int fresh; /* true if fresh free(path); free(name); } - if (nowork && warn) + if (nowork && arcwarn) printf("No files were added.\n"); } @@ -225,7 +225,7 @@ addbunch(nfiles, path, name, move, updat if (move) { /* if this was a move */ for (n = 0; n < nfiles; n++) { /* then delete each file * added */ - if (unlink(path[n]) && warn) { + if (unlink(path[n]) && arcwarn) { printf("Cannot unsave %s\n", path[n]); nerrs++; } @@ -257,7 +257,7 @@ addfile(path, name, update, fresh) /* ad if (!f) #endif { - if (warn) { + if (arcwarn) { printf("Cannot read file: %s\n", path); nerrs++; } @@ -265,7 +265,7 @@ addfile(path, name, update, fresh) /* ad } #if !DOS if (strlen(name) >= FNLEN) { - if (warn) { + if (arcwarn) { char buf[STRLEN]; printf("WARNING: File %s name too long!\n", name); name[FNLEN-1]='\0'; [FILE:400:patches/patch-arccvt.c] --- arccvt.c.orig 2013-06-27 02:00:19 UTC +++ arccvt.c @@ -118,7 +118,7 @@ cvtfile(hdr) /* convert a file */ writehdr(hdr, new); /* write out real header */ fseek(new, hdr->size, 1); /* skip over data to next header */ fclose(tmp); /* all done with the file */ - if (unlink(tempname) && warn) { + if (unlink(tempname) && arcwarn) { printf("Cannot unsave %s\n", tempname); nerrs++; } [FILE:471:patches/patch-arcdata.c] --- arcdata.c.orig 2013-06-27 02:00:19 UTC +++ arcdata.c @@ -33,7 +33,7 @@ char tmpchr[2] = "-";/* Tempo #if GEMDOS int hold = 0; /* true to pause before exit */ #endif -int warn = 1; /* true to print warnings */ +int arcwarn = 1; /* true to print warnings */ int note = 1; /* true to print comments */ int bose = 0; /* true to be verbose */ int nocomp = 0; /* true to suppress compression */ [FILE:539:patches/patch-arcdos.c] --- arcdos.c.orig 2013-06-27 02:00:19 UTC +++ arcdos.c @@ -173,14 +173,13 @@ setstamp(f, date, time) /* set a file's struct tm tm; struct timeval tvp[2]; int utimes(); - long tmclock(); tm.tm_sec = (time & 31) * 2; tm.tm_min = (time >> 5) & 63; tm.tm_hour = (time >> 11); tm.tm_mday = date & 31; tm.tm_mon = ((date >> 5) & 15) - 1; tm.tm_year = (date >> 9) + 80; - tvp[0].tv_sec = tmclock(&tm); + tvp[0].tv_sec = timelocal(&tm); tvp[1].tv_sec = tvp[0].tv_sec; tvp[0].tv_usec = tvp[1].tv_usec = 0; utimes(f, tvp); [FILE:524:patches/patch-arcext.c] --- arcext.c.orig 2013-06-27 02:00:19 UTC +++ arcext.c @@ -141,7 +141,7 @@ extfile(hdr, path, prt) /* extract a fi if (note) printf("Extracting file: %s\n", fix); - if (warn && !overlay) { + if (arcwarn && !overlay) { if ((f = fopen(fix, "r"))) { /* see if it exists */ fclose(f); printf("WARNING: File %s already exists!", fix); @@ -189,7 +189,7 @@ extfile(hdr, path, prt) /* extract a fi if (!f) #endif { - if (warn) { + if (arcwarn) { printf("Cannot create %s\n", fix); nerrs++; } [FILE:1052:patches/patch-arcio.c] --- arcio.c.orig 2013-06-27 02:00:19 UTC +++ arcio.c @@ -44,7 +44,7 @@ readhdr(hdr, f) /* read a header from return 0; /* then signal end of archive */ if (hdrver != ARCMARK) { /* check archive validity */ - if (warn) { + if (arcwarn) { printf("An entry in %s has a bad header.\n", arcname); nerrs++; } @@ -65,10 +65,10 @@ readhdr(hdr, f) /* read a header from if (feof(f) && first) arcdie("%s is not an archive", arcname); - if (changing && warn) + if (changing && arcwarn) arcdie("%s is corrupted -- changes disallowed", arcname); - if (warn) + if (arcwarn) printf(" %d bytes skipped.\n", try); if (feof(f)) @@ -116,7 +116,8 @@ readhdr(hdr, f) /* read a header from hdr->crc = (short) ((dummy[22] << 8) + dummy[21]); for (i = 0, hdr->length=0; i<4; hdr->length<<=8, hdr->length += dummy[26-i], i++); #endif - + if (hdr->size < 0) + arcdie("Invalid header in archive %s", arcname); if (hdr->date > olddate || (hdr->date == olddate && hdr->time > oldtime)) { olddate = hdr->date; [FILE:597:patches/patch-arclzw.c] --- arclzw.c.orig 2013-06-27 02:00:19 UTC +++ arclzw.c @@ -56,8 +56,7 @@ static VOID putcode(); extern u_char *pinbuf; u_char *inbeg, *inend; -u_char *outbuf; -u_char *outbeg, *outend; +u_char *outbeg; static int sp; /* current stack pointer */ static int inflag; @@ -558,7 +557,7 @@ decomp(squash, f, t) /* decompress a fi */ if (code >= free_ent) { if (code > free_ent) { - if (warn) { + if (arcwarn) { printf("Corrupted compressed file.\n"); printf("Invalid code %d when max is %d.\n", code, free_ent); [FILE:1127:patches/patch-arcrun.c] --- arcrun.c.orig 2013-06-27 02:00:19 UTC +++ arcrun.c @@ -96,7 +96,7 @@ runfile(hdr, num, arg) /* run a file */ strcpy(sys, buf); else { - if (warn) { + if (arcwarn) { printf("File %s is not a .BAS, .BAT, .COM, or .EXE\n", hdr->name); nerrs++; @@ -110,7 +110,7 @@ runfile(hdr, num, arg) /* run a file */ && strcmp(i, ".TTP") && strcmp(i, ".TOS")) { - if (warn) { + if (arcwarn) { printf("File %s is not a .PRG, .TOS, or .TTP\n", hdr->name); nerrs++; @@ -120,7 +120,7 @@ runfile(hdr, num, arg) /* run a file */ } #endif - if (warn) + if (arcwarn) if ((tmp = fopen(buf, "r"))) arcdie("Temporary file %s already exists", buf); if (!(tmp = tmpopen(buf))) @@ -144,7 +144,7 @@ runfile(hdr, num, arg) /* run a file */ if (system(buf)) /* try to invoke it */ arcdie("Execution failed for %s", buf); #endif - if (unlink(buf) && warn) { + if (unlink(buf) && arcwarn) { printf("Cannot unsave temporary file %s\n", buf); nerrs++; } [FILE:867:patches/patch-arcunp.c] --- arcunp.c.orig 2013-06-27 02:00:19 UTC +++ arcunp.c @@ -37,8 +37,6 @@ extern int lastc; #define NOHIST 0 /* no relevant history */ #define INREP 1 /* sending a repeated value */ -short crcval; /* CRC check value */ -long stdlen; /* bytes to read */ #if !DOS static int gotcr; /* got a carriage return? */ #endif @@ -120,7 +118,7 @@ unpack(f, t, hdr) /* unpack an archive break; default: /* unknown method */ - if (warn) { + if (arcwarn) { printf("I don't know how to unpack file %s\n", hdr->name); printf("I think you need a newer version of ARC\n"); nerrs++; @@ -132,7 +130,7 @@ unpack(f, t, hdr) /* unpack an archive /* cleanups common to all methods */ if (crcval != hdr->crc) { - if (warn || kludge) { + if (arcwarn || kludge) { printf("WARNING: File %s fails CRC check\n", hdr->name); nerrs++; }