Thu Sep 21 14:37:40 2017 UTC ()
Support large files in sam.

From trebol via pkgsrc-users.
While here, regenerate patches (one per file, unified diffs).
Bump PKGREVISION.

(This commit message was written in sam.)


(bsiegert)
diff -r1.42 -r1.43 pkgsrc/editors/sam/Makefile
diff -r1.7 -r1.8 pkgsrc/editors/sam/distinfo
diff -r1.4 -r1.5 pkgsrc/editors/sam/patches/patch-aa
diff -r1.3 -r0 pkgsrc/editors/sam/patches/patch-ac
diff -r1.3 -r0 pkgsrc/editors/sam/patches/patch-ad
diff -r1.2 -r0 pkgsrc/editors/sam/patches/patch-ag
diff -r0 -r1.1 pkgsrc/editors/sam/patches/patch-include_libg.h
diff -r0 -r1.1 pkgsrc/editors/sam/patches/patch-sam_B.rc
diff -r0 -r1.1 pkgsrc/editors/sam/patches/patch-sam_Makefile
diff -r0 -r1.1 pkgsrc/editors/sam/patches/patch-sam_io.c
diff -r0 -r1.1 pkgsrc/editors/sam/patches/patch-samterm_Makefile

cvs diff -r1.42 -r1.43 pkgsrc/editors/sam/Makefile (expand / switch to unified diff)

--- pkgsrc/editors/sam/Makefile 2015/07/04 16:18:29 1.42
+++ pkgsrc/editors/sam/Makefile 2017/09/21 14:37:39 1.43
@@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
1# $NetBSD: Makefile,v 1.42 2015/07/04 16:18:29 joerg Exp $ 1# $NetBSD: Makefile,v 1.43 2017/09/21 14:37:39 bsiegert Exp $
2 2
3DISTNAME= sam 3DISTNAME= sam
4PKGNAME= sam-4.3 4PKGNAME= sam-4.3
5PKGREVISION= 3 5PKGREVISION= 4
6CATEGORIES= editors plan9 6CATEGORIES= editors plan9
7MASTER_SITES= ftp://ftp.ecf.toronto.edu/pub/plan9/matty/ 7MASTER_SITES= ftp://ftp.ecf.toronto.edu/pub/plan9/matty/
8EXTRACT_SUFX= .msg.gz 8EXTRACT_SUFX= .msg.gz
9 9
10MAINTAINER= pkgsrc-users@NetBSD.org 10MAINTAINER= pkgsrc-users@NetBSD.org
11COMMENT= Unix version of Rob Pike's editor for plan9 11COMMENT= Unix version of Rob Pike's editor for plan9
12 12
13DEPENDS+= libXgFonts>=1.0nb1:../../fonts/Xg 13DEPENDS+= libXgFonts>=1.0nb1:../../fonts/Xg
14 14
15MAKE_JOBS_SAFE= no 15MAKE_JOBS_SAFE= no
16 16
17WRKSRC= ${WRKDIR} 17WRKSRC= ${WRKDIR}
18EXTRACT_CMD= ${GZCAT} $$extract_file | ${SH} 18EXTRACT_CMD= ${GZCAT} $$extract_file | ${SH}

cvs diff -r1.7 -r1.8 pkgsrc/editors/sam/distinfo (expand / switch to unified diff)

