- Update to 2.9.8

PR:		ports/80690
Submitted by:	chinsan <chinsan@mail2000.com.tw>
Approved by:	Kevin Day <toasty@dragondata.com> (maintainer)
This commit is contained in:
Pav Lucistnik 2005-10-21 08:53:32 +00:00
parent 2d224add8e
commit ae38e88a73
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=146001
18 changed files with 71 additions and 424 deletions

View file

@ -6,22 +6,35 @@
#
PORTNAME= joe
PORTVERSION= 2.8
PORTREVISION= 5
CATEGORIES+= editors
MASTER_SITES= ftp://ftp.std.com/src/editors/ \
http://www.dragondata.com/software/
DISTNAME= ${PORTNAME}${PORTVERSION}
EXTRACT_SUFX= .tar.Z
PORTVERSION= 2.9.8
CATEGORIES= editors
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}-editor
MAINTAINER?= toasty@dragondata.com
COMMENT?= Joe's own editor
COMMENT?= Joe's Own Editor
RUN_DEPENDS= ispell:${PORTSDIR}/textproc/ispell
LATEST_LINK= joe2
CONFLICTS= joe-3*
WRKSRC= ${WRKDIR}/joe
ALL_TARGET= joe
MAN1= joe.1
GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_ICONV= yes
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LIBS="-L${LOCALBASE}/lib -liconv"
ALL_TARGET= ${PORTNAME}
MAN1= ${PORTNAME}.1
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${WRKSRC}/README.cvs ${WRKSRC}/ChangeLog\
${WRKSRC}/INFO ${WRKSRC}/NEWS ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/LIST ${DOCSDIR}/CommandList
.endif
.include <bsd.port.mk>

View file

@ -1,2 +1,2 @@
MD5 (joe2.8.tar.Z) = bad4221aa63ca432e37dac1a953294b1
SIZE (joe2.8.tar.Z) = 322108
MD5 (joe-2.9.8.tar.gz) = c7c66cc641f53ba820f47a73c5b2377f
SIZE (joe-2.9.8.tar.gz) = 283596

View file

