diff --git a/hunspell-1.1.4-defaultdictfromlang.patch b/hunspell-1.1.4-defaultdictfromlang.patch new file mode 100644 index 0000000..5c49db7 --- /dev/null +++ b/hunspell-1.1.4-defaultdictfromlang.patch @@ -0,0 +1,24 @@ +--- hunspell-1.1.4/src/tools/hunspell.cxx.orig 2006-11-29 12:09:52.000000000 +0000 ++++ hunspell-1.1.4/src/tools/hunspell.cxx 2006-11-29 12:24:36.000000000 +0000 +@@ -1105,7 +1105,20 @@ + if (printgood && (filter_mode == NORMAL)) filter_mode = BADWORD; + + if (! dicname) { +- if (! (dicname=getenv("DICTIONARY"))) dicname = mystrdup("default"); ++ if (! (dicname=getenv("DICTIONARY"))) { ++ if (! (dicname=getenv("LANG"))) { ++ dicname = mystrdup("default"); ++ } ++ else { ++ int len = strlen(dicname); ++ for (int i = 0; i < len; ++i) { ++ if (dicname[i] == '_') && (i+2 < len) { ++ dicname[i+2] = 0; ++ break; ++ } ++ } ++ } ++ } + } + + if (!privdicname) privdicname = mystrdup(getenv("WORDLIST"));