Skip site navigation (1)Skip section navigation (2)
Date:      Sun,  6 Feb 2000 23:06:08 +0100 (MET)
From:      Espen Skoglund <esk@ira.uka.de>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/16533: Norwegian ispell
Message-ID:  <14493.61379.169051.984786@i30nb2>

next in thread | raw e-mail | index | archive | help

>Number:         16533
>Category:       ports
>Synopsis:       Ispell with support for Norwegian
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb  6 14:10:02 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Espen Skoglund
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
University of Karlsruhe
>Environment:

	

>Description:

I've added support for Norwegain dictinaries in the ispell port.  The
Norwegain dictionary is enabled by compiling the package with 
``ISPELL_NO=yes''.  Note that the Norwegian dictionary requires that
ispell be compiled with MASKBITS=64, and that ispell needs to be slightly
patched.

The Norwegian ispell adds one new file (files/NO.patch) to the port.

>How-To-Repeat:

	

>Fix:


diff -ruN ispell.bak/Makefile ispell/Makefile
--- ispell.bak/Makefile	Sun Feb  6 20:15:27 2000
+++ ispell/Makefile	Sun Feb  6 21:19:13 2000
@@ -29,7 +29,7 @@
 EXTRACT_ONLY=	${ISPELL_FILES}
 EXTRA_DICT=	
 
-.if (!defined(ISPELL_FR) && !defined (ISPELL_SE) && !defined(ISPELL_BR) && !defined(ISPELL_DENEU) && !defined(ISPELL_DEALT) && !defined(ISPELL_LANG))
+.if (!defined(ISPELL_FR) && !defined (ISPELL_SE) && !defined (ISPELL_NO) && !defined(ISPELL_BR) && !defined(ISPELL_DENEU) && !defined(ISPELL_DEALT) && !defined(ISPELL_LANG))
 .if (make(patch) || make(configure) || make(build) || make (install))
 .BEGIN:
 	@${ECHO_MSG} '*********************************************************'
@@ -43,6 +43,7 @@
 	@${ECHO_MSG} '*  - German (old spelling)     ISPELL_DEALT=yes         *'
 	@${ECHO_MSG} '*  - German (new spelling)     ISPELL_DENEU=yes         *'
 	@${ECHO_MSG} '*  - Swedish                   ISPELL_SE=yes            *'
+	@${ECHO_MSG} '*  - Norwegian                 ISPELL_NO=yes            *'
 	@${ECHO_MSG} '* Example: "make ISPELL_FR=yes ISPELL_SE=yes british"   *'
 	@${ECHO_MSG} '*********************************************************'
 .endif
@@ -58,6 +59,12 @@
 EXTRA_DICT+=	${SEDISTFILE}
 EXTRACT_ONLY+=	${SEDISTFILE}
 .endif
+.if defined(ISPELL_NO)
+NODISTFILE=	ispell-norsk-1.1a.tar.gz
+MASTER_SITES+=	http://www.uio.no/~runekl/
+EXTRA_DICT+=	${NODISTFILE}
+MASKBITS?=	64
+.endif
 .if defined(ISPELL_BR)
 BRDISTFILE=	br.ispell-2.3.tar.gz
 EXTRA_DICT+=	${BRDISTFILE}
@@ -95,6 +102,10 @@
 	-@${MKDIR} ${WRKDIR}/hk-deutsch
 	@${TAR} -C ${WRKDIR}/hk-deutsch/ -zxf ${PORTSDIR}/distfiles/${DEALTDISTFILE}
 .endif
+.if defined(ISPELL_NO)
+	-@${MKDIR} ${WRKDIR}/inorsk
+	@${TAR} -C ${WRKDIR}/inorsk/ -zxf ${PORTSDIR}/distfiles/${NODISTFILE}
+.endif
 	@${TOUCH} ${WRKSRC}/dummy
 	@${CP} ${FILESDIR}/Makefile ${WRKDIR}/Makefile
 
@@ -112,9 +123,15 @@
 .if defined(ISPELL_SE)
 	@cd ${WRKDIR} && ${PATCH} < ${FILESDIR}/SE.patch 2>/dev/null
 .endif
+.if defined(ISPELL_NO)
+	@cd ${WRKSRC} && ${PATCH} < ${FILESDIR}/NO.patch 2>/dev/null
+.endif
 
 post-configure:
 	@${ECHO} "#define CFLAGS \"${CFLAGS}\"" >> ${WRKSRC}/local.h
+.if defined(MASKBITS)
+	@${ECHO} "#define MASKBITS ${MASKBITS}" >> ${WRKSRC}/local.h
+.endif
 
 do-build:
 	@(cd ${WRKDIR}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} WRKSRC=${WRKSRC} ${ALL_TARGET})
@@ -140,6 +157,9 @@
 .endif
 .if defined(ISPELL_SE)
 	@cat ${.CURDIR}/pkg/PLIST.SE >> ${TMPPLIST}
+.endif
+.if defined(ISPELL_NO)
+	@cat ${.CURDIR}/pkg/PLIST.NO >> ${TMPPLIST}
 .endif
 	@echo "@dirrm share/ispell" >> ${TMPPLIST}
 	
