summaryrefslogtreecommitdiff
path: root/textproc/ispell
diff options
context:
space:
mode:
authorMatthew N. Dodd <mdodd@FreeBSD.org>2003-02-22 20:14:57 +0000
committerMatthew N. Dodd <mdodd@FreeBSD.org>2003-02-22 20:14:57 +0000
commitfedb6e57676bd54f6ac8d1afba35cf3aab77e107 (patch)
tree29dc82ae60b657af36f62ab8cc77822d396dc108 /textproc/ispell
parentUpdate to 1.0.20. (diff)
Provide a limited compatibility with the Unix spell command.
Approved by: jmz
Notes
Notes: svn path=/head/; revision=76196
Diffstat (limited to 'textproc/ispell')
-rw-r--r--textproc/ispell/Makefile11
-rw-r--r--textproc/ispell/files/patch-ispell.1X53
-rw-r--r--textproc/ispell/files/patch-ispell.c90
-rw-r--r--textproc/ispell/files/patch-ispell.h10
-rw-r--r--textproc/ispell/pkg-plist1
5 files changed, 162 insertions, 3 deletions
diff --git a/textproc/ispell/Makefile b/textproc/ispell/Makefile
index 88df848de787..cbdee86955d1 100644
--- a/textproc/ispell/Makefile
+++ b/textproc/ispell/Makefile
@@ -7,7 +7,7 @@
PORTNAME?= ispell
PORTVERSION?= 3.2.06
-PORTREVISION?= 2
+PORTREVISION?= 3
CATEGORIES+= textproc
MASTER_SITES= http://fmg-www.cs.ucla.edu/geoff/tars/
DISTNAME= ispell-3.2.06 # needed for slave ports / options
@@ -18,8 +18,11 @@ ISPELL_FILES= ispell-3.2.06.tar.gz
MAN1= ispell.1
MAN4= ispell.4 english.4
-MLINKS= ispell.1 buildhash.1 ispell.1 findaffix.1 ispell.1 \
- munchlist.1 ispell.1 tryaffix.1
+MLINKS= ispell.1 buildhash.1 \
+ ispell.1 findaffix.1 \
+ ispell.1 munchlist.1 \
+ ispell.1 tryaffix.1 \
+ ispell.1 spell.1
USE_REINPLACE= yes
@@ -273,6 +276,8 @@ pre-install:
@if [ ! -d ${DATADIR} ]; then ${MKDIR} ${DATADIR}; fi
post-install:
+ @${RM} -f ${PREFIX}/bin/spell
+ @${LN} ${PREFIX}/bin/ispell ${PREFIX}/bin/spell
.if defined(ISPELL_BRITISH)
${INSTALL_DATA} ${WRKSRC}/languages/british/english.xlg \
${DATADIR}/english.dict
diff --git a/textproc/ispell/files/patch-ispell.1X b/textproc/ispell/files/patch-ispell.1X
new file mode 100644
index 000000000000..2c9158f903f7
--- /dev/null
+++ b/textproc/ispell/files/patch-ispell.1X
@@ -0,0 +1,53 @@
+--- ispell.1X.orig Wed Jul 25 17:51:46 2001
++++ ispell.1X Sat Feb 22 14:51:32 2003
+@@ -106,7 +106,7 @@
+ .\"
+ .TH ISPELL 1 local
+ .SH NAME
+-ispell, buildhash, munchlist, findaffix, tryaffix, icombine, ijoin \- Interactive
++ispell, spell, buildhash, munchlist, findaffix, tryaffix, icombine, ijoin \- Interactive
+ spelling checking
+ .SH SYNOPSIS
+ .B ispell
+@@ -148,6 +148,11 @@
+ .br
+ .B ispell
+ .BR \-v [ v ]
++.br
++.B ispell
++.BR \-u
++.RB [ files ]
++.br
+ .IP \fIcommon-flags\fP:
+ .RB [ \-t ]
+ .RB [ \-n ]
+@@ -174,6 +179,9 @@
+ .RB [ \-F
+ .IR program ]
+ .PP
++.B spell
++.RB [ files ]
++.PP
+ .B buildhash
+ .RB [ \-s ]
+ .I
+@@ -737,6 +745,19 @@
+ or "list" option to
+ .I ispell
+ is used to produce a list of misspelled words from the standard input.
++.PP
++The
++.B \-u
++option to
++.I ispell
++provides backwards compatibility with the Unix spell command.
++When
++.I ispell
++is invoked as
++.I spell
++the
++.B \-u
++option is implied.
+ .PP
+ The
+ .B \-a
diff --git a/textproc/ispell/files/patch-ispell.c b/textproc/ispell/files/patch-ispell.c
new file mode 100644
index 000000000000..24dc68cb1712
--- /dev/null
+++ b/textproc/ispell/files/patch-ispell.c
@@ -0,0 +1,90 @@
+--- ispell.c.orig Wed Jul 25 17:51:46 2001
++++ ispell.c Sat Feb 22 14:24:29 2003
+@@ -209,6 +209,7 @@
+ #include <fcntl.h>
+ #endif /* NO_FCNTL_H */
+ #include <sys/stat.h>
++#include <libgen.h>
+
+ static void usage P ((void));
+ static void initckch P ((char * wchars));
+@@ -327,6 +328,7 @@
+ char ** versionp;
+ char * wchars = NULL;
+ char * preftype = NULL;
++ char * cmdname;
+ static char libdictname[sizeof DEFHASH];
+ static char outbuf[BUFSIZ];
+ int argno;
+@@ -334,6 +336,11 @@
+
+ Cmd = *argv;
+
++ cmdname = (char *)basename(argv[0]);
++ if (strncmp(cmdname, "spell", 5) == 0) {
++ uflag++;
++ }
++
+ Trynum = 0;
+
+ p = getenv ("DICTIONARY");
+@@ -792,6 +799,11 @@
+ LibDict = p + 1;
+ }
+ break;
++ case 'u':
++ if (arglen > 2)
++ usage ();
++ uflag++;
++ break;
+ case 'V': /* Display 8-bit characters as M-xxx */
+ if (arglen > 2)
+ usage ();
+@@ -827,7 +839,7 @@
+ argc--;
+ }
+
+- if (!argc && !lflag && !aflag && !eflag && !dumpflag)
++ if (!argc && !lflag && !aflag && !eflag && !dumpflag && !uflag)
+ {
+ if (argc != 0)
+ usage ();
+@@ -848,7 +860,7 @@
+ if (access (argv[argno], 4) >= 0)
+ break;
+ }
+- if (argno >= argc && !lflag && !aflag && !eflag && !dumpflag)
++ if (argno >= argc && !lflag && !aflag && !eflag && !dumpflag && !uflag)
+ {
+ (void) fprintf (stderr,
+ argc == 1 ? ISPELL_C_NO_FILE : ISPELL_C_NO_FILES);
+@@ -935,6 +947,29 @@
+ outfile = stdout;
+ checkfile ();
+ exit (0);
++ }
++
++ if (uflag)
++ {
++ lflag++;
++ if (!argc)
++ {
++ infile = setupdefmt(NULL);
++ outfile = stdout;
++ checkfile ();
++ exit (0);
++ }
++ else
++ {
++ while (argc--)
++ {
++ infile = setupdefmt (*argv++);
++ outfile = stdout;
++ checkfile ();
++ (void) fclose (infile);
++ }
++ exit (0);
++ }
+ }
+
+ terminit ();
diff --git a/textproc/ispell/files/patch-ispell.h b/textproc/ispell/files/patch-ispell.h
new file mode 100644
index 000000000000..534477727137
--- /dev/null
+++ b/textproc/ispell/files/patch-ispell.h
@@ -0,0 +1,10 @@
+--- ispell.h.orig Sat Feb 22 13:53:04 2003
++++ ispell.h Sat Feb 22 14:11:29 2003
+@@ -702,6 +702,7 @@
+ INIT (int deftflag, -1); /* Default deformatting mode, chosen */
+ /* ..from DEFORMAT_* values */
+ INIT (int tflag, DEFTEXFLAG); /* Deformatting for current file */
++INIT (int uflag, 0); /* NZ if -u (spell compat) option */
+ INIT (int prefstringchar, -1); /* Preferred string character type */
+
+ INIT (int insidehtml, 0); /* Flag to indicate we're amid HTML */
diff --git a/textproc/ispell/pkg-plist b/textproc/ispell/pkg-plist
index c585b0e79331..28eef6b39920 100644
--- a/textproc/ispell/pkg-plist
+++ b/textproc/ispell/pkg-plist
@@ -4,6 +4,7 @@ bin/deformat-sh
bin/findaffix
bin/icombine
bin/ijoin
+bin/spell
bin/ispell
bin/munchlist
bin/tryaffix