summary refs log tree commit diff
path: root/pkgs/development/libraries/aspell/dict-path.patch
blob: c044c3d0eba4dbedce7050a18ef410e0f694736f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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)