Mercurial > vim
comparison runtime/spell/pt/main.aap @ 2537:6efdc2e61533 vim73
Improved pt_PT spell file generation.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 10 Aug 2010 22:53:02 +0200 |
parents | ea3c3f13385c |
children | 4b51e4be14ab |
comparison
equal
deleted
inserted
replaced
2536:d61cdf51613a | 2537:6efdc2e61533 |
---|---|
12 pt_BR.aff pt_BR.dic | 12 pt_BR.aff pt_BR.dic |
13 | 13 |
14 # | 14 # |
15 # Fetching the pt_PT files from the Natura project. | 15 # Fetching the pt_PT files from the Natura project. |
16 # | 16 # |
17 PT_DIR = http://natura.di.uminho.pt/download/sources/Dictionaries/myspell | 17 PT_FNAME = oo3x-pt-PT.oxt |
18 PT_FNAME = myspell.pt-latest.zip | 18 PT_DIR = http://extensions.services.openoffice.org/e-files/1196/5/$(PT_FNAME) |
19 :attr {fetch = $PT_DIR/%file%} $PT_FNAME | 19 :attr {fetch = $PT_DIR} $PT_FNAME |
20 | 20 |
21 # | 21 # |
22 # Fetching the pt_BR files from BrOffice.org (Brazilian OOo). | 22 # Fetching the pt_BR files from BrOffice.org (Brazilian OOo). |
23 # | 23 # |
24 BR_FNAME = pt_BR-V.zip | 24 BR_FNAME = Vero_pt_BR_V207AOC.oxt |
25 BR_DIR = http://www.deso-se.com.br/downloads/broffice.org/$(BR_FNAME) | 25 BR_DIR = http://www.broffice.org/files/$(BR_FNAME) |
26 :attr {fetch = $BR_DIR} $BR_FNAME | 26 :attr {fetch = $BR_DIR} $BR_FNAME |
27 | 27 |
28 all: $SPELLDIR/pt.latin1.spl $SPELLDIR/pt.utf-8.spl \ | 28 all: $SPELLDIR/pt.latin1.spl $SPELLDIR/pt.utf-8.spl \ |
29 ../README_pt.txt | 29 ../README_pt.txt |
30 | 30 |
48 pt_PT.aff pt_PT.dic: {buildcheck=} | 48 pt_PT.aff pt_PT.dic: {buildcheck=} |
49 :assertpkg unzip patch | 49 :assertpkg unzip patch |
50 :fetch $PT_FNAME | 50 :fetch $PT_FNAME |
51 :sys $UNZIP $PT_FNAME | 51 :sys $UNZIP $PT_FNAME |
52 :delete $PT_FNAME | 52 :delete $PT_FNAME |
53 :move myspell.pt-*/pt_PT.dic . | 53 :move dictionaries/pt_PT.dic . |
54 :move myspell.pt-*/pt_PT.aff . | 54 :move dictionaries/pt_PT.aff . |
55 :move myspell.pt-*/README_pt_PT.txt . | 55 :move dictionaries/README_pt_PT.txt . |
56 :move myspell.pt-*/COPYING COPYING_pt_PT.txt | 56 :move dictionaries/COPYING COPYING_pt_PT.txt |
57 :deldir myspell.pt-* | 57 :delete {r}{f} dictionaries |
58 :delete {r}{f} META-INF | |
59 :delete {f} description.xml | |
60 :delete {f} dictionaries.xcu | |
61 :delete {f} LICENSES.txt | |
62 :sys $VIM pt_PT.dic -u NONE -e -c "%s/\t.*//" -c update -c q | |
63 :sys $VIM pt_PT.aff -u NONE -e -c "%s/\S\+=\S\+$$//" -c update -c q | |
58 @if not os.path.exists('pt_PT.orig.aff'): | 64 @if not os.path.exists('pt_PT.orig.aff'): |
59 :copy pt_PT.aff pt_PT.orig.aff | 65 :copy pt_PT.aff pt_PT.orig.aff |
60 @if not os.path.exists('pt_PT.orig.dic'): | 66 @if not os.path.exists('pt_PT.orig.dic'): |
61 :copy pt_PT.dic pt_PT.orig.dic | 67 :copy pt_PT.dic pt_PT.orig.dic |
62 @if os.path.exists('pt_PT.diff'): | 68 @if os.path.exists('pt_PT.diff'): |
65 pt_BR.aff pt_BR.dic: {buildcheck=} | 71 pt_BR.aff pt_BR.dic: {buildcheck=} |
66 :assertpkg unzip patch | 72 :assertpkg unzip patch |
67 :fetch $BR_FNAME | 73 :fetch $BR_FNAME |
68 :sys $UNZIP $BR_FNAME | 74 :sys $UNZIP $BR_FNAME |
69 :delete $BR_FNAME | 75 :delete $BR_FNAME |
70 :sys $VIM README_pt_BR.TXT -u NONE -e -c "set ff=unix" -c update -c q | 76 :sys $VIM README_pt_BR.TXT -u NONE -N -e -c "set ff=unix" -c update -c q |
71 :move README_pt_BR.TXT README_pt_BR.txt | 77 :move README_pt_BR.TXT README_pt_BR.txt |
72 | 78 |
73 # Vim seems to ignore the dots from the word list. | 79 :sys $VIM pt_BR.dic -u NONE -N -e -c "set ff=unix" -c update -c q |
74 # Removing words with dot to avoid misbehaviour. | 80 :sys $VIM pt_BR.aff -u NONE -N -e -c "set ff=unix" -c update -c q |
75 :sys $VIM pt_BR.dic -u NONE -e -c "set ff=unix" -c "/\./d" -c update -c q | |
76 :sys $VIM pt_BR.aff -u NONE -e -c "set ff=unix" -c update -c q | |
77 @if not os.path.exists('pt_BR.orig.aff'): | 81 @if not os.path.exists('pt_BR.orig.aff'): |
78 :copy pt_BR.aff pt_BR.orig.aff | 82 :copy pt_BR.aff pt_BR.orig.aff |
79 @if not os.path.exists('pt_BR.orig.dic'): | 83 @if not os.path.exists('pt_BR.orig.dic'): |
80 :copy pt_BR.dic pt_BR.orig.dic | 84 :copy pt_BR.dic pt_BR.orig.dic |
81 @if os.path.exists('pt_BR.diff'): | 85 @if os.path.exists('pt_BR.diff'): |
90 :sys {force} diff -a -C 1 pt_PT.orig.aff pt_PT.aff >pt_PT.diff | 94 :sys {force} diff -a -C 1 pt_PT.orig.aff pt_PT.aff >pt_PT.diff |
91 :sys {force} diff -a -C 1 pt_PT.orig.dic pt_PT.dic >>pt_PT.diff | 95 :sys {force} diff -a -C 1 pt_PT.orig.dic pt_PT.dic >>pt_PT.diff |
92 :sys {force} diff -a -C 1 pt_BR.orig.aff pt_BR.aff >pt_BR.diff | 96 :sys {force} diff -a -C 1 pt_BR.orig.aff pt_BR.aff >pt_BR.diff |
93 :sys {force} diff -a -C 1 pt_BR.orig.dic pt_BR.dic >>pt_BR.diff | 97 :sys {force} diff -a -C 1 pt_BR.orig.dic pt_BR.dic >>pt_BR.diff |
94 | 98 |
99 # Delete all downloaded and generated files. | |
100 clean: clean_pt_BR clean_pt_PT | |
101 | |
102 clean_pt_BR: | |
103 :delete {f} pt_BR.aff | |
104 :delete {f} pt_BR.dic | |
105 :delete {f} pt_BR.orig.aff | |
106 :delete {f} pt_BR.orig.dic | |
107 :delete {f} README_pt_BR.txt | |
108 | |
109 clean_pt_PT: | |
110 :delete {f} pt_PT.aff | |
111 :delete {f} pt_PT.dic | |
112 :delete {f} pt_PT.orig.aff | |
113 :delete {f} pt_PT.orig.dic | |
114 :delete {f} README_pt_PT.txt | |
115 :delete {f} COPYING_pt_PT.txt | |
95 | 116 |
96 # Check for updated OpenOffice spell files. When there are changes the | 117 # Check for updated OpenOffice spell files. When there are changes the |
97 # ".new.aff" and ".new.dic" files are left behind for manual inspection. | 118 # ".new.aff" and ".new.dic" files are left behind for manual inspection. |
98 # TO BE IMPLEMENTED | 119 # TO BE IMPLEMENTED |
99 | 120 |