Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Apr 2001 11:30:25 -0400 (EDT)
From:      petef@databits.net
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/26773: Update editors/joe to version 2.9.6
Message-ID:  <200104221530.f3MFUP916499@electron.databits.net>

next in thread | raw e-mail | index | archive | help

>Number:         26773
>Category:       ports
>Synopsis:       Update editors/joe to version 2.9.6
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 22 08:40:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Pete Fritchman
>Release:        FreeBSD 4.3-RC i386
>Organization:
Databits Network Services, Inc.
>Environment:
System: FreeBSD electron.databits.net 4.3-RC FreeBSD 4.3-RC #0: Thu Apr 12 17:02:53 EDT 2001 root@electron.databits.net:/usr/obj/usr/src/sys/ELECTRON i386


>Description:

- update version to 2.9.6
- update MASTER_SITES
- take over MAINTAINERship
- install some documentation into ${PREFIX}/share/doc/joe
- fix up pkg-descr (fmt(1), WWW:, etc)
- remove files/patch-a{a,b,c}
- note: joerc and friends are now installed in ${PREFIX}/etc rather than
  ${PREFIX}/lib
- update patch-ad (the purpose of patch-ad is to add file locking to joe;
  some logistic changes were made to accomodate the newer joe source).  I
  am going to see if the joe author(s) will incorporate this (and patch-ae)
  into the main distribution; it seems rather silly the editor has no 
  file locking by default.
 
>How-To-Repeat:

N/A

>Fix:

Also available at http://hex.databits.net/~petef/diffs/joe.diff

(Remember to remove files/patch-a{a,b,c})

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/editors/joe/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- Makefile	2001/03/11 04:32:07	1.14
+++ Makefile	2001/04/22 03:50:44
@@ -6,17 +6,24 @@
 #
 
 PORTNAME=	joe
-PORTVERSION=	2.8
-PORTREVISION=	3
+PORTVERSION=	2.9.6
 CATEGORIES=	editors
-MASTER_SITES=	ftp://ftp.std.com/src/editors/
-DISTNAME=	${PORTNAME}${PORTVERSION}
-EXTRACT_SUFX=	.tar.Z
+MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR=	joe-editor
+EXTRACT_SUFX=	.tgz
 
-MAINTAINER?=	toasty@dragondata.com
+MAINTAINER=	petef@databits.net
 
-WRKSRC=		${WRKDIR}/joe
-ALL_TARGET=	joe
+GNU_CONFIGURE=	yes
+USE_GMAKE=	yes
+
 MAN1=		joe.1
+
+post-install:
+.if !defined(NOPORTDOCS)
+	${MKDIR} ${PREFIX}/share/doc/joe
+	${INSTALL_DATA} ${WRKSRC}/INFO ${WRKSRC}/README ${PREFIX}/share/doc/joe
+	${INSTALL_DATA} ${WRKSRC}/LIST ${PREFIX}/share/doc/joe/CommandList
+.endif
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/editors/joe/distinfo,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 distinfo
--- distinfo	1995/07/05 15:08:51	1.1.1.1
+++ distinfo	2001/04/22 02:53:51
@@ -1 +1 @@
-MD5 (joe2.8.tar.Z) = bad4221aa63ca432e37dac1a953294b1
+MD5 (joe-2.9.6.tgz) = 304084bd8e32ec3a4ac2d90bbfef19b3
Index: pkg-descr
===================================================================
RCS file: /home/ncvs/ports/editors/joe/pkg-descr,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 pkg-descr
--- pkg-descr	1995/07/05 15:08:50	1.1.1.1
+++ pkg-descr	2001/04/22 02:35:42
@@ -1,9 +1,15 @@
-	JOE is the professional freeware ASCII text screen editor for UNIX. 
-It makes full use of the power and versatility of UNIX, but lacks the steep
-learning curve and basic nonsense you have to deal with in every other UNIX
-editor. JOE has the feel of most IBM PC text editors: The key-sequences are
-reminiscent of WordStar and Turbo-C.  JOE is much more powerful than those
-editors, however.  JOE has all of the features a UNIX user should expect:
-full use of termcap/terminfo, excellent screen update optimizations (JOE is
-fully useable at 2400 baud), simple installation, and all of the
+JOE is the professional freeware ASCII text screen editor for UNIX.
+It makes full use of the power and versatility of UNIX, but lacks
+the steep learning curve and basic nonsense you have to deal with
+in every other UNIX editor. JOE has the feel of most IBM PC text
+editors: the key-sequences are reminiscent of WordStar and Turbo-C.
+JOE is much more powerful than those editors, however.  JOE has
+all of the features a UNIX user should expect:  full use of
+termcap/terminfo, excellent screen update optimizations (JOE is
+fully usable at 2400 baud), simple installation, and all of the
 UNIX-integration features of VI.
