The version as released in 1998 keeps crashing, among many other
things the updated fork supports scalable fonts.
https://github.com/deadpixi/sam describes other changes.

Index: Makefile
===================================================================
RCS file: /cvs/ports/plan9/sam/Makefile,v
retrieving revision 1.31
diff -u -p -r1.31 Makefile
--- Makefile    12 Jul 2019 20:48:54 -0000      1.31
+++ Makefile    11 Nov 2019 07:03:45 -0000
@@ -2,31 +2,30 @@
 
 COMMENT=       X11 version of Rob Pike's editor, sam
 
-DISTNAME=      sam
-PKGNAME=       sam-4.3.19980506
-REVISION=      3
-CATEGORIES=    plan9
+DISTNAME=      sam-4.3.20190427
+GH_ACCOUNT=    deadpixi
+GH_PROJECT=    sam
+GH_COMMIT=     5893679bbbab2f50ceb6ef0805e4bb63f5f51df8
 
-MASTER_SITES=  ftp://netlib.bell-labs.com/netlib/research/ \
-               http://netlib.bell-labs.com/netlib/research/
-EXTRACT_SUFX=  .shar.gz
-EXTRACT_CASES= *.shar.gz) ${GZIP_CMD} -dc ${FULLDISTDIR}/$$archive | /bin/sh;;
+CATEGORIES=    plan9
 
 MAINTAINER=    Markus Friedl <[email protected]>
 
 PERMIT_PACKAGE=        Yes
-WANTLIB=               X11 Xt c xcb
+WANTLIB=               X11 Xft Xi Xt c
 
-WRKDIST=       ${WRKDIR}
+RUN_DEPENDS+=  devel/desktop-file-utils
 
 NO_TEST=       Yes
 
 SAMDOCDIR=     ${PREFIX}/share/doc/sam
-SAMDOCFILES=   README doc/sam.ps doc/sam.tut.ms doc/se.ps doc/Sam.ad
+SAMDOCFILES=   README.rst doc/sam.ps doc/sam.tut.ms doc/se.ps
+EXAMPLEDIR=    ${PREFIX}/share/examples/sam
 
 post-install:
        ${INSTALL_DATA_DIR} ${SAMDOCDIR}
-       ${INSTALL_MAN} $(WRKSRC)/doc/sam.1 $(PREFIX)/man/man1
+       ${INSTALL_DATA_DIR} ${EXAMPLEDIR}
+       ${INSTALL_DATA} ${WRKSRC}/doc/samrc ${EXAMPLEDIR}
        @set -e; for f in ${SAMDOCFILES}; do \
         ${INSTALL_DATA} ${WRKSRC}/$${f} ${SAMDOCDIR}; \
        done
