Hello,
first, sorry to reply so late, and when you have started to update
hunspell dictionaries packages.
Le 21/12/2011 08:15, Kamil Rytarowski a écrit :
Hello!
[...]
There was a discuss on
1) preparing policies on hunspell-dictionaries
2) deprecate and kill myspell in Mga2
3) changing the default path of dictionaries, from /usr/share/myspell to
/usr/share/hunspell (and to keep backward compatibility links in myspell
directory)
4) to provide "enchant-dictionary" and "hunspell-dictionary" by every
hunspell-dictionary
So finally, I've prepared a first version of the policy
https://wiki.mageia.org/en/Hunspell-dictionary_policy
If you like, please tell me your comments of it. Is it right? (Also: is
the .spec correct?) When everything will be accepted then every
hunspell-dictionary will be updated according to the policy.
some comments about the policy:
Version: 1.0
Release: %mkrel %{upstream_release}.%{rel}
I don't think it will be possible to use Version 1.0 and upstream
version only in the release; most hunspell dictionaries already use
upstream version as version and have a version > 1.0.
--
#Mageia values: 1 - aspell, 2 - hunspell, 3 - language specific
Provides: enchant-dictionary = 2
Provides: hunspell-dictionary
Provides: dictionary-%{languagecode}
about the version value of the provides: is the meaning (1 - aspell, 2 -
hunspell, 3 - language specific) really needed? is it currently used?
Because I think that it could be usefull that the versionned provides
indicates the location of the dictionary:
- current enchant-dictionary = 2 ->> /usr/share/dict/mozilla
- enchant-dictionary from hunspell ->> enchant-dictionary = 4 ->>
/usr/share/hunspell and /usr/share/myspell,
- enchant-dictionary from future hunspell without compatibility link in
/usr/share/myspell ->> enchant-dictionary = 5 ->> /usr/share/hunspell only,
- ...
(it seems weird for me to use the same "enchant-dictionary = 2"
versionned provide, both for "deprecated" myspell dictionaries, and new
hunspell dictionaries.)
if the versionned provides indicates the location, we can use it if
necessary in Conflicts or Requires in others packages.
e.g. currently Firefox searches dictionnaries in /usr/share/dict/mozilla
(myspell dictionaries). when we change this location, we could add a
Requires enchant-dictionary = 4.
same for hunspell-dictionary and dictionary-%{languagecode}, a
versionned provides could indicate the location of the dictionary.
if we want to be able to remove easily all the compatibility link in the
future, we should really consider this.
PS. The changes of enchant will be proposed or accepted later, Funda has
already prepared the package.
new hunspell dictionaries provides enchant-dictionary and obsoletes
myspell dictionaries, but enchant still can't use the new hunspell
dictionaries. I think that it should be fixed ASAP, or we will release
an alpha 3 with broken spelling for lot of languages.
I propose the attached patches for enchant, so that enchant can use
dictionaries from /usr/share/hunspell, /usr/share/myspell, and
/usr/share/dict/ooo.
Anssi, Kamil, WDYT ?
same problem with firefox and thunderbird, they use dictionaries from
/usr/share/dict/mozilla = myspell dictionaries, that are obsoleted.
(Will we wait for the complete migration, to release alpha 3 ? )
CC: Anssi, enchant and thunderbird maintainer
dmorgan, firefox maintainer
regards,
Luc
--
Luc Menut
diff -Naur enchant-1.6.0.orig/src/myspell/myspell_checker.cpp enchant-1.6.0/src/myspell/myspell_checker.cpp
--- enchant-1.6.0.orig/src/myspell/myspell_checker.cpp 2010-04-01 22:53:37.000000000 +0200
+++ enchant-1.6.0/src/myspell/myspell_checker.cpp 2011-12-19 23:07:37.000000000 +0100
@@ -276,6 +276,9 @@
dirs = g_slist_append (dirs, g_strdup (ENCHANT_MYSPELL_DICT_DIR));
#endif
+ dirs = g_slist_append (dirs, g_strdup ("/usr/share/myspell"));
+ dirs = g_slist_append (dirs, g_strdup ("/usr/share/dict/ooo"));
+
#if defined(_WIN32)
char* open_office_dicts_dir = myspell_checker_get_open_office_dicts_dir ();
if (open_office_dicts_dir)
Index: enchant.spec
===================================================================
--- enchant.spec (révision 184618)
+++ enchant.spec (copie de travail)
@@ -10,6 +10,7 @@
Group: System/Libraries
URL: http://www.abisource.com/projects/enchant/
Source0: http://www.abisource.com/downloads/enchant/%{version}/%{name}-%{version}.tar.gz
+Patch0: enchant-1.6.0-add-more-myspell-dicts-dirs.patch
BuildRequires: pkgconfig(glib-2.0) >= 2.6
BuildRequires: pkgconfig(gmodule-2.0)
BuildRequires: pkgconfig(hunspell)
@@ -40,12 +41,13 @@
%prep
%setup -q
+%patch0 -p1
%build
%configure2_5x --disable-static \
--with-system-myspell=yes \
--disable-ispell --disable-aspell --disable-uspell --disable-hspell \
- --with-myspell-dir=%{_datadir}/dict/ooo
+ --with-myspell-dir=%{_datadir}/hunspell
%make
%install