diff options
author | Jory Pratt <anarchy@gentoo.org> | 2010-04-05 04:18:25 +0000 |
---|---|---|
committer | Jory Pratt <anarchy@gentoo.org> | 2010-04-05 04:18:25 +0000 |
commit | f6065b8e1994200cb2cc28718538cf4f99097c91 (patch) | |
tree | f7c90db9c81e7b853d1754dc6045acf103f67118 /net-libs/xulrunner/files | |
parent | Bump to EAPI=3, add prefix keywords (diff) | |
download | gentoo-2-f6065b8e1994200cb2cc28718538cf4f99097c91.tar.gz gentoo-2-f6065b8e1994200cb2cc28718538cf4f99097c91.tar.bz2 gentoo-2-f6065b8e1994200cb2cc28718538cf4f99097c91.zip |
Fix hunspell support bug #278927
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'net-libs/xulrunner/files')
-rw-r--r-- | net-libs/xulrunner/files/1001_fix-system-hunspell.patch | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/net-libs/xulrunner/files/1001_fix-system-hunspell.patch b/net-libs/xulrunner/files/1001_fix-system-hunspell.patch new file mode 100644 index 000000000000..c531e061a99a --- /dev/null +++ b/net-libs/xulrunner/files/1001_fix-system-hunspell.patch @@ -0,0 +1,117 @@ +--- ./extensions/spellcheck/hunspell/src/mozHunspell.cpp.orig 2008-02-15 19:21:21.000000000 +0000 ++++ ./extensions/spellcheck/hunspell/src/mozHunspell.cpp 2008-02-15 19:23:20.000000000 +0000 +@@ -63,6 +63,9 @@ + #include "nsISimpleEnumerator.h" + #include "nsIDirectoryEnumerator.h" + #include "nsIFile.h" ++#ifdef MOZ_NATIVE_HUNSPELL ++#include "nsILocalFile.h" ++#endif + #include "nsDirectoryServiceUtils.h" + #include "nsDirectoryServiceDefs.h" + #include "mozISpellI18NManager.h" +@@ -307,7 +310,16 @@ + return; + + nsCOMPtr<nsIFile> dictDir; +- rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY, ++ #ifdef MOZ_NATIVE_HUNSPELL ++ nsCOMPtr<nsILocalFile> localFile; ++ rv = NS_NewNativeLocalFile(nsDependentCString("/usr/share/myspell"),PR_TRUE, getter_AddRefs(localFile)); ++ if (localFile && NS_SUCCEEDED(rv)) { ++ localFile->QueryInterface(NS_GET_IID(nsIFile), getter_AddRefs(dictDir)); ++ LoadDictionariesFromDir(dictDir); ++ } ++ else { ++ #endif ++ rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY, + NS_GET_IID(nsIFile), getter_AddRefs(dictDir)); + if (NS_SUCCEEDED(rv)) { + LoadDictionariesFromDir(dictDir); +@@ -332,6 +344,9 @@ + LoadDictionariesFromDir(appDir); + } + } ++#ifdef MOZ_NATIVE_HUNSPELL ++ } ++#endif + + nsCOMPtr<nsISimpleEnumerator> dictDirs; + rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY_LIST, +--- ./extensions/spellcheck/src/Makefile.in.orig 2008-02-15 19:25:58.000000000 +0000 ++++ ./extensions/spellcheck/src/Makefile.in 2008-02-15 19:28:36.000000000 +0000 +@@ -63,9 +63,16 @@ + txtsvc \ + uconv \ + unicharutil \ ++ xulapp \ + $(NULL) + +-CPPSRCS = \ ++ifdef MOZ_NATIVE_HUNSPELL ++CPPSRCS += mozHunspell.cpp ++ifdef MOZ_XUL_APP ++CPPSRCS += mozHunspellDirProvider.cpp ++endif ++endif ++CPPSRCS += \ + mozSpellCheckerFactory.cpp \ + mozSpellChecker.cpp \ + mozPersonalDictionary.cpp \ +@@ -80,8 +87,14 @@ + SHARED_LIBRARY_LIBS += ../osxspell/src/$(LIB_PREFIX)osxspell_s.$(LIB_SUFFIX) + LOCAL_INCLUDES += -I$(srcdir)/../osxspell/src + else ++ifndef MOZ_NATIVE_HUNSPELL + SHARED_LIBRARY_LIBS += ../hunspell/src/$(LIB_PREFIX)hunspell_s.$(LIB_SUFFIX) + LOCAL_INCLUDES += -I$(srcdir)/../hunspell/src ++else ++LOCAL_INCLUDES += $(MOZ_HUNSPELL_CFLAGS) \ ++ -DMOZ_NATIVE_HUNSPELL \ ++ $(NULL) ++endif + endif + + EXTRA_DSO_LDOPTS = \ +@@ -96,3 +112,18 @@ + LOCAL_INCLUDES += \ + -I$(topsrcdir)/xpcom/io \ + $(NULL) ++ ++ifdef MOZ_NATIVE_HUNSPELL ++export:: $(srcdir)/../hunspell/src/mozHunspell.cpp ++ $(INSTALL) $(srcdir)/../hunspell/src/mozHunspell.* . ++GARBAGE += mozHunspell.$(OBJ_SUFFIX) mozHunspell.cpp ++clean:: ++ rm -f mozHunspell.* ++ifdef MOZ_XUL_APP ++export:: $(srcdir)/../hunspell/src/mozHunspellDirProvider.cpp ++ $(INSTALL) $(srcdir)/../hunspell/src/mozHunspellDirProvider.* . ++GARBAGE += mozHunspellDirProvider.$(OBJ_SUFFIX) mozHunspellDirProvider.cpp ++clean:: ++ rm -f mozHunspellDirProvider.* ++endif ++endif +--- ./extensions/spellcheck/Makefile.in.orig 2008-02-15 19:23:39.000000000 +0000 ++++ ./extensions/spellcheck/Makefile.in 2008-02-15 19:24:34.000000000 +0000 +@@ -42,13 +42,19 @@ + include $(DEPTH)/config/autoconf.mk + + MODULE = spellchecker +-DIRS = idl locales ++ifndef MOZ_NATIVE_HUNSPELL ++DIRS = idl locales ++else ++DIRS = idl ++endif + + ifeq (camino,$(MOZ_BUILD_APP)) + DIRS += osxspell + else ++ifndef MOZ_NATIVE_HUNSPELL + DIRS += hunspell + endif ++endif + + DIRS += src + |