Index: distinfo
===================================================================
RCS file: /cvs/ports/plan9/sam/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo    18 Jan 2015 03:14:56 -0000      1.4
+++ distinfo    11 Nov 2019 06:33:03 -0000
@@ -1,2 +1,2 @@
-SHA256 (sam.shar.gz) = UiBRCBtC2LgRMn5OhbK8qb9pa6nfrz7c3JSp76CxU3k=
-SIZE (sam.shar.gz) = 252281
+SHA256 (sam-4.3.20190427-5893679b.tar.gz) = 
17k1wL+Rv5Z43t79sLyj0Vn9UYzSVfpVxOYZNiAfB0E=
+SIZE (sam-4.3.20190427-5893679b.tar.gz) = 311827
Index: patches/patch-Makefile
===================================================================
RCS file: patches/patch-Makefile
diff -N patches/patch-Makefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-Makefile      11 Nov 2019 07:07:53 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Index: Makefile
+--- Makefile.orig
++++ Makefile
+@@ -27,7 +27,8 @@ samtermdir:
+       cd samterm; $(MAKE)
+ 
+ install:
+-      @xdg-desktop-menu install --mode $(MODE) deadpixi-sam.desktop || echo 
"unable to install desktop entry"
++      mkdir -p ${PREFIX}/share/applications/
++      cp deadpixi-sam.desktop ${PREFIX}/share/applications/
+       cd libXg; $(MAKE) install
+       cd libframe; $(MAKE) install
+       cd sam; $(MAKE) install
Index: patches/patch-config_mk_def
===================================================================
RCS file: patches/patch-config_mk_def
diff -N patches/patch-config_mk_def
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-config_mk_def 11 Nov 2019 06:49:20 -0000
@@ -0,0 +1,45 @@
+$OpenBSD$
+
+Index: config.mk.def
+--- config.mk.def.orig
++++ config.mk.def
+@@ -2,7 +2,6 @@
+ # copyright 2015 Rob King <[email protected]>
+ 
+ # CC is the C compiler to use
+-CC=gcc
+ CFLAGS?=
+ CFLAGS+=-std=c99
+ 
+@@ -11,23 +10,23 @@ CFLAGS+=-std=c99
+ # environment.
+ #
+ # Mac OS X users need to add -D_DARWIN_C_SOURCE here.
+-STANDARDS=-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500
++STANDARDS=-D_POSIX_C_SOURCE=200809L
+ 
+ # DESTDIR is the root of the installation tree
+-DESTDIR?=/usr/local
++# DESTDIR?=/usr/local
+ 
+ # BINDIR is the directory where binaries go
+-BINDIR?=$(DESTDIR)/bin
++BINDIR?=${PREFIX}/bin
+ 
+ # MANDIR is where manual pages go
+-MANDIR?=$(DESTDIR)/share/man/
++MANDIR?=${PREFIX}/man/
+ 
+ # Add additional include and library directories
+ # BSD/Mac OS X users might need to add something like
+-# INCLUDES=-I/usr/X11R6/include -I/usr/X11R6/include/freetype2
+-# LDFLAGS=-L/usr/X11R6/lib
+-INCLUDES=-I/usr/include/freetype2
+-LDFLAGS=
++INCLUDES=-I${X11BASE}/include -I${X11BASE}/include/freetype2
++LDFLAGS=-L${X11BASE}/lib
++#INCLUDES=-I/usr/include/freetype2
++#LDFLAGS=
+ 
+ # Set this to your default remote shell.
+ RXPATH=/usr/bin/ssh
Index: patches/patch-doc_Makefile
===================================================================
RCS file: patches/patch-doc_Makefile
diff -N patches/patch-doc_Makefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-doc_Makefile  11 Nov 2019 06:35:28 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Index: doc/Makefile
+--- doc/Makefile.orig
++++ doc/Makefile
+@@ -7,10 +7,6 @@ all:
+ install: sam.1 
+       mkdir -p "$(MANDIR)/man1"
+       cp sam.1 "$(MANDIR)/man1"
+-      ln -sf "$(MANDIR)/man1/sam.1" "$(MANDIR)/man1/B.1"
+-      ln -sf "$(MANDIR)/man1/sam.1" "$(MANDIR)/man1/samterm.1"
+-      ln -sf "$(MANDIR)/man1/sam.1" "$(MANDIR)/man1/rsam.1"
+-      ln -sf "$(MANDIR)/man1/sam.1" "$(MANDIR)/man1/sam.save.1"
+       mkdir -p "$(MANDIR)/man5"
+       cp samrc.5 "$(MANDIR)/man5"
+ 
Index: patches/patch-doc_sam_1
===================================================================
RCS file: /cvs/ports/plan9/sam/patches/patch-doc_sam_1,v
retrieving revision 1.2
diff -u -p -r1.2 patch-doc_sam_1
--- patches/patch-doc_sam_1     18 Apr 2015 20:35:25 -0000      1.2
+++ patches/patch-doc_sam_1     11 Nov 2019 06:35:28 -0000
@@ -1,25 +1,16 @@
-$OpenBSD: patch-doc_sam_1,v 1.2 2015/04/18 20:35:25 schwarze Exp $
-Ignore .TF macro that is broken even with groff; use default indentation.
-Delete unused .EX and .EE macros.
---- doc/sam.1.orig     Sat Apr 18 15:40:50 2015
-+++ doc/sam.1  Sat Apr 18 15:53:01 2015
-@@ -15,19 +15,7 @@
- .de CW
- .ft B
- ..
--.\" This is gross but it avoids relying on internal implementation details
--.\" of the -man macros.
- .de TF
--.br
--.IP "" \w'\fB\\$1\ \ \fP'u
--.PD0
--..
--.de EX
--.CW
--.nf
--..
--.de EE
--.fi
- ..
- .\" delete above this point if your system has F, L, FR, LR, CW and TF macros
- .ds a \fR*\ \fP
+$OpenBSD$
+
+Index: doc/sam.1
+--- doc/sam.1.orig
++++ doc/sam.1
+@@ -3,6 +3,10 @@
+ .Os
+ .Sh NAME
+ .Nm sam
++.Nm B
++.Nm samterm
++.Nm rsam
++.Nm sam.save
+ .Nd screen editor with structural regular expressions
+ .Sh SYNOPSIS
+ .Nm
Index: patches/patch-libXg_Makefile
===================================================================
RCS file: patches/patch-libXg_Makefile
diff -N patches/patch-libXg_Makefile
--- patches/patch-libXg_Makefile        4 Nov 2002 10:28:56 -0000       1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,42 +0,0 @@
-$OpenBSD: patch-libXg_Makefile,v 1.1 2002/11/04 10:28:56 markus Exp $
---- libXg/Makefile.orig        Thu Oct 31 00:27:21 2002
-+++ libXg/Makefile     Thu Oct 31 00:27:59 2002
-@@ -8,17 +8,17 @@
- #     
- #     Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified
- #     if your compiler supports posix-compatible compilation
--OS=-DIRIX5 -ansiposix
-+OS=-D_POSIX_SOURCE -DSOLARIS
- 
- #     add -Iincludedir for any include directories that need to be searched
--INCS=-I../include
-+INCS=-I../include -I${X11BASE}/include
- 
- #     set this if your X libraries are in different locations
- #     or if you need extra libraries to load with X11 applications
- XLIBS=-lXt
- 
- #     add name of library orderer - use ":" if none
--RANLIB=:
-+RANLIB=ranlib
- 
- #     add name of librarian
- AR=ar
-@@ -26,8 +26,7 @@ AR=ar
- #     the name of the library
- LIB=libXg.a
- 
--CFLAGS=$(OS) -D_LIBXG_EXTENSION $(INCS)
--CC=cc
-+CFLAGS+=$(OS) -D_LIBXG_EXTENSION $(INCS)
- 
- OBJS= arc.o arith.o balloc.o bitblt.o bitbltclip.o border.o bscreenrect.o\
-       circle.o clipline.o clipr.o copymasked.o cursorset.o cursorswitch.o\
-@@ -50,7 +49,5 @@ nuke:        clean
- $(LIB):       $(OBJS)
-       $(AR) rv $(LIB) $(OBJS)
-       $(RANLIB) $(LIB)
--
--$(LIB)(%.o): %.o
- 
- $(OBJS):      ../include/libg.h libgint.h ../include/libc.h
Index: patches/patch-libframe_Makefile
===================================================================
RCS file: patches/patch-libframe_Makefile
diff -N patches/patch-libframe_Makefile
--- patches/patch-libframe_Makefile     4 Nov 2002 10:28:56 -0000       1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
-$OpenBSD: patch-libframe_Makefile,v 1.1 2002/11/04 10:28:56 markus Exp $
---- libframe/Makefile.orig     Wed Oct 30 21:05:48 2002
-+++ libframe/Makefile  Wed Oct 30 21:05:50 2002
-@@ -8,22 +8,21 @@
- #     
- #     Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified
- #     if your compiler supports posix-compatible compilation
--OS=-DIRIX5 -ansiposix
-+OS=-D_POSIX_SOURCE -DSOLARIS
- 
- #     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
- 
- #     add name of library orderer - use ":" if none exists
--RANLIB=:
-+RANLIB=ranlib
- 
- #     add name of library
- AR=ar
- 
--CFLAGS=-c $(OS) $(INCS) -D_LIBXG_EXTENSION
-+CFLAGS+=-c $(OS) $(INCS) -D_LIBXG_EXTENSION
- 
- LIB=libframe.a
--CC=cc
- 
- OBJ=frbox.o frdelete.o frdraw.o frinit.o frinsert.o frptofchar.o\
-       frselect.o frstr.o frutil.o misc.o
Index: patches/patch-libframe_misc_c
===================================================================
RCS file: patches/patch-libframe_misc_c
diff -N patches/patch-libframe_misc_c
--- patches/patch-libframe_misc_c       17 Mar 2016 21:07:32 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
-$OpenBSD: patch-libframe_misc_c,v 1.1 2016/03/17 21:07:32 naddy Exp $
---- libframe/misc.c.orig       Thu Mar 17 21:21:48 2016
-+++ libframe/misc.c    Thu Mar 17 21:27:16 2016
-@@ -1,4 +1,5 @@
- /* Copyright (c) 1998 Lucent Technologies - All rights reserved. */
-+#include      <errno.h>
- #include      <u.h>
- #include      <libc.h>
- #include      <pwd.h>
-@@ -22,8 +23,6 @@ fprint(int fd, char *z, ...)
- 
- int errstr(char *buf)
- {
--      extern int errno;
--
-       strncpy(buf, strerror(errno), ERRLEN);
-       return 1;
- }
Index: patches/patch-sam_Makefile
===================================================================
RCS file: patches/patch-sam_Makefile
diff -N patches/patch-sam_Makefile
--- patches/patch-sam_Makefile  17 Mar 2016 21:07:32 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,53 +0,0 @@
-$OpenBSD: patch-sam_Makefile,v 1.2 2016/03/17 21:07:32 naddy Exp $
---- sam/Makefile.orig  Thu Mar 17 21:21:48 2016
-+++ sam/Makefile       Thu Mar 17 21:21:48 2016
-@@ -8,7 +8,7 @@
- #     
- #     Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified
- #     if your compiler supports posix-compatible compilation
--OS=-DIRIX5 -ansiposix
-+OS=-D_POSIX_SOURCE -DSOLARIS
- 
- #     add -Iincludedir for any include directories that need to be searched
- #     for posix header files (for UMIPS, add -I/usr/include/posix)
-@@ -22,12 +22,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=/tmp
-+TMP=/var/tmp
- 
- #     Set SHELLNAME and SHELLPATH to the name of a shell and the pathname
- #     of its executable
-@@ -36,12 +36,12 @@ 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
-+RXNAME=ssh
-+RXPATHNAME=/usr/bin/ssh
- 
- SAMSAVE=/bin/sh\\n$(SAMSAVEDIR)/samsave
- 
--CFLAGS=$(OS) -D_LIBXG_EXTENSION $(INCS)
-+CFLAGS+=$(OS) -D_LIBXG_EXTENSION $(INCS)
- 
- SYSFLAGS=  -DHOMEDIR=\"$(HOMEDIR)\" -DRSAMNAME=\"$(RSAMNAME)\" \
-               -DTERMNAME=\"$(TERMNAME)\" -DTMP=\"$(TMP)\" \
-@@ -50,7 +50,6 @@ SYSFLAGS=  -DHOMEDIR=\"$(HOMEDIR)\" -DRSAMNAME=\"$(RSA
-               -DSAMSAVE=\"$(SAMSAVE)\"
- 
- LIB=../libframe/libframe.a ../libXg/libXg.a
--CC=cc
- 
- OBJ=sam.o address.o buffer.o cmd.o disc.o error.o file.o io.o \
-       list.o mesg.o moveto.o multi.o rasp.o regexp.o shell.o \
Index: patches/patch-sam_unix_c
===================================================================
RCS file: patches/patch-sam_unix_c
diff -N patches/patch-sam_unix_c
--- patches/patch-sam_unix_c    17 Mar 2016 21:07:32 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
-$OpenBSD: patch-sam_unix_c,v 1.2 2016/03/17 21:07:32 naddy Exp $
---- sam/unix.c.orig    Thu Mar 17 21:21:48 2016
-+++ sam/unix.c Thu Mar 17 21:21:48 2016
-@@ -147,18 +147,18 @@ notifyf(void *a, char *b)        /* never called */
- int
- newtmp(int i)
- {
--      char *s;
--      FILE *f;
--      extern char *tempnam(const char*, const char*);
-+      char file[40];
-+      int fd;
-+      extern int mkstemp(char *);
- 
--      s = tempnam(TMPDIR, "sam.");
--      if (!s)
-+      snprintf(file, 40, "%s/sam.XXXXXXXXXX", TMPDIR);
-+      fd = mkstemp(file);
-+      if(fd < 0){
-+              unlink(file);
-               return -1;
--      f = fopen(s, "w+");
--      if (!f)
--              return -1;
--      unlink(s);
--      return fileno(f);
-+      }
-+      unlink(file);
-+      return fd;
- }
- 
- void
Index: patches/patch-samterm_Makefile
===================================================================
RCS file: patches/patch-samterm_Makefile
diff -N patches/patch-samterm_Makefile
--- patches/patch-samterm_Makefile      4 Nov 2002 10:28:56 -0000       1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
-$OpenBSD: patch-samterm_Makefile,v 1.1 2002/11/04 10:28:56 markus Exp $
---- samterm/Makefile.orig      Thu Oct 31 00:48:26 2002
-+++ samterm/Makefile   Thu Oct 31 00:49:03 2002
-@@ -8,7 +8,7 @@
- #     
- #     Additionally, -D_POSIX_SOURCE (or its equivalent) may be specified
- #     if your compiler supports posix-compatible compilation
--OS=-DIRIX5 -ansiposix
-+OS=-D_POSIX_SOURCE -DSOLARIS
- 
- #     add -Iincludedir for any include directories that need to be searched
- #     for posix header files (for UMIPS, add -I/usr/include/posix)
-@@ -16,16 +16,15 @@ INCS=-I../include
- 
- #     SAMTERM contains the name of the file containing the samterm
- #     executable.
--SAMTERM=/v/bin/samterm
-+SAMTERM=${PREFIX}/bin/samterm
- 
- #     set this if your X libraries are in different locations
- #     or if you need extra libraries to load with X11 applications
--XLIBS=-lXt -lX11
-+XLIBS=-L${X11BASE}/lib -lXt -lX11
- 
--CFLAGS=$(OS) $(INCS) -D_LIBXG_EXTENSION
-+CFLAGS+=$(OS) $(INCS) -D_LIBXG_EXTENSION
- 
- 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
- 
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/plan9/sam/pkg/PLIST,v
retrieving revision 1.5
diff -u -p -r1.5 PLIST
--- pkg/PLIST   17 Mar 2016 21:07:32 -0000      1.5
+++ pkg/PLIST   11 Nov 2019 07:08:27 -0000
@@ -1,11 +1,15 @@
-@comment $OpenBSD: PLIST,v 1.5 2016/03/17 21:07:32 naddy Exp $
+@comment $OpenBSD: PLIST,v$
+@bin bin/B
 @bin bin/sam
-bin/samsave
 @bin bin/samterm
 @man man/man1/sam.1
+@man man/man5/samrc.5
+share/applications/deadpixi-sam.desktop
 share/doc/sam/
-share/doc/sam/README
-share/doc/sam/Sam.ad
+share/doc/sam/README.rst
 share/doc/sam/sam.ps
 share/doc/sam/sam.tut.ms
 share/doc/sam/se.ps
+share/examples/sam/
+share/examples/sam/samrc
+@tag update-desktop-database

Reply via email to