1 |
anarchy 10/04/05 04:18:26 |
2 |
|
3 |
Added: 1001_fix-system-hunspell.patch |
4 |
Log: |
5 |
Fix hunspell support bug #278927 |
6 |
(Portage version: 2.1.8.3/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 net-libs/xulrunner/files/1001_fix-system-hunspell.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-libs/xulrunner/files/1001_fix-system-hunspell.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-libs/xulrunner/files/1001_fix-system-hunspell.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: 1001_fix-system-hunspell.patch |
15 |
=================================================================== |
16 |
--- ./extensions/spellcheck/hunspell/src/mozHunspell.cpp.orig 2008-02-15 19:21:21.000000000 +0000 |
17 |
+++ ./extensions/spellcheck/hunspell/src/mozHunspell.cpp 2008-02-15 19:23:20.000000000 +0000 |
18 |
@@ -63,6 +63,9 @@ |
19 |
#include "nsISimpleEnumerator.h" |
20 |
#include "nsIDirectoryEnumerator.h" |
21 |
#include "nsIFile.h" |
22 |
+#ifdef MOZ_NATIVE_HUNSPELL |
23 |
+#include "nsILocalFile.h" |
24 |
+#endif |
25 |
#include "nsDirectoryServiceUtils.h" |
26 |
#include "nsDirectoryServiceDefs.h" |
27 |
#include "mozISpellI18NManager.h" |
28 |
@@ -307,7 +310,16 @@ |
29 |
return; |
30 |
|
31 |
nsCOMPtr<nsIFile> dictDir; |
32 |
- rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY, |
33 |
+ #ifdef MOZ_NATIVE_HUNSPELL |
34 |
+ nsCOMPtr<nsILocalFile> localFile; |
35 |
+ rv = NS_NewNativeLocalFile(nsDependentCString("/usr/share/myspell"),PR_TRUE, getter_AddRefs(localFile)); |
36 |
+ if (localFile && NS_SUCCEEDED(rv)) { |
37 |
+ localFile->QueryInterface(NS_GET_IID(nsIFile), getter_AddRefs(dictDir)); |
38 |
+ LoadDictionariesFromDir(dictDir); |
39 |
+ } |
40 |
+ else { |
41 |
+ #endif |
42 |
+ rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY, |
43 |
NS_GET_IID(nsIFile), getter_AddRefs(dictDir)); |
44 |
if (NS_SUCCEEDED(rv)) { |
45 |
LoadDictionariesFromDir(dictDir); |
46 |
@@ -332,6 +344,9 @@ |
47 |
LoadDictionariesFromDir(appDir); |
48 |
} |
49 |
} |
50 |
+#ifdef MOZ_NATIVE_HUNSPELL |
51 |
+ } |
52 |
+#endif |
53 |
|
54 |
nsCOMPtr<nsISimpleEnumerator> dictDirs; |
55 |
rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY_LIST, |
56 |
--- ./extensions/spellcheck/src/Makefile.in.orig 2008-02-15 19:25:58.000000000 +0000 |
57 |
+++ ./extensions/spellcheck/src/Makefile.in 2008-02-15 19:28:36.000000000 +0000 |
58 |
@@ -63,9 +63,16 @@ |
59 |
txtsvc \ |
60 |
uconv \ |
61 |
unicharutil \ |
62 |
+ xulapp \ |
63 |
$(NULL) |
64 |
|
65 |
-CPPSRCS = \ |
66 |
+ifdef MOZ_NATIVE_HUNSPELL |
67 |
+CPPSRCS += mozHunspell.cpp |
68 |
+ifdef MOZ_XUL_APP |
69 |
+CPPSRCS += mozHunspellDirProvider.cpp |
70 |
+endif |
71 |
+endif |
72 |
+CPPSRCS += \ |
73 |
mozSpellCheckerFactory.cpp \ |
74 |
mozSpellChecker.cpp \ |
75 |
mozPersonalDictionary.cpp \ |
76 |
@@ -80,8 +87,14 @@ |
77 |
SHARED_LIBRARY_LIBS += ../osxspell/src/$(LIB_PREFIX)osxspell_s.$(LIB_SUFFIX) |
78 |
LOCAL_INCLUDES += -I$(srcdir)/../osxspell/src |
79 |
else |
80 |
+ifndef MOZ_NATIVE_HUNSPELL |
81 |
SHARED_LIBRARY_LIBS += ../hunspell/src/$(LIB_PREFIX)hunspell_s.$(LIB_SUFFIX) |
82 |
LOCAL_INCLUDES += -I$(srcdir)/../hunspell/src |
83 |
+else |
84 |
+LOCAL_INCLUDES += $(MOZ_HUNSPELL_CFLAGS) \ |
85 |
+ -DMOZ_NATIVE_HUNSPELL \ |
86 |
+ $(NULL) |
87 |
+endif |
88 |
endif |
89 |
|
90 |
EXTRA_DSO_LDOPTS = \ |
91 |
@@ -96,3 +112,18 @@ |
92 |
LOCAL_INCLUDES += \ |
93 |
-I$(topsrcdir)/xpcom/io \ |
94 |
$(NULL) |
95 |
+ |
96 |
+ifdef MOZ_NATIVE_HUNSPELL |
97 |
+export:: $(srcdir)/../hunspell/src/mozHunspell.cpp |
98 |
+ $(INSTALL) $(srcdir)/../hunspell/src/mozHunspell.* . |
99 |
+GARBAGE += mozHunspell.$(OBJ_SUFFIX) mozHunspell.cpp |
100 |
+clean:: |
101 |
+ rm -f mozHunspell.* |
102 |
+ifdef MOZ_XUL_APP |
103 |
+export:: $(srcdir)/../hunspell/src/mozHunspellDirProvider.cpp |
104 |
+ $(INSTALL) $(srcdir)/../hunspell/src/mozHunspellDirProvider.* . |
105 |
+GARBAGE += mozHunspellDirProvider.$(OBJ_SUFFIX) mozHunspellDirProvider.cpp |
106 |
+clean:: |
107 |
+ rm -f mozHunspellDirProvider.* |
108 |
+endif |
109 |
+endif |
110 |
--- ./extensions/spellcheck/Makefile.in.orig 2008-02-15 19:23:39.000000000 +0000 |
111 |
+++ ./extensions/spellcheck/Makefile.in 2008-02-15 19:24:34.000000000 +0000 |
112 |
@@ -42,13 +42,19 @@ |
113 |
include $(DEPTH)/config/autoconf.mk |
114 |
|
115 |
MODULE = spellchecker |
116 |
-DIRS = idl locales |
117 |
+ifndef MOZ_NATIVE_HUNSPELL |
118 |
+DIRS = idl locales |
119 |
+else |
120 |
+DIRS = idl |
121 |
+endif |
122 |
|
123 |
ifeq (camino,$(MOZ_BUILD_APP)) |
124 |
DIRS += osxspell |
125 |
else |
126 |
+ifndef MOZ_NATIVE_HUNSPELL |
127 |
DIRS += hunspell |
128 |
endif |
129 |
+endif |
130 |
|
131 |
DIRS += src |