1 # Aap recipe for Spanish Vim spell files.
3 # Use a freshly compiled Vim if it exists.
4 @if os.path.exists('../../../src/vim'):
10 ES_REGIONS = es_$*REGIONS
13 FILES = es_$*(REGIONS).aff es_$*(REGIONS).dic
15 ZIPFILE_ES = es_ES.zip
16 ZIPFILE_MX = es_MX.zip
17 ZIPFILES = $ZIPFILE_ES $ZIPFILE_MX
19 READMES = README_es_$*(REGIONS).txt
21 all: $SPELLDIR/es.latin1.spl $SPELLDIR/es.utf-8.spl ../README_es.txt
23 $SPELLDIR/es.latin1.spl : $FILES
24 :sys env LANG=es_ES.ISO8859-1
25 $VIM -u NONE -e -c "mkspell! $SPELLDIR/es $ES_REGIONS" -c q
27 $SPELLDIR/es.utf-8.spl : $FILES
28 :sys env LANG=es_ES.UTF-8
29 $VIM -u NONE -e -c "mkspell! $SPELLDIR/es $ES_REGIONS" -c q
31 ../README_es.txt: $READMES
32 :print es_ES >! $target
33 :cat README_es_ES.txt >> $target
34 :print =================================================== >>$target
35 :print es_MX >> $target
36 :cat README_es_MX.txt >> $target
39 # Fetching the files from the OpenOffice.org site.
40 # The OLDSPELL file comes from elsewhere
42 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
43 :attr {fetch = $OODIR/%file%} $ZIPFILES
45 # The files don't depend on the .zip file so that we can delete it.
46 # Only download the zip file if the targets don't exist.
47 es_ES.aff es_ES.dic: {buildcheck=}
48 :assertpkg unzip patch
50 :sys $UNZIP $ZIPFILE_ES
51 :delete Changelog_es_ES.txt
53 @if not os.path.exists('es_ES.orig.aff'):
54 :copy es_ES.aff es_ES.orig.aff
55 @if not os.path.exists('es_ES.orig.dic'):
56 :copy es_ES.dic es_ES.orig.dic
57 @if os.path.exists('es_ES.diff'):
58 :sys patch <es_ES.diff
60 es_MX.aff es_MX.dic: {buildcheck=}
61 :assertpkg unzip patch
63 :print No copyright information for es_MX wordlist >! README_es_MX.txt
64 :sys $UNZIP $ZIPFILE_MX
66 :sys $VIM -e -c "set ff=unix | wq" es_MX.dic
67 @if not os.path.exists('es_MX.orig.aff'):
68 :copy es_MX.aff es_MX.orig.aff
69 @if not os.path.exists('es_MX.orig.dic'):
70 :copy es_MX.dic es_MX.orig.dic
71 @if os.path.exists('es_MX.diff'):
72 :sys patch <es_MX.diff
75 # Generate diff files, so that others can get the OpenOffice files and apply
76 # the diffs to get the Vim versions.
79 :sys {force} diff -a -C 1 es_ES.orig.aff es_ES.aff >es_ES.diff
80 :sys {force} diff -a -C 1 es_ES.orig.dic es_ES.dic >>es_ES.diff
81 :sys {force} diff -a -C 1 es_MX.orig.aff es_MX.aff >es_MX.diff
82 :sys {force} diff -a -C 1 es_MX.orig.dic es_MX.dic >>es_MX.diff
85 # Check for updated OpenOffice spell files. When there are changes the
86 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
92 # vim: set sts=4 sw=4 :