vim72-20100325-kaoriya-w64j.zip
[MacVim/KaoriYa.git] / runtime / spell / en / main.aap
blob9e4b98ea75aa4331154dab123565db3214b2d23a
1 # Aap recipe for English 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    = en_US.aff en_US.dic
11            en_AU.aff en_AU.dic
12            en_CA.aff en_CA.dic
13            en_GB.aff en_GB.dic
14            en_NZ.aff en_NZ.dic
16 all: $SPELLDIR/en.latin1.spl $SPELLDIR/en.utf-8.spl \
17         $SPELLDIR/en.ascii.spl ../README_en.txt
19 $SPELLDIR/en.latin1.spl : $FILES
20         :sys env LANG=en_US.ISO8859-1
21                 $VIM -u NONE -e -c "mkspell! $SPELLDIR/en
22                         en_US en_AU en_CA en_GB en_NZ" -c q
24 $SPELLDIR/en.utf-8.spl : $FILES
25         :sys env LANG=en_US.UTF-8
26                 $VIM -u NONE -e -c "mkspell! $SPELLDIR/en
27                         en_US en_AU en_CA en_GB en_NZ" -c q
29 $SPELLDIR/en.ascii.spl : $FILES
30         :sys $VIM -u NONE -e -c "mkspell! -ascii $SPELLDIR/en
31                         en_US en_AU en_CA en_GB en_NZ" -c q
33 ../README_en.txt: README_en_US.txt README_en_AU.txt
34         :print en_US >!$target
35         :cat README_en_US.txt | :eval re.sub('\r', '', stdin) >>$target
36         :print =================================================== >>$target
37         :print en_AU: >>$target
38         :cat README_en_AU.txt | :eval re.sub('\r', '', stdin) >>$target
39         :print =================================================== >>$target
40         :print en_CA: >>$target
41         :cat README_en_CA.txt | :eval re.sub('\r', '', stdin) >>$target
42         :print =================================================== >>$target
43         :print en_GB: >>$target
44         :cat README_en_GB.txt | :eval re.sub('\r', '', stdin) >>$target
45         :print =================================================== >>$target
46         :print en_NZ: >>$target
47         :cat README_en_NZ.txt | :eval re.sub('\r', '', stdin) >>$target
50 # Fetching the files from OpenOffice.org.
52 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
53 :attr {fetch = $OODIR/%file%} en_US.zip en_CA.zip en_NZ.zip
54                                 en_GB.zip en_AU.zip
56 # The files don't depend on the .zip file so that we can delete it.
57 # Only download the zip file if the targets don't exist.
58 en_US.aff en_US.dic: {buildcheck=}
59         :assertpkg unzip patch
60         :fetch en_US.zip
61         :sys $UNZIP en_US.zip
62         :delete en_US.zip
63         @if not os.path.exists('en_US.orig.aff'):
64             :copy en_US.aff en_US.orig.aff
65         @if not os.path.exists('en_US.orig.dic'):
66             :copy en_US.dic en_US.orig.dic
67         @if os.path.exists('en_US.diff'):
68             :sys patch <en_US.diff
70 en_AU.aff en_AU.dic: {buildcheck=}
71         :assertpkg unzip patch
72         :fetch en_AU.zip
73         :sys $UNZIP en_AU.zip
74         :delete en_AU.zip
75         @if not os.path.exists('en_AU.orig.aff'):
76             :copy en_AU.aff en_AU.orig.aff
77         @if not os.path.exists('en_AU.orig.dic'):
78             :copy en_AU.dic en_AU.orig.dic
79         @if os.path.exists('en_AU.diff'):
80             :sys patch <en_AU.diff
82 en_CA.aff en_CA.dic: {buildcheck=}
83         :assertpkg unzip patch
84         :fetch en_CA.zip
85         :sys $UNZIP en_CA.zip
86         :delete en_CA.zip
87         @if not os.path.exists('en_CA.orig.aff'):
88             :copy en_CA.aff en_CA.orig.aff
89         @if not os.path.exists('en_CA.orig.dic'):
90             :copy en_CA.dic en_CA.orig.dic
91         @if os.path.exists('en_CA.diff'):
92             :sys patch <en_CA.diff
94 en_GB.aff en_GB.dic: {buildcheck=}
95         :assertpkg unzip patch
96         :fetch en_GB.zip
97         :sys $UNZIP en_GB.zip
98         :delete en_GB.zip
99         :delete dictionary.lst.example
100         @if not os.path.exists('en_GB.orig.aff'):
101             :copy en_GB.aff en_GB.orig.aff
102         @if not os.path.exists('en_GB.orig.dic'):
103             :copy en_GB.dic en_GB.orig.dic
104         @if os.path.exists('en_GB.diff'):
105             :sys patch <en_GB.diff
107 en_NZ.aff en_NZ.dic: {buildcheck=}
108         :assertpkg unzip patch
109         :fetch en_NZ.zip
110         :sys $UNZIP en_NZ.zip
111         :delete en_NZ.zip
112         @if not os.path.exists('en_NZ.orig.aff'):
113             :copy en_NZ.aff en_NZ.orig.aff
114         @if not os.path.exists('en_NZ.orig.dic'):
115             :copy en_NZ.dic en_NZ.orig.dic
116         @if os.path.exists('en_NZ.diff'):
117             :sys patch <en_NZ.diff
120 # Generate diff files, so that others can get the OpenOffice files and apply
121 # the diffs to get the Vim versions.
123 diff:
124         :assertpkg diff
125         :sys {force} diff -a -C 1 en_US.orig.aff en_US.aff >en_US.diff
126         :sys {force} diff -a -C 1 en_US.orig.dic en_US.dic >>en_US.diff
127         :sys {force} diff -a -C 1 en_AU.orig.aff en_AU.aff >en_AU.diff
128         :sys {force} diff -a -C 1 en_AU.orig.dic en_AU.dic >>en_AU.diff
129         :sys {force} diff -a -C 1 en_CA.orig.aff en_CA.aff >en_CA.diff
130         :sys {force} diff -a -C 1 en_CA.orig.dic en_CA.dic >>en_CA.diff
131         :sys {force} diff -a -C 1 en_GB.orig.aff en_GB.aff >en_GB.diff
132         :sys {force} diff -a -C 1 en_GB.orig.dic en_GB.dic >>en_GB.diff
133         :sys {force} diff -a -C 1 en_NZ.orig.aff en_NZ.aff >en_NZ.diff
134         :sys {force} diff -a -C 1 en_NZ.orig.dic en_NZ.dic >>en_NZ.diff
137 # Check for updated OpenOffice spell files.  When there are changes the
138 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
140 check: check-us check-au check-ca check-gb check-nz
142 check-us:
143         :assertpkg unzip diff
144         :fetch en_US.zip
145         :mkdir tmp
146         :cd tmp
147         @try:
148             @import stat
149             :sys $UNZIP ../en_US.zip
150             :sys {force} diff ../en_US.orig.aff en_US.aff >d
151             @if os.stat('d')[stat.ST_SIZE] > 0:
152                 :copy en_US.aff ../en_US.new.aff
153             :sys {force} diff ../en_US.orig.dic en_US.dic >d
154             @if os.stat('d')[stat.ST_SIZE] > 0:
155                 :copy en_US.dic ../en_US.new.dic
156         @finally:
157             :cd ..
158             :delete {r}{f}{q} tmp
159             :delete en_US.zip
161 check-au:
162         :assertpkg unzip diff
163         :fetch en_AU.zip
164         :mkdir tmp
165         :cd tmp
166         @try:
167             @import stat
168             :sys $UNZIP ../en_AU.zip
169             :sys {force} diff ../en_AU.orig.aff en_AU.aff >d
170             @if os.stat('d')[stat.ST_SIZE] > 0:
171                 :copy en_AU.aff ../en_AU.new.aff
172             :sys {force} diff ../en_AU.orig.dic en_AU.dic >d
173             @if os.stat('d')[stat.ST_SIZE] > 0:
174                 :copy en_AU.dic ../en_AU.new.dic
175         @finally:
176             :cd ..
177             :delete {r}{f}{q} tmp
178             :delete en_AU.zip
180 check-ca:
181         :assertpkg unzip diff
182         :fetch en_CA.zip
183         :mkdir tmp
184         :cd tmp
185         @try:
186             @import stat
187             :sys $UNZIP ../en_CA.zip
188             :sys {force} diff ../en_CA.orig.aff en_CA.aff >d
189             @if os.stat('d')[stat.ST_SIZE] > 0:
190                 :copy en_CA.aff ../en_CA.new.aff
191             :sys {force} diff ../en_CA.orig.dic en_CA.dic >d
192             @if os.stat('d')[stat.ST_SIZE] > 0:
193                 :copy en_CA.dic ../en_CA.new.dic
194         @finally:
195             :cd ..
196             :delete {r}{f}{q} tmp
197             :delete en_CA.zip
199 check-gb:
200         :assertpkg unzip diff
201         :fetch en_GB.zip
202         :mkdir tmp
203         :cd tmp
204         @try:
205             @import stat
206             :sys $UNZIP ../en_GB.zip
207             :sys {force} diff ../en_GB.orig.aff en_GB.aff >d
208             @if os.stat('d')[stat.ST_SIZE] > 0:
209                 :copy en_GB.aff ../en_GB.new.aff
210             :sys {force} diff ../en_GB.orig.dic en_GB.dic >d
211             @if os.stat('d')[stat.ST_SIZE] > 0:
212                 :copy en_GB.dic ../en_GB.new.dic
213         @finally:
214             :cd ..
215             :delete {r}{f}{q} tmp
216             :delete en_GB.zip
218 check-nz:
219         :assertpkg unzip diff
220         :fetch en_NZ.zip
221         :mkdir tmp
222         :cd tmp
223         @try:
224             @import stat
225             :sys $UNZIP ../en_NZ.zip
226             :sys {force} diff ../en_NZ.orig.aff en_NZ.aff >d
227             @if os.stat('d')[stat.ST_SIZE] > 0:
228                 :copy en_NZ.aff ../en_NZ.new.aff
229             :sys {force} diff ../en_NZ.orig.dic en_NZ.dic >d
230             @if os.stat('d')[stat.ST_SIZE] > 0:
231                 :copy en_NZ.dic ../en_NZ.new.dic
232         @finally:
233             :cd ..
234             :delete {r}{f}{q} tmp
235             :delete en_NZ.zip
237 # vim: set sts=4 sw=4 :