1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-05 22:43:24 +00:00
freebsd-ports/textproc/ispell/scripts/configure
Jean-Marc Zucconi bbfb2cdea9 Build british dictionary with ISPELL_BRITISH=yes instead of `make british'.
Cleanups from PR ports/16450
Add norvegian dictionary (ports/16533)
Don't create a dummy file in ${WRKSRC}. It is only valid when emacs is a link
to xemacs.

PR:		ports/16450, ports/16533
Submitted by:	Alexander Langer <alex@big.endian.de>
Reviewed by:	jmz
2000-02-11 17:08:00 +00:00

35 lines
1.2 KiB
Bash

#!/bin/sh
if [ "`echo a|sed -e P`" = "aa" ]; then
echo You need a newer version of sed. Use sed from -current or gnu sed
exit 1
fi
if [ ! -f /usr/share/dict/words ]; then
echo "you need to install /usr/share/dict/words from the 'dict' distribution first"
exit 1
fi
cd $WRKSRC || exit 1;
sed -e s:/usr/local:$PREFIX: <local.h.samp >local.h || exit 1;
echo "#undef NO8BIT" >> local.h
if [ ! -z "$ISPELL_BRITISH" ] && \
[ "$ISPELL_BRITISH" = "YES" -o "$ISPELL_BRITISH" = "yes" ]; then
echo "#define LANGUAGES \"{british,MASTERDICTS=british.xlg,HASHFILES=britishxlg.hash,EXTRADICT=}$LOCAL\"" >>local.h ||exit 1;
echo '#define MASTERHASH "britishxlg.hash"' >> local.h
else
echo "#define LANGUAGES \"{american,MASTERDICTS=american.med+,HASHFILES=americanmed+.hash,EXTRADICT=/usr/share/dict/words}$LOCAL\"" >>local.h ||exit 1;
fi
echo "#undef WORDS" >> local.h
echo '#define WORDS "/usr/share/dict/words"' >> local.h
echo '#undef ELISPDIR' >> local.h
echo "#define ELISPDIR \"$PREFIX/share/emacs/site-lisp\"" >> local.h
echo "#undef LIBDIR" >> local.h
echo "#define LIBDIR \"$PREFIX/share/ispell\"" >> local.h
mv Makefile Makefile.orig
sed -e 's/^[ ]*$/\
/' -e 's/[ ]*ELISPDIR//' <Makefile.orig >Makefile
exit 0;