From owner-svn-ports-all@freebsd.org Mon Jan 7 11:16:56 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E2E6148EF71; Mon, 7 Jan 2019 11:16:56 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 30152872EF; Mon, 7 Jan 2019 11:16:56 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2419BF074; Mon, 7 Jan 2019 11:16:56 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x07BGusB052066; Mon, 7 Jan 2019 11:16:56 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x07BGsnw052059; Mon, 7 Jan 2019 11:16:54 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <201901071116.x07BGsnw052059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Mon, 7 Jan 2019 11:16:54 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r489572 - in head/textproc/2bsd-diff: . files X-SVN-Group: ports-head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: in head/textproc/2bsd-diff: . files X-SVN-Commit-Revision: 489572 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 30152872EF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 11:16:56 -0000 Author: fernape Date: Mon Jan 7 11:16:54 2019 New Revision: 489572 URL: https://svnweb.freebsd.org/changeset/ports/489572 Log: textproc/2bsd-diff: fix breakage on current On FreeBSD 13 - current, the build failed with: cc: error: unknown argument: '-i' PR: 234362 Submitted by: risner@stdio.com (maintainer) Added: head/textproc/2bsd-diff/files/patch-diffh.c (contents, props changed) Modified: head/textproc/2bsd-diff/Makefile head/textproc/2bsd-diff/files/patch-Makefile head/textproc/2bsd-diff/files/patch-diff.c head/textproc/2bsd-diff/files/patch-diff.h head/textproc/2bsd-diff/files/patch-diffdir.c head/textproc/2bsd-diff/files/patch-diffreg.c head/textproc/2bsd-diff/pkg-descr Modified: head/textproc/2bsd-diff/Makefile ============================================================================== --- head/textproc/2bsd-diff/Makefile Mon Jan 7 10:36:38 2019 (r489571) +++ head/textproc/2bsd-diff/Makefile Mon Jan 7 11:16:54 2019 (r489572) @@ -3,10 +3,10 @@ PORTNAME= diff PORTVERSION= 2.11 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= textproc MASTER_SITES= http://www.tribug.org/pub/tuhs/PDP-11/Distributions/ucb/2.11BSD/ \ - http://www.stdio.com/2.11BSD/ + http://www.d20hobbies.com/2.11BSD/ PKGNAMEPREFIX= 2bsd- DISTNAME= file8 Modified: head/textproc/2bsd-diff/files/patch-Makefile ============================================================================== --- head/textproc/2bsd-diff/files/patch-Makefile Mon Jan 7 10:36:38 2019 (r489571) +++ head/textproc/2bsd-diff/files/patch-Makefile Mon Jan 7 11:16:54 2019 (r489572) @@ -1,20 +1,26 @@ ---- ./Makefile.orig 1996-10-22 04:29:46.000000000 +0000 -+++ ./Makefile 2014-02-17 13:43:18.000000000 +0000 -@@ -1,9 +1,9 @@ +--- Makefile.orig 1996-10-22 04:29:46 UTC ++++ Makefile +@@ -1,10 +1,14 @@ # @(#)Makefile 4.1.1 1996/10/21 # -DIFF= /bin/diff -DIFFH= /usr/libexec/diffh -PR= /bin/pr -CFLAGS= -O -DDIFF='"${DIFF}"' -DDIFFH='"${DIFFH}"' -DPR='"${PR}"' +-SEPFLAG=-i +DIFF= ${PREFIX}/bin/2diff +DIFFH= ${PREFIX}/libexec/2diffh +PR= /usr/bin/pr +CFLAGS+=-DDIFF='"${DIFF}"' -DDIFFH='"${DIFFH}"' -DPR='"${PR}"' - SEPFLAG=-i ++# SEPFLAG should be: ++# not on a PDP-11: SEPFLAG = ++# PDP-11 with separate I&D: SEPFLAG = -i ++# PDP-11 without separate I&D: SEPFLAG = -n ++SEPFLAG= DESTDIR= -@@ -14,14 +14,15 @@ + SRCS= diff.c diffdir.c diffreg.c +@@ -14,14 +18,15 @@ OBJS= diff.o diffdir.o diffreg.o all: diff diffh diff: ${OBJS} Modified: head/textproc/2bsd-diff/files/patch-diff.c ============================================================================== --- head/textproc/2bsd-diff/files/patch-diff.c Mon Jan 7 10:36:38 2019 (r489571) +++ head/textproc/2bsd-diff/files/patch-diff.c Mon Jan 7 11:16:54 2019 (r489572) @@ -1,6 +1,31 @@ ---- diff.c.orig Wed Nov 13 05:31:26 1991 -+++ diff.c Wed Mar 19 01:31:23 2003 -@@ -176,9 +176,10 @@ +--- diff.c.orig 1991-11-12 20:31:26 UTC ++++ diff.c +@@ -11,7 +11,7 @@ char diff[] = DIFF; + char diffh[] = DIFFH; + char pr[] = PR; + +-main(argc, argv) ++int main(argc, argv) + int argc; + char **argv; + { +@@ -162,23 +162,24 @@ savestr(cp) + return (dp); + } + +-min(a,b) ++int min(a,b) + int a,b; + { + + return (a < b ? a : b); + } + +-max(a,b) ++int max(a,b) + int a,b; + { + return (a > b ? a : b); } @@ -12,7 +37,15 @@ unlink(tempfile); exit(status); } -@@ -198,7 +199,6 @@ +@@ -191,6 +192,7 @@ talloc(n) + if ((p = malloc((unsigned)n)) != NULL) + return(p); + noroom(); ++ return NULL; + } + + char * +@@ -198,14 +200,13 @@ ralloc(p,n) char *p; { register char *q; @@ -20,3 +53,11 @@ if ((q = realloc(p, (unsigned)n)) == NULL) noroom(); + return(q); + } + +-noroom() ++void noroom() + { + fprintf(stderr, "diff: files too big, try -h\n"); + done(); Modified: head/textproc/2bsd-diff/files/patch-diff.h ============================================================================== --- head/textproc/2bsd-diff/files/patch-diff.h Mon Jan 7 10:36:38 2019 (r489571) +++ head/textproc/2bsd-diff/files/patch-diff.h Mon Jan 7 11:16:54 2019 (r489572) @@ -1,6 +1,6 @@ ---- diff.h.orig Thu Aug 29 06:44:35 1985 -+++ diff.h Wed Mar 19 01:35:49 2003 -@@ -5,10 +5,11 @@ +--- diff.h.orig 1985-08-28 21:44:35 UTC ++++ diff.h +@@ -5,11 +5,17 @@ */ #include @@ -11,9 +11,15 @@ -#include +#include #include ++#include ++#include ++#include ++#include ++#include /* -@@ -61,7 +62,7 @@ + * Output format options +@@ -61,7 +67,7 @@ int context; /* lines of context to be printed */ */ int status; int anychange; @@ -22,7 +28,7 @@ /* * Variables for diffdir. -@@ -77,9 +78,9 @@ +@@ -77,9 +83,20 @@ char **diffargv; /* option list to pass to recursive char *file1, *file2, *efile1, *efile2; struct stat stb1, stb2; @@ -35,3 +41,14 @@ +sig_t done(); extern char diffh[], diff[], pr[]; ++ ++/* declarations */ ++void diffdir(char **argv); ++void diffreg(); ++void noroom(); ++void setfile(char **fpp, char **epp, char *file); ++int useless(register char *cp); ++int min(int, int); ++int max(int, int); ++void prune(); ++int skipline(int); Modified: head/textproc/2bsd-diff/files/patch-diffdir.c ============================================================================== --- head/textproc/2bsd-diff/files/patch-diffdir.c Mon Jan 7 10:36:38 2019 (r489571) +++ head/textproc/2bsd-diff/files/patch-diffdir.c Mon Jan 7 11:16:54 2019 (r489572) @@ -1,6 +1,61 @@ ---- diffdir.c.orig Wed Nov 13 05:31:29 1991 -+++ diffdir.c Wed Mar 19 01:36:38 2003 -@@ -172,7 +172,7 @@ +--- diffdir.c.orig 1991-11-12 20:31:29 UTC ++++ diffdir.c +@@ -24,7 +24,15 @@ struct dir *setupdir(); + int header; + char title[2*BUFSIZ], *etitle; + +-diffdir(argv) ++/* declarations */ ++void only(struct dir *, int); ++void compare(register struct dir *); ++void scanpr(register struct dir *, int, char *, char *, char *, char *, char *); ++void calldiff(char *); ++int ascii(int); ++int entcmp(const void *, const void *); ++ ++void diffdir(argv) + char **argv; + { + register struct dir *d1, *d2; +@@ -112,7 +120,7 @@ diffdir(argv) + } + } + +-setfile(fpp, epp, file) ++void setfile(fpp, epp, file) + char **fpp, **epp; + char *file; + { +@@ -130,7 +138,7 @@ setfile(fpp, epp, file) + *epp = cp; + } + +-scanpr(dp, test, title, file1, efile1, file2, efile2) ++void scanpr(dp, test, title, file1, efile1, file2, efile2) + register struct dir *dp; + int test; + char *title, *file1, *efile1, *file2, *efile2; +@@ -155,24 +163,23 @@ scanpr(dp, test, title, file1, efile1, file2, efile2) + } + } + +-only(dp, which) ++void only(dp, which) + struct dir *dp; + int which; + { + char *file = which == 1 ? file1 : file2; + char *efile = which == 1 ? efile1 : efile2; + +- printf("Only in %.*s: %s\n", efile - file - 1, file, dp->d_entry); ++ printf("Only in %.*s: %s\n", (int)(efile - file - 1), ++ file, dp->d_entry); + } + +-int entcmp(); +- + struct dir * + setupdir(cp) char *cp; { register struct dir *dp = 0, *ep; @@ -8,4 +63,58 @@ + register struct dirent *rp; register int nitems, n; DIR *dirp; + +@@ -196,7 +203,7 @@ setupdir(cp) + fprintf(stderr, "diff: ran out of memory\n"); + done(); + } +- while (rp = readdir(dirp)) { ++ while ((rp = readdir(dirp))) { + ep = &dp[nitems++]; + ep->d_reclen = rp->d_reclen; + ep->d_namlen = rp->d_namlen; +@@ -225,13 +232,13 @@ setupdir(cp) + return (dp); + } + +-entcmp(d1, d2) +- struct dir *d1, *d2; ++int entcmp(d1, d2) ++ const void *d1, *d2; + { +- return (strcmp(d1->d_entry, d2->d_entry)); ++ return strcmp(((struct dir *)d1)->d_entry, ((struct dir *)d2)->d_entry); + } + +-compare(dp) ++void compare(dp) + register struct dir *dp; + { + register int i, j; +@@ -323,7 +330,7 @@ closem: + + char *prargs[] = { "pr", "-h", 0, "-f", 0, 0 }; + +-calldiff(wantpr) ++void calldiff(wantpr) + char *wantpr; + { + int pid, status, status2, pv[2]; +@@ -382,7 +389,7 @@ calldiff(wantpr) + + #include + +-ascii(f) ++int ascii(f) + int f; + { + char buf[BUFSIZ]; +@@ -407,7 +414,7 @@ ascii(f) + /* + * THIS IS CRUDE. + */ +-useless(cp) ++int useless(cp) + register char *cp; + { Added: head/textproc/2bsd-diff/files/patch-diffh.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/2bsd-diff/files/patch-diffh.c Mon Jan 7 11:16:54 2019 (r489572) @@ -0,0 +1,184 @@ +--- diffh.c.orig 1991-11-12 20:31:33 UTC ++++ diffh.c +@@ -6,6 +6,7 @@ static char sccsid[] = "@(#)diffh.c 4.4 11/27/85"; + #include + #include + #include ++#include + + #define C 3 + #define RANGE 30 +@@ -20,13 +21,24 @@ int bflag; + int debug = 0; + FILE *file[2]; + ++/* declarations */ ++void error(char *, char *); ++char cmp(char *, char *); ++void range(long, int); ++void change(long, int, long, int, char *); ++int output(int, int); ++void progerr(char *); ++int hardsynch(); ++int easysynch(); ++void movstr(char *, char *t); ++void clrl(int, long); ++ + /* return pointer to line n of file f*/ + char *getl(f,n) + long n; + { + register char *t; +- char *malloc(); +- register delta, nt; ++ register int delta, nt; + again: + delta = n - lineno[f]; + nt = ntext[f]; +@@ -43,11 +55,12 @@ again: + t = text[f][nt]; + if(t==0) { + t = text[f][nt] = malloc(LEN+1); +- if(t==NULL) ++ if(t==NULL) { + if(hardsynch()) + goto again; + else + progerr("5"); ++ } + } + t = fgets(t,LEN,file[f]); + if(t!=NULL) +@@ -56,10 +69,10 @@ again: + } + + /*remove thru line n of file f from storage*/ +-clrl(f,n) ++void clrl(f,n) + long n; + { +- register i,j; ++ register int i,j; + j = n-lineno[f]+1; + for(i=0;i+jvalue > ai[0].value || +- aim->value == ai[0].value && +- aim->serial > ai[0].serial) ++ (aim->value == ai[0].value && ++ aim->serial > ai[0].serial)) + break; + w.value = ai[0].value; + ai[0].value = aim->value; +@@ -600,7 +619,7 @@ struct line *a; + } + } + +-unsort(f, l, b) ++void unsort(f, l, b) + struct line *f; + int *b; + { +@@ -614,9 +633,9 @@ int *b; + free((char *)a); + } + +-skipline(f) ++int skipline(f) + { +- register i, c; ++ register int i, c; + + for(i=1;(c=getc(input[f]))!='\n';i++) + if (c < 0) +@@ -624,7 +643,7 @@ skipline(f) + return(i); + } + +-output() ++void output() + { + int m; + register int i0, i1, j1; +@@ -691,7 +710,7 @@ struct context_vec *context_vec_start, + and this means that there were lines appended (beginning at b). + If c is greater than d then there are lines missing from the to file. + */ +-change(a,b,c,d) ++void change(a,b,c,d) + { + int ch; + int lowa,upb,lowc,upd; +@@ -781,7 +800,7 @@ change(a,b,c,d) + } + } + +-range(a,b,separator) ++void range(a,b,separator) + char *separator; + { + printf("%d", a>b?b:a); +@@ -790,7 +809,7 @@ char *separator; + } + } + +-fetch(f,a,b,lb,s,oldfile) ++void fetch(f,a,b,lb,s,oldfile) + long *f; + FILE *lb; + char *s; +@@ -869,13 +888,13 @@ char *s; + * arranging line in 7-bit bytes and then + * summing 1-s complement in 16-bit hunks + */ +-readhash(f) ++int readhash(f) + register FILE *f; + { + register long sum; + register unsigned shift; +- register t; +- register space; ++ register int t; ++ register int space; + + sum = 1; + space = 0; +@@ -931,12 +950,12 @@ register FILE *f; + } + } + sum = low(sum) + high(sum); +- return((short)low(sum) + (short)high(sum)); ++ return((int)low(sum) + (int)high(sum)); + } + + #include + +-asciifile(f) ++int asciifile(f) + FILE *f; + { + char buf[BUFSIZ]; +@@ -960,7 +979,7 @@ asciifile(f) + + + /* dump accumulated "context" diff changes */ +-dump_context_vec() ++void dump_context_vec() + { + register int a, b, c, d; + register char ch; +@@ -1003,15 +1022,15 @@ dump_context_vec() + ch = (a <= b) ? 'd' : 'a'; + + if (ch == 'a') +- fetch(ixold,lowa,b,input[0]," "); ++ fetch(ixold,lowa,b,input[0]," ", 0); + else { +- fetch(ixold,lowa,a-1,input[0]," "); +- fetch(ixold,a,b,input[0],ch == 'c' ? "! " : "- "); ++ fetch(ixold,lowa,a-1,input[0]," ", 0); ++ fetch(ixold,a,b,input[0],ch == 'c' ? "! " : "- ", 0); + } + lowa = b + 1; + cvp++; + } +- fetch(ixold, b+1, upb, input[0], " "); ++ fetch(ixold, b+1, upb, input[0], " ", 0); + } + + /* output changes to the "new" file */ +@@ -1037,15 +1056,15 @@ dump_context_vec() + ch = (a <= b) ? 'd' : 'a'; + + if (ch == 'd') +- fetch(ixnew,lowc,d,input[1]," "); ++ fetch(ixnew,lowc,d,input[1]," ", 0); + else { +- fetch(ixnew,lowc,c-1,input[1]," "); +- fetch(ixnew,c,d,input[1],ch == 'c' ? "! " : "+ "); ++ fetch(ixnew,lowc,c-1,input[1]," ", 0); ++ fetch(ixnew,c,d,input[1],ch == 'c' ? "! " : "+ ", 0); + } + lowc = d + 1; + cvp++; + } +- fetch(ixnew, d+1, upd, input[1], " "); ++ fetch(ixnew, d+1, upd, input[1], " ", 0); + } + + context_vec_ptr = context_vec_start - 1; Modified: head/textproc/2bsd-diff/pkg-descr ============================================================================== --- head/textproc/2bsd-diff/pkg-descr Mon Jan 7 10:36:38 2019 (r489571) +++ head/textproc/2bsd-diff/pkg-descr Mon Jan 7 11:16:54 2019 (r489572) @@ -1,7 +1,5 @@ -This is the original diff program from 2.11BSD. It works better -with very large files on systems with datasize limits. +2.11BSD's original diff works significantly better with very large +files with default datasize limits. -Default FreeBSD limits datasize to 524288 kbytes. This means that -GNU diff processes that require more than this much ram will fail. -The 2.11BSD diff did not load the files in core and could operate -on considerably less ram. +GNU diff fails with out of memmory when operating on files at or +above the default limit to datasize.