blob: a31310de8c9874dce85417d7fca838ea5840958a [file] [log] [blame]
Bram Moolenaaracc22402020-06-07 21:07:18 +02001# 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
6# Select the amount of memory that can be used.
7# Default.
8#SETTING = 'set mkspellmem=460000,2000,500'
9
10# For about 1 Tbyte of RAM.
11#SETTING = 'set mkspellmem=900000,4000,1000'
12
13# For about 2 Tbyte of RAM.
14#SETTING = 'set mkspellmem=1900000,8000,2000'
15
16# For about 4 Tbyte of RAM.
17#SETTING = 'set mkspellmem=3900000,16000,4000'
18
19# For about 8 Tbyte of RAM.
20SETTING = 'set mkspellmem=7900000,30000,8000'
21
22
23# Use a freshly compiled Vim if it exists.
24@if os.path.exists('../../../src/vim'):
25 VIM = ../../../src/vim
26@else:
27 :progsearch VIM vim
28
29SPELLDIR = ..
30FILES = eu_ES.aff eu_ES.dic
31
32all: $SPELLDIR/eu.utf-8.spl ../README_eu.txt
33
34$SPELLDIR/eu.utf-8.spl : $FILES
35 :sys env LANG=eu_ES.UTF-8
36 $VIM -u NONE -e -c $SETTING -c "mkspell! $SPELLDIR/eu eu_ES" -c q
37
38#
39# Fetching the files.
40# URL suggested by Zuhaitz Beloki Leiza.
41#
42:attr {fetch = http://xuxen.eus/static/hunspell/xuxen_5.1_hunspell.tar.gz} xuxen_5.1_hunspell.tar.gz
43
44# The files don't depend on the tar file so that we can delete it.
45# Only download the tar file if the targets don't exist.
46eu_ES.aff eu_ES.dic: {buildcheck=}
47 :assertpkg tar
48 :fetch xuxen_5.1_hunspell.tar.gz
49 :sys tar xf xuxen_5.1_hunspell.tar.gz
50 :update cleanunused
51 @if not os.path.exists('eu_ES.orig.aff'):
52 :copy eu_ES.aff eu_ES.orig.aff
53 @if not os.path.exists('eu_ES.orig.dic'):
54 :copy eu_ES.dic eu_ES.orig.dic
55 @if os.path.exists('eu_ES.diff'):
56 :sys patch <eu_ES.diff
57
58../README_eu.txt : LICENSE.txt
59 :cat $source >! $target
60
61# Delete all the files unpacked from the archive
62clean: cleanunused
63 :delete {f} eu_ES.dic
64 :delete {f} eu_ES.aff
65
66# Delete all the files from the archive that are not used, including the
67# archive itself.
68cleanunused:
69 :delete {f} xuxen_5.1_hunspell.tar.gz
70
71# Generate diff files, so that others can get the files and apply
72# the diffs to get the Vim versions.
73
74diff:
75 :assertpkg diff
76 :sys {force} diff -a -C 1 eu_ES.orig.aff eu_ES.aff >eu_ES.diff
77 :sys {force} diff -a -C 1 eu_ES.orig.dic eu_ES.dic >>eu_ES.diff
78
79
80
81# vim: set sts=4 sw=4 :