1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-24 04:33:24 +00:00

Add support for swedish, brasilian and german (old and new spelling)

dictionaries (in addition to french). They can be built with
``make ISPELL_XX=yes'' where ``XX'' is SE, BR, DEALT or DENEU, or FR

PR:		ports/15948
Submitted by:	Alexander Langer <alex@cichlids.com>
Reviewed by:	jmz
This commit is contained in:
Jean-Marc Zucconi 2000-01-22 22:16:40 +00:00
parent 2bf082f797
commit 6f5de1d923
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=24951
14 changed files with 152 additions and 54 deletions

View File

@ -12,10 +12,12 @@ PKGNAME= ispell-3.1.20c
CATEGORIES= textproc elisp
MASTER_SITES= ftp://ftp.cs.ucla.edu/pub/ispell-3.1/ \
ftp://ftp.kiarchive.ru/pub/unix/text/ispell/
DISTFILES= ispell-3.1.20.tar.gz
PATCH_SITES= ftp://ftp.kiarchive.ru/pub/unix/text/ispell/
ISPELL_FILES= ispell-3.1.20.tar.gz
HTML_PATCH= ispell-html-mode.patch
PATCH_SITES= ftp://ftp.kiarchive.ru/pub/unix/text/ispell/
PATCHFILES= ispell-html-mode.patch
DISTFILES= ${ISPELL_FILES}
PATCHFILES= ${HTML_PATCH}
MAINTAINER= jmz@FreeBSD.org
@ -24,45 +26,121 @@ MAN1= ispell.1 sq.1
MAN4= ispell.4 english.4
MLINKS= ispell.1 buildhash.1 ispell.1 findaffix.1 ispell.1 munchlist.1\
ispell.1 tryaffix.1 sq.1 unsq.1
EXTRACT_ONLY= ${ISPELL_FILES}
EXTRA_DICT=
.if !defined(ISPELL_FR)
.if (!defined(ISPELL_FR) && !defined (ISPELL_SE) && !defined(ISPELL_BR) && !defined(ISPELL_DENEU) && !defined(ISPELL_DEALT) && !defined(ISPELL_LANG))
.if (make(patch) || make(configure) || make(build) || make (install))
.BEGIN:
@${ECHO_MSG} '*********************************************************'
@${ECHO_MSG} '* Note that you can build a french or british version *'
@${ECHO_MSG} '* by typing "make french" or "make british" *'
@${ECHO_MSG} '* Note that you can add build a british version by *'
@${ECHO_MSG} '* typing "make british" (port must be clean, type *'
@${ECHO_MSG} '* "make clean" to clean it). *'
@${ECHO_MSG} '* Additionally, you can add further dictionaries: *'
@${ECHO_MSG} '* Use make-flag: *'
@${ECHO_MSG} '* - French ISPELL_FR=yes *'
@${ECHO_MSG} '* - Brasilian ISPELL_BR=yes *'
@${ECHO_MSG} '* - German (old spelling) ISPELL_DEALT=yes *'
@${ECHO_MSG} '* - German (new spelling) ISPELL_DENEU=yes *'
@${ECHO_MSG} '* - Swedish ISPELL_SE=yes *'
@${ECHO_MSG} '* Example: "make ISPELL_FR=yes ISPELL_SE=yes british" *'
@${ECHO_MSG} '*********************************************************'
.endif
.else
EXTRA_DICT= francais-IREQ-1.4.tar.gz
.if defined(ISPELL_FR)
FRDISTFILE= francais-IREQ-1.4.tar.gz
EXTRA_DICT+= ${FRDISTFILE}
MASTER_SITES+= ftp://ftp.robot.ireq.ca/pub/ispell/
.endif
.if defined(ISPELL_SE)
SEDISTFILE= iswedish-1.2.1.tar.gz
MASTER_SITES+= http://www.sslug.dk/locale/ispell/iswedish/
EXTRA_DICT+= ${SEDISTFILE}
EXTRACT_ONLY+= ${SEDISTFILE}
.endif
.if defined(ISPELL_BR)
BRDISTFILE= br.ispell-2.3.tar.gz
EXTRA_DICT+= ${BRDISTFILE}
EXTRACT_ONLY+= ${BRDISTFILE}
MASTER_SITES+= ftp://ftp.ime.usp.br/pub/ueda/br.ispell/
.endif
.if defined(ISPELL_DENEU)
DENEUDISTFILE= igerman98-19991219.tar.gz
EXTRA_DICT+= ${DENEUDISTFILE}
EXTRACT_ONLY+= ${DENEUDISTFILE}
MASTER_SITES+= http://members.xoom.com/maccy/ispell/dict/ \
ftp://student.physik.uni-dortmund.de/pub/users/jacke/ispell/
FETCH_BEFORE_ARGS+= -b # HTTP Workaround at Xoom
.endif
.if defined(ISPELL_DEALT)
DEALTDISTFILE= hk-deutsch.tar.gz
EXTRA_DICT+= ${DEALTDISTFILE}
MASTER_SITES+= ftp://ftp.informatik.uni-kiel.de/pub/kiel/dicts/
.endif
DISTFILES+= ${EXTRA_DICT}
.endif
ALL_TARGET= WRKDIR=${WRKDIR} SEDISTFILE=${SEDISTFILE} BRDISTFILE=${BRDISTFILE} all
pre-extract:
.if !defined(LANG)
@${ECHO_MSG} '******************************************************'
@${ECHO_MSG} '* Note that you can build a british version by *'
@${ECHO_MSG} '* typing "make british" following a "make clean" *'
@${ECHO_MSG} '******************************************************'
british:
@${ECHO_MSG} "Okay, making a british version of ispell...."
@${MAKE} ${.MAKEFLAGS} ISPELL_LANG=british all
@${TOUCH} ${WRKDIR}/.british-build
post-extract:
.if defined(ISPELL_FR)
@${MKDIR} -p ${WRKDIR}/francais-IREQ
@${TAR} -C ${WRKDIR}/francais-IREQ -zxf ${PORTSDIR}/distfiles/${FRDISTFILE}
.endif
.if defined(ISPELL_DEALT)
-@${MKDIR} ${WRKDIR}/hk-deutsch
@${TAR} -C ${WRKDIR}/hk-deutsch/ -zxf ${PORTSDIR}/distfiles/${DEALTDISTFILE}
.endif
@${TOUCH} ${WRKSRC}/dummy
@${CP} ${FILESDIR}/Makefile ${WRKDIR}/Makefile
pre-configure:
.if defined(EXTRA_DICT)
@${ECHO} ${EXTRA_DICT} > ${WRKDIR}/extra_dict
.else
@${ECHO} -n
post-patch:
.if defined(ISPELL_FR)
@cd ${WRKDIR} && ${PATCH} < ${FILESDIR}/FR.patch 2>/dev/null
.endif
.if defined(ISPELL_BR)
@cd ${WRKDIR} && ${PATCH} < ${FILESDIR}/BR.patch 2>/dev/null
@cd ${WRKDIR} && ${PATCH} < ${FILESDIR}/BR2.patch 2>/dev/null
.endif
.if defined(ISPELL_DENEU)
@cd ${WRKDIR} && ${PATCH} < ${FILESDIR}/DENEU.patch 2>/dev/null
.endif
.if defined(ISPELL_SE)
@cd ${WRKDIR} && ${PATCH} < ${FILESDIR}/SE.patch 2>/dev/null
.endif
post-configure:
@${ECHO} "#define CFLAGS \"${CFLAGS}\"" >> ${WRKSRC}/local.h
british:
@${ECHO_MSG} "Okay, making a british version of ispell...."
@${MAKE} ${.MAKEFLAGS} LANG=british all
do-build:
@(cd ${WRKDIR}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} WRKSRC=${WRKSRC} ${ALL_TARGET})
french:
@${ECHO_MSG} "Okay, making a french/english version of ispell...."
@${MAKE} ${.MAKEFLAGS} ISPELL_FR=yes
do-install:
@(cd ${WRKDIR}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} WRKSRC=${WRKSRC} ${INSTALL_TARGET})
post-install:
@[ -e ${WRKDIR}/.british-build ] && \
cat ${.CURDIR}/pkg/PLIST.BRITISH >> ${TMPPLIST} || \
cat ${.CURDIR}/pkg/PLIST.AM >> ${TMPPLIST}
.if defined(ISPELL_FR)
@cat ${.CURDIR}/pkg/PLIST.FR >> ${TMPPLIST}
.endif
.if defined(ISPELL_DEALT)
@cat ${.CURDIR}/pkg/PLIST.DEALT >> ${TMPPLIST}
.endif
.if defined(ISPELL_DENEU)
@cat ${.CURDIR}/pkg/PLIST.DENEU >> ${TMPPLIST}
.endif
.if defined(ISPELL_BR)
@cat ${.CURDIR}/pkg/PLIST.BR >> ${TMPPLIST}
.endif
.if defined(ISPELL_SE)
@cat ${.CURDIR}/pkg/PLIST.SE >> ${TMPPLIST}
.endif
@echo "@dirrm share/ispell" >> ${TMPPLIST}
.include <bsd.port.mk>