@ -1,106 +0,0 @@
*** Makefile.orig Sat Jul 1 18:43:39 1995
--- Makefile Sat Jul 1 18:59:47 1995
***************
*** 9,17 ****
# to go and where you want the man page
# to go:
! WHEREJOE = /usr/local/bin
! WHERERC = /usr/local/lib
! WHEREMAN = /usr/man/man1
# If you want to use TERMINFO, you have to set
# the following variable to 1. Also you have to
--- 9,17 ----
# to go and where you want the man page
# to go:
! WHEREJOE = ${PREFIX}/bin
! WHERERC = ${PREFIX}/lib
! WHEREMAN = ${PREFIX}/man/man1
# If you want to use TERMINFO, you have to set
# the following variable to 1. Also you have to
***************
*** 27,33 ****
# C compiler options: make's built-in rules use this variable
! CFLAGS = -O
# C compiler to use: make's built-in rules use this variable
--- 27,33 ----
# C compiler options: make's built-in rules use this variable
! # CFLAGS = -O
# C compiler to use: make's built-in rules use this variable
***************
*** 84,100 ****
# Install proceedure
! install: joe termidx
strip joe
! strip termidx
if [ ! -d $(WHEREJOE) ]; then mkdir $(WHEREJOE); chmod a+rx $(WHEREJOE); fi
! rm -f $(WHEREJOE)/joe $(WHEREJOE)/jmacs $(WHEREJOE)/jstar $(WHEREJOE)/jpico $(WHEREJOE)/rjoe $(WHEREJOE)/termidx
mv joe $(WHEREJOE)
ln $(WHEREJOE)/joe $(WHEREJOE)/jmacs
ln $(WHEREJOE)/joe $(WHEREJOE)/jstar
ln $(WHEREJOE)/joe $(WHEREJOE)/rjoe
ln $(WHEREJOE)/joe $(WHEREJOE)/jpico
! mv termidx $(WHEREJOE)
if [ ! -d $(WHERERC) ]; then mkdir $(WHERERC); chmod a+rx $(WHERERC); fi
rm -f $(WHERERC)/joerc $(WHERERC)/jmacsrc $(WHERERC)/jstarrc $(WHERERC)/jpicorc $(WHERERC)/rjoerc $(WHEREMAN)/joe.1
cp joerc $(WHERERC)
--- 84,100 ----
# Install proceedure
! install: joe # termidx
strip joe
! # strip termidx
if [ ! -d $(WHEREJOE) ]; then mkdir $(WHEREJOE); chmod a+rx $(WHEREJOE); fi
! rm -f $(WHEREJOE)/joe $(WHEREJOE)/jmacs $(WHEREJOE)/jstar $(WHEREJOE)/jpico $(WHEREJOE)/rjoe # $(WHEREJOE)/termidx
mv joe $(WHEREJOE)
ln $(WHEREJOE)/joe $(WHEREJOE)/jmacs
ln $(WHEREJOE)/joe $(WHEREJOE)/jstar
ln $(WHEREJOE)/joe $(WHEREJOE)/rjoe
ln $(WHEREJOE)/joe $(WHEREJOE)/jpico
! # mv termidx $(WHEREJOE)
if [ ! -d $(WHERERC) ]; then mkdir $(WHERERC); chmod a+rx $(WHERERC); fi
rm -f $(WHERERC)/joerc $(WHERERC)/jmacsrc $(WHERERC)/jstarrc $(WHERERC)/jpicorc $(WHERERC)/rjoerc $(WHEREMAN)/joe.1
cp joerc $(WHERERC)
***************
*** 114,126 ****
chmod a+r $(WHERERC)/rjoerc
chmod a+r $(WHERERC)/jpicorc
chmod a+r $(WHEREMAN)/joe.1
! chmod a+x $(WHEREJOE)/termidx
! rm -f $(WHERERC)/termcap
! cp termcap $(WHERERC)/termcap
! chmod a+r $(WHERERC)/termcap
! rm -f $(WHERERC)/terminfo
! cp terminfo $(WHERERC)/terminfo
! chmod a+r $(WHERERC)/terminfo
# Cleanup proceedure
--- 114,126 ----
chmod a+r $(WHERERC)/rjoerc
chmod a+r $(WHERERC)/jpicorc
chmod a+r $(WHEREMAN)/joe.1
! # chmod a+x $(WHEREJOE)/termidx
! # rm -f $(WHERERC)/termcap
! # cp termcap $(WHERERC)/termcap
! # chmod a+r $(WHERERC)/termcap
! # rm -f $(WHERERC)/terminfo
! # cp terminfo $(WHERERC)/terminfo
! # chmod a+r $(WHERERC)/terminfo
# Cleanup proceedure

View file

@ -1,64 +0,0 @@
--- main.c.orig Sat Jan 21 19:21:08 1995
+++ main.c Wed Feb 28 18:52:17 2001
@@ -18,6 +18,10 @@
#include <stdio.h>
#include <fcntl.h>
+#ifdef __FreeBSD__
+#include <locale.h>
+#include <ctype.h>
+#endif
#include "config.h"
#include "w.h"
#include "tty.h"
@@ -187,6 +191,20 @@
run=namprt(argv[0]);
#endif
+#ifdef __FreeBSD__
+ setlocale(LC_ALL, "");
+ for(c=0;c<256;c++)
+ { int a=0;
+ if(iscntrl(c))
+ a|=UNDERLINE;
+ if((c&0x80)&&!isprint(c))
+ a|=INVERSE;
+ xlata[c]=a;
+ if(isprint(c))
+ xlatc[c]=c;
+ }
+#endif
+
if(s=getenv("LINES")) sscanf(s,"%d",&lines);
if(s=getenv("COLUMNS")) sscanf(s,"%d",&columns);
if(s=getenv("BAUD")) sscanf(s,"%u",&Baud);
@@ -234,20 +252,6 @@
#else
- s=vsncpy(NULL,0,sc("."));
- s=vsncpy(sv(s),sv(run));
- s=vsncpy(sv(s),sc("rc"));
- c=procrc(cap,s);
- if(c==0) goto donerc;
- if(c==1)
- {
- char buf[8];
- fprintf(stderr,"There were errors in '%s'. Use it anyway?",s);
- fflush(stderr);
- fgets(buf,8,stdin);
- if(buf[0]=='y' || buf[0]=='Y') goto donerc;
- }
-
vsrm(s);
s=getenv("HOME");
if(s)
@@ -365,7 +369,7 @@
maint->curwin=maint->topwin;
if(help) helpon(maint);
if(!nonotice)
- msgnw(lastw(maint)->object,"\\i** Joe's Own Editor v2.8 ** Copyright (C) 1995 Joseph H. Allen **\\i");
+ msgnw(lastw(maint)->object,"\\i** Joe's Own Editor v2.8l ** Copyright (C) 1995 Joseph H. Allen **\\i");
edloop(0);
vclose(vmem);
nclose(n);

