Mercurial > vim
annotate runtime/spell/la/main.aap @ 7430:e2fe7a67b3a4 v7.4.1019
commit https://github.com/vim/vim/commit/39373819fd5fad825df416f1e2b96a6f43758e23
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jan 1 17:20:27 2016 +0100
patch 7.4.1019
Problem: Directory listing of "src" is too long.
Solution: Rename the resources file to make it shorter.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 01 Jan 2016 17:30:04 +0100 |
parents | ea3c3f13385c |
children |
rev | line source |
---|---|
502 | 1 # Aap recipe for Latin 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: | |
7 :progsearch VIM vim | |
8 | |
9 SPELLDIR = .. | |
10 FILES = la.aff la.dic | |
11 | |
12 all: $SPELLDIR/la.latin1.spl $SPELLDIR/la.utf-8.spl ../README_la.txt | |
13 | |
2292
ea3c3f13385c
Update spell files for Ubuntu locale names.
Bram Moolenaar <bram@vim.org>
parents:
502
diff
changeset
|
14 # NOTE: the la_LN.ISO-8859-1 locale is not available on Ubuntu. |
ea3c3f13385c
Update spell files for Ubuntu locale names.
Bram Moolenaar <bram@vim.org>
parents:
502
diff
changeset
|
15 # Use the English one instead. |
ea3c3f13385c
Update spell files for Ubuntu locale names.
Bram Moolenaar <bram@vim.org>
parents:
502
diff
changeset
|
16 |
502 | 17 $SPELLDIR/la.latin1.spl : $FILES |
2292
ea3c3f13385c
Update spell files for Ubuntu locale names.
Bram Moolenaar <bram@vim.org>
parents:
502
diff
changeset
|
18 :sys env LANG=en_US.ISO-8859-1 |
502 | 19 $VIM -u NONE -e -c "mkspell! $SPELLDIR/la la" -c q |
20 | |
21 $SPELLDIR/la.utf-8.spl : $FILES | |
22 :sys $VIM -u NONE -e -c "set enc=utf-8" | |
23 -c "mkspell! $SPELLDIR/la la" -c q | |
24 | |
25 ../README_la.txt : README_la.txt | |
26 :copy $source $target | |
27 | |
28 # | |
29 # Fetching the files from OpenOffice.org. | |
30 # | |
31 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries | |
32 :attr {fetch = $OODIR/%file%} la.zip | |
33 | |
34 # The files don't depend on the .zip file so that we can delete it. | |
35 # Only download the zip file if the targets don't exist. | |
36 la.aff la.dic: {buildcheck=} | |
37 :assertpkg unzip patch | |
38 :fetch la.zip | |
39 :sys $UNZIP la.zip | |
40 :delete la.zip | |
41 @if not os.path.exists('la.orig.aff'): | |
42 :copy la.aff la.orig.aff | |
43 @if not os.path.exists('la.orig.dic'): | |
44 :copy la.dic la.orig.dic | |
45 @if os.path.exists('la.diff'): | |
46 :sys patch <la.diff | |
47 | |
48 | |
49 # Generate diff files, so that others can get the OpenOffice files and apply | |
50 # the diffs to get the Vim versions. | |
51 | |
52 diff: | |
53 :assertpkg diff | |
54 :sys {force} diff -a -C 1 la.orig.aff la.aff >la.diff | |
55 :sys {force} diff -a -C 1 la.orig.dic la.dic >>la.diff | |
56 | |
57 | |
58 # Check for updated OpenOffice spell files. When there are changes the | |
59 # ".new.aff" and ".new.dic" files are left behind for manual inspection. | |
60 | |
61 check: | |
62 :assertpkg unzip diff | |
63 :fetch la.zip | |
64 :mkdir tmp | |
65 :cd tmp | |
66 @try: | |
67 @import stat | |
68 :sys $UNZIP ../la.zip | |
69 :sys {force} diff ../la.orig.aff la.aff >d | |
70 @if os.stat('d')[stat.ST_SIZE] > 0: | |
71 :copy la.aff ../la.new.aff | |
72 :sys {force} diff ../la.orig.dic la.dic >d | |
73 @if os.stat('d')[stat.ST_SIZE] > 0: | |
74 :copy la.dic ../la.new.dic | |
75 @finally: | |
76 :cd .. | |
77 :delete {r}{f}{q} tmp | |
78 :delete la.zip | |
79 | |
80 | |
81 # vim: set sts=4 sw=4 : |