+
+WWW: http://sourceforge.net/projects/joe-editor/
+
+-Pete
+petef@databits.net
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/editors/joe/pkg-plist,v
retrieving revision 1.2
diff -u -r1.2 pkg-plist
--- pkg-plist	1998/08/17 09:35:00	1.2
+++ pkg-plist	2001/04/22 01:30:58
@@ -3,8 +3,12 @@
 bin/jstar
 bin/rjoe
 bin/jpico
-lib/joerc
-lib/jmacsrc
-lib/jstarrc
-lib/rjoerc
-lib/jpicorc
+etc/joerc
+etc/jmacsrc
+etc/jstarrc
+etc/rjoerc
+etc/jpicorc
+%%PORTDOCS%%share/doc/joe/INFO
+%%PORTDOCS%%share/doc/joe/README
+%%PORTDOCS%%share/doc/joe/CommandList
+%%PORTDOCS%%@dirrm share/doc/joe
Index: files/patch-ad
===================================================================
RCS file: /home/ncvs/ports/editors/joe/files/patch-ad,v
retrieving revision 1.5
diff -u -r1.5 patch-ad
--- files/patch-ad	2000/12/03 18:03:25	1.5
+++ files/patch-ad	2001/04/22 03:12:32
@@ -1,98 +1,66 @@
---- b.c.orig	Fri Jan 20 00:38:25 1995
-+++ b.c	Sun Dec  3 09:58:21 2000
-@@ -21,6 +21,9 @@
+--- b.c.orig	Wed Apr 11 17:10:49 2001
++++ b.c	Sat Apr 21 23:11:38 2001
+@@ -16,6 +16,9 @@
  #include <pwd.h>
  #endif
  #include <errno.h>
 +#include <sys/file.h>
 +#include <sys/types.h>
 +#include <sys/stat.h>