View file

@ -1,16 +0,0 @@
--- scrn.c.old Thu Oct 6 02:10:07 1994
+++ scrn.c Thu Sep 11 11:45:47 1997
@@ -288,6 +288,12 @@
if(!(t->uc=jgetstr(t->cap,"uc"))) if(t->ul) t->uc="_";
if(t->uc) t->avattr|=UNDERLINE;
+/* If we don't have underline, but we do have bold, print underline as bold */
+if (!(t->avattr & UNDERLINE) && t->md != NULL)
+ {
+ t->us = t->md ; t->ue = t->me ; t->avattr |= UNDERLINE;
+ }
+
t->ms=getflag(t->cap,"ms");
t->da=getflag(t->cap,"da");

View file

@ -1,101 +0,0 @@
--- b.c.orig Fri Jan 20 02:38:25 1995
+++ b.c Sun Feb 10 14:39:03 2002
@@ -21,6 +21,9 @@
#include <pwd.h>
#endif
#include <errno.h>
+#include <sys/file.h>
+#include <sys/types.h>
+#include <sys/stat.h>
#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])
{
@@ -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 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);
b->er=error;
+ if( fh != -1 ) b->filehandle = fh;
return b;
}
@@ -1988,9 +2020,20 @@
void ttsig(sig)
{
- long tim=time(0);
+ time_t 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");

View file

@ -1,8 +0,0 @@
--- 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 */
};

View file

@ -1,11 +0,0 @@
--- conf.c.orig Fri Jun 1 19:32:10 2001
+++ conf.c Fri Jun 1 19:33:37 2001
@@ -204,8 +204,6 @@
fprintf(f,"\n");
fprintf(f,"char *getenv();\n");
- if(sizeof(long)==8) fprintf(f,"int time();\n");
- else fprintf(f,"long time();\n");
fprintf(f,"void *malloc();\n");
fprintf(f,"void free();\n");
fprintf(f,"void *calloc();\n");

View file

