main.aap 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Aap recipe for Basque Vim spell files.
  2. #
  3. # NOTE: This takes a VERY long time: several hours on a modern PC, more than
  4. # a day on older systems.
  5. # Select the amount of memory that can be used.
  6. # Default.
  7. #SETTING = 'set mkspellmem=460000,2000,500'
  8. # For about 1 Tbyte of RAM.
  9. #SETTING = 'set mkspellmem=900000,4000,1000'
  10. # For about 2 Tbyte of RAM.
  11. #SETTING = 'set mkspellmem=1900000,8000,2000'
  12. # For about 4 Tbyte of RAM.
  13. #SETTING = 'set mkspellmem=3900000,16000,4000'
  14. # For about 8 Tbyte of RAM.
  15. SETTING = 'set mkspellmem=7900000,30000,8000'
  16. # Use a freshly compiled Vim if it exists.
  17. @if os.path.exists('../../../src/vim'):
  18. VIM = ../../../src/vim
  19. @else:
  20. :progsearch VIM vim
  21. SPELLDIR = ..
  22. FILES = eu_ES.aff eu_ES.dic
  23. all: $SPELLDIR/eu.utf-8.spl ../README_eu.txt
  24. $SPELLDIR/eu.utf-8.spl : $FILES
  25. :sys env LANG=eu_ES.UTF-8
  26. $VIM -u NONE -e -c $SETTING -c "mkspell! $SPELLDIR/eu eu_ES" -c q
  27. #
  28. # Fetching the files.
  29. # URL suggested by Zuhaitz Beloki Leiza.
  30. #
  31. :attr {fetch = http://xuxen.eus/static/hunspell/xuxen_5.1_hunspell.tar.gz} xuxen_5.1_hunspell.tar.gz
  32. # The files don't depend on the tar file so that we can delete it.
  33. # Only download the tar file if the targets don't exist.
  34. eu_ES.aff eu_ES.dic: {buildcheck=}
  35. :assertpkg tar
  36. :fetch xuxen_5.1_hunspell.tar.gz
  37. :sys tar xf xuxen_5.1_hunspell.tar.gz
  38. :update cleanunused
  39. @if not os.path.exists('eu_ES.orig.aff'):
  40. :copy eu_ES.aff eu_ES.orig.aff
  41. @if not os.path.exists('eu_ES.orig.dic'):
  42. :copy eu_ES.dic eu_ES.orig.dic
  43. @if os.path.exists('eu_ES.diff'):
  44. :sys patch <eu_ES.diff
  45. ../README_eu.txt : LICENSE.txt
  46. :cat $source >! $target
  47. # Delete all the files unpacked from the archive
  48. clean: cleanunused
  49. :delete {f} eu_ES.dic
  50. :delete {f} eu_ES.aff
  51. # Delete all the files from the archive that are not used, including the
  52. # archive itself.
  53. cleanunused:
  54. :delete {f} xuxen_5.1_hunspell.tar.gz
  55. # Generate diff files, so that others can get the files and apply
  56. # the diffs to get the Vim versions.
  57. diff:
  58. :assertpkg diff
  59. :sys {force} diff -a -C 1 eu_ES.orig.aff eu_ES.aff >eu_ES.diff
  60. :sys {force} diff -a -C 1 eu_ES.orig.dic eu_ES.dic >>eu_ES.diff
  61. # vim: set sts=4 sw=4 :