[OmegaT] * Wed Aug 11 2010 Ismael Olea <ismael at olea.org> 2.0.5_04-1 - updating to 2.0.5_04 - removing referen
Ismael Olea
olea at fedoraproject.org
Wed Aug 25 11:22:05 UTC 2010
commit 1bf3017b18ddd2fd5ed8bfc72f129c06fe06661a
Author: Ismael Olea <ismael at olea.org>
Date: Wed Aug 25 13:21:57 2010 +0200
* Wed Aug 11 2010 Ismael Olea <ismael at olea.org> 2.0.5_04-1
- updating to 2.0.5_04
- removing references to javadoc generation
- removing support for jmyspell (from Tiago's OmegaT-05-remove-jmyspell-alternative.patch)
- using local hunspell (from Tiago's OmegaT-06-use-external-hunspell.patch )
- spec cleaning
* Wed Aug 11 2010 Ismael Olea <ismael at olea.org> 2.0.5_04-1
- updating to 2.0.5_04
- removing references to javadoc generation
- removing support for jmyspell (from Tiago's OmegaT-05-remove-jmyspell-alternative.patch)
- using local hunspell (from Tiago's OmegaT-06-use-external-hunspell.patch )
- spec cleaning
.gitignore | 1 +
OmegaT-04-get-rid-of-MRJAdapter.patch | 67 +++++---------
OmegaT-05-remove-jmyspell-alternative.patch | 72 ++++++++++++++++
OmegaT-06-use-external-hunspell.patch | 43 +++++++++
OmegaT-ant.properties | 9 --
OmegaT-build.xml | 9 ++
OmegaT-extra-jars-in-new-location.patch | 14 ---
OmegaT-help-path.patch | 25 ++++++
OmegaT-manifes-template.patch | 9 --
OmegaT.sh | 13 +++
OmegaT.spec | 124 ++++++++++++++++-----------
sources | 2 +-
12 files changed, 260 insertions(+), 128 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e8e7eff..9c66509 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
OmegaT_1.7.3_04_Source.zip
+OmegaT_2.0.5_04_Source.zip
diff --git a/OmegaT-04-get-rid-of-MRJAdapter.patch b/OmegaT-04-get-rid-of-MRJAdapter.patch
index ef0f958..8eda442 100644
--- a/OmegaT-04-get-rid-of-MRJAdapter.patch
+++ b/OmegaT-04-get-rid-of-MRJAdapter.patch
@@ -1,53 +1,34 @@
-# Removing MacOSX useless dependence
-# Adapted from Tiago Saboga <tiagosaboga at gmail.com> original:
-#
-# http://svn.debian.org/wsvn/pkg-java/trunk/omegat/debian/patches/04-get-rid-of-MRJAdapter.dpatch?op=file&rev=0&sc=0
-
---- OmegaT-1.7.3_02/src/org/omegat/gui/main/MainWindow.java.orig 2008-03-28 11:20:12.000000000 +0100
-+++ OmegaT-1.7.3_02/src/org/omegat/gui/main/MainWindow.java 2008-07-04 18:23:44.000000000 +0200
-@@ -103,7 +103,6 @@
- import com.vlsolutions.swing.docking.event.DockableStateWillChangeListener;
- import com.vlsolutions.swing.docking.ui.DockingUISettings;
+diff -Naur OmegaT-2.0.0_Beta-orig/src/org/omegat/gui/main/MainWindowMenu.java OmegaT-2.0.0_Beta/src/org/omegat/gui/main/MainWindowMenu.java
+--- OmegaT-2.0.0_Beta-orig/src/org/omegat/gui/main/MainWindowMenu.java 2008-09-28 18:58:40.000000000 +0200
++++ OmegaT-2.0.0_Beta/src/org/omegat/gui/main/MainWindowMenu.java 2008-12-10 20:22:20.000000000 +0100
+@@ -41,8 +41,6 @@
+ import javax.swing.JMenuItem;
+ import javax.swing.JSeparator;
-import net.roydesign.mac.MRJAdapter;
-
- /**
- * The main window of OmegaT application.
-@@ -257,35 +256,8 @@
- uiUpdateOnProjectClose();
- initUIShortcuts();
-
-- try
-- {
+-
+ import org.omegat.core.Core;
+ import org.omegat.core.CoreEvents;
+ import org.omegat.core.events.IApplicationEventListener;
+@@ -246,21 +244,6 @@
+ * Initialize Mac-specific features.
+ */
+ private void initMacSpecific() {
+- try {
- // MacOSX-specific
-- MRJAdapter.addQuitApplicationListener(new ActionListener()
-- {
-- public void actionPerformed(ActionEvent e)
-- {
-- doQuit();
+- MRJAdapter.addQuitApplicationListener(new ActionListener() {
+- public void actionPerformed(ActionEvent e) {
+- mainWindowMenuHandler.projectExitMenuItemActionPerformed();
- }
- });
-- MRJAdapter.addAboutListener(new ActionListener()
-- {
-- public void actionPerformed(ActionEvent e)
-- {
-- doAbout();
+- MRJAdapter.addAboutListener(new ActionListener() {
+- public void actionPerformed(ActionEvent e) {
+- mainWindowMenuHandler.helpAboutMenuItemActionPerformed();
- }
- });
-- }
-- catch(NoClassDefFoundError e)
-- {
+- } catch (NoClassDefFoundError e) {
- Log.log(e);
- }
--
-- // all except MacOSX
-- if(!StaticUtils.onMacOSX()) // NOI18N
-- {
-- projectMenu.add(separator2inProjectMenu);
-- projectMenu.add(projectExitMenuItem);
-- }
-+ projectMenu.add(separator2inProjectMenu);
-+ projectMenu.add(projectExitMenuItem);
-
- // Add Language submenu to Options menu
+ }
+ /**
diff --git a/OmegaT-05-remove-jmyspell-alternative.patch b/OmegaT-05-remove-jmyspell-alternative.patch
new file mode 100644
index 0000000..9432447
--- /dev/null
+++ b/OmegaT-05-remove-jmyspell-alternative.patch
@@ -0,0 +1,72 @@
+Author: Tiago Saboga <tiagosaboga at gmail.com>
+Description: Do not use jmyspell, as it is not in debian.
+--- omegat-2.0.5.2+dfsg.orig/src/org/omegat/core/spellchecker/SpellChecker.java
++++ omegat-2.0.5.2+dfsg/src/org/omegat/core/spellchecker/SpellChecker.java
+@@ -45,8 +45,6 @@
+ import java.util.List;
+ import java.util.logging.Logger;
+
+-import org.dts.spell.dictionary.OpenOfficeSpellDictionary;
+-import org.dts.spell.dictionary.SpellDictionary;
+ import org.omegat.core.Core;
+ import org.omegat.core.CoreEvents;
+ import org.omegat.core.events.IProjectEventListener;
+@@ -79,8 +77,6 @@
+
+ private Hunspell hunspellSave;
+
+- private org.dts.spell.SpellChecker jmyspell;
+-
+ /** the list of ignored words */
+ private List<String> ignoreList = new ArrayList<String>();
+
+@@ -185,19 +181,7 @@
+ LOGGER
+ .finer("Initialize SpellChecker by Hunspell for language '"
+ + language + "' dictionary " + dictionaryName);
+- } else {
+- try {
+- SpellDictionary dict = new OpenOfficeSpellDictionary(new File(dictionaryName), new File(affixName), false);
+- jmyspell = new org.dts.spell.SpellChecker(dict);
+- jmyspell.setCaseSensitive(false);
+- } catch (Exception ex) {
+- Log.log("Error loading jmyspell: " + ex.getMessage());
+- return;
+- }
+- LOGGER
+- .finer("Initialize SpellChecker by JMySpell for language '"
+- + language + "' dictionary " + dictionaryName);
+- }
++ }
+ // find out the internal project directory
+ String projectDir =
+ Core.getProject().getProjectProperties().getProjectInternal();
+@@ -240,10 +224,6 @@
+ saveWordLists();
+ pHunspell = null;
+ }
+- if (jmyspell != null) {
+- jmyspell = null;
+- }
+-
+ }
+
+ /**
+@@ -326,8 +306,6 @@
+ Log.log("Unsupported encoding " + encoding);
+ }
+ return false;
+- } else if (jmyspell != null) {
+- return jmyspell.isCorrect(word);
+ } else {
+ return true;
+ }
+@@ -389,8 +367,6 @@
+ }
+ }
+ }
+- } else if (jmyspell != null) {
+- aList.addAll(jmyspell.getDictionary().getSuggestions(word, 20));
+ }
+
+ return aList;
diff --git a/OmegaT-06-use-external-hunspell.patch b/OmegaT-06-use-external-hunspell.patch
new file mode 100644
index 0000000..6c75e5d
--- /dev/null
+++ b/OmegaT-06-use-external-hunspell.patch
@@ -0,0 +1,43 @@
+Author: Tiago Saboga <tiagosaboga at gmail.com>
+Description: Use debian's libhunspell.
+--- omegat-2.0.5.2+dfsg.orig/src/org/omegat/core/spellchecker/SpellChecker.java
++++ omegat-2.0.5.2+dfsg/src/org/omegat/core/spellchecker/SpellChecker.java
+@@ -108,9 +108,7 @@
+ + 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_NAME;
+ }
+
+ try {
+@@ -148,8 +146,9 @@
+ 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 +
+--- omegat-2.0.5.2+dfsg.orig/src/org/omegat/util/OConsts.java
++++ omegat-2.0.5.2+dfsg/src/org/omegat/util/OConsts.java
+@@ -94,8 +94,12 @@
+ public static final String LEARNED_WORD_LIST_FILE_NAME = "learned_words.txt"; // NOI18N
+
+ /** The name of the spell checking library */
+- public static final String SPELLCHECKER_LIBRARY_NAME = "hunspell"; // NOI18N
++ public static final String SPELLCHECKER_LIBRARY_NAME = "hunspell-1.2"; // NOI18N
+
++ /** directory of system dictionaries */
++ public static final String SPELLCHECKER_SYSTEM_DICTIONARY_DIRECTORY =
++ "/usr/share/myspell/dicts"; // NOI18N
++
+ /** the native library directory */
+ public static final String NATIVE_LIBRARY_DIR = "native"; // NOI18N
+
diff --git a/OmegaT-build.xml b/OmegaT-build.xml
index 4bcfe9a..391c0fb 100644
--- a/OmegaT-build.xml
+++ b/OmegaT-build.xml
@@ -43,7 +43,16 @@ by Ismael Olea <ismael at olea.org>, public domain
<pathelement path="${classpath}"/>
<pathelement location="/usr/share/java/htmlparser-1.6.jar"/>
<pathelement location="/usr/share/java/vldocking.jar"/>
+ <pathelement location="/usr/share/java/JMySpell-core-1.0.0_beta2.jar"/>
+ <pathelement location="/usr/share/java/jna.jar"/>
<pathelement location="lib-mnemonics/dist/lib-mnemonics.jar"/>
+ <pathelement location="/usr/share/java/jaxme2.jar"/>
+ <pathelement location="/usr/share/java/jaxme2-rt.jar"/>
+ <pathelement location="/usr/share/java/jaxmejs.jar"/>
+ <pathelement location="/usr/share/java/jaxmepm.jar"/>
+ <pathelement location="/usr/share/java/jaxmexs.jar"/>
+ <pathelement location="lib/MRJAdapter.jar"/>
+ <pathelement location="/usr/share/java/swing-layout.jar"/>
</classpath>
</javac>
</target>
diff --git a/OmegaT-help-path.patch b/OmegaT-help-path.patch
new file mode 100644
index 0000000..00bc648
--- /dev/null
+++ b/OmegaT-help-path.patch
@@ -0,0 +1,25 @@
+Author: Tiago Saboga <tiagosaboga at gmail.com>
+Description: Change location of help files.
+--- omegat-2.0.5.2+dfsg.orig/src/org/omegat/gui/help/HelpFrame.java
++++ omegat-2.0.5.2+dfsg/src/org/omegat/gui/help/HelpFrame.java
+@@ -174,8 +174,7 @@
+ } else {
+ path = filename;
+ }
+- File f = new File(StaticUtils.installDir() + File.separator
+- + OConsts.HELP_DIR + File.separator + path);
++ File f = new File(OConsts.HELP_DIR + File.separator + path);
+ try {
+ if (f.exists()) {
+ return f.toURI().toURL();
+--- omegat-2.0.5.2+dfsg.orig/src/org/omegat/util/OConsts.java
++++ omegat-2.0.5.2+dfsg/src/org/omegat/util/OConsts.java
+@@ -60,7 +60,7 @@
+ // help
+ public static final String HELP_HOME = "index.html"; // NOI18N
+ public static final String HELP_INSTANT_START = "instantStartGuideNoTOC.html";// NOI18N
+- public static final String HELP_DIR = "docs"; // NOI18N
++ public static final String HELP_DIR = "/usr/share/omegat/docs"; // NOI18N
+ public static final String HELP_LANG_INDEX = "languageIndex.html"; // NOI18N
+
+ // status file consts
diff --git a/OmegaT.sh b/OmegaT.sh
new file mode 100755
index 0000000..dc49c9a
--- /dev/null
+++ b/OmegaT.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+. /usr/share/java-utils/java-functions
+
+BASE_JARS="OmegaT htmlparser vldocking jna lib-mnemonics jaxme/jaxme2 jaxme/jaxme2-rt jaxme/jaxmejs jaxme/jaxmepm jaxme/jaxmexs swing-layout"
+
+MAIN_CLASS=org.omegat.Main
+
+set_jvm
+set_flags $BASE_FLAGS
+set_options $BASE_OPTIONS
+set_classpath $BASE_JARS
+
+run "$@"
diff --git a/OmegaT.spec b/OmegaT.spec
index 8127f9c..50e73cd 100644
--- a/OmegaT.spec
+++ b/OmegaT.spec
@@ -1,30 +1,47 @@
# TODO:
-# fix paths to help and internal docs (http://svn.debian.org/wsvn/pkg-java/trunk/omegat/debian/patches/03-location-of-help-files.dpatch?op=file&rev=0&sc=0)
-# add credits for Tiago
+# 2.0.5
+# gen/lib/jaxb-xjc.jar ??
+
+# 2.1.8 ????
+# lib/swing-worker-1.2.jar
Name: OmegaT
%define namer omegat
Summary: Computer Aid Translation tool
-Version: 1.7.3_04
-Release: 5%{?dist}
+Version: 2.0.5_04
+Release: 1%{?dist}
Source0: http://downloads.sourceforge.net/omegat/%{name}_%{version}_Source.zip
-Source1: OmegaT-ant.properties
Source2: OmegaT-lib-mnemonics-build.xml
Source3: OmegaT-build.xml
+Source4: OmegaT.sh
Url: http://www.omegat.org/
Group: Applications/Text
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
-BuildRequires: ant, java-devel
-BuildRequires: desktop-file-utils, dos2unix
-BuildRequires: htmlparser, vldocking
-Requires: java
-Requires: vldocking
+BuildRequires: ant, java-devel >= 1.6.0, jpackage-utils
+BuildRequires: desktop-file-utils, dos2unix
+BuildRequires: htmlparser, vldocking >= 2.1.4
+BuildRequires: jna
+BuildRequires: ws-jaxme
+BuildRequires: swing-layout
+
+Requires: java, jpackage-utils
+Requires: vldocking >= 2.1.4
Requires: htmlparser
+Requires: hunspell
+Requires: jna
+Requires: swing-layout
+Requires: swing-layout
+Requires: ws-jaxme
+
License: GPLv2+
-BuildArch: noarch
+BuildArch: noarch
+# http://svn.debian.org/wsvn/pkg-java/trunk04-get-rid-of-MRJAdapter.patch
Patch1: OmegaT-04-get-rid-of-MRJAdapter.patch
-Patch2: OmegaT-extra-jars-in-new-location.patch
-Patch3: OmegaT-manifes-template.patch
+Patch2: OmegaT-help-path.patch
+# http://svn.debian.org/wsvn/pkg-java/trunk/omegat/debian/patches/05-remove-jmyspell-alternative.patch
+Patch3: OmegaT-05-remove-jmyspell-alternative.patch
+# based on http://svn.debian.org/wsvn/pkg-java/trunk/omegat/debian/patches/06-use-external-hunspell.patch
+Patch4: OmegaT-06-use-external-hunspell.patch
%description
OmegaT is a free translation memory application written in Java.
@@ -49,27 +66,31 @@ OmegaT has the following features:
* Support for right-to-left languages
* Compatible with other translation memory applications (TMX)
-# %package javadoc
-# Summary: Javadocs for %{name}
-# Group: Documentation
-# %description javadoc
-# Requires: %{name} = %{version}-%{release}
-# Requires: jpackage-utils
-# This package contains the API documentation for %{name}.
-
%prep
%setup -q -c -n %{name}-%{version}
%patch1 -p1
%patch2 -p1
-%patch3 -p0
+%patch3 -p1
+%patch4 -p1
# not needed outside Netbeans
-cp /dev/null nbproject/org-netbeans-modules-java-j2seproject-copylibstask.jar
+rm nbproject/org-netbeans-modules-java-j2seproject-copylibstask.jar
# clean dependencies:
-rm lib/vldocking_2.0.6d.jar
+rm lib/vldocking_2.1.4.jar
rm lib/htmlparser.jar
rm lib/sources/htmlparser1_6_20060610.zip-source.zip
+rm lib/jmyspell-core-1.0.0-beta-2.jar
+rm lib/jna.jar
+rm -r native/*
+rm lib/swing-layout-1.0.jar
+
+### JAXB dependencies
+rm lib/activation.jar
+rm lib/jaxb-api.jar
+rm lib/jaxb-impl.jar
+rm lib/jsr173_1.0_api.jar
+rm lib/sources/JAXB/jsr173_1.0_src.jar
# not needed outside MacOSX:
rm lib/MRJAdapter.jar
@@ -78,21 +99,26 @@ rm lib/sources/MRJAdapter-source.zip
# not needed outside windows
rm -rf release/win32-specific/
+# not sure if needed...
+rm -rf ./test/lib/junit-4.4.jar
+rm -rf ./test/lib/xmlunit-1.1.jar
+
# this shows the netbeans jar needed to compile nmonics...
-find . -name \*.jar -exec echo {} . \;
+find . -name \*.jar -exec echo {} \;
+
+## gen/lib/jaxb-xjc.jar
+rm -rf gen/lib/jaxb-xjc.jar
%build
+#limpieza:
+sed -i '/class-path/I d' manifest-template.mf
+
pushd lib-mnemonics
cp %{SOURCE2} build.xml
ant dist
popd
-
-## build.xml que tira de netbeans:
-# ant -propertyfile %{SOURCE1} jar release
-
-
cp %{SOURCE3} build.xml
ant dist
@@ -116,21 +142,8 @@ popd
cp -pR release/index.html docs/ images/ $RPM_BUILD_ROOT%{_datadir}/%{namer}/
-# this directory should dissapear as soon the internal jars dissapear:
-#mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{namer}/lib
-#cp -pR dist/lib/ $RPM_BUILD_ROOT%{_datadir}/%{namer}/
-#rm $RPM_BUILD_ROOT%{_datadir}/%{namer}/lib/MRJAdapter.jar
-
-## now we used the packaged icon, not sure if it's a problem to use it from /usr/share/omegat/images/OmegaT.png
-## install -p %SOURCE1 $RPM_BUILD_ROOT/%{_iconsdir}/%{namer}.png
-
#create our launch wrapper script
-cat > $RPM_BUILD_ROOT%{_bindir}/%{namer} <<EOF
-#!/bin/sh
-. %{_datadir}/java-utils/java-functions
-java -jar %{_javadir}/OmegaT.jar $*
-
-EOF
+install -pm 0755 %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}/%{namer}
#make our launch wrapper executable
chmod +x $RPM_BUILD_ROOT%{_bindir}/*
@@ -154,10 +167,6 @@ EOF
desktop-file-install --vendor "fedora" --dir=%{buildroot}%{_datadir}/applications/ %{buildroot}%{_datadir}/applications/fedora-%{namer}.desktop
-# ant -propertyfile %{SOURCE1} javadoc
-# mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-# cp -rp dist/javadoc/ $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-
# fixing end of line making rpmlint happy
dos2unix -k release/*.txt
@@ -171,13 +180,24 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/*
%{_javadir}/*
%{_datadir}/applications/fedora-%{namer}.desktop
-#%{_iconsdir}/%{namer}.png
%doc ./release/changes.txt release/doc-license.txt release/license.txt release/readme*.txt release/join.html
-# %files javadoc
-# %defattr(-,root,root,-)
-# %{_javadocdir}/*
+
+%changelog
+* Wed Aug 11 2010 Ismael Olea <ismael at olea.org> 2.0.5_04-1
+- updating to 2.0.5_04
+- removing references to javadoc generation
+- removing support for jmyspell (from Tiago's OmegaT-05-remove-jmyspell-alternative.patch)
+- using local hunspell (from Tiago's OmegaT-06-use-external-hunspell.patch )
+- spec cleaning
+
+* Wed Nov 26 2008 Ismael Olea <ismael at olea.org> 2.0.0_Beta-2
+- Porting MRJAdapter removing patch
+- Porting OmegaT-help-path.patch from http://svn.debian.org/wsvn/pkg-java/trunk/omegat/debian/patches/03-location-of-help-files.dpatch?op=file&rev=0&sc=0)
+
+* Wed Nov 26 2008 Ismael Olea <ismael at olea.org> 2.0.0_Beta-1
+- First 2.0 beta version
%changelog
diff --git a/sources b/sources
index c97fc7f..05142e8 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-2465293567211cfcd9217b3dc8e4c43c OmegaT_1.7.3_04_Source.zip
+b493d1879c0c2c91b64e32d10eb2ffc6 OmegaT_2.0.5_04_Source.zip
More information about the scm-commits
mailing list