blob: 49ec2f25bfc60bd05420bde1422e087d858d0590 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
# Aap recipe for German Vim spell files.
#
# Since there is a big discussion about whether to use the old or the new
# spelling rules, both have been included.
# "de": new German spelling
# "de_de": old and new German spelling
# "de_19": old German spelling
# "de_20": new German spelling
# "de_AT": Austrian spelling
# "de_CH": Swiss spelling
# Use a freshly compiled Vim if it exists.
@if os.path.exists('../../../src/vim'):
VIM = ../../../src/vim
@else:
:progsearch VIM vim
REGIONS = DE 19 20 AT CH
DE_REGIONS = de_$*REGIONS
SPELLDIR = ..
FILES = de_$*(REGIONS).aff de_$*(REGIONS).dic
# The de_20 is the same as de_DE dictionary and only uses the
# new revised orthography
FILE_DE_AFF = de_DE_frami.aff
FILE_DE_DIC = de_DE_frami.dic
FILE_20_AFF = de_DE_frami.aff
FILE_20_DIC = de_DE_frami.dic
FILE_AT_AFF = de_AT_frami.aff
FILE_AT_DIC = de_AT_frami.dic
FILE_CH_AFF = de_CH_frami.aff
FILE_CH_DIC = de_CH_frami.dic
#ZIPFILES = $ZIPFILE_DE $ZIPFILE_20 $ZIPFILE_AT $ZIPFILE_CH
ZIPFILE_19 = de_OLDSPELL.zip # unmaintained
DICT_FILES = $FILE_20_AFF $FILE_20_DIC $FILE_AT_AFF $FILE_AT_DIC $FILE_CH_AFF $FILE_CH_DIC
READMES = README_de_DE_frami.txt README_extension_owner.txt
all: $SPELLDIR/de.latin1.spl $SPELLDIR/de.utf-8.spl ../README_de.txt
$SPELLDIR/de.latin1.spl : $FILES
:sys env LANG=de_DE.ISO-8859-1
$VIM -u NONE -e -c "mkspell! $SPELLDIR/de $DE_REGIONS" -c q
$SPELLDIR/de.utf-8.spl : $FILES
:sys env LANG=de_DE.UTF-8
$VIM -u NONE -e -c "mkspell! $SPELLDIR/de $DE_REGIONS" -c q
../README_de.txt: $READMES
:fetch $READMES
:print de_DE_frami.txt >! $target
:cat README_de_DE_frami.txt >> $target
:print =================================================== >>$target
:print extension_owner >> $target
:cat README_extension_owner.txt >> $target
#
# Fetching the files from the LibreOffices github repository.
# The OLDSPELL file comes from elsewhere
#
OODIR = https://github.com/LibreOffice/dictionaries/raw/master/de
DEDIR = http://www.j3e.de/myspell
:attr {fetch = $OODIR/%file%} $DICT_FILES
:attr {fetch = $OODIR/%file%} $READMES
:attr {fetch = $DEDIR/%file%} $ZIPFILE_19
# The files don't depend on the .zip file so that we can delete it.
# Only download the zip file if the targets don't exist.
de_DE.aff de_DE.dic de_20.aff de_20.dic: {buildcheck=}
:assertpkg patch
:fetch $FILE_DE_AFF
:fetch $FILE_DE_DIC
:move de_DE_frami.aff de_DE.aff
:move de_DE_frami.dic de_DE.dic
@if not os.path.exists('de_DE.orig.aff'):
:copy de_DE.aff de_DE.orig.aff
@if not os.path.exists('de_DE.orig.dic'):
:copy de_DE.dic de_DE.orig.dic
@if os.path.exists('de_DE.diff'):
:sys patch <de_DE.diff
:copy de_DE.aff de_20.aff
:copy de_DE.dic de_20.dic
de_19.aff de_19.dic: {buildcheck=}
:assertpkg unzip patch
:fetch $ZIPFILE_19
:sys $UNZIP $ZIPFILE_19
:delete $ZIPFILE_19
:move de_OLDSPELL.aff de_19.aff
:move de_OLDSPELL.dic de_19.dic
@if not os.path.exists('de_19.orig.aff'):
:copy de_19.aff de_19.orig.aff
@if not os.path.exists('de_19.orig.dic'):
:copy de_19.dic de_19.orig.dic
@if os.path.exists('de_19.diff'):
:sys patch <de_19.diff
de_AT.aff de_AT.dic: {buildcheck=}
:assertpkg patch
:fetch $FILE_AT_AFF
:fetch $FILE_AT_DIC
:move $FILE_AT_AFF de_AT.aff
:move $FILE_AT_DIC de_AT.dic
@if not os.path.exists('de_AT.orig.aff'):
:copy de_AT.aff de_AT.orig.aff
@if not os.path.exists('de_AT.orig.dic'):
:copy de_AT.dic de_AT.orig.dic
@if os.path.exists('de_AT.diff'):
:sys patch <de_AT.diff
de_CH.aff de_CH.dic: {buildcheck=}
:assertpkg patch
:fetch $FILE_CH_AFF
:fetch $FILE_CH_DIC
:move $FILE_CH_AFF de_CH.aff
:move $FILE_CH_DIC de_CH.dic
@if not os.path.exists('de_CH.orig.aff'):
:copy de_CH.aff de_CH.orig.aff
@if not os.path.exists('de_CH.orig.dic'):
:copy de_CH.dic de_CH.orig.dic
@if os.path.exists('de_CH.diff'):
:sys patch <de_CH.diff
# Generate diff files, so that others can get the OpenOffice files and apply
# the diffs to get the Vim versions.
diff:
:assertpkg diff
:sys {force} diff -a -C 1 de_DE.orig.aff de_DE.aff >de_DE.diff
:sys {force} diff -a -C 1 de_DE.orig.dic de_DE.dic >>de_DE.diff
:sys {force} diff -a -C 1 de_19.orig.aff de_19.aff >de_19.diff
:sys {force} diff -a -C 1 de_19.orig.dic de_19.dic >>de_19.diff
:sys {force} diff -a -C 1 de_AT.orig.aff de_AT.aff >de_AT.diff
:sys {force} diff -a -C 1 de_AT.orig.dic de_AT.dic >>de_AT.diff
:sys {force} diff -a -C 1 de_CH.orig.aff de_CH.aff >de_CH.diff
:sys {force} diff -a -C 1 de_CH.orig.dic de_CH.dic >>de_CH.diff
:copy de_DE.diff de_20.diff
# Check for updated OpenOffice spell files. When there are changes the
# ".new.aff" and ".new.dic" files are left behind for manual inspection.
check:
:assertpkg unzip patch
:fetch $ZIPFILE_19
:fetch $DICT_FILES
@try:
:mkdir tmp
:cd tmp
:sys $UNZIP ../$ZIPFILE_19
:copy ../*.aff .
:copy ../*.dic .
:move de_OLDSPELL.aff de_19.aff
:move de_OLDSPELL.dic de_19.dic
:move de_DE_frami.aff de_DE.aff
:move de_DE_frami.dic de_DE.dic
:move de_AT_frami.dic de_AT.dic
:move de_AT_frami.aff de_AT.aff
:move de_CH_frami.dic de_CH.dic
:move de_CH_frami.aff de_CH.aff
:copy de_DE.dic de_20.dic
:copy de_DE.aff de_20.aff
@import stat
@for nm in ['de_DE', 'de_19', 'de_20', 'de_AT', 'de_CH']:
@for ext in ['aff', 'dic']:
:sys {force} diff ../$(nm).orig.$ext $(nm).$ext >d
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy $(nm).$ext ../$(nm).new.$ext
:sys {force} diff ../README_$(nm).txt README_$(nm).txt >d
@finally:
:cd ..
:delete {r}{f}{q} tmp
# vim: set sts=4 sw=4 :
|