1 # Aap recipe for Hungarian Vim spell files.
3 # Use a freshly compiled Vim if it exists.
4 @if os.path.exists('../../../src/vim'):
10 FILES = hu_HU.aff hu_HU.dic
12 all: $SPELLDIR/hu.iso-8859-2.spl $SPELLDIR/hu.utf-8.spl \
13 $SPELLDIR/hu.cp1250.spl ../README_hu.txt
15 $SPELLDIR/hu.iso-8859-2.spl : $FILES
16 :sys env LANG=hu_HU.ISO8859-2 $VIM -u NONE -e -c "mkspell! $SPELLDIR/hu hu_HU" -c q
18 $SPELLDIR/hu.utf-8.spl : $FILES
19 :sys env LANG=hu_HU.UTF-8 $VIM -u NONE -e -c "mkspell! $SPELLDIR/hu hu_HU" -c q
21 $SPELLDIR/hu.cp1250.spl : $FILES
22 :sys $VIM -u NONE -e -c "set enc=cp1250" -c "mkspell! $SPELLDIR/hu hu_HU" -c q
24 ../README_hu.txt: README_hu_HU.txt
28 # Fetching the files from OpenOffice.org.
30 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
31 :attr {fetch = $OODIR/%file%} hu_HU.zip
33 # The files don't depend on the .zip file so that we can delete it.
34 # Only download the zip file if the targets don't exist.
35 # This is a bit tricky, since the file name includes the date.
36 hu_HU.aff hu_HU.dic: {buildcheck=}
37 :assertpkg unzip patch
41 @if not os.path.exists('hu_HU.orig.aff'):
42 :copy hu_HU.aff hu_HU.orig.aff
43 @if not os.path.exists('hu_HU.orig.dic'):
44 :copy hu_HU.dic hu_HU.orig.dic
45 @if os.path.exists('hu_HU.diff'):
46 :sys patch <hu_HU.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 hu_HU.orig.aff hu_HU.aff >hu_HU.diff
55 :sys {force} diff -a -C 1 hu_HU.orig.dic hu_HU.dic >>hu_HU.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 ../hu_HU.zip
69 :sys {force} diff ../hu_HU.orig.aff hu_HU.aff >d
70 @if os.stat('d')[stat.ST_SIZE] > 0:
71 :copy hu_HU.aff ../hu_HU.new.aff
72 :sys {force} diff ../hu_HU.orig.dic hu_HU.dic >d
73 @if os.stat('d')[stat.ST_SIZE] > 0:
74 :copy hu_HU.dic ../hu_HU.new.dic
81 # vim: set sts=4 sw=4 :