main.aap 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # Aap recipe for Spanish Vim spell files.
  2. # Use a freshly compiled Vim if it exists.
  3. @if os.path.exists('../../../src/vim'):
  4. VIM = ../../../src/vim
  5. @else:
  6. :progsearch VIM vim
  7. REGIONS = ES MX
  8. ES_REGIONS = es_$*REGIONS
  9. SPELLDIR = ..
  10. FILES = es_$*(REGIONS).aff es_$*(REGIONS).dic
  11. ZIPFILE_ES = es_ES.zip
  12. ZIPFILE_MX = es_MX.zip
  13. ZIPFILES = $ZIPFILE_ES $ZIPFILE_MX
  14. READMES = README_es_$*(REGIONS).txt
  15. all: $SPELLDIR/es.latin1.spl $SPELLDIR/es.utf-8.spl ../README_es.txt
  16. $SPELLDIR/es.latin1.spl : $FILES
  17. :sys env LANG=es_ES.ISO8859-1
  18. $VIM -u NONE -e -c "mkspell! $SPELLDIR/es $ES_REGIONS" -c q
  19. $SPELLDIR/es.utf-8.spl : $FILES
  20. :sys env LANG=es_ES.UTF-8
  21. $VIM -u NONE -e -c "mkspell! $SPELLDIR/es $ES_REGIONS" -c q
  22. ../README_es.txt: $READMES
  23. :print es_ES >! $target
  24. :cat README_es_ES.txt >> $target
  25. :print =================================================== >>$target
  26. :print es_MX >> $target
  27. :cat README_es_MX.txt >> $target
  28. #
  29. # Fetching the files from the OpenOffice.org site.
  30. # The OLDSPELL file comes from elsewhere
  31. #
  32. OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
  33. :attr {fetch = $OODIR/%file%} $ZIPFILES
  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. es_ES.aff es_ES.dic: {buildcheck=}
  37. :assertpkg unzip patch
  38. :fetch $ZIPFILE_ES
  39. :sys $UNZIP $ZIPFILE_ES
  40. :delete Changelog_es_ES.txt
  41. :delete $ZIPFILE_ES
  42. @if not os.path.exists('es_ES.orig.aff'):
  43. :copy es_ES.aff es_ES.orig.aff
  44. @if not os.path.exists('es_ES.orig.dic'):
  45. :copy es_ES.dic es_ES.orig.dic
  46. @if os.path.exists('es_ES.diff'):
  47. :sys patch <es_ES.diff
  48. es_MX.aff es_MX.dic: {buildcheck=}
  49. :assertpkg unzip patch
  50. :fetch $ZIPFILE_MX
  51. :print No copyright information for es_MX wordlist >! README_es_MX.txt
  52. :sys $UNZIP $ZIPFILE_MX
  53. :delete $ZIPFILE_MX
  54. :sys $VIM -u NONE -e -c "set ff=unix | wq" es_MX.dic
  55. @if not os.path.exists('es_MX.orig.aff'):
  56. :copy es_MX.aff es_MX.orig.aff
  57. @if not os.path.exists('es_MX.orig.dic'):
  58. :copy es_MX.dic es_MX.orig.dic
  59. @if os.path.exists('es_MX.diff'):
  60. :sys patch <es_MX.diff
  61. # Generate diff files, so that others can get the OpenOffice files and apply
  62. # the diffs to get the Vim versions.
  63. diff:
  64. :assertpkg diff
  65. :sys {force} diff -a -C 1 es_ES.orig.aff es_ES.aff >es_ES.diff
  66. :sys {force} diff -a -C 1 es_ES.orig.dic es_ES.dic >>es_ES.diff
  67. :sys {force} diff -a -C 1 es_MX.orig.aff es_MX.aff >es_MX.diff
  68. :sys {force} diff -a -C 1 es_MX.orig.dic es_MX.dic >>es_MX.diff
  69. # Check for updated OpenOffice spell files. When there are changes the
  70. # ".new.aff" and ".new.dic" files are left behind for manual inspection.
  71. check:
  72. :print TODO!!!!
  73. # vim: set sts=4 sw=4 :