NetBSD Problem Report #55972
From woods@xentastic.weird.com Wed Feb 3 22:04:39 2021
Return-Path: <woods@xentastic.weird.com>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 768A01A9217
for <gnats-bugs@gnats.NetBSD.org>; Wed, 3 Feb 2021 22:04:39 +0000 (UTC)
Message-Id: <20210203220436.227D7511C5@xentastic.weird.com>
Date: Wed, 3 Feb 2021 14:04:36 -0800 (PST)
From: "Greg A. Woods" <woods@planix.ca>
Reply-To: "Greg A. Woods" <woods@planix.ca>
To: gnats-bugs@NetBSD.org
Subject: fixes to build ispell-british (aka textproc/ispell-en_GB) properly
X-Send-Pr-Version: 3.95
>Number: 55972
>Category: pkg
>Synopsis: fixes to build ispell-british (aka textproc/ispell-en_GB) properly
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: gutteridge
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 03 22:05:00 +0000 2021
>Closed-Date: Thu Apr 01 00:46:47 +0000 2021
>Last-Modified: Thu Jun 10 23:45:01 +0000 2021
>Originator: Greg A. Woods
>Release: NetBSD 9.99.64
>Organization:
Planix, Inc.; Kelowna, BC; Canada
>Environment:
System: NetBSD xentastic 9.99.64 NetBSD 9.99.64 (GENERIC) #11: Sat Jul 4 16:12:53 PDT 2020 woods@xentastic:/build/woods/xentastic/current-amd64-amd64-obj/build/src-current/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
I've been trying to use the ispell-british dictionaries but I've
been having no luck. Ispell refuses to use the installed
dictionary hash file(s).
(note that the default "english" dictionary works A-OK).
>How-To-Repeat:
Install ispell and ispell-british on a 9.x (amd64?) system,
e.g. from:
http://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/amd64/9.0/All
$ /usr/sbin/pkg_info ispell
Information for ispell-3.4.00:
Comment:
Interactive spelling checker
Required by:
ispell-british-3.4.00
Description:
Ispell is a fast screen-oriented spelling checker that shows you your
errors in the context of the original file, and suggests possible
corrections when it can figure them out. Compared to UNIX spell, it
is faster and much easier to use. Ispell can also handle languages
other than English.
Homepage:
http://ficus-www.cs.ucla.edu/geoff/ispell.html
$ /usr/sbin/pkg_info ispell-british
Information for ispell-british-3.4.00:
Comment:
British dictionary for interactive spelling checker
Requires:
ispell>=3.3.02
Description:
This package provides the British-spelling dictionaries for ispell.
Homepage:
http://ficus-www.cs.ucla.edu/geoff/ispell.html
Try using them:
$ DICTIONARY=british ispell quotes
Illegal format hash table /usr/pkg/lib/british.hash - expected magic2 0x9602, got 0x0
FYI there doesn't appear to be any problem with the dictionary
file's magic(5) number:
$ file /usr/pkg/lib/*.hash
/usr/pkg/lib/american.hash: symbolic link to americanmed+.hash
/usr/pkg/lib/americanmed+.hash: little endian ispell 3.1 hash file, 7-bit, capitalization, 52 flags and 512 string characters
/usr/pkg/lib/british.hash: little endian ispell 3.1 hash file, 7-bit, capitalization, 52 flags and 512 string characters
/usr/pkg/lib/britishxlg.hash: little endian ispell 3.1 hash file, 7-bit, capitalization, 52 flags and 512 string characters
/usr/pkg/lib/english.hash: symbolic link to americanmed+.hash
>Fix:
Apply the following changes to pkgsrc/textproc/ispell-en_GB:
(all other dictionary packages probably need similar fixes)
--- Makefile.~1.6.~ 2016-07-14 20:32:29.000000000 -0700
+++ Makefile 2019-12-12 12:47:16.301900656 -0800
@@ -1,6 +1,8 @@
# $NetBSD: Makefile,v 1.6 2016/02/26 10:32:47 jperkin Exp $
#
+# XXX there should be a ../../textproc/ispell/Makefile.common or such
+
DISTNAME= ispell-3.4.00
PKGNAME= ${DISTNAME:S/-/-${DICT_LANG}-/1}
CATEGORIES= textproc
@@ -13,34 +15,24 @@
CONFLICTS+= ispell-british-[0-9]*
DEPENDS+= ispell>=3.3.02:../../textproc/ispell
-PATCHDIR= ${.CURDIR}/../../textproc/ispell/patches
DISTINFO_FILE= ${.CURDIR}/../../textproc/ispell/distinfo
-
-BUILD_TARGET= config.sh all-languages
+WRKSRC= ${WRKDIR}/${DISTNAME}/languages/english
DICT_LANG= british
-MAKE_FLAGS+= TMPDIR=${WRKDIR:Q}
-
INSTALLATION_DIRS= lib
-MAKE_JOBS_SAFE= no
OPSYSVARS+= WORDS
WORDS.SunOS= /usr/dict/words
WORDS.*= /usr/share/dict/words
-do-configure:
- cd ${WRKSRC}; \
- ${SED} -e 's|/usr/local|${PREFIX}|g' <local.h.bsd >local.h; \
- ${ECHO} "#define LANGUAGES \"{${DICT_LANG},MASTERDICTS=${DICT_LANG}.xlg,HASHFILES=${DICT_LANG}xlg.hash,EXTRADICT=}\"" >>local.h; \
- ${ECHO} '#define MASTERHASH "${DICT_LANG}xlg.hash"' >> local.h ; \
- ${ECHO} "#undef WORDS" >> local.h ; \
- ${ECHO} '#define WORDS "${WORDS}"' >> local.h
+do-build:
+ ( cd ${WRKSRC} && \
+ $(MAKE) CONFIG= MUNCHLIST=${PREFIX}/bin/munchlist VARIANTS=british EXTRADICT=${WORDS} SHELLDEBUG=+vx AFFIXES=english.aff english.xlg+ && \
+ $(MAKE) CONFIG= BUILDHASH=${PREFIX}/bin/buildhash EXTRADICT=${WORDS} AFFIXES=english.aff SHELLDEBUG=+vx xlg+.hash )
do-install:
- ${CP} ${WRKSRC}/languages/${DICT_LANG}/${DICT_LANG}xlg.hash ${DESTDIR}${PREFIX}/lib
- cd ${DESTDIR}${PREFIX}/lib; \
- ${RM} -f ${DICT_LANG}.hash; \
- ${LN} ${DICT_LANG}xlg.hash ${DICT_LANG}.hash
+ ${INSTALL_DATA} ${WRKSRC}/english.aff ${DESTDIR}${PREFIX}/lib/${DICT_LANG}.aff
+ ${INSTALL_DATA} ${WRKSRC}/xlg+.hash ${DESTDIR}${PREFIX}/lib/${DICT_LANG}.hash
.include "../../mk/bsd.pkg.mk"
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->gutteridge
Responsible-Changed-By: gutteridge@NetBSD.org
Responsible-Changed-When: Fri, 26 Mar 2021 04:03:16 +0000
Responsible-Changed-Why:
I'll take this.
From: "David H. Gutteridge" <gutteridge@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/55972 CVS commit: pkgsrc/textproc/ispell-en_GB
Date: Fri, 26 Mar 2021 04:11:08 +0000
Module Name: pkgsrc
Committed By: gutteridge
Date: Fri Mar 26 04:11:08 UTC 2021
Modified Files:
pkgsrc/textproc/ispell-en_GB: Makefile PLIST
Log Message:
ispell-en_GB: generate usable dictionary files
Addresses PR pkg/55972, report and patch provided by Greg A. Woods,
additional adjustments by me. (Several people have noted that there
really should be a Makefile.common used here, but I'm not going to
touch more than this leaf package right now, since we're in a freeze.)
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 pkgsrc/textproc/ispell-en_GB/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/textproc/ispell-en_GB/PLIST
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: gutteridge@NetBSD.org
State-Changed-When: Thu, 01 Apr 2021 00:46:47 +0000
State-Changed-Why:
Fix applied, and is in 2021Q1. Thanks for the PR!
From: "David H. Gutteridge" <gutteridge@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/55972 CVS commit: pkgsrc/textproc
Date: Thu, 10 Jun 2021 23:43:26 +0000
Module Name: pkgsrc
Committed By: gutteridge
Date: Thu Jun 10 23:43:26 UTC 2021
Modified Files:
pkgsrc/textproc/ispell: Makefile
pkgsrc/textproc/ispell-en_GB: Makefile
Added Files:
pkgsrc/textproc/ispell: Makefile.common
Log Message:
ispell & ispell-en_GB: use Makefile.common
Centralize some basics so ispell-en_GB doesn't need to be manually
adjusted every time ispell gets an update. Addresses a lingering issue
from PR pkg/55972 noted by Greg A. Woods.
To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 pkgsrc/textproc/ispell/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/textproc/ispell/Makefile.common
cvs rdiff -u -r1.11 -r1.12 pkgsrc/textproc/ispell-en_GB/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.