Add Finnish language support.

PR:		ports/34793
Submitted by:	Esa Karkkainen <ejk@iki.fi>
This commit is contained in:
Jean-Marc Zucconi 2002-02-11 14:13:18 +00:00
parent 49df86fb19
commit 54a14a2a75
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=54555
4 changed files with 36 additions and 3 deletions

View file

@ -7,7 +7,7 @@
PORTNAME?= ispell
PORTVERSION?= 3.2.05
PORTREVISION?= 1
PORTREVISION?= 2
CATEGORIES+= textproc
MASTER_SITES= http://fmg-www.cs.ucla.edu/geoff/tars/
DISTNAME= ispell-3.2.05 # needed for slave ports / options
@ -31,7 +31,7 @@ UNSQ?= ${WRKDIR}/${DENEUDISTFILE:S=.tar.bz2$==}/bin/unsq.pl
MUNCHLIST= ${WRKSRC}/munchlist
DATADIR= ${PREFIX}/share/ispell
.if (!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))
.if (!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))
pre-everything::
@${ECHO_MSG} '*********************************************************'
@${ECHO_MSG} '* You can add further dictionaries: *'
@ -41,6 +41,8 @@ pre-everything::
@${ECHO_MSG} '* (replaces the American dictionary) *'
@${ECHO_MSG} '* - Dutch ISPELL_NL=yes *'
@${ECHO_MSG} '* - Danish ISPELL_DA=yes *'
@${ECHO_MSG} '* - Finnish ISPELL_FI=yes *'
@${ECHO_MSG} '* (or ISPELL_FI=[small|large] (medium is default) *'
@${ECHO_MSG} '* - French ISPELL_FR=yes *'
@${ECHO_MSG} '* - Brasilian ISPELL_BR=yes *'
@${ECHO_MSG} '* - German (old spelling) ISPELL_DEALT=yes *'
@ -116,6 +118,16 @@ MASTER_SITE_SUBDIR= asmodai
EXTRA_DICT+= ${AFDISTFILE}
EXTRACT_ONLY+= ${AFDISTFILE}
.endif
.if defined(ISPELL_FI)
MASTER_SITES+= http://ispell-fi.sourceforge.net/
FIDICTFILE= finnish.dict.bz2
.if ${ISPELL_FI:L} != yes
FIAFFIXFILE= finnish.${ISPELL_FI:L}.aff.bz2
.else
FIAFFIXFILE= finnish.medium.aff.bz2
.endif
EXTRA_DICT+= ${FIDICTFILE} ${FIAFFIXFILE}
.endif
DISTFILES+= ${EXTRA_DICT}
.endif
@ -132,6 +144,13 @@ post-extract:
.if defined(ISPELL_DENEU)
@${TAR} -C ${WRKDIR}/ -yxf ${DISTDIR}/${DENEUDISTFILE}
.endif
.if defined(ISPELL_FI)
${MKDIR} ${WRKDIR}/finnish
.for file in ${FIDICTFILE} ${FIAFFIXFILE}
${BZIP2_CMD} -dc ${DISTDIR}/${file} \
> ${WRKDIR}/finnish/${file:S/.bz2$//}
.endfor
.endif
post-patch:
.if defined(ISPELL_FR)
@ -159,7 +178,6 @@ post-patch:
@cd ${WRKDIR} && ${PATCH} < ${FILESDIR}/AF.patch 2>/dev/null
.endif
post-configure:
@${ECHO_CMD} "#define CFLAGS \"${CFLAGS}\"" >> ${WRKSRC}/local.h
.if defined(MASKBITS)
@ -212,6 +230,11 @@ post-build:
@cd ${WRKDIR}/${AFDISTFILE:S=.tar.gz==} && \
${MAKE} ${MAKEFLAGS} BUILDHASH=${BUILDHASH} all
.endif
.if defined(ISPELL_FI)
@cd ${WRKDIR}/finnish && \
${BUILDHASH} ${FIDICTFILE:S/.bz2//} ${FIAFFIXFILE:S/.bz2//} \
finnish.hash && ${MV} ${FIAFFIXFILE:S/.bz2//} finnish.aff
.endif
pre-install:
@if [ ! -d ${DATADIR} ]; then ${MKDIR} ${DATADIR}; fi
@ -256,6 +279,9 @@ post-install:
@${CAT} ${MASTERDIR}/pkg-plist.british >> ${TMPPLIST}
.else
@${CAT} ${MASTERDIR}/pkg-plist.am >> ${TMPPLIST}
.endif
.if defined(ISPELL_FI)
@${CAT} ${MASTERDIR}/pkg-plist.fi >> ${TMPPLIST}
.endif
@${ECHO_CMD} "@dirrm share/ispell" >> ${TMPPLIST}

View file

@ -8,3 +8,7 @@ MD5 (ispell-nl-1.0.0.tar.gz) = d9f8c68f28053e71792053e34201a28b
MD5 (ispell-da-1.4.22.tar.gz) = fd4580d33dc61b3dc667495db1d6f098
MD5 (ispell-sa-1.0.0.tar.gz) = b70889894d1427e5b78c0a6ecc4f8235
MD5 (igerman98-20001109.tar.bz2) = ec06d69a4b045b738788fd3359de37ee
MD5 (finnish.dict.bz2) = 977a5eebe21881dca6be6cf38a244457
MD5 (finnish.small.aff.bz2) = 19fec07598e23ad747bc999ea53b9538
MD5 (finnish.medium.aff.bz2) = d53611daaed94c8b17869a60e4ae61d9
MD5 (finnish.large.aff.bz2) = 9c7bfc8850e958a5d2aec579f5d8903c

View file

@ -8,6 +8,7 @@ Included in this port are:
- British English
- Danish
- Dutch
- Finnish
- French
- Brasilian
- German (old and new spelling)

View file

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