summaryrefslogtreecommitdiffstats
path: root/runtime/spell/yi/main.aap
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 08:50:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 08:50:31 +0000
commitaed8ce9da277f5ecffe968b324f242c41c3b752a (patch)
treed2e538394cb7a8a7c42a4aac6ccf1a8e3256999b /runtime/spell/yi/main.aap
parentInitial commit. (diff)
downloadvim-aed8ce9da277f5ecffe968b324f242c41c3b752a.tar.xz
vim-aed8ce9da277f5ecffe968b324f242c41c3b752a.zip
Adding upstream version 2:9.0.1378.upstream/2%9.0.1378upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/spell/yi/main.aap')
-rw-r--r--runtime/spell/yi/main.aap65
1 files changed, 65 insertions, 0 deletions
diff --git a/runtime/spell/yi/main.aap b/runtime/spell/yi/main.aap
new file mode 100644
index 0000000..8a98ce0
--- /dev/null
+++ b/runtime/spell/yi/main.aap
@@ -0,0 +1,65 @@
+# Aap recipe for Yiddish Vim spell files.
+
+# Use a freshly compiled Vim if it exists.
+@if os.path.exists('../../../src/vim'):
+ VIM = ../../../src/vim
+@else:
+ :progsearch VIM vim
+
+SPELLDIR = ..
+FILES = yi.dic yi.aff
+WORDFILE = wordlist.utf8.txt
+FILES_TR = yi_tr.dic yi_tr.aff
+WORDFILE_TR = wordlist.txt
+
+all: $SPELLDIR/yi.utf-8.spl $SPELLDIR/yi-tr.utf-8.spl \
+ $SPELLDIR/yi.latin1.spl ../README_yi.txt
+
+$SPELLDIR/yi.utf-8.spl : $FILES
+ :sys $VIM -u NONE -e -c "set enc=utf-8"
+ -c "mkspell! $SPELLDIR/yi yi" -c q
+
+$SPELLDIR/yi-tr.utf-8.spl : $FILES_TR
+ :sys $VIM -u NONE -e -c "set enc=utf-8"
+ -c "mkspell! $SPELLDIR/yi-tr yi_tr" -c q
+
+$SPELLDIR/yi.latin1.spl : $FILES_TR
+ :sys $VIM -u NONE -e -c "set enc=latin1"
+ -c "mkspell! $SPELLDIR/yi yi_tr" -c q
+
+../README_yi.txt : README.txt
+ :copy $source $target
+
+#
+# Fetch the word list when needed.
+#
+URLDIR = http://www.cs.uky.edu/~raphael/yiddish
+:attr {fetch = $URLDIR/%file%} $WORDFILE $WORDFILE_TR
+
+# We use the word list as a .dic file, so that we can use an affix file to
+# define a few extra things.
+$FILES: {buildcheck=}
+ :assertpkg patch
+ :fetch $WORDFILE
+ :copy $WORDFILE yi.dic
+ :touch {force} yi.aff
+ @if os.path.exists('yi.diff'):
+ :sys patch < yi.diff
+
+$FILES_TR: {buildcheck=}
+ :assertpkg patch
+ :fetch $WORDFILE_TR
+ :copy $WORDFILE_TR yi_tr.dic
+ :touch {force} yi_tr.aff
+ @if os.path.exists('yi_tr.diff'):
+ :sys patch < yi_tr.diff
+
+diff {virtual}:
+ :assertpkg diff
+ # Using a context of two lines to work around a bug in FreeBSD patch.
+ :sys {force} diff -a -C 2 $WORDFILE yi.dic > yi.diff
+ :sys {force} diff -a -N -C 1 /dev/null yi.aff >> yi.diff
+ :sys {force} diff -a -C 2 $WORDFILE_TR yi_tr.dic > yi_tr.diff
+ :sys {force} diff -a -N -C 1 /dev/null yi_tr.aff >> yi_tr.diff
+
+# vim: set sts=4 sw=4 :