pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/55972: fixes to build ispell-british (aka textproc/ispell-en_GB) properly



>Number:         55972
>Category:       pkg
>Synopsis:       fixes to build ispell-british (aka textproc/ispell-en_GB) properly
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 03 22:05:00 +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"



Home | Main Index | Thread Index | Old Index