--- pkgsrc/editors/sam/distinfo 2015/11/03 03:32:21 1.7
+++ pkgsrc/editors/sam/distinfo 2017/09/21 14:37:39 1.8
@@ -1,17 +1,19 @@ @@ -1,17 +1,19 @@
1$NetBSD: distinfo,v 1.7 2015/11/03 03:32:21 agc Exp $ 1$NetBSD: distinfo,v 1.8 2017/09/21 14:37:39 bsiegert Exp $
2 2
3SHA1 (sam.msg.gz) = c6d2baa07a3b7410658e31e6ebfb997809c8323e 3SHA1 (sam.msg.gz) = c6d2baa07a3b7410658e31e6ebfb997809c8323e
4RMD160 (sam.msg.gz) = f3a6f354bd11b45966818188392c4655267f0571 4RMD160 (sam.msg.gz) = f3a6f354bd11b45966818188392c4655267f0571
5SHA512 (sam.msg.gz) = 279e9854a2177330fcb80a5ad2751b01629b35d33c759e9f2d707450753c4b5c6c3ec07cbbe4e01f1b9c43e167570e88de4f9f403f9c0fe58f360db99f40e666 5SHA512 (sam.msg.gz) = 279e9854a2177330fcb80a5ad2751b01629b35d33c759e9f2d707450753c4b5c6c3ec07cbbe4e01f1b9c43e167570e88de4f9f403f9c0fe58f360db99f40e666
6Size (sam.msg.gz) = 246311 bytes 6Size (sam.msg.gz) = 246311 bytes
7SHA1 (patch-aa) = baba874e5d18b0c19f8255ed97f5f98f57d52cac 7SHA1 (patch-aa) = cbc293b98847bc36d87a780cda487e88096a2dc4
8SHA1 (patch-ab) = 76fa25ab4737f925eefe2e3876d862e7814d3d31 8SHA1 (patch-ab) = 76fa25ab4737f925eefe2e3876d862e7814d3d31
9SHA1 (patch-ac) = fa5ccdc02a82d4bd4a713f53a180126b85df0880 
10SHA1 (patch-ad) = 3a456316d0806b6b6bc6f6143bb3dd3701f8c1e1 
11SHA1 (patch-ae) = b95056d090d73ffa8920669027b43d16d6cf81f5 9SHA1 (patch-ae) = b95056d090d73ffa8920669027b43d16d6cf81f5
12SHA1 (patch-af) = 9afde00ab2b86519dcf558c0e1e2232b3839b579 10SHA1 (patch-af) = 9afde00ab2b86519dcf558c0e1e2232b3839b579
13SHA1 (patch-ag) = 348b5400cccdd8cdcc6e63244a6e28551bbfb354 
14SHA1 (patch-ah) = 0126f1eee5bbcf59e3e08063d2cddffba83dc94b 11SHA1 (patch-ah) = 0126f1eee5bbcf59e3e08063d2cddffba83dc94b
15SHA1 (patch-ai) = ca76a0c22c4e962ec590e9aeff719c71bd6fdafc 12SHA1 (patch-ai) = ca76a0c22c4e962ec590e9aeff719c71bd6fdafc
16SHA1 (patch-aj) = 1f6270f7893fce0d1b213fcaa4b91c6c3e82c833 13SHA1 (patch-aj) = 1f6270f7893fce0d1b213fcaa4b91c6c3e82c833
17SHA1 (patch-ak) = 80f9399d23fb615da4d98488e93a58a101e57e4c 14SHA1 (patch-ak) = 80f9399d23fb615da4d98488e93a58a101e57e4c
 15SHA1 (patch-include_libg.h) = eaa8b3831d44b5d96d2b1154d201576878ee8d81
 16SHA1 (patch-sam_B.rc) = e6d774d230656bb6ae9800e35fe20c2760e8380e
 17SHA1 (patch-sam_Makefile) = 378874943b4719cb434de56d4f5aa665c66121d1
 18SHA1 (patch-sam_io.c) = e7ca3a59b5a493db55397655aa1db5c3ac65c508
 19SHA1 (patch-samterm_Makefile) = 6772ee78eb2e5512c2002b86a851a6e71bdbdaef

cvs diff -r1.4 -r1.5 pkgsrc/editors/sam/patches/patch-aa (expand / switch to unified diff)

