aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authorjmz <jmz@FreeBSD.org>2008-07-21 23:09:37 +0800
committerjmz <jmz@FreeBSD.org>2008-07-21 23:09:37 +0800
commit3c598b9b763d21dfd8c8ad626195c8b305aa70aa (patch)
tree2e724beb5fb585444073b6fc407e524be211cf0f /textproc
parent5ef440ca493c0b7c3f3f8cdacc20ab8a93fa9bd6 (diff)
downloadfreebsd-ports-gnome-3c598b9b763d21dfd8c8ad626195c8b305aa70aa.tar.gz
freebsd-ports-gnome-3c598b9b763d21dfd8c8ad626195c8b305aa70aa.tar.zst
freebsd-ports-gnome-3c598b9b763d21dfd8c8ad626195c8b305aa70aa.zip
Add support for Spanish dictionary.
PR: ports/125267 Submitted by: "Pedro F. Giffuni" <pfgshield-freebsd@yahoo.com>
Diffstat (limited to 'textproc')
-rw-r--r--textproc/ispell/Makefile25
-rw-r--r--textproc/ispell/files/ES.patch20
-rw-r--r--textproc/ispell/pkg-descr3
-rw-r--r--textproc/ispell/pkg-plist.es2
4 files changed, 47 insertions, 3 deletions
diff --git a/textproc/ispell/Makefile b/textproc/ispell/Makefile
index 9f9b907493d9..b455b258863d 100644
--- a/textproc/ispell/Makefile
+++ b/textproc/ispell/Makefile
@@ -7,6 +7,7 @@
PORTNAME?= ispell
PORTVERSION?= 3.3.02
+PORTREVISION= 1
CATEGORIES+= textproc
MASTER_SITES= http://fmg-www.cs.ucla.edu/geoff/tars/ \
http://distfiles.opendarwin.org/
@@ -25,7 +26,7 @@ MLINKS= ispell.1 buildhash.1 \
ispell.1 tryaffix.1 \
ispell.1 spell.1
-ISPELL_FILES= ${PORTNAME}-${PORTVERSION}.tar.gz
+ISPELL_FILES= ${DISTNAME}.tar.gz
EXTRA_DICT=
MAKE_FLAGS= TMPDIR=${WRKDIR} -f
@@ -37,7 +38,7 @@ MUNCHLIST= ${WRKSRC}/munchlist
DATADIR= ${PREFIX}/share/ispell
ISPELL= ${WRKSRC}/ispell
-.if (!defined(ISPELL_IT) && !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) && !defined(ISPELL_PL) && !defined(ISPELL_BG) && !defined(ISPELL_SK) && !defined(ISPELL_CS))
+.if (!defined(ISPELL_ES) && !defined(ISPELL_IT) && !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) && !defined(ISPELL_PL) && !defined(ISPELL_BG) && !defined(ISPELL_SK) && !defined(ISPELL_CS))
pre-everything::
@${ECHO_MSG} '*********************************************************'
@${ECHO_MSG} '* You can add further dictionaries: *'
@@ -59,6 +60,7 @@ pre-everything::
@${ECHO_MSG} '* - Italian ISPELL_IT=yes *'
@${ECHO_MSG} '* - Polish ISPELL_PL=yes *'
@${ECHO_MSG} '* - Slovak ISPELL_SK=yes *'
+ @${ECHO_MSG} '* - Spanish ISPELL_ES=yes *'
@${ECHO_MSG} '* - Swedish ISPELL_SE=yes *'
@${ECHO_MSG} '* - Norwegian ISPELL_NO=yes *'
@${ECHO_MSG} '* Example: "make ISPELL_FR=yes ISPELL_SE=yes install" *'
@@ -70,6 +72,11 @@ SCRIPTS_ENV+= ISPELL_BRITISH=${ISPELL_BRITISH}
SCRIPTS_ENV+= ISPELL_INCLAMERICAN=${ISPELL_INCLAMERICAN}
.endif
.endif
+.if defined(ISPELL_ES)
+ESDISTFILE= espa~nol-1.10.tar.gz
+MASTER_SITES+= http://www.datsi.fi.upm.es/~coes/:es
+EXTRA_DICT+= ${ESDISTFILE}:es
+.endif
.if defined(ISPELL_IT)
ITDISTFILE= ispell-it2001.tgz
MASTER_SITES+= http://members.xoom.alice.it/trasforma/ispell/:it
@@ -178,6 +185,9 @@ EXTRACT_ONLY+= ${CSDISTFILE}
DISTFILES+= ${EXTRA_DICT}
post-extract:
+.if defined(ISPELL_ES)
+ @${TAR} -C ${WRKDIR} -zxf ${DISTDIR}/${ESDISTFILE}
+.endif
.if defined(ISPELL_IT)
@${TAR} -C ${WRKDIR} -zxf ${DISTDIR}/${ITDISTFILE}
.endif
@@ -201,6 +211,11 @@ post-extract:
.endif
post-patch:
+.if defined(ISPELL_ES)
+ @cd ${WRKDIR} && ${PATCH} < ${FILESDIR}/ES.patch 2>/dev/null
+ @${REINPLACE_CMD} -e "s|%%BH%%|${BUILDHASH}|g;s|%%MH%%|${MUNCHLIST}|g" \
+ ${WRKDIR}/espa~nol-1.10/Makefile
+.endif
.if defined(ISPELL_IT)
@cd ${WRKDIR} && ${PATCH} < ${FILESDIR}/IT.patch 2>/dev/null
@${REINPLACE_CMD} -e "s|%%BH%%|${BUILDHASH}|g;s|%%MH%%|${MUNCHLIST}|g" \
@@ -245,6 +260,9 @@ post-configure:
.endif
post-build:
+.if defined(ISPELL_ES)
+ @cd ${WRKDIR}/espa~nol-1.10 && ${MAKE}
+.endif
.if defined(ISPELL_IT)
@cd ${WRKDIR}/ispell-it && ${MAKE} all
.endif
@@ -333,6 +351,9 @@ post-install:
${DATADIR}/english.dict
.endif
@-${INSTALL_DATA} ${WRKDIR}/*/*.aff ${WRKDIR}/*/*.hash ${DATADIR}
+.if defined(ISPELL_ES)
+ @${CAT} ${MASTERDIR}/pkg-plist.es >> ${TMPPLIST}
+.endif
.if defined(ISPELL_IT)
@${CAT} ${MASTERDIR}/pkg-plist.it >> ${TMPPLIST}
.endif
diff --git a/textproc/ispell/files/ES.patch b/textproc/ispell/files/ES.patch
new file mode 100644
index 000000000000..182971346db1
--- /dev/null
+++ b/textproc/ispell/files/ES.patch
@@ -0,0 +1,20 @@
+--- espa~nol-1.10/Makefile.orig 2008-07-05 16:49:20.000000000 -0500
++++ espa~nol-1.10/Makefile 2008-07-05 16:51:23.000000000 -0500
+@@ -54,7 +54,7 @@
+ MAKE = make
+
+ PATHADDER = ../..
+-BUILDHASH = buildhash
++BUILDHASH = %%BH%%
+ UNSQ = unsq
+ FIX8BIT = fix8bit
+
+@@ -79,7 +79,7 @@
+
+ $(HASHFILE): $(AFFIXES) $(DICTIONARY)
+ rm -f $(HASHFILE)
+- munchlist -v -l $(AFFIXES) $(DICTIONARY) > $(LANGUAGE).words+
++ %%MH%% -v -l $(AFFIXES) $(DICTIONARY) > $(LANGUAGE).words+
+ $(BUILDHASH) $(LANGUAGE).words+ $(AFFIXES) $(HASHFILE)
+
+ build:
diff --git a/textproc/ispell/pkg-descr b/textproc/ispell/pkg-descr
index 2a23c61d7845..42b909afe002 100644
--- a/textproc/ispell/pkg-descr
+++ b/textproc/ispell/pkg-descr
@@ -14,7 +14,8 @@ Included in this port are:
- Brasilian
- German (old and new spelling)
- Norwegian
- - Swedish
+ - Swedish
+ - Spanish
- Polish
- Slovak
diff --git a/textproc/ispell/pkg-plist.es b/textproc/ispell/pkg-plist.es
new file mode 100644
index 000000000000..c48eb57fefd8
--- /dev/null
+++ b/textproc/ispell/pkg-plist.es
@@ -0,0 +1,2 @@
+share/ispell/espa~nol.aff
+share/ispell/espa~nol.hash