Building and installing ispell
on a new install of FreeBSD
10 (now RC5) failed. With ISPELL_BRITISH set, the following errors
occur during a "make install".
install -o root -g wheel -m 444 /usr/ports/textproc/ispell/work/ispell-3.3.02/languages/british/english.xlg /usr/local/share/ispell/english.dict install: /usr/ports/textproc/ispell/work/*/*.aff: No such file or directory *** Error code 71 (ignored) ====> Compressing man pages (compress-man) ===> Installing for ispell-3.3.02_5 ===> Checking if textproc/ispell already installed ===> Registering installation for ispell-3.3.02_5 pkg-static: lstat(/usr/ports/textproc/ispell/work/stage/usr/local/bin/buildhash): No such file or directory pkg-static: lstat(/usr/ports/textproc/ispell/work/stage/usr/local/bin/defmt-c): No such file or directory pkg-static: lstat(/usr/ports/textproc/ispell/work/stage/usr/local/bin/defmt-sh): No such file or directory ... the list goes on ...
There are two different errors: The first is the failure to install the *.aff files. The next is the slew of pkg-static errors.
On inspecting the Makefile
, it seems that the
*.aff
error was caused by the path specification not going
deep enough into the work
directory tree. The second
problem, related to pkg-static
, was due to the new method
of package creation implemented since pkgng hit mainstream. For
ports that are not yet packagised, the NO_STAGE
macro can be set to omit the staging step. This macro had been
added to the Makefile
but was not evaluated when specifying
any non-US spelling environment.
The following unified diff shows the changes to the Makefile which made the install work in my environment (long lines folded).
root@cobalt:/usr/ports/textproc/ispell # diff -u Makefile.orig Makefile --- Makefile.orig 2014-01-07 16:54:08.000000000 +0000 +++ Makefile 2014-01-07 17:07:26.000000000 +0000 @@ -35,9 +35,9 @@ DATADIR= ${PREFIX}/share/ispell ISPELL= ${WRKSRC}/ispell -.if (!defined(ISPELL_ES) && !defined(ISPELL_IT) && \ !defined(ISPELL_FR) && !defined(ISPELL_SE) && \ !defined(ISPELL_BR) && !defined(ISPELL_DENEU) && \ !defined(ISPELL_DEALT) && !defined(ISPELL_BRITISH) && \ !defined(ISPELL_NO) && !defined(ISPELL_NL) && \ !defined(ISPELL_DA) && !defined(ISPELL_AF) && \ !defined(ISPELL_FI) && !defined(ISPELL_PL) && \ !defined(ISPELL_BG) && !defined(ISPELL_SK) && \ !defined(ISPELL_CS)) NO_STAGE= yes +.if (!defined(ISPELL_ES) && !defined(ISPELL_IT) && \ !defined(ISPELL_FR) && !defined(ISPELL_SE) && \ !defined(ISPELL_BR) && !defined(ISPELL_DENEU) && \ !defined(ISPELL_DEALT) && !defined(ISPELL_BRITISH) && \ !defined(ISPELL_NO) && !defined(ISPELL_NL) && \ !defined(ISPELL_DA) && !defined(ISPELL_AF) && \ !defined(ISPELL_FI) && !defined(ISPELL_PL) && \ !defined(ISPELL_BG) && !defined(ISPELL_SK) && \ !defined(ISPELL_CS)) pre-everything:: @${ECHO_MSG} '*********************************************************' @${ECHO_MSG} '* You can add further dictionaries: *' @@ -347,7 +347,7 @@ ${INSTALL_DATA} ${WRKSRC}/languages/american/english.med+ \ ${DATADIR}/english.dict .endif - @-${INSTALL_DATA} ${WRKDIR}/*/*.aff ${WRKDIR}/*/*.hash ${DATADIR} + @-${INSTALL_DATA} ${WRKDIR}/*/*/*/*.aff ${WRKDIR}/*/*/*/*.hash ${DATADIR} .if defined(ISPELL_ES) @${CAT} ${MASTERDIR}/pkg-plist.es >> ${TMPPLIST} .endif
The defect has been reported.
The fix for the defect report was to remove the ispell
port
from the ports tree. The replacement is aspell-ispell
, an
ispell shim for aspell. The simplest way of installing the English
language version is to use pkg
:
# pkg install -y en-aspell # (cd /usr/ports/textproc/aspell-ispell; make install)
There are other language ports for aspell, all starting with the standard two character code.