View File

@ -1,5 +1,7 @@
MD5 (ispell-3.1.20.tar.gz) = 92986f940548fe4116428d21b16fd356
MD5 (ispell.el-3.2.gz) = 39236db8caa43f84ae4629ba14eda768
MD5 (francais-IREQ-1.4.tar.gz) = 3871371b0f8e57b554f8895ce3a43b5a
MD5 (iswedish-1.2.1.tar.gz) = b546aeb88d7614c32e541488d55f32fe
MD5 (br.ispell-2.3.tar.gz) = 76e1614c462e37a35b6df770a9080976
MD5 (igerman98-19991219.tar.gz) = 418f50fc8fd51044b43a843ab03842b6
MD5 (hk-deutsch.tar.gz) = 0fb468159f7f0ba5b8a02c1fe111ac2d
MD5 (ispell-html-mode.patch) = 1b44441a3748e55b3d509fcff21af4b7
MD5 (texpatch-3.1.20c.gz) = 49449d5f5b9a366078da2d13124d8fa1

View File

@ -1,5 +1,5 @@
--- Makefile.orig Thu Oct 12 20:04:06 1995
+++ Makefile Wed Jun 4 05:05:47 1997
+++ Makefile Sat Jan 22 22:44:42 2000
@@ -253,7 +253,7 @@
set -ex; \
rm -f $$ELISPDIR/ispell.el; \
@ -9,6 +9,27 @@
echo '(byte-compile-file "'"$$ELISPDIR/ispell.el"'")' \
> /tmp/emi$$$$; \
$$EMACS -batch -l /tmp/emi$$$$; \
@@ -310,9 +310,9 @@
$(MAKE) LANGUAGE_TARGET=install SHELLDEBUG=$(SHELLDEBUG) \
language-subdirs
. ./config.sh; \
- [ -d $$LIBDIR ] || (mkdir $$LIBDIR; chmod 755 $$LIBDIR); \
+ [ -d $$SHAREDIR ] || (mkdir $$SHAREDIR; chmod 755 $$SHAREDIR); \
set -x; \
- cd $$LIBDIR; \
+ cd $$SHAREDIR; \
if [ $$MASTERHASH != $DEFHASH ]; then \
rm -f $$DEFHASH; \
ln $$MASTERHASH $$DEFHASH; \
@@ -412,7 +412,7 @@
config.sh: config.X local.h
set $(SHELLDEBUG); \
for var in BINDIR CC CFLAGS COUNTSUFFIX DEFDICT DEFHASH DEFLANG \
- ELISPDIR EMACS HASHSUFFIX INSTALL \
+ ELISPDIR EMACS HASHSUFFIX INSTALL SHAREDIR \
LANGUAGES LIBDIR LIBES LINT LINTFLAGS \
MAKE_SORTTMP MAN1DIR MAN1EXT MAN4DIR MAN4EXT MASTERHASH \
MSGLANG REGLIB STATSUFFIX \
@@ -508,7 +508,7 @@
local.h:
set +e; [ -r local.h ] || cp local.h.samp local.h