--- pkgsrc/editors/sam/patches/patch-aa 2001/05/01 09:16:25 1.4
+++ pkgsrc/editors/sam/patches/patch-aa 2017/09/21 14:37:40 1.5
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1$NetBSD: patch-aa,v 1.4 2001/05/01 09:16:25 agc Exp $ 1$NetBSD: patch-aa,v 1.5 2017/09/21 14:37:40 bsiegert Exp $
2 2
3--- libXg/Makefile.orig Tue May 1 09:42:03 2001 3--- libXg/Makefile.orig 2017-09-21 13:54:42.000000000 +0000
4+++ libXg/Makefile Tue May 1 09:48:09 2001 4+++ libXg/Makefile
5@@ -1,24 +1,23 @@ 5@@ -1,24 +1,23 @@
6 # Copyright (c) 1992 AT&T - All rights reserved. 6 # Copyright (c) 1992 AT&T - All rights reserved.
7 # 7 #
8-# Prototype Makefile for libXg 8-# Prototype Makefile for libXg
9+# Prototype BSDi Makefile for libXg 9+# Prototype BSDi Makefile for libXg
10+# Courtesy of Boyd Roberts 10+# Courtesy of Boyd Roberts
11+# 11+#
12+# Define operating system type: -DBSDi 12+# Define operating system type: -DBSDi
13 # 13 #
14-# define operating system. ONE of: 14-# define operating system. ONE of:
15-# -DIRIX -DSUNOS -DUMIPS -DSYSVR3 -DAIX -DOSF1 15-# -DIRIX -DSUNOS -DUMIPS -DSYSVR3 -DAIX -DOSF1
16-# -DHPUX -DAPOLLO -DCONVEX -DDYNIX 16-# -DHPUX -DAPOLLO -DCONVEX -DDYNIX
17-#  17-#
@@ -25,37 +25,37 @@ $NetBSD: patch-aa,v 1.4 2001/05/01 09:16 @@ -25,37 +25,37 @@ $NetBSD: patch-aa,v 1.4 2001/05/01 09:16
25+INCS=-I../include -I${X11BASE}/include 25+INCS=-I../include -I${X11BASE}/include
26  26
27 # set this if your X libraries are in different locations 27 # set this if your X libraries are in different locations
28 # or if you need extra libraries to load with X11 applications 28 # or if you need extra libraries to load with X11 applications
29-XLIBS=/usr/local/X11R5/lib/libXt.a /usr/local/X11R5/lib/libX11.a 29-XLIBS=/usr/local/X11R5/lib/libXt.a /usr/local/X11R5/lib/libX11.a
30+XLIBS=-L${X11BASE}/lib -Wl,-R${X11BASE}/lib -lXt -lX11 30+XLIBS=-L${X11BASE}/lib -Wl,-R${X11BASE}/lib -lXt -lX11
31  31
32 # add name of library orderer - use ":" if none 32 # add name of library orderer - use ":" if none
33-RANLIB=: 33-RANLIB=:
34+RANLIB=ranlib 34+RANLIB=ranlib
35  35
36 # add name of librarian 36 # add name of librarian
37 AR=ar 37 AR=ar
38@@ -36,7 +35,7 @@ 38@@ -36,7 +35,7 @@ OBJS= arc.o arith.o balloc.o bitblt.o bi
39 rdfontfile.o rectclip.o rune.o segment.o string.o strwidth.o texture.o\ 39 rdfontfile.o rectclip.o rune.o segment.o string.o strwidth.o texture.o\
40 wrbitmap.o wrbitmapfile.o xtbinit.o 40 wrbitmap.o wrbitmapfile.o xtbinit.o
41  41
42-all install: $(LIB) 42-all install: $(LIB)
43+all : $(LIB) 43+all : $(LIB)
44 compile: $(LIB) 44 compile: $(LIB)
45 test: test.o 45 test: test.o
46 $(CC) -o $@ $? $(LIB) $(XLIBS) -lm 46 $(CC) -o $@ $? $(LIB) $(XLIBS) -lm
47@@ -47,10 +46,12 @@ 47@@ -47,10 +46,12 @@ clean:
48 nuke: clean 48 nuke: clean
49 rm -f $(LIB) 49 rm -f $(LIB)
50  50
51+install: ${LIB} 51+install: ${LIB}
52+ cp ${LIB} ${PREFIX}/lib/${LIB} 52+ cp ${LIB} ${PREFIX}/lib/${LIB}
53+ ${RANLIB} ${PREFIX}/lib/${LIB} 53+ ${RANLIB} ${PREFIX}/lib/${LIB}
54+ 54+
55 $(LIB): $(OBJS) 55 $(LIB): $(OBJS)
56 $(AR) rv $(LIB) $(OBJS) 56 $(AR) rv $(LIB) $(OBJS)
57 $(RANLIB) $(LIB) 57 $(RANLIB) $(LIB)
58- 
59-$(LIB)(%.o): %.o 
60  58
 59-$(LIB)(%.o): %.o
 60-
