vim72-20100325-kaoriya-w64j.zip
[MacVim/KaoriYa.git] / runtime / spell / af / main.aap
blobec5382509f5b2540c845d1ccea3b4042eb5c2fda
1 # Aap recipe for Afrikaans 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    = af_ZA.aff af_ZA.dic
12 all: $SPELLDIR/af.latin1.spl $SPELLDIR/af.utf-8.spl ../README_af.txt
14 $SPELLDIR/af.latin1.spl : $FILES
15         :sys env LANG=af_ZA.ISO8859-1
16                 $VIM -u NONE -e -c "mkspell! $SPELLDIR/af af_ZA" -c q
18 $SPELLDIR/af.utf-8.spl : $FILES
19         :sys env LANG=af_ZA.UTF-8
20                 $VIM -u NONE -e -c "mkspell! $SPELLDIR/af af_ZA" -c q
22 ../README_af.txt : README_af_ZA.txt
23         :copy $source $target
26 # Fetching the file from SourceForge.  The archive at OpenOffice is broken!
28 FILE = http://surfnet.dl.sourceforge.net/sourceforge/translate/myspell-af_ZA-20040727.zip
30 :attr {fetch = $FILE} af_ZA.zip
32 # The files don't depend on the .zip file so that we can delete it.
33 # Only download the zip file if the targets don't exist.
34 af_ZA.aff af_ZA.dic: {buildcheck=}
35         :assertpkg unzip patch
36         :fetch af_ZA.zip
37         :sys $UNZIP af_ZA.zip
38         :delete af_ZA.zip
39         @if not os.path.exists('af_ZA.orig.aff'):
40             :copy af_ZA.aff af_ZA.orig.aff
41         @if not os.path.exists('af_ZA.orig.dic'):
42             :copy af_ZA.dic af_ZA.orig.dic
43         @if os.path.exists('af_ZA.diff'):
44             :sys patch <af_ZA.diff
47 # Generate diff files, so that others can get the OpenOffice files and apply
48 # the diffs to get the Vim versions.
50 diff:
51         :assertpkg diff
52         :sys {force} diff -a -C 1 af_ZA.orig.aff af_ZA.aff >af_ZA.diff
53         :sys {force} diff -a -C 1 af_ZA.orig.dic af_ZA.dic >>af_ZA.diff
56 # Check for updated OpenOffice spell files.  When there are changes the
57 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
59 check:
60         :assertpkg unzip diff
61         :fetch af_ZA.zip
62         :mkdir tmp
63         :cd tmp
64         @try:
65             @import stat
66             :sys $UNZIP ../af_ZA.zip
67             :sys {force} diff ../af_ZA.orig.aff af_ZA.aff >d
68             @if os.stat('d')[stat.ST_SIZE] > 0:
69                 :copy af_ZA.aff ../af_ZA.new.aff
70             :sys {force} diff ../af_ZA.orig.dic af_ZA.dic >d
71             @if os.stat('d')[stat.ST_SIZE] > 0:
72                 :copy af_ZA.dic ../af_ZA.new.dic
73         @finally:
74             :cd ..
75             :delete {r}{f}{q} tmp
76             :delete af_ZA.zip
79 # vim: set sts=4 sw=4 :