1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-02 06:03:50 +00:00

- Update to 3.3

Obtained from:	editors/joe-devel
Approved by:	Kevin Day <toasty@dragondata.com> (maintainer)
This commit is contained in:
Pav Lucistnik 2005-10-21 08:21:15 +00:00
parent 15326114dc
commit 094982a4a5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=145995
17 changed files with 120 additions and 436 deletions

View File

@ -6,19 +6,38 @@
#
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= 3.3
PORTEPOCH= 1
CATEGORIES= editors
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}-editor
DISTNAME= ${PORTNAME}-${PORTVERSION}
MAINTAINER?= toasty@dragondata.com
COMMENT?= Joe's own editor
MAINTAINER= toasty@dragondata.com
COMMENT= Joe's Own Editor
WRKSRC= ${WRKDIR}/joe
ALL_TARGET= joe
MAN1= joe.1
BUILD_DEPENDS= aspell:${PORTSDIR}/textproc/aspell
RUN_DEPENDS= aspell:${PORTSDIR}/textproc/aspell
.include <bsd.port.mk>
CONFLICTS= joe-2.*
USE_GMAKE= yes
USE_ICONV= yes
GNU_CONFIGURE= 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
.include <bsd.port.pre.mk>
post-install:
.for file in jmacsrc jpicorc jstarrc rjoerc joerc
.if !exists(${PREFIX}/etc/${PORTNAME}/${file})
@${CP} ${PREFIX}/etc/${PORTNAME}/${file} ${PREFIX}/etc/${PORTNAME}/${file}.dist
.endif
.endfor
.include <bsd.port.post.mk>

View File

@ -1,2 +1,2 @@
MD5 (joe2.8.tar.Z) = bad4221aa63ca432e37dac1a953294b1
SIZE (joe2.8.tar.Z) = 322108
MD5 (joe-3.3.tar.gz) = 02221716679c039c5da00c275d61dbf4
SIZE (joe-3.3.tar.gz) = 478218

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,13 @@
--- tty.c.orig Fri Mar 18 10:40:11 2005
+++ tty.c Fri May 6 16:58:38 2005
@@ -1074,8 +1074,10 @@
setsid(); /* I think you do setprgp(0,0) on systems with no setsid() */
#ifndef SETPGRP_VOID
setpgrp(0, 0);
+/*
#else
setpgrp();
+*/
#endif
#endif

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

@ -1,9 +1,13 @@
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
UNIX-integration features of VI.
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.
JOE now has UTF-8 support and Syntax Highlighting.
WWW: http://sourceforge.net/projects/joe-editor/

View File

@ -1,10 +1,63 @@
bin/joe
bin/jmacs
bin/joe
bin/jpico
bin/jstar
bin/rjoe
bin/jpico
lib/joerc
lib/jmacsrc
lib/jstarrc
lib/rjoerc
lib/jpicorc
bin/termidx
etc/joe/charmaps/klingon
@unexec if cmp -s %D/etc/joe/jmacsrc.dist %D/etc/joe/jmacsrc; then rm -f %D/etc/joe/jmacsrc; fi
etc/joe/jmacsrc.dist
@exec if [ ! -f %D/etc/joe/jmacsrc ]; then cp %D/etc/joe/%f %D/etc/joe/jmacsrc; fi
@unexec if cmp -s %D/etc/joe/joerc.dist %D/etc/joe/joerc; then rm -f %D/etc/joe/joerc; fi
etc/joe/joerc.dist
@exec if [ ! -f %D/etc/joe/joerc ]; then cp %D/etc/joe/%f %D/etc/joe/joerc; fi
@unexec if cmp -s %D/etc/joe/jpicorc.dist %D/etc/joe/jpicorc; then rm -f %D/etc/joe/jpicorc; fi
etc/joe/jpicorc.dist
@exec if [ ! -f %D/etc/joe/jpicorc ]; then cp %D/etc/joe/%f %D/etc/joe/jpicorc; fi
@unexec if cmp -s %D/etc/joe/jstarrc.dist %D/etc/joe/jstarrc; then rm -f %D/etc/joe/jstarrc; fi
etc/joe/jstarrc.dist
@exec if [ ! -f %D/etc/joe/jstarrc ]; then cp %D/etc/joe/%f %D/etc/joe/jstarrc; fi
@unexec if cmp -s %D/etc/joe/rjoerc.dist %D/etc/joe/rjoerc; then rm -f %D/etc/joe/rjoerc; fi
etc/joe/rjoerc.dist
@exec if [ ! -f %D/etc/joe/rjoerc ]; then cp %D/etc/joe/%f %D/etc/joe/rjoerc; fi
etc/joe/syntax/4gl.jsf
etc/joe/syntax/ada.jsf
etc/joe/syntax/asm.jsf
etc/joe/syntax/awk.jsf
etc/joe/syntax/c.jsf
etc/joe/syntax/cobol.jsf
etc/joe/syntax/conf.jsf
etc/joe/syntax/csh.jsf
etc/joe/syntax/css.jsf
etc/joe/syntax/diff.jsf
etc/joe/syntax/fortran.jsf
etc/joe/syntax/html.jsf
etc/joe/syntax/java.jsf
etc/joe/syntax/lisp.jsf
etc/joe/syntax/mail.jsf
etc/joe/syntax/mason.jsf
etc/joe/syntax/ocaml.jsf
etc/joe/syntax/pascal.jsf
etc/joe/syntax/perl.jsf
etc/joe/syntax/php.jsf
etc/joe/syntax/ps.jsf
etc/joe/syntax/python.jsf
etc/joe/syntax/sed.jsf
etc/joe/syntax/sh.jsf
etc/joe/syntax/sml.jsf
etc/joe/syntax/sql.jsf
etc/joe/syntax/tcl.jsf
etc/joe/syntax/tex.jsf
etc/joe/syntax/verilog.jsf
etc/joe/syntax/vhdl.jsf
etc/joe/syntax/xml.jsf
etc/joe/doc/ChangeLog
etc/joe/doc/LIST
etc/joe/doc/HACKING
etc/joe/doc/HINTS
etc/joe/doc/NEWS
etc/joe/doc/README
@unexec rmdir %D/etc/joe/doc 2>/dev/null || true
@unexec rmdir %D/etc/joe/charmaps 2>/dev/null || true
@unexec rmdir %D/etc/joe/syntax 2>/dev/null || true
@unexec rmdir %D/etc/joe 2>/dev/null || true