nixpkgs/pkgs/development/libraries/aspell/dict-path.patch

31 lines
1,012 B
Diff
Raw Normal View History

diff -rc aspell-0.60.5-orig/common/info.cpp aspell-0.60.5/common/info.cpp
*** aspell-0.60.5-orig/common/info.cpp 2004-11-10 07:18:45.000000000 +0100
--- aspell-0.60.5/common/info.cpp 2007-10-23 17:30:47.000000000 +0200
***************
*** 209,214 ****
--- 209,215 ----
unsigned int name_size,
IStream & in)
{
+ char * extra_dict_dirs = getenv("ASPELL_EXTRA_DICT_DIRS");
ModuleInfoNode * * prev = &head_;
ModuleInfoNode * to_add = new ModuleInfoNode();
to_add->c_struct.name = 0;
***************
*** 246,251 ****
--- 247,260 ----
goto RETURN_ERROR;
}
}
+
+ // Add dictionaries from directories in
+ // $ASPELL_EXTRA_DICT_DIRS. Maybe this isn't the right place to do
+ // this, but it works.
+ if (extra_dict_dirs) {
+ to_add->c_struct.dict_dirs = &(to_add->dict_dirs);
+ itemize(extra_dict_dirs, to_add->dict_dirs);
+ }
while (*prev != 0 &&
(*prev)->c_struct.order_num < to_add->c_struct.order_num)