1 # Aap recipe for Malay Vim spell files.
3 # Use a freshly compiled Vim if it exists.
4 @if os.path.exists('../../../src/vim'):
10 FILES = ms_MY.aff ms_MY.dic
12 # I do not have a Malay locale, use the Dutch one instead.
13 all: $SPELLDIR/ms.latin1.spl $SPELLDIR/ms.utf-8.spl ../README_ms.txt
15 $SPELLDIR/ms.latin1.spl : $FILES
16 :sys env LANG=nl_NL.ISO8859-1
17 $VIM -u NONE -e -c "mkspell! $SPELLDIR/ms ms_MY" -c q
19 $SPELLDIR/ms.utf-8.spl : $FILES
20 :sys env LANG=nl_NL.UTF-8
21 $VIM -u NONE -e -c "mkspell! $SPELLDIR/ms ms_MY" -c q
23 ../README_ms.txt : README_ms_MY.txt
27 # Fetching the files from OpenOffice.org.
29 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
30 :attr {fetch = $OODIR/%file%} ms_MY.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 ms_MY.aff ms_MY.dic: {buildcheck=}
35 :assertpkg unzip patch
39 :sys $VIM ms_MY.aff -u NONE -e -c "set ff=unix" -c update -c q
40 :sys $VIM ms_MY.dic -u NONE -e -c "set ff=unix" -c update -c q
41 @if not os.path.exists('ms_MY.orig.aff'):
42 :copy ms_MY.aff ms_MY.orig.aff
43 @if not os.path.exists('ms_MY.orig.dic'):
44 :copy ms_MY.dic ms_MY.orig.dic
45 @if os.path.exists('ms_MY.diff'):
46 :sys patch <ms_MY.diff
49 # Generate diff files, so that others can get the OpenOffice files and apply
50 # the diffs to get the Vim versions.
54 :sys {force} diff -a -C 1 ms_MY.orig.aff ms_MY.aff >ms_MY.diff
55 :sys {force} diff -a -C 1 ms_MY.orig.dic ms_MY.dic >>ms_MY.diff
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.
68 :sys $UNZIP ../ms_MY.zip
69 :sys {force} diff ../ms_MY.orig.aff ms_MY.aff >d
70 @if os.stat('d')[stat.ST_SIZE] > 0:
71 :copy ms_MY.aff ../ms_MY.new.aff
72 :sys {force} diff ../ms_MY.orig.dic ms_MY.dic >d
73 @if os.stat('d')[stat.ST_SIZE] > 0:
74 :copy ms_MY.dic ../ms_MY.new.dic
81 # vim: set sts=4 sw=4 :