diff -ruN ispell.bak/files/Makefile ispell/files/Makefile
--- ispell.bak/files/Makefile	Sun Feb  6 20:15:27 2000
+++ ispell/files/Makefile	Sun Feb  6 21:19:12 2000
@@ -17,6 +17,9 @@
 .if defined(ISPELL_SE)
 	@make SE;
 .endif
+.if defined(ISPELL_NO)
+	@make NO;
+.endif
 .if defined(ISPELL_FR)
 	@make FR;
 .endif
@@ -38,6 +41,12 @@
 
 SE:
 	@cd ./`echo ${SEDISTFILE} | sed -e 's/\.tar.gz\$$//g'` && make BUILDHASH=${BUILDHASH}
+
+NO:
+	@cd inorsk && \
+		cp norsk.7bit norsk.aff && \
+		cat norsk.base > norsk.sml && \
+		${BUILDHASH} norsk.sml norsk.aff norsk.hash
 
 FR:
 	@cd ./francais-IREQ/ && make BUILDHASH=${BUILDHASH}
diff -ruN ispell.bak/files/NO.patch ispell/files/NO.patch
--- ispell.bak/files/NO.patch	Thu Jan  1 00:00:00 1970
+++ ispell/files/NO.patch	Sun Feb  6 21:19:12 2000
@@ -0,0 +1,36 @@
+*** parse.y.org	Sun Feb  6 19:41:49 2000
+--- parse.y	Sun Feb  6 19:42:58 2000
+***************
+*** 870,876 ****
+  				flagbit = toupper (flagbit);
+  #endif /* MASKBITS */
+  #if MASKBITS <= 64
+! 			    if (!isalpha (flagbit))
+  				yyerror (PARSE_Y_BAD_FLAG);
+  #endif /* MASKBITS */
+  			    flagbit = CHARTOBIT (flagbit);
+--- 870,876 ----
+  				flagbit = toupper (flagbit);
+  #endif /* MASKBITS */
+  #if MASKBITS <= 64
+! 			    if (flagbit < 'A' || flagbit > 'z')
+  				yyerror (PARSE_Y_BAD_FLAG);
+  #endif /* MASKBITS */
+  			    flagbit = CHARTOBIT (flagbit);
+***************
+*** 902,908 ****
+  				flagbit = toupper (flagbit);
+  #endif /* MASKBITS */
+  #if MASKBITS <= 64
+! 			    if (!isalpha (flagbit))
+  				yyerror (PARSE_Y_BAD_FLAG);
+  #endif /* MASKBITS */
+  			    flagbit = CHARTOBIT (flagbit);
+--- 902,908 ----
+  				flagbit = toupper (flagbit);
+  #endif /* MASKBITS */
+  #if MASKBITS <= 64
+! 			    if (flagbit < 'A' || flagbit > 'z')
+  				yyerror (PARSE_Y_BAD_FLAG);
+  #endif /* MASKBITS */
+  			    flagbit = CHARTOBIT (flagbit);
diff -ruN ispell.bak/files/md5 ispell/files/md5
--- ispell.bak/files/md5	Sun Feb  6 20:15:27 2000
+++ ispell/files/md5	Sun Feb  6 21:19:12 2000
@@ -1,6 +1,7 @@
 MD5 (ispell-3.1.20.tar.gz) = 92986f940548fe4116428d21b16fd356
 MD5 (francais-IREQ-1.4.tar.gz) = 3871371b0f8e57b554f8895ce3a43b5a
 MD5 (iswedish-1.2.1.tar.gz) = b546aeb88d7614c32e541488d55f32fe
+MD5 (ispell-norsk-1.1a.tar.gz) = d096dce5003b4e221e96fbf34f523c4c
 MD5 (br.ispell-2.3.tar.gz) = 76e1614c462e37a35b6df770a9080976
 MD5 (igerman98-19991219.tar.gz) = 418f50fc8fd51044b43a843ab03842b6
 MD5 (hk-deutsch.tar.gz) = 0fb468159f7f0ba5b8a02c1fe111ac2d
diff -ruN ispell.bak/pkg/DESCR ispell/pkg/DESCR
--- ispell.bak/pkg/DESCR	Sun Feb  6 20:15:27 2000
+++ ispell/pkg/DESCR	Sun Feb  6 21:19:12 2000
@@ -8,5 +8,6 @@
 	- Brasilian
 	- German (old and new spelling)
 	- Swedish 
+	- Norwegian
 
 WWW: http://fmg-www.cs.ucla.edu/geoff/ispell.html
diff -ruN ispell.bak/pkg/PLIST.NO ispell/pkg/PLIST.NO
--- ispell.bak/pkg/PLIST.NO	Thu Jan  1 00:00:00 1970
+++ ispell/pkg/PLIST.NO	Sun Feb  6 21:19:12 2000
@@ -0,0 +1,2 @@
+share/ispell/norsk.aff
+share/ispell/norsk.hash

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14493.61379.169051.984786>