vim72-20100325-kaoriya-w64j.zip
[MacVim/KaoriYa.git] / runtime / spell / eo / main.aap
blob19b7555ab575ab47e1a0727956248d4666dbb93a
1 # Aap recipe for Esperanto Vim spell files.
3 # Use a freshly compiled Vim if it exists.
4 @if os.path.exists('../../../src/vim'):
5     VIM = ../../../src/vim
6 @else:
7     :progsearch VIM vim
9 SPELLDIR = ..
10 FILES    = eo_l3.aff eo_l3.dic
12 all: $SPELLDIR/eo.iso-8859-3.spl $SPELLDIR/eo.utf-8.spl ../README_eo.txt
14 $SPELLDIR/eo.iso-8859-3.spl : $FILES
15         :sys $VIM -u NONE -e -c "set enc=iso-8859-3"
16                 -c "mkspell! $SPELLDIR/eo eo_l3" -c q
18 $SPELLDIR/eo.utf-8.spl : $FILES
19         :sys $VIM -u NONE -e -c "set enc=utf-8"
20                 -c "mkspell! $SPELLDIR/eo eo_l3" -c q
22 ../README_eo.txt : README_eo_l3.txt
23         :copy $source $target
24         # fix missing newline
25         :sys $VIM $target -e -c "set ff=unix" -c wq
28 # Fetching the files from OpenOffice.org.
30 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
31 :attr {fetch = $OODIR/%file%} eo.zip
33 # The files don't depend on the .zip file so that we can delete it.
34 # Only download the zip file if the targets don't exist.
35 eo_l3.aff eo_l3.dic: {buildcheck=}
36         :assertpkg unzip patch
37         :fetch eo.zip
38         :sys $UNZIP eo.zip
39         :delete eo.zip
40         @if not os.path.exists('eo_l3.orig.aff'):
41             :copy eo_l3.aff eo_l3.orig.aff
42         @if not os.path.exists('eo_l3.orig.dic'):
43             :copy eo_l3.dic eo_l3.orig.dic
44         @if os.path.exists('eo_l3.diff'):
45             :sys patch <eo_l3.diff
48 # Generate diff files, so that others can get the OpenOffice files and apply
49 # the diffs to get the Vim versions.
51 diff:
52         :assertpkg diff
53         :sys {force} diff -a -C 1 eo_l3.orig.aff eo_l3.aff >eo_l3.diff
54         :sys {force} diff -a -C 1 eo_l3.orig.dic eo_l3.dic >>eo_l3.diff
57 # Check for updated OpenOffice spell files.  When there are changes the
58 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
60 check:
61         :assertpkg unzip diff
62         :fetch eo.zip
63         :mkdir tmp
64         :cd tmp
65         @try:
66             @import stat
67             :sys $UNZIP ../eo.zip
68             :sys {force} diff ../eo_l3.orig.aff eo_l3.aff >d
69             @if os.stat('d')[stat.ST_SIZE] > 0:
70                 :copy eo_l3.aff ../eo_l3.new.aff
71             :sys {force} diff ../eo_l3.orig.dic eo_l3.dic >d
72             @if os.stat('d')[stat.ST_SIZE] > 0:
73                 :copy eo_l3.dic ../eo_l3.new.dic
74         @finally:
75             :cd ..
76             :delete {r}{f}{q} tmp
77             :delete eo.zip
80 # vim: set sts=4 sw=4 :