1 # Aap recipe for Latin Vim spell files.
3 # Use a freshly compiled Vim if it exists.
4 @if os.path.exists('../../../src/vim'):
12 all: $SPELLDIR/la.latin1.spl $SPELLDIR/la.utf-8.spl ../README_la.txt
14 # NOTE: the la_LN.ISO-8859-1 locale is not available on Ubuntu.
15 # Use the English one instead.
17 $SPELLDIR/la.latin1.spl : $FILES
18 :sys env LANG=en_US.ISO-8859-1
19 $VIM -u NONE -e -c "mkspell! $SPELLDIR/la la" -c q
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
25 ../README_la.txt : README_la.txt
29 # Fetching the files from OpenOffice.org.
31 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
32 :attr {fetch = $OODIR/%file%} la.zip
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
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'):
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 la.orig.aff la.aff >la.diff
55 :sys {force} diff -a -C 1 la.orig.dic la.dic >>la.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.
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
81 # vim: set sts=4 sw=4 :