@ -1,39 +0,0 @@
--- rc.c.orig Fri Jan 20 02:53:42 1995
+++ rc.c Sun Feb 10 14:28:42 2002
@@ -29,7 +29,7 @@
* is created.
*/
-KMAP *getcontext(name)
+KMAP *joegetcontext(name)
char *name;
{
struct context *c;
@@ -610,7 +610,8 @@
FILE *fd; /* rc file */
int line=0; /* Line number */
int err=0; /* Set to 1 if there was a syntax error */
- ossep(zcpy(buf,name));
+ strlcpy(buf,name,sizeof(buf));
+ ossep(buf);
#ifdef __MSDOS__
fd=fopen(buf,"rt");
#else
@@ -739,7 +740,7 @@
for(buf[x]=c;cwhite(buf[x]);++x);
for(c=x;!cwhitef(buf[c]);++c);
buf[c]=0;
- if(c!=x) kcpy(context,getcontext(buf+x));
+ if(c!=x) kcpy(context,joegetcontext(buf+x));
else
{
err=1;
@@ -788,7 +789,7 @@
err=1;
fprintf(stderr,"\n%s %d: No context selected for :delete",name,line);
}
- else context=getcontext(buf+1);
+ else context=joegetcontext(buf+1);
else
{
err=1;

View file

@ -1,11 +0,0 @@
--- w.c.orig Sun Feb 10 14:28:10 2002
+++ w.c Sun Feb 10 14:29:15 2002
@@ -594,7 +594,7 @@
else seth(original,original->h-height);
/* Create new keyboard handler for window */
- if(watom->context) new->kbd=mkkbd(getcontext(watom->context));
+ if(watom->context) new->kbd=mkkbd(joegetcontext(watom->context));
else new->kbd=0;
/* Put window on the screen */

View file

@ -1,11 +0,0 @@
--- bw.c.orig Sun Feb 10 14:27:49 2002
+++ bw.c Sun Feb 10 14:28:18 2002
@@ -734,7 +734,7 @@
if(window==window->main)
{
rmkbd(window->kbd);
- window->kbd=mkkbd(getcontext(w->o.context));
+ window->kbd=mkkbd(joegetcontext(w->o.context));
}
w->top->xcol=0; w->cursor->xcol=0;
return w;

View file

@ -1,16 +0,0 @@
--- rc.h.orig Sun Feb 10 14:28:00 2002
+++ rc.h Sun Feb 10 14:28:55 2002
@@ -34,11 +34,11 @@
extern OPTIONS pdefault;
void setopt();
-/* KMAP *getcontext(char *name);
+/* KMAP *joegetcontext(char *name);
* Find and return the KMAP for a given context name. If none is found, an
* empty kmap is created, bound to the context name, and returned.
*/
-KMAP *getcontext();
+KMAP *joegetcontext();
/* int procrc(char *name); Process an rc file
Returns 0 for success

View file

@ -0,0 +1,11 @@
--- configure.orig Fri May 6 18:53:19 2005
+++ configure Fri May 6 18:53:19 2005
@@ -340,7 +340,7 @@
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
+sysconfdir='${prefix}/etc/joe'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'

View file

@ -0,0 +1,17 @@
--- tty.c.orig Fri May 6 17:26:17 2005
+++ tty.c Fri May 6 17:28:19 2005
@@ -934,9 +934,11 @@
#endif
#ifndef SETPGRP_VOID
- setpgrp(0, 0);
-#else
- setpgrp();
+ setpgrp(0, getpid());
+/*
+ * #else
+ * setpgrp();
+ */
#endif
for (x = 0; x != 32; ++x)

View file

@ -1,11 +0,0 @@
--- ufile.c.orig Wed Sep 18 19:09:53 2002
+++ ufile.c Wed Sep 18 19:10:19 2002
@@ -149,7 +149,7 @@
f=open(from,O_RDONLY);
if(f<0) return -1;
if(fstat(f,&sbuf)<0) return -1;
- g=creat(to,sbuf.st_mode);
+ g=creat(to,sbuf.st_mode&~(S_ISGID|S_ISUID));
if(g<0)
{
close(f);

View file

@ -1,11 +0,0 @@
--- vs.c.orig Tue Oct 14 22:58:32 2003
+++ vs.c Tue Oct 14 22:58:52 2003
@@ -16,7 +16,7 @@
JOE; see the file COPYING. If not, write to the Free Software Foundation,
675 Mass Ave, Cambridge, MA 02139, USA. */
-#include <varargs.h>
+#include <stdarg.h>
#include "config.h"
#include "zstr.h"
#include "blocks.h"

View file

@ -7,3 +7,5 @@ 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
UNIX-integration features of VI.
WWW: http://sourceforge.net/projects/joe-editor/

View file

@ -3,8 +3,17 @@ bin/jmacs
bin/jstar
bin/rjoe
bin/jpico
lib/joerc
lib/jmacsrc
lib/jstarrc
lib/rjoerc
lib/jpicorc
bin/termidx
etc/joe/joerc
etc/joe/jmacsrc
etc/joe/jstarrc
etc/joe/rjoerc
etc/joe/jpicorc
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
%%PORTDOCS%%%%DOCSDIR%%/CommandList
%%PORTDOCS%%%%DOCSDIR%%/INFO
%%PORTDOCS%%%%DOCSDIR%%/NEWS
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/README.cvs
%%PORTDOCS%%@unexec rmdir %D/%%DOCSDIR%% 2>/dev/null || true
@unexec rmdir %D/etc/joe 2>/dev/null || true