+ #include <stdlib.h>
+ #include <ctype.h>
+ #include <string.h>
+@@ -178,6 +181,7 @@
+ 	else
+ 		b->o = pdefault;
+ 	mset (b->marks, 0, sizeof (b->marks));
++	b->filehandle = -1;  /* initialize filehandle &&& ob */
+ 	b->rdonly = 0;
+ 	b->orphan = 0;
+ 	b->oldcur = 0;
+@@ -229,6 +233,11 @@
+ void brm (B *b) {
+ 	if (b && !--b->count)
+ 	  {
++           if (b->filehandle != -1) {
++           /* close filehandle, free lock &&& ob */
++           close (b->filehandle);
++          }
++
+ 		  if (b->changed)
+ 			  abrerr (b->name);
+ 		  if (b == errbuf)
+@@ -1867,7 +1876,8 @@
+ 	B *b;
+ 	long skip, amnt;
+ 	char *n;
+-	int nowrite = 0;
++	struct stat sb;
++	int nowrite = 0, fh = -1;
  
- #include "config.h"
- #include "blocks.h"
-@@ -201,6 +204,7 @@
-  if(prop) b->o=prop->o;
-  else b->o=pdefault;
-  mset(b->marks,0,sizeof(b->marks));
-+ b->filehandle = -1;	/* initialize filehandle &&& ob */
-  b->rdonly=0;
-  b->orphan=0;
-  b->oldcur=0;
-@@ -255,6 +259,10 @@
-  {
-  if(b && !--b->count)
-   {
-+  if (b->filehandle != -1) {
-+    /* close filehandle, free lock &&& ob */
-+    close (b->filehandle);
-+    }
-   if(b->changed) abrerr(b->name);
-   if(b==errbuf) errbuf=0;
-   if(b->undo) undorm(b->undo);
-@@ -1671,7 +1679,8 @@
-  B *b;
-  long skip,amnt;
-  char *n;
-- int nowrite=0;
-+ struct stat sb;
-+ int nowrite=0,fh=-1;
+ 	if (!s || !s[0])
+ 	  {
+@@ -1920,6 +1930,14 @@
+ 		  goto opnerr;
+ 	  }
  
-  if(!s || !s[0])
-   {
-@@ -1704,6 +1713,28 @@
-   else fclose(fi);
-   fi=fopen(n,"r");
-   if(!fi) nowrite=0;
-+/*printf ("nowrite open=%i\n", nowrite); */
-+  
-+  /* check file mod, if no write flags set, 
-+     joe in read only mode. &&& ob */
-+
-+  if (!nowrite) { 
-+    nowrite = (!stat (n, &sb)) && (!(sb.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)));
-+    }
-+/*printf ("nowrite stat=%i\n", nowrite); */
++	/* Lock the file &&& ob,petef */
++	if (fi)
++	  {
++	    fh = dup( fileno(fi) );
++	    nowrite = (flock (fh, LOCK_EX | LOCK_NB));
++	  }
 +
-+  /* lock the file if writable, or go into read only mode if
-+     already locked,      */
-+  
-+  if ((fi) && (!nowrite)) { 
-+    fh = dup( fileno(fi) ); 
-+    nowrite = (flock (fh, LOCK_EX | LOCK_NB));
-+    }
-+/*printf ("nowrite flock=%i\n", nowrite); */
 +
-+/*nowrite = 1; */	/* for test purpose */
-+/*printf ("nowrite=%i\n", nowrite); */
-+
-   }
-  joesep(n);
- 
-@@ -1761,6 +1792,7 @@
-  vsrm(n);
+ 	/* Skip data if we need to */
+ 	if (skip && lseek (fileno (fi), skip, 0) < 0)
+ 	  {
+@@ -1978,6 +1996,8 @@
+ 	vsrm (n);
  
-  b->er=error;
-+ if( fh != -1 ) b->filehandle = fh;
-  return b;
-  }
+ 	b->er = error;
++	if (fh != -1)
++	  b->filehandle = fh;
+ 	return b;
+ }
  
-@@ -1990,7 +2022,18 @@
-  {
-  long tim=time(0);
-  B *b;
-- FILE *f=fopen("DEADJOE","a");
-+ FILE *f;
-+ struct stat sb;
-+ if ((lstat("DEADJOE", &sb) == 0) && (((sb.st_mode & S_IFLNK) && (sb.st_uid != getuid())) || (sb.st_nlink > 1))) 
-+  {
-+  printf("*** JOE was aborted ");
-+  if (sig) printf("by signal %d, cannot save DEADJOE due to unsafe symlink\n",sig);
-+  else printf("because the terminal closed, cannot save DEADJOE due to unsafe symlink\n");
-+  if(sig) ttclsn();
-+  _exit(1);
-+  }
-+ f=fopen("DEADJOE","a");
-+ chmod("DEADJOE", S_IRUSR | S_IWUSR);
-  fprintf(f,"\n*** Modified files in JOE when it aborted on %s",ctime(&tim));
-  if(sig) fprintf(f,"*** JOE was aborted by signal %d\n",sig);
-  else fprintf(f,"*** JOE was aborted because the terminal closed\n");
Index: files/patch-ae
===================================================================
RCS file: /home/ncvs/ports/editors/joe/files/patch-ae,v
retrieving revision 1.1
diff -u -r1.1 patch-ae
--- files/patch-ae	1999/12/25 02:22:53	1.1
+++ files/patch-ae	2001/04/22 03:16:24
@@ -1,8 +1,10 @@
---- b.h.orig	Wed Dec 21 13:04:46 1994
-+++ b.h	Tue Dec  7 13:35:11 1999
-@@ -61,4 +61,5 @@
-  int internal;			/* Set for internal buffers */
-  int er;			/* Error code when file was loaded */
-+ int filehandle;		/* File handle for locking */
-  };
+--- b.h.orig	Sat Apr 21 23:15:48 2001
++++ b.h	Sat Apr 21 23:16:16 2001
+@@ -56,6 +56,7 @@
+ 	P *oldtop;		/* Last top screen position before orphaning */
+ 	int rdonly;		/* Set for read-only */
+ 	int internal;		/* Set for internal buffers */
++	int filehandle; 	/* File handle for locking */
+ 	int er;			/* Error code when file was loaded */
+ };
  
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200104221530.f3MFUP916499>