ports/64700: ispell fixes (leftover .bak files and install error)
Jeremy Chadwick
freebsd at jdc.parodius.com
Thu Mar 25 12:10:22 UTC 2004
>Number: 64700
>Category: ports
>Synopsis: ispell fixes (leftover .bak files and install error)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Thu Mar 25 04:10:21 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Jeremy Chadwick
>Release: FreeBSD 4.9-STABLE i386
>Organization:
Parodius Networking
>Environment:
System: FreeBSD pentarou.parodius.com 4.9-STABLE FreeBSD 4.9-STABLE #0: Wed Mar 17 23:46:30 PST 2004 root at pentarou.parodius.com:/usr/obj/usr/src/sys/PENTAROU i386
>Description:
This send-pr contains two fixes: 1) fix ispell leaving .bak files
laying around TMPDIR (/tmp), and 2) Makefile fix for languages which
do not use or generate *.hash or *.aff files.
1) ispell creates backup files in TMPDIR (/tmp) when doing spell-checking.
The problem is that ispell won't unlink (delete) it's own backup files
if the filename length is greater than MAXNAMLEN. In config.X, an #ifdef
check for MAXNAMLEN is done. If unavailable, it defines a default of 14.
This is particularly annoying for those of us who use mutt, which
creates temporary files named /tmp/mutt-HOSTNAME-RANDOM8CHARS. If
ispell is spawned, tons of .bak files are left laying around /tmp.
"ispell -x" will not work around this problem.
2) During "make install" of the ispell port, one commonly sees the
following (albeit harmless) error:
install: /usr/ports/textproc/ispell/work/*/*.aff: No such file or directory
*.aff and *.hash files (from what I can tell) only apply to German,
Finnish, and Polish. Therefore we now do an .if defined() check before
firing off that install command.
>How-To-Repeat:
1) Run "ispell -vv". Otherwise, run mutt, make some typos in your
editor, hit "i" to spawn ispell (prior to sending), apply changes, hit
"x", then find .bak files laying around /tmp.
2) Run "make install" without using certain ISPELL_xx hooks.
>Fix:
1) Make config.X use dirent.h to get our system-wide MAXNAMLEN.
2) Simple Makefile .if defined() check.
Applicable diff is included below.
diff -ruN ispell.orig/Makefile ispell/Makefile
--- ispell.orig/Makefile Wed Mar 10 19:07:51 2004
+++ ispell/Makefile Thu Mar 25 03:33:41 2004
@@ -7,7 +7,7 @@
PORTNAME?= ispell
PORTVERSION?= 3.2.06
-PORTREVISION?= 4
+PORTREVISION?= 5
CATEGORIES+= textproc
MASTER_SITES= http://fmg-www.cs.ucla.edu/geoff/tars/
DISTNAME= ispell-3.2.06 # needed for slave ports / options
@@ -289,7 +289,9 @@
${INSTALL_DATA} ${WRKSRC}/languages/american/english.med+ \
${DATADIR}/english.dict
.endif
+.if defined(ISPELL_DENEU) || defined(ISPELL_DEALT) || defined(ISPELL_FI) || defined(ISPELL_PL)
@-${INSTALL_DATA} ${WRKDIR}/*/*.aff ${WRKDIR}/*/*.hash ${DATADIR}
+.endif
.if defined(ISPELL_IT)
@${CAT} ${MASTERDIR}/pkg-plist.it >> ${TMPPLIST}
.endif
diff -ruN ispell.orig/files/patch-ad.maxnamlen ispell/files/patch-ad.maxnamlen
--- ispell.orig/files/patch-ad.maxnamlen Wed Dec 31 16:00:00 1969
+++ ispell/files/patch-ad.maxnamlen Thu Mar 25 03:05:50 2004
@@ -0,0 +1,14 @@
+--- config.X.orig Thu Mar 25 03:03:29 2004
++++ config.X Thu Mar 25 03:05:23 2004
+@@ -169,6 +169,11 @@
+ #include <sys/param.h>
+ #include <sys/types.h>
+
++/* Support MAXNAMLEN greater than 14 on FreeBSD; this is not in
++ * sys/param.h for obvious reasons.
++ */
++#include <dirent.h>
++
+ /*
+ ** Things that normally go in a Makefile. Define these just like you
+ ** might in the Makefile, except you should use #define instead of
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list