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