Mercurial > vim
annotate runtime/spell/en/main.aap @ 17761:109a0889b900 v8.1.1877
patch 8.1.1877: graduated features scattered
commit https://github.com/vim/vim/commit/ffc0716af8e448ef8a2a3249edfd0260546933df
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 17 20:17:51 2019 +0200
patch 8.1.1877: graduated features scattered
Problem: Graduated features scattered.
Solution: Put graduated and obsolete features together.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 17 Aug 2019 20:30:03 +0200 |
parents | 3eda97270667 |
children |
rev | line source |
---|---|
388 | 1 # Aap recipe for English Vim spell files. |
2 | |
3 # Use a freshly compiled Vim if it exists. | |
4 @if os.path.exists('../../../src/vim'): | |
5 VIM = ../../../src/vim | |
6 @else: | |
456 | 7 :progsearch VIM vim |
388 | 8 |
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 | |
15 | |
481 | 16 all: $SPELLDIR/en.latin1.spl $SPELLDIR/en.utf-8.spl \ |
17 $SPELLDIR/en.ascii.spl ../README_en.txt | |
388 | 18 |
482 | 19 $SPELLDIR/en.latin1.spl : $FILES |
388 | 20 :sys env LANG=en_US.ISO8859-1 |
481 | 21 $VIM -u NONE -e -c "mkspell! $SPELLDIR/en |
448 | 22 en_US en_AU en_CA en_GB en_NZ" -c q |
388 | 23 |
482 | 24 $SPELLDIR/en.utf-8.spl : $FILES |
388 | 25 :sys env LANG=en_US.UTF-8 |
481 | 26 $VIM -u NONE -e -c "mkspell! $SPELLDIR/en |
448 | 27 en_US en_AU en_CA en_GB en_NZ" -c q |
388 | 28 |
482 | 29 $SPELLDIR/en.ascii.spl : $FILES |
481 | 30 :sys $VIM -u NONE -e -c "mkspell! -ascii $SPELLDIR/en |
388 | 31 en_US en_AU en_CA en_GB en_NZ" -c q |
32 | |
7401
254d2d36b143
commit https://github.com/vim/vim/commit/cc7ff3fcd8c8fd7da6faac98a138b830ec5c00d8
Christian Brabandt <cb@256bit.org>
parents:
482
diff
changeset
|
33 ../README_en.txt: README_en_US.txt README_en_AU.txt README_en_CA.txt README_en_GB.txt README_en_NZ.txt |
388 | 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 | |
48 | |
49 # | |
50 # Fetching the files from OpenOffice.org. | |
7401
254d2d36b143
commit https://github.com/vim/vim/commit/cc7ff3fcd8c8fd7da6faac98a138b830ec5c00d8
Christian Brabandt <cb@256bit.org>
parents:
482
diff
changeset
|
51 # THIS URL NO LONGER WORKS. |
254d2d36b143
commit https://github.com/vim/vim/commit/cc7ff3fcd8c8fd7da6faac98a138b830ec5c00d8
Christian Brabandt <cb@256bit.org>
parents:
482
diff
changeset
|
52 # |
7508
3eda97270667
commit https://github.com/vim/vim/commit/a61018d7e02a4c98086a04ef747ff0406437b509
Christian Brabandt <cb@256bit.org>
parents:
7401
diff
changeset
|
53 # Files for en_US, en_CA and en_GB can be obtained from: |
7401
254d2d36b143
commit https://github.com/vim/vim/commit/cc7ff3fcd8c8fd7da6faac98a138b830ec5c00d8
Christian Brabandt <cb@256bit.org>
parents:
482
diff
changeset
|
54 # github.com/marcoagpinto/aoo-mozilla-en-dict |
7508
3eda97270667
commit https://github.com/vim/vim/commit/a61018d7e02a4c98086a04ef747ff0406437b509
Christian Brabandt <cb@256bit.org>
parents:
7401
diff
changeset
|
55 # Unfortunately, giving suggestions becomes terribly slow with these. |
3eda97270667
commit https://github.com/vim/vim/commit/a61018d7e02a4c98086a04ef747ff0406437b509
Christian Brabandt <cb@256bit.org>
parents:
7401
diff
changeset
|
56 # TODO: find out why suggestions are slow and fix that. |
7401
254d2d36b143
commit https://github.com/vim/vim/commit/cc7ff3fcd8c8fd7da6faac98a138b830ec5c00d8
Christian Brabandt <cb@256bit.org>
parents:
482
diff
changeset
|
57 # |
7508
3eda97270667
commit https://github.com/vim/vim/commit/a61018d7e02a4c98086a04ef747ff0406437b509
Christian Brabandt <cb@256bit.org>
parents:
7401
diff
changeset
|
58 # For now we use the older libraries. |
388 | 59 # |
60 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries | |
481 | 61 :attr {fetch = $OODIR/%file%} en_US.zip en_CA.zip en_NZ.zip |
388 | 62 en_GB.zip en_AU.zip |
63 | |
64 # The files don't depend on the .zip file so that we can delete it. | |
65 # Only download the zip file if the targets don't exist. | |
66 en_US.aff en_US.dic: {buildcheck=} | |
67 :assertpkg unzip patch | |
68 :fetch en_US.zip | |
481 | 69 :sys $UNZIP en_US.zip |
388 | 70 :delete en_US.zip |
71 @if not os.path.exists('en_US.orig.aff'): | |
481 | 72 :copy en_US.aff en_US.orig.aff |
388 | 73 @if not os.path.exists('en_US.orig.dic'): |
481 | 74 :copy en_US.dic en_US.orig.dic |
456 | 75 @if os.path.exists('en_US.diff'): |
76 :sys patch <en_US.diff | |
388 | 77 |
78 en_AU.aff en_AU.dic: {buildcheck=} | |
79 :assertpkg unzip patch | |
80 :fetch en_AU.zip | |
481 | 81 :sys $UNZIP en_AU.zip |
388 | 82 :delete en_AU.zip |
83 @if not os.path.exists('en_AU.orig.aff'): | |
481 | 84 :copy en_AU.aff en_AU.orig.aff |
388 | 85 @if not os.path.exists('en_AU.orig.dic'): |
481 | 86 :copy en_AU.dic en_AU.orig.dic |
456 | 87 @if os.path.exists('en_AU.diff'): |
88 :sys patch <en_AU.diff | |
388 | 89 |
90 en_CA.aff en_CA.dic: {buildcheck=} | |
91 :assertpkg unzip patch | |
92 :fetch en_CA.zip | |
481 | 93 :sys $UNZIP en_CA.zip |
388 | 94 :delete en_CA.zip |
95 @if not os.path.exists('en_CA.orig.aff'): | |
481 | 96 :copy en_CA.aff en_CA.orig.aff |
388 | 97 @if not os.path.exists('en_CA.orig.dic'): |
481 | 98 :copy en_CA.dic en_CA.orig.dic |
456 | 99 @if os.path.exists('en_CA.diff'): |
100 :sys patch <en_CA.diff | |
388 | 101 |
102 en_GB.aff en_GB.dic: {buildcheck=} | |
103 :assertpkg unzip patch | |
104 :fetch en_GB.zip | |
481 | 105 :sys $UNZIP en_GB.zip |
388 | 106 :delete en_GB.zip |
107 :delete dictionary.lst.example | |
108 @if not os.path.exists('en_GB.orig.aff'): | |
481 | 109 :copy en_GB.aff en_GB.orig.aff |
388 | 110 @if not os.path.exists('en_GB.orig.dic'): |
481 | 111 :copy en_GB.dic en_GB.orig.dic |
456 | 112 @if os.path.exists('en_GB.diff'): |
113 :sys patch <en_GB.diff | |
388 | 114 |
115 en_NZ.aff en_NZ.dic: {buildcheck=} | |
116 :assertpkg unzip patch | |
117 :fetch en_NZ.zip | |
481 | 118 :sys $UNZIP en_NZ.zip |
388 | 119 :delete en_NZ.zip |
120 @if not os.path.exists('en_NZ.orig.aff'): | |
481 | 121 :copy en_NZ.aff en_NZ.orig.aff |
388 | 122 @if not os.path.exists('en_NZ.orig.dic'): |
481 | 123 :copy en_NZ.dic en_NZ.orig.dic |
456 | 124 @if os.path.exists('en_NZ.diff'): |
125 :sys patch <en_NZ.diff | |
388 | 126 |
127 | |
7401
254d2d36b143
commit https://github.com/vim/vim/commit/cc7ff3fcd8c8fd7da6faac98a138b830ec5c00d8
Christian Brabandt <cb@256bit.org>
parents:
482
diff
changeset
|
128 # Generate diff files, so that others can get the original files and apply |
388 | 129 # the diffs to get the Vim versions. |
130 | |
131 diff: | |
132 :assertpkg diff | |
133 :sys {force} diff -a -C 1 en_US.orig.aff en_US.aff >en_US.diff | |
134 :sys {force} diff -a -C 1 en_US.orig.dic en_US.dic >>en_US.diff | |
135 :sys {force} diff -a -C 1 en_AU.orig.aff en_AU.aff >en_AU.diff | |
136 :sys {force} diff -a -C 1 en_AU.orig.dic en_AU.dic >>en_AU.diff | |
137 :sys {force} diff -a -C 1 en_CA.orig.aff en_CA.aff >en_CA.diff | |
138 :sys {force} diff -a -C 1 en_CA.orig.dic en_CA.dic >>en_CA.diff | |
139 :sys {force} diff -a -C 1 en_GB.orig.aff en_GB.aff >en_GB.diff | |
140 :sys {force} diff -a -C 1 en_GB.orig.dic en_GB.dic >>en_GB.diff | |
141 :sys {force} diff -a -C 1 en_NZ.orig.aff en_NZ.aff >en_NZ.diff | |
142 :sys {force} diff -a -C 1 en_NZ.orig.dic en_NZ.dic >>en_NZ.diff | |
143 | |
144 | |
145 # Check for updated OpenOffice spell files. When there are changes the | |
146 # ".new.aff" and ".new.dic" files are left behind for manual inspection. | |
147 | |
148 check: check-us check-au check-ca check-gb check-nz | |
149 | |
150 check-us: | |
151 :assertpkg unzip diff | |
152 :fetch en_US.zip | |
153 :mkdir tmp | |
154 :cd tmp | |
155 @try: | |
156 @import stat | |
481 | 157 :sys $UNZIP ../en_US.zip |
388 | 158 :sys {force} diff ../en_US.orig.aff en_US.aff >d |
159 @if os.stat('d')[stat.ST_SIZE] > 0: | |
160 :copy en_US.aff ../en_US.new.aff | |
161 :sys {force} diff ../en_US.orig.dic en_US.dic >d | |
162 @if os.stat('d')[stat.ST_SIZE] > 0: | |
163 :copy en_US.dic ../en_US.new.dic | |
164 @finally: | |
165 :cd .. | |
166 :delete {r}{f}{q} tmp | |
167 :delete en_US.zip | |
168 | |
169 check-au: | |
170 :assertpkg unzip diff | |
171 :fetch en_AU.zip | |
172 :mkdir tmp | |
173 :cd tmp | |
174 @try: | |
175 @import stat | |
481 | 176 :sys $UNZIP ../en_AU.zip |
388 | 177 :sys {force} diff ../en_AU.orig.aff en_AU.aff >d |
178 @if os.stat('d')[stat.ST_SIZE] > 0: | |
179 :copy en_AU.aff ../en_AU.new.aff | |
180 :sys {force} diff ../en_AU.orig.dic en_AU.dic >d | |
181 @if os.stat('d')[stat.ST_SIZE] > 0: | |
182 :copy en_AU.dic ../en_AU.new.dic | |
183 @finally: | |
184 :cd .. | |
185 :delete {r}{f}{q} tmp | |
186 :delete en_AU.zip | |
187 | |
188 check-ca: | |
189 :assertpkg unzip diff | |
190 :fetch en_CA.zip | |
191 :mkdir tmp | |
192 :cd tmp | |
193 @try: | |
194 @import stat | |
481 | 195 :sys $UNZIP ../en_CA.zip |
388 | 196 :sys {force} diff ../en_CA.orig.aff en_CA.aff >d |
197 @if os.stat('d')[stat.ST_SIZE] > 0: | |
198 :copy en_CA.aff ../en_CA.new.aff | |
199 :sys {force} diff ../en_CA.orig.dic en_CA.dic >d | |
200 @if os.stat('d')[stat.ST_SIZE] > 0: | |
201 :copy en_CA.dic ../en_CA.new.dic | |
202 @finally: | |
203 :cd .. | |
204 :delete {r}{f}{q} tmp | |
205 :delete en_CA.zip | |
206 | |
207 check-gb: | |
208 :assertpkg unzip diff | |
209 :fetch en_GB.zip | |
210 :mkdir tmp | |
211 :cd tmp | |
212 @try: | |
213 @import stat | |
481 | 214 :sys $UNZIP ../en_GB.zip |
388 | 215 :sys {force} diff ../en_GB.orig.aff en_GB.aff >d |
216 @if os.stat('d')[stat.ST_SIZE] > 0: | |
217 :copy en_GB.aff ../en_GB.new.aff | |
218 :sys {force} diff ../en_GB.orig.dic en_GB.dic >d | |
219 @if os.stat('d')[stat.ST_SIZE] > 0: | |
220 :copy en_GB.dic ../en_GB.new.dic | |
221 @finally: | |
222 :cd .. | |
223 :delete {r}{f}{q} tmp | |
224 :delete en_GB.zip | |
225 | |
226 check-nz: | |
227 :assertpkg unzip diff | |
228 :fetch en_NZ.zip | |
229 :mkdir tmp | |
230 :cd tmp | |
231 @try: | |
232 @import stat | |
481 | 233 :sys $UNZIP ../en_NZ.zip |
388 | 234 :sys {force} diff ../en_NZ.orig.aff en_NZ.aff >d |
235 @if os.stat('d')[stat.ST_SIZE] > 0: | |
236 :copy en_NZ.aff ../en_NZ.new.aff | |
237 :sys {force} diff ../en_NZ.orig.dic en_NZ.dic >d | |
238 @if os.stat('d')[stat.ST_SIZE] > 0: | |
239 :copy en_NZ.dic ../en_NZ.new.dic | |
240 @finally: | |
241 :cd .. | |
242 :delete {r}{f}{q} tmp | |
243 :delete en_NZ.zip | |
244 | |
245 # vim: set sts=4 sw=4 : |