El mar, 2 feb 2021 a las 3:45, James McCoy (<james...@debian.org>) escribió:
> Back when I last tried to maintain vim-spellfiles, most of the languages > were reasonable to build. There were just a couple which completely > crippled my computer when building. Thanks for the feedback, James, I was having some fun with the espa~nol package, which still provides a pure myspell-es dict (different and from different authors than hunspell-es) to see how hard would be to generate a vim spellchecking dict from it. For those curious I am attaching a diff with the used changes, although I would prefer the libhunspell way. It took around 8s per dict, not a big problem. To properly build utf-8 part in a pbuilder chroot I had to set LC_ALL instead of LANG. Another problem I noticed is that vim expects those dicts in a versioned dir, so unless somehing else is added to vim search path package will need to be rebuilt everytime that version changes. > Bram appears receptive to reviewing an fully fleshed out version of the > libhunspell patch, so I'd prefer to focus efforts on cleaning that up > and getting it upstreamed. That would also avoid duplicating efforts on > keeping multiple sources of dictionaries updated. Agreed. Most myspell only dicts are somewhat old and most new hunspell dicts will not work well with vim spellchecking engine. Hope someone revitalizes the libunspell patch way. Regards, -- Agustin
diff --git a/debian/control b/debian/control index 41cef1f..f540811 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,9 @@ Build-Depends: debhelper-compat (= 12), Build-Depends-Indep: ispell, aspell, dictionaries-common-dev (>= 1.23.2), - hunspell-tools | myspell-tools | libmyspell-dev (>= 1:3.1-7) + hunspell-tools | myspell-tools | libmyspell-dev (>= 1:3.1-7), + vim, + locales-all Standards-Version: 4.1.4 Vcs-Browser: https://salsa.debian.org/agmartin/espa-nol Vcs-Git: https://salsa.debian.org/agmartin/espa-nol.git @@ -57,3 +59,13 @@ Description: Spanish dictionary for aspell This is the Spanish dictionary for use with the aspell spellchecker. It is based on ispell dictionary put together by Santiago Rodriguez and Jesus Carretero. + +Package: vim-spell-es +Architecture: all +Multi-Arch: foreign +Depends: ${misc:Depends}, + vim +Description: Spanish dictionary for vim spell + This is the Spanish dictionary for use with the vim spellchecker. + It is based on ispell dictionary put together by + Santiago Rodriguez and Jesus Carretero. diff --git a/debian/es_ES.myheader b/debian/es_ES.myheader index dda545d..7fc92c1 100644 --- a/debian/es_ES.myheader +++ b/debian/es_ES.myheader @@ -1,6 +1,14 @@ SET ISO8859-1 TRY aersoinltcdmubpágízfvhéjqóņxyúükCMAIESPGJBRFTDVHUOwLKNZÁYXÜÓÚÉŅQWÍ +# For vim spellchecking +FOL ßāáâãäåæįčéęëėíîïðņōóôõöøųúûüýþĸ +LOW ßāáâãäåæįčéęëėíîïðņōóôõöøųúûüýþĸ +UPP ßĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖØŲÚÛÜÝÞĸ + +SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZāáâãäåæįčéęëėíîïðņōóôõöøųúûüýþßĸĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖØŲÚÛÜÝÞŋ +SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep? + # ------------------------------------------------------------------------- # The affix file below is automatically generated from espa~nol.aff file by # means of ispellaff2myspell script. Original copyright applies: diff --git a/debian/es_ES.replaces b/debian/es_ES.replaces index bc1339c..f548a4e 100644 --- a/debian/es_ES.replaces +++ b/debian/es_ES.replaces @@ -51,3 +51,16 @@ REP g REP hue güe REP güi hui REP hui güi + +# map rules for vim use + +MAP 9 +MAP aāáâãäå +MAP ečéęë +MAP iėíîï +MAP oōóôõö +MAP uųúûü +MAP nņ +MAP cį +MAP yĸý +MAP sß diff --git a/debian/rules b/debian/rules index d150637..ecd8470 100755 --- a/debian/rules +++ b/debian/rules @@ -20,6 +20,9 @@ ISHAREDIR = $(CURDIR)/debian/ispanish/usr/share/ispell # OOOTMP = ooo-tmp # +VIM = vim +VIMTMP = vim-tmp +# ASPELL6BASENAME = aspell6-es ASPELL6DIR = $(CURDIR)/debian/$(ASPELL6BASENAME) ASPELLPROC = /usr/share/aspell-lang/proc # Location of proc script @@ -58,6 +61,12 @@ build-stamp: $(QUILT_STAMPFN) --replacements=debian/es_ES.replaces \ --myheader=debian/es_ES.myheader $(AFFIXES).latin1 > es_ES.myaff +# ----- Creating vim dict + mkdir -p $(VIMTMP) + cp es_ES.myaff $(VIMTMP)/es_ES.aff + cp es_ES.mydict $(VIMTMP)/es_ES.dic + LC_ALL=es_ES.ISO8859-1 $(VIM) -u NONE -e -c "mkspell! $(VIMTMP)/es $(VIMTMP)/es_ES" -c q + LC_ALL=es_ES.UTF-8 $(VIM) -u NONE -e -c "mkspell! $(VIMTMP)/es $(VIMTMP)/es_ES" -c q # ----- # cat $(LANGUAGE).allwords+.latin1 | ispell -d ./$(LANGUAGE) -e | \ @@ -92,7 +101,7 @@ clean-patched: # rm -f $(LANGUAGE).wordlist rm -f es_ES.mydict es_ES.myaff $(LANGUAGE).mwl.gz rm -f es_affix.dat $(ISOLANG).cwl.gz - rm -rf $(OOOTMP) + rm -rf $(OOOTMP) $(VIMTMP) if [ -d $(ASPELL6DIR) ]; then \ rm -rf $(ASPELL6DIR); fi @@ -122,6 +131,8 @@ install: build echo "add es.rws" > $(ALIBDIR)/es.multi echo "add es.multi" > $(ALIBDIR)/spanish.alias installdeb-aspell -paspell-es +# ------ vim ---------------------------------------- + dh_install -pvim-spell-es # ---------------------------------------------- binary-indep: build install diff --git a/debian/vim-spell-es.install b/debian/vim-spell-es.install new file mode 100644 index 0000000..326ba92 --- /dev/null +++ b/debian/vim-spell-es.install @@ -0,0 +1,2 @@ +vim-tmp/*.spl usr/share/vim/vim82/spell/ +vim-tmp/*.sug usr/share/vim/vim82/spell/