Support building with Enchant 2.x
This adds support for Enchant 2 named "enchant" and Enchant 2 named "enchant-2" (!)
This commit is contained in:
parent
f80fe6b7c0
commit
68a985a76c
3 changed files with 41 additions and 14 deletions
34
bindings/vapi/enchant-2.vapi
Normal file
34
bindings/vapi/enchant-2.vapi
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[CCode (cheader_filename = "enchant.h")]
|
||||
namespace Enchant {
|
||||
public delegate void BrokerDescribeFn (string provider_name, string provider_desc, string provider_dll_file);
|
||||
public delegate void DictDescribeFn (string lang_tag, string provider_name, string provider_desc, string provider_file);
|
||||
|
||||
[Compact]
|
||||
[CCode (free_function = "enchant_broker_free")]
|
||||
public class Broker {
|
||||
[CCode (cname = "enchant_broker_init")]
|
||||
public Broker ();
|
||||
|
||||
public unowned Dict request_dict (string tag);
|
||||
public unowned Dict request_pwl_dict (string pwl);
|
||||
public void free_dict (Dict dict);
|
||||
public int dict_exists (string tag);
|
||||
public void set_ordering (string tag, string ordering);
|
||||
public void describe (BrokerDescribeFn fn);
|
||||
public void list_dicts (DictDescribeFn fn);
|
||||
public unowned string get_error ();
|
||||
}
|
||||
|
||||
[Compact]
|
||||
public class Dict {
|
||||
public int check (string word, long len = -1);
|
||||
public unowned string[] suggest (string word, long len = -1);
|
||||
public void free_string_list ([CCode (array_length = false)] string[] string_list);
|
||||
public void add_to_session (string word, long len = -1);
|
||||
public int is_in_session (string word, long len = -1);
|
||||
public void store_replacement ( string mis, long mis_len, string cor, long cor_len);
|
||||
public void add_to_pwl ( string word, long len = -1);
|
||||
public void describe (DictDescribeFn fn);
|
||||
public unowned string get_error ();
|
||||
}
|
||||
}
|
||||
|
|
@ -52,7 +52,7 @@ sqlite = dependency('sqlite3', version: '>= 3.12')
|
|||
webkit2gtk = dependency('webkit2gtk-4.0', version: '>=' + target_webkit)
|
||||
|
||||
# Secondary deps - keep sorted alphabetically
|
||||
enchant = dependency('enchant', version: '>= 1.6')
|
||||
enchant = dependency('enchant-2', version: '>=2.1', required: false) # see below
|
||||
gck = dependency('gck-1')
|
||||
gcr = dependency('gcr-3', version: '>= 3.10.1')
|
||||
gdk = dependency('gdk-3.0', version: '>=' + target_gtk)
|
||||
|
|
@ -76,6 +76,12 @@ posix = valac.find_library('posix')
|
|||
webkit2gtk = dependency('webkit2gtk-4.0', version: '>=' + target_webkit)
|
||||
webkit2gtk_web_extension = dependency('webkit2gtk-web-extension-4.0', version: '>=' + target_webkit)
|
||||
|
||||
# Can currently use either Enchant 1 or 2
|
||||
if not enchant.found()
|
||||
enchant = dependency('enchant', version: '>=1.6')
|
||||
endif
|
||||
|
||||
|
||||
# Libunwind system dependencies above ensures appropriate versions,
|
||||
# but this declared depencency is what we actually build against so we
|
||||
# can include the custom VAPI correctly. We need to add unwind_lib to
|
||||
|
|
|
|||
|
|
@ -107,19 +107,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "enchant",
|
||||
"cleanup" : [
|
||||
"/bin"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "archive",
|
||||
"url" : "https://github.com/AbiWord/enchant/releases/download/enchant-1-6-1/enchant-1.6.1.tar.gz",
|
||||
"sha256" : "bef0d9c0fef2e4e8746956b68e4d6c6641f6b85bd2908d91731efb68eba9e3f5"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "geary",
|
||||
"buildsystem": "meson",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue