Fix hunspell backend. Idea from Matthias Drochner, patch from Adam Hoka. Fix path to hunspell directories. Make hunspell the default backend. Bump PKGREVISION.diff -r1.24 -r1.25 pkgsrc/textproc/enchant/Makefile
(wiz)
@@ -1,29 +1,31 @@ | @@ -1,29 +1,31 @@ | |||
1 | # $NetBSD: Makefile,v 1.24 2008/04/17 14:29:58 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.25 2008/04/17 21:07:18 wiz Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | DISTNAME= enchant-1.4.0 | 4 | DISTNAME= enchant-1.4.0 | |
5 | PKGREVISION= 1 | 5 | PKGREVISION= 2 | |
6 | CATEGORIES= textproc | 6 | CATEGORIES= textproc | |
7 | MASTER_SITES= http://www.abisource.com/downloads/enchant/1.4.0/ | 7 | MASTER_SITES= http://www.abisource.com/downloads/enchant/1.4.0/ | |
8 | 8 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= http://www.abisource.com/projects/enchant/ | 10 | HOMEPAGE= http://www.abisource.com/projects/enchant/ | |
11 | COMMENT= Generic spell checking library | 11 | COMMENT= Generic spell checking library | |
12 | 12 | |||
13 | PKG_DESTDIR_SUPPORT= user-destdir | 13 | PKG_DESTDIR_SUPPORT= user-destdir | |
14 | 14 | |||
15 | USE_TOOLS+= pkg-config autoconf | 15 | USE_TOOLS+= pkg-config autoconf | |
16 | USE_LANGUAGES= c c++ | 16 | USE_LANGUAGES= c c++ | |
17 | USE_PKGLOCALEDIR= yes | 17 | USE_PKGLOCALEDIR= yes | |
18 | USE_LIBTOOL= yes | 18 | USE_LIBTOOL= yes | |
19 | PKGCONFIG_OVERRIDE+= enchant.pc.in | 19 | PKGCONFIG_OVERRIDE+= enchant.pc.in | |
20 | GNU_CONFIGURE= yes | 20 | GNU_CONFIGURE= yes | |
21 | CFLAGS.SunOS+= -D__EXTENSIONS__ | 21 | CFLAGS.SunOS+= -D__EXTENSIONS__ | |
22 | 22 | |||
23 | CONFIGURE_ARGS+= --with-myspell-dir=${BUILDLINK_PREFIX.hunspell}/share/hunspell | |||
24 | ||||
23 | pre-configure: | 25 | pre-configure: | |
24 | cd ${WRKSRC} && autoconf | 26 | cd ${WRKSRC} && autoconf | |
25 | 27 | |||
26 | .include "options.mk" | 28 | .include "options.mk" | |
27 | 29 | |||
28 | .include "../../devel/glib2/buildlink3.mk" | 30 | .include "../../devel/glib2/buildlink3.mk" | |
29 | .include "../../mk/bsd.pkg.mk" | 31 | .include "../../mk/bsd.pkg.mk" |
@@ -1,6 +1,7 @@ | @@ -1,6 +1,7 @@ | |||
1 | $NetBSD: distinfo,v 1.10 2008/04/17 14:29:58 wiz Exp $ | 1 | $NetBSD: distinfo,v 1.11 2008/04/17 21:07:18 wiz Exp $ | |
2 | 2 | |||
3 | SHA1 (enchant-1.4.0.tar.gz) = 1a3c140c96769d3268a7f1faf7d9400016985537 | 3 | SHA1 (enchant-1.4.0.tar.gz) = 1a3c140c96769d3268a7f1faf7d9400016985537 | |
4 | RMD160 (enchant-1.4.0.tar.gz) = 84a253e665f71ba5b3277ad95a403ea386d42ba4 | 4 | RMD160 (enchant-1.4.0.tar.gz) = 84a253e665f71ba5b3277ad95a403ea386d42ba4 | |
5 | Size (enchant-1.4.0.tar.gz) = 601930 bytes | 5 | Size (enchant-1.4.0.tar.gz) = 601930 bytes | |
6 | SHA1 (patch-aa) = 56ca983fdd6de171aba956b46c673299dcb7549e | 6 | SHA1 (patch-aa) = 56ca983fdd6de171aba956b46c673299dcb7549e | |
7 | SHA1 (patch-ab) = fd2319dd225493d643facb8fbe7f88dee810b1db |
@@ -1,22 +1,22 @@ | @@ -1,22 +1,22 @@ | |||
1 | # $NetBSD: options.mk,v 1.2 2008/04/17 14:29:58 wiz Exp $ | 1 | # $NetBSD: options.mk,v 1.3 2008/04/17 21:07:18 wiz Exp $ | |
2 | 2 | |||
3 | PKG_OPTIONS_VAR= PKG_OPTIONS.enchant | 3 | PKG_OPTIONS_VAR= PKG_OPTIONS.enchant | |
4 | PKG_SUPPORTED_OPTIONS= aspell enchant-zemberek hunspell ispell | 4 | PKG_SUPPORTED_OPTIONS= aspell enchant-zemberek hunspell ispell | |
5 | # Package also supports the following: | 5 | # Package also supports the following: | |
6 | # hspell - Hebrew spelling | 6 | # hspell - Hebrew spelling | |
7 | # uspell - Yiddish spelling | 7 | # uspell - Yiddish spelling | |
8 | # voikko - Finnish spelling | 8 | # voikko - Finnish spelling | |
9 | PKG_SUGGESTED_OPTIONS= aspell ispell | 9 | PKG_SUGGESTED_OPTIONS= hunspell ispell | |
10 | 10 | |||
11 | .include "../../mk/bsd.options.mk" | 11 | .include "../../mk/bsd.options.mk" | |
12 | 12 | |||
13 | PLIST_VARS+= aspell | 13 | PLIST_VARS+= aspell | |
14 | .if !empty(PKG_OPTIONS:Maspell) | 14 | .if !empty(PKG_OPTIONS:Maspell) | |
15 | CONFIGURE_ARGS+= --enable-aspell | 15 | CONFIGURE_ARGS+= --enable-aspell | |
16 | .include "../../textproc/aspell/buildlink3.mk" | 16 | .include "../../textproc/aspell/buildlink3.mk" | |
17 | PLIST.aspell= yes | 17 | PLIST.aspell= yes | |
18 | .else | 18 | .else | |
19 | CONFIGURE_ARGS+= --disable-aspell | 19 | CONFIGURE_ARGS+= --disable-aspell | |
20 | .endif | 20 | .endif | |
21 | 21 | |||
22 | .if !empty(PKG_OPTIONS:Menchant-zemberek) | 22 | .if !empty(PKG_OPTIONS:Menchant-zemberek) |
$NetBSD: patch-ab,v 1.3 2008/04/17 21:07:18 wiz Exp $
--- src/myspell/myspell_checker.cpp.orig 2008-03-21 02:45:24.000000000 +0100
+++ src/myspell/myspell_checker.cpp
@@ -39,7 +39,7 @@
#include "enchant-provider.h"
/* built against hunspell 1.1.5 on 2007-03-19 */
-#include "hunspell.hxx"
+#include <hunspell/hunspell.hxx>
ENCHANT_PLUGIN_DECLARE("Myspell")
@@ -353,7 +353,7 @@ MySpellChecker::requestDictionary(const
strcpy(aff+len_dic-3, "aff");
if (g_file_test(aff, G_FILE_TEST_EXISTS))
{
- myspell = new Hunspell(aff, dic);
+ myspell = new Hunspell(aff, dic, NULL);
}
g_free(dic);
g_free(aff);