[OmegaT] update hunspell patch to 1.3.*
Ismael Olea
olea at fedoraproject.org
Mon Dec 10 18:48:52 UTC 2012
commit d8216d99ed304f0eca91c8903f88ac5093b164c9
Author: Ismael Olea <ismael at olea.org>
Date: Mon Dec 10 19:21:24 2012 +0100
update hunspell patch to 1.3.*
OmegaT-06-use-external-hunspell.patch | 43 +++++++++++++++++++++++++++++++++
OmegaT.spec | 7 ++++-
2 files changed, 48 insertions(+), 2 deletions(-)
---
diff --git a/OmegaT-06-use-external-hunspell.patch b/OmegaT-06-use-external-hunspell.patch
new file mode 100644
index 0000000..2c0f935
--- /dev/null
+++ b/OmegaT-06-use-external-hunspell.patch
@@ -0,0 +1,43 @@
+diff -Naur OmegaT-2.2.3_Beta-orig/src/org/omegat/core/spellchecker/SpellCheckerHunspell.java OmegaT-2.2.3_Beta/src/org/omegat/core/spellchecker/SpellCheckerHunspell.java
+--- OmegaT-2.2.3_Beta-orig/src/org/omegat/core/spellchecker/SpellCheckerHunspell.java 2010-11-19 13:13:02.000000000 +0100
++++ OmegaT-2.2.3_Beta/src/org/omegat/core/spellchecker/SpellCheckerHunspell.java 2010-12-30 12:18:26.718213164 +0100
+@@ -76,8 +76,7 @@
+ libraryPath = Native.getWebStartLibraryPath(OConsts.SPELLCHECKER_LIBRARY_NAME)
+ + File.separator + mapLibraryName(OConsts.SPELLCHECKER_LIBRARY_NAME);
+ } else {
+- libraryPath = StaticUtils.installDir() + File.separator + OConsts.NATIVE_LIBRARY_DIR
+- + File.separator + mapLibraryName(OConsts.SPELLCHECKER_LIBRARY_NAME);
++ libraryPath = OConsts.SPELLCHECKER_LIBRARY_PATH;
+ }
+
+ hunspell = (Hunspell) Native.loadLibrary(libraryPath, Hunspell.class);
+diff -Naur OmegaT-2.2.3_Beta-orig/src/org/omegat/core/spellchecker/SpellChecker.java OmegaT-2.2.3_Beta/src/org/omegat/core/spellchecker/SpellChecker.java
+--- OmegaT-2.2.3_Beta-orig/src/org/omegat/core/spellchecker/SpellChecker.java 2010-11-19 13:13:02.000000000 +0100
++++ OmegaT-2.2.3_Beta/src/org/omegat/core/spellchecker/SpellChecker.java 2010-12-30 12:33:14.457228666 +0100
+@@ -115,7 +115,9 @@
+ // initialize the spell checker - get the data from the preferences
+ String language = Core.getProject().getProjectProperties().getTargetLanguage().getLocaleCode();
+
+- String dictionaryDir = Preferences.getPreference(Preferences.SPELLCHECKER_DICTIONARY_DIRECTORY);
++ String dictionaryDir = Preferences.getPreferenceDefault(
++ Preferences.SPELLCHECKER_DICTIONARY_DIRECTORY,
++ OConsts.SPELLCHECKER_SYSTEM_DICTIONARY_DIRECTORY);
+
+ if (dictionaryDir != null) {
+ String affixName = dictionaryDir + File.separator + language + OConsts.SC_AFFIX_EXTENSION;
+diff -Naur OmegaT-2.2.3_Beta-orig/src/org/omegat/util/OConsts.java OmegaT-2.2.3_Beta/src/org/omegat/util/OConsts.java
+--- OmegaT-2.2.3_Beta-orig/src/org/omegat/util/OConsts.java 2010-11-19 13:13:40.000000000 +0100
++++ OmegaT-2.2.3_Beta/src/org/omegat/util/OConsts.java 2010-12-30 12:35:26.410461913 +0100
+@@ -102,6 +102,12 @@
+ /** The name of the spell checking library */
+ public static final String SPELLCHECKER_LIBRARY_NAME = "hunspell";
+
++ /** the path of the spell checking library */
++ public static final String SPELLCHECKER_LIBRARY_PATH = "/usr/lib/libhunspell-1.3.so.0";
++
++ /** directory of system dictionaries */
++ public static final String SPELLCHECKER_SYSTEM_DICTIONARY_DIRECTORY = "/usr/share/myspell/"; // NOI18N
++
+ /** the native library directory */
+ public static final String NATIVE_LIBRARY_DIR = "native";
+
diff --git a/OmegaT.spec b/OmegaT.spec
index 942d8f9..9e5b201 100644
--- a/OmegaT.spec
+++ b/OmegaT.spec
@@ -13,7 +13,7 @@ Summary: Computer Aid Translation tool
Version: 2.6.1
%global versionr 2.6.1_01_Beta
#Release: 1%{?dist}
-Release: 0.5.Beta%{?dist}
+Release: 0.6.Beta%{?dist}
Source0: http://downloads.sourceforge.net/omegat/%{name}_%{versionr}_Source.zip
Source2: OmegaT-lib-mnemonics-build.xml
Source3: OmegaT-build.xml
@@ -37,7 +37,7 @@ BuildRequires: antlr3-tool
Requires: java, jpackage-utils
Requires: vldocking >= 2.1.4
Requires: htmlparser
-Requires: hunspell
+Requires: hunspell <= 1.4.0
Requires: jna
Requires: swing-layout
Requires: ws-jaxme
@@ -216,6 +216,9 @@ dos2unix -k -f release/*.txt
%changelog
+* Mon Dec 10 2012 Ismael Olea <ismael at olea.org> - 2.6.1-0.6.Beta
+- update hunspell patch to 1.3.*
+
* Fri Oct 5 2012 Ismael Olea <ismael at olea.org> - 2.6.1-0.5.Beta
- update to 2.6.1_01_Beta
- adjusting requires
More information about the scm-commits
mailing list