annotate runtime/spell/br/main.aap @ 7010:f28fa3fc6821

Added tag v7-4-822 for changeset 286fd54c7ae3
author Bram Moolenaar <bram@vim.org>
date Tue, 11 Aug 2015 19:14:00 +0200
parents 61bcafd8c648
children c590de398af9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
1 # Aap recipe for Breton Vim spell files.
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
2
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
3 # Use a freshly compiled Vim if it exists.
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
4 @if os.path.exists('../../../src/vim'):
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
5 VIM = ../../../src/vim
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
6 @else:
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
7 :progsearch VIM vim
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
8
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
9 SPELLDIR = ..
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
10 FILES = br_FR.aff br_FR.dic
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
11
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
12 all: $SPELLDIR/br.latin1.spl $SPELLDIR/br.utf-8.spl ../README_br.txt
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
13
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
14 $SPELLDIR/br.latin1.spl : $FILES
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
15 :sys $VIM -u NONE -e -c "set enc=latin1"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
16 -c "mkspell! $SPELLDIR/br br_FR" -c q
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
17
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
18 $SPELLDIR/br.utf-8.spl : $FILES
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
19 :sys $VIM -u NONE -e -c "set enc=UTF-8"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
20 -c "mkspell! $SPELLDIR/br br_FR" -c q
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
21
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
22 ../README_br.txt : package-description.txt
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
23 :copy $source $target
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
24
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
25 #
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
26 # Fetching the files from OpenOffice.org.
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
27 #
4119
61bcafd8c648 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
28 OODIR = http://extensions.libreoffice.org/extension-center/an-drouizig-breton-spellchecker/releases/0.11/
61bcafd8c648 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
29 :attr {fetch = $OODIR/%file%} dict-br-0.11.oxt
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
30
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
31 # The files don't depend on the .zip file so that we can delete it.
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
32 # Only download the zip file if the targets don't exist.
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
33 br_FR.aff br_FR.dic: {buildcheck=}
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
34 :assertpkg unzip patch
4119
61bcafd8c648 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
35 :fetch dict-br-0.11.oxt
61bcafd8c648 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
36 :sys $UNZIP dict-br-0.11.oxt
61bcafd8c648 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
37 :delete dict-br-0.11.oxt
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
38 :copy dictionaries/br_FR.aff br_FR.aff
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
39 :copy dictionaries/br_FR.dic br_FR.dic
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
40 # The br_FR.aff file contains a BOM, remove it.
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
41 :sys $VIM -u NONE -e -c "set enc=utf-8"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
42 -c "e br_FR.aff"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
43 -c "set nobomb ff=unix"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
44 -c "update" -c q
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
45 :sys $VIM -u NONE -e -c "set enc=utf-8"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
46 -c "e br_FR.dic"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
47 -c "set nobomb ff=unix"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
48 -c "update" -c q
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
49 @if not os.path.exists('br_FR.orig.aff'):
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
50 :copy br_FR.aff br_FR.orig.aff
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
51 @if os.path.exists('br_FR.diff'):
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
52 :sys patch <br_FR.diff
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
53
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
54 # Generate diff files, so that others can get the OpenOffice files and apply
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
55 # the diffs to get the Vim versions.
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
56
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
57 diff:
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
58 :assertpkg diff
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
59 :sys {force} diff -a -C 1 dictionaries/br_FR.aff br_FR.aff >br_FR.diff
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
60 :sys {force} diff -a -C 1 dictionaries/br_FR.dic br_FR.dic >>br_FR.diff
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
61
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
62
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
63 # Check for updated OpenOffice spell files. When there are changes the
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
64 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
65
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
66 check:
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
67 :assertpkg unzip diff
4119
61bcafd8c648 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
68 :fetch dict-br-0.11.oxt
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
69 :mkdir tmp
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
70 :cd tmp
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
71 @try:
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
72 @import stat
4119
61bcafd8c648 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
73 :sys $UNZIP ../dict-br-0.11.oxt
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
74 :sys {force} diff ../dictionaries/br_FR.aff br_FR.aff >d
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
75 @if os.stat('d')[stat.ST_SIZE] > 0:
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
76 :copy br_FR.aff ../br_FR.new.aff
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
77 :sys {force} diff ../dictionaries/br_FR.dic br_FR.dic >d
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
78 @if os.stat('d')[stat.ST_SIZE] > 0:
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
79 :copy br_FR.dic ../br_FR.new.dic
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
80 @finally:
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
81 :cd ..
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
82 :delete {r}{f}{q} tmp
4119
61bcafd8c648 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3750
diff changeset
83 :delete dict-br-0.11.oxt
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
84
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
85
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents:
diff changeset
86 # vim: set sts=4 sw=4 :