View File

@ -1 +1 @@
An interactive spelling checker
An interactive spelling checker for multiple languages

View File

@ -3,7 +3,10 @@ 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.
WWW: http://fmg-www.cs.ucla.edu/geoff/ispell.html
Included in this port are:
- French
- Brasilian
- German (old and new spelling)
- Swedish
WWW: http://fmg-www.cs.ucla.edu/geoff/ispell.html

View File

@ -7,7 +7,5 @@ bin/munchlist
bin/sq
bin/tryaffix
bin/unsq
lib/american.hash
lib/americanmed+.hash
lib/english.aff
lib/english.hash
share/ispell/english.aff
share/ispell/english.hash

View File

@ -0,0 +1,2 @@
share/ispell/american.hash
share/ispell/americanmed+.hash

View File

@ -0,0 +1,2 @@
share/ispell/br.aff
share/ispell/br.hash

View File

@ -0,0 +1,2 @@
share/ispell/british.hash
share/ispell/britishxlg.hash

View File

@ -0,0 +1,2 @@
share/ispell/deutsch.aff
share/ispell/deutsch.hash

View File

@ -0,0 +1,2 @@
share/ispell/ndeutsch.aff
share/ispell/ndeutsch.hash

View File

@ -0,0 +1,2 @@
share/ispell/francais.aff
share/ispell/francais.hash

View File

@ -0,0 +1,2 @@
share/ispell/svenska.aff
share/ispell/svenska.hash

View File

@ -10,28 +10,9 @@ if [ ! -f /usr/share/dict/words ]; then
fi
cd $WRKSRC || exit 1;
if [ -f $WRKDIR/extra_dict ]; then
extra_dict=`cat $WRKDIR/extra_dict`;
case $extra_dict in
francais-IREQ*)
mkdir -p $WRKSRC/languages/francais-IREQ
LOCAL=' {francais-IREQ}'
for i in $WRKDIR/[A-Za-z]*; do
if [ -f $i ]; then cp $i $WRKSRC/languages/francais-IREQ/; fi
done
(echo RM=rm -f; echo LIBDIR=$PREFIX/lib; echo HASH=../../buildhash) \
>> $WRKSRC/languages/francais-IREQ/Makefile
;;
*)
echo "I don't now how to configure ispell with $extra_dict"
exit 1;
;;
esac
fi
sed -e s:/usr/local:$PREFIX: <local.h.samp >local.h || exit 1;
echo "#undef NO8BIT" >> local.h
case $LANG in
case $ISPELL_LANG in
british)
echo "#define LANGUAGES \"{british,MASTERDICTS=british.xlg,HASHFILES=britishxlg.hash,EXTRADICT=}$LOCAL\"" >>local.h ||exit 1;
echo '#define MASTERHASH "britishxlg.hash"' >> local.h
@ -45,6 +26,7 @@ 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 "#define SHAREDIR \"$PREFIX/share/ispell\"" >> local.h
mv Makefile Makefile.orig
sed -e 's/^[ ]*$/\