Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 302388 - Myspell doesn't work with oxt dictionaries provided by OpenOffice.org extensions
Summary: Myspell doesn't work with oxt dictionaries provided by OpenOffice.org extensions
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Spell checking utilities and dictionaries -- related bugs (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-27 02:15 UTC by Joaquim Uchoa
Modified: 2012-06-13 13:04 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to myspell.eclass to support *.oxt openoffice extensions (myspell.eclass.patch,1.14 KB, patch)
2011-05-16 10:31 UTC, Atman Sense
Details | Diff
Updated myspell.class (myspell.eclass,9.38 KB, text/plain)
2012-03-14 13:13 UTC, Joaquim Uchoa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joaquim Uchoa 2010-01-27 02:15:19 UTC
Myspell doesn't work with oxt dictionaries provided by OpenOffice.org extensions (http://extensions.services.openoffice.org/dictionary). I've tried to make updated ebuilds to myspell-pt, using the extensions (see http://bugs.gentoo.org/show_bug.cgi?id=221733 or http://bugs.gentoo.org/show_bug.cgi?id=151076)... The oxt file is a zip file, but Portage doesn't know it. I think this is a problem, because new dictionaries are available mainly in oxt formats, and zip formats only to OpenOffice.org 2. 

Reproducible: Always

Actual Results:  
 * Vero_pt_BR_V207AOC.oxt RMD160 SHA1 SHA256 size ;-) ...                                                                                     [ ok ]
 * oo3x-pt-PT.oxt RMD160 SHA1 SHA256 size ;-) ...                                                                                             [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                          [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                         [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                        [ ok ]
>>> Unpacking source...
>>> Unpacking Vero_pt_BR_V207AOC.oxt to /var/tmp/portage/app-dicts/myspell-pt-9.10.13/work
unpack Vero_pt_BR_V207AOC.oxt: file format not recognized. Ignoring.


Expected Results:  
Unpacking of oxt
Comment 1 Peter Volkov (RETIRED) gentoo-dev 2010-01-27 10:22:57 UTC
This is expected, because myspell really does not work with oxt dictionaries... or do you mean that it is possible to make it workable somehow?
Comment 2 Joaquim Uchoa 2010-01-27 18:32:23 UTC
(In reply to comment #1)
> This is expected, because myspell really does not work with oxt dictionaries...
> or do you mean that it is possible to make it workable somehow?
> 

Oxt files are zip files:

unzip -l Vero_pt_BR_V207AOC.oxt 
Archive:  Vero_pt_BR_V207AOC.oxt
  Length      Date    Time    Name
---------  ---------- -----   ----
      366  09-22-2008 17:35   META-INF/manifest.xml
     4327  01-08-2010 22:14   description.xml
     1300  07-02-2009 09:02   dictionaries.xcu
     3081  12-14-2009 21:32   hyph_pt_BR.dic
   968260  01-09-2010 11:33   pt_BR.aff
  4571588  01-09-2010 11:25   pt_BR.dic
     2600  09-22-2008 17:35   README_en.TXT
    11482  01-08-2010 22:11   README_hyph_pt_BR.TXT
     9099  01-08-2010 22:05   README_pt_BR.TXT
---------                     -------
  5572103                     9 files

The problem to me, is that oxt is the actual format adopted by OpenOffice.org. So, in my opinion is highly desirable that Myspell eclass was able to work with oxt files. I don't know how to do this workaround and how to start. I've tried to use src_prepare() to rename the oxt file to give it a zip extension, but aparently Portage tries to unpack the file before src_prepare(). I think there is a configuration to Portage informing the command associated with a file, but I couldn't find it. So I think the better way to improve dictionaries in future is using oxt files and configurating Portage to open this kind of file with unzip. 

How I can start to do this? 
Comment 3 Peter Volkov (RETIRED) gentoo-dev 2010-01-27 18:56:33 UTC
Write custom src_unpack function for myspell.eclass which will do that. For example, take a look on /usr/lib/portage/bin/ebuild.sh unpack() function.
Comment 4 Atman Sense 2011-05-16 10:31:05 UTC
Created attachment 273417 [details, diff]
patch to myspell.eclass to support *.oxt openoffice extensions

for example see bug #305725
Comment 5 Joaquim Uchoa 2012-03-14 13:13:54 UTC
Created attachment 305303 [details]
Updated myspell.class

Updated eclass file, with provided patch. Worked here with an updated myspell-pt!

Please, gentoo developers: update main tree!!!
Comment 6 Tomáš Chvátal (RETIRED) gentoo-dev 2012-06-13 13:04:30 UTC
The eclass myspell-r2 is provided in main tree for this purposes.

Example ebuilds are myspell-cs, myspell-ca or myspell-sk.