61 $(OBJS): ../include/libg.h libgint.h ../include/libc.h 61 $(OBJS): ../include/libg.h libgint.h ../include/libc.h

File Deleted: pkgsrc/editors/sam/patches/Attic/patch-ac

File Deleted: pkgsrc/editors/sam/patches/Attic/patch-ad

File Deleted: pkgsrc/editors/sam/patches/Attic/patch-ag

File Added: pkgsrc/editors/sam/patches/patch-include_libg.h
$NetBSD: patch-include_libg.h,v 1.1 2017/09/21 14:37:40 bsiegert Exp $

--- include/libg.h.orig	2017-09-21 13:54:43.000000000 +0000
+++ include/libg.h
@@ -94,12 +94,12 @@ struct	Fontchar
 
 struct	Subfont
 {
-	short		minrow;	/* first character row in font (for X subfonts) */
-	short		mincol;	/* first character col in font (for X subfonts) */
-	short		minchar; /* first char code in subfont */
-	short		maxchar; /* last char code in subfont */
-	short		width;	/* number of chars in row */
-	short		n;	/* number of chars in font */
+	int		minrow;	/* first character row in font (for X subfonts) */
+	int		mincol;	/* first character col in font (for X subfonts) */
+	int		minchar; /* first char code in subfont */
+	int		maxchar; /* last char code in subfont */
+	int		width;	/* number of chars in row */
+	int		n;	/* number of chars in font */
 	unsigned char	height;	/* height of bitmap */
 	char		ascent;	/* top of bitmap to baseline */
 	Fontchar	*info;	/* n+1 character descriptors */

File Added: pkgsrc/editors/sam/patches/patch-sam_B.rc
$NetBSD: patch-sam_B.rc,v 1.1 2017/09/21 14:37:40 bsiegert Exp $

--- sam/B.rc.orig	2017-09-21 13:54:41.000000000 +0000
+++ sam/B.rc
@@ -1,4 +1,4 @@
-#!/bin/rc
+#!/usr/local/bin/rc
 
 files=()
 line=''

File Added: pkgsrc/editors/sam/patches/patch-sam_Makefile
$NetBSD: patch-sam_Makefile,v 1.1 2017/09/21 14:37:40 bsiegert Exp $

--- sam/Makefile.orig	2017-09-21 13:54:42.000000000 +0000
+++ sam/Makefile
@@ -1,18 +1,17 @@
 #	Copyright (c) 1992 AT&T - All rights reserved.
 #
-#	Prototype Makefile for sam
+#	Prototype BSDi Makefile for sam
+#	Courtesy of Boyd Roberts
+#
+#	Define operating system type: -DBSDi
 #
-#	define operating system.  ONE of:
-#		-DIRIX -DSUNOS -DUMIPS -DSYSVR3 -DAIX -DOSF1
-#		-DHPUX -DAPOLLO -DCONVEX -DDYNIX
-#	
 #	Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified
 #	if your compiler supports posix-compatible compilation
-OS=-DIRIX -ansiposix
+OS=-DBSDi -O2
 
 #	add -Iincludedir for any include directories that need to be searched
 #	for posix header files (for UMIPS, add -I/usr/include/posix)
-INCS=-I../include
+INCS=-I../include -I/usr/include/posix
 
 #	Set the name of the environment variable containing the user's home directory
 HOMEDIR=HOME
@@ -22,12 +21,12 @@ HOMEDIR=HOME
 #	where sam is to be installed.  SAMSAVEDIR is the name of the directory
 #	where the samsave file restoration script is stored.
 RSAMNAME=sam
-TERMNAME=/v/bin/samterm
-SAMDIR=/usr/bin
-SAMSAVEDIR=/v/bin
+TERMNAME=$(PREFIX)/bin/samterm
+SAMDIR=$(PREFIX)/bin
+SAMSAVEDIR=$(PREFIX)/bin
 
 #	Set TMP to a good place for tmp files (with lots of room)
-TMP=/usr/tmp
+TMP=/var/tmp
 
 #	Set SHELLNAME and SHELLPATH to the name of a shell and the pathname
 #	of its executable
@@ -37,7 +36,7 @@ SHELLPATH=/bin/sh
 #	Set RXNAME and RXPATHNAME to the name of the remote execution command
 #	and the pathname of its executable
 RXNAME=rsh
-RXPATHNAME=/usr/bsd/rsh
+RXPATHNAME=/usr/bin/rsh
 
 SAMSAVE=/bin/sh\\n$(SAMSAVEDIR)/samsave
 
@@ -68,9 +67,10 @@ nuke:	clean
 	rm -f sam
 
 install:	sam
-	cp sam $(SAMDIR)/$(RSAMNAME)
-	cp samsave $(SAMSAVEDIR)/samsave
-	chmod +x samsave
+	$(INSTALL) -c sam $(SAMDIR)/$(RSAMNAME)
+	$(INSTALL) -c samsave $(SAMSAVEDIR)/samsave
+	$(INSTALL) -c B.sh $(SAMDIR)/B
+	chmod +x $(SAMSAVEDIR)/samsave
 
 $(OBJ):	sam.h ../include/u.h ../include/libc.h errors.h mesg.h
 

File Added: pkgsrc/editors/sam/patches/patch-sam_io.c
$NetBSD: patch-sam_io.c,v 1.1 2017/09/21 14:37:40 bsiegert Exp $

--- sam/io.c.orig	2017-09-21 13:54:43.000000000 +0000
+++ sam/io.c
@@ -2,7 +2,9 @@
 #include "sam.h"
 
 #define	NSYSFILE	3
+#ifndef NOFILE
 #define	NOFILE		128
+#endif
 
 void
 checkqid(File *f)

File Added: pkgsrc/editors/sam/patches/patch-samterm_Makefile
$NetBSD: patch-samterm_Makefile,v 1.1 2017/09/21 14:37:40 bsiegert Exp $

--- samterm/Makefile.orig	2017-09-21 13:54:42.000000000 +0000
+++ samterm/Makefile
@@ -1,31 +1,35 @@
 #	Copyright (c) 1992 AT&T - All rights reserved.
 #
-#	Prototype Makefile for samterm
+#	Prototype BSDi Makefile for samterm
+#	Courtesy of Boyd Roberts
+#
+#	Define operating system type: -DBSDi
 #
-#	define operating system.  ONE of:
-#		-DIRIX -DSUNOS -DUMIPS -DSYSVR3 -DAIX -DOSF1
-#		-DHPUX -DAPOLLO -DCONVEX -DDYNIX
-#	
 #	Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified
 #	if your compiler supports posix-compatible compilation
-OS=-DIRIX -ansiposix
+OS=-DBSDi -O2
 
 #	add -Iincludedir for any include directories that need to be searched
 #	for posix header files (for UMIPS, add -I/usr/include/posix)
-INCS=-I../include
+INCS=-I../include -I/usr/include/posix
 
 #	SAMTERM contains the name of the file containing the samterm
 #	executable.  SAMTERMDIR is the directory where it is installed.
 SAMTERM=samterm
-SAMTERMDIR=/v/bin
+SAMTERMDIR=$(PREFIX)/bin
 
 #	set this if your X libraries are in different locations
 #	or if you need extra libraries to load with X11 applications
-XLIBS=/usr/local/X11R5/lib/libXt.a /usr/local/X11R5/lib/libX11.a
+#XLIBS= /usr/X11R6/lib/libXt.a \
+#      /usr/X11R6/lib/libSM.a \
+#      /usr/X11R6/lib/libICE.a \
+#      /usr/X11R6/lib/libX11.a
+
+XLIBS=-L${X11BASE}/lib -Wl,-R${X11BASE}/lib -lXt -lSM -lICE -lX11
 
 CFLAGS=$(OS) $(INCS) -D_LIBXG_EXTENSION
 
-LIBS=../libframe/libframe.a ../libXg/libXg.a
+LIBS=../libframe/libframe.a ../libXg/libXg.a 
 CC=cc
 
 OBJ=main.o flayer.o icons.o io.o menu.o mesg.o rasp.o scroll.o unix.o