Get the hunspell wraper building correctly on all platforms

This commit is contained in:
Kovid Goyal 2019-09-02 12:32:00 +05:30
parent 22a1481bcd
commit 46295bb17f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
5 changed files with 11 additions and 3 deletions

View File

@ -41,7 +41,7 @@ def binary_includes():
] + list(map(
get_dll_path,
('usb-1.0 mtp expat sqlite3 ffi z poppler dbus-1 iconv xml2 xslt jpeg png16'
' webp webpmux webpdemux exslt ncursesw readline chm'
' webp webpmux webpdemux exslt ncursesw readline chm hunspell-1.7'
' icudata icui18n icuuc icuio gcrypt gpg-error'
' gobject-2.0 glib-2.0 gthread-2.0 gmodule-2.0 gio-2.0 dbus-glib-1').split()
)) + [

View File

@ -504,7 +504,7 @@ class Freeze(object):
@flush
def add_misc_libraries(self):
for x in (
'usb-1.0.0', 'mtp.9', 'chm.0', 'sqlite3.0',
'usb-1.0.0', 'mtp.9', 'chm.0', 'sqlite3.0', 'hunspell-1.7.0',
'icudata.64', 'icui18n.64', 'icuio.64', 'icuuc.64',
'xslt.1', 'exslt.0', 'xml2.2', 'z.1', 'unrar',
'crypto.1.0.0', 'ssl.1.0.0', 'iconv.2', # 'ltdl.7'

View File

@ -390,6 +390,11 @@
"filename": "hunspell-1.7.0.tar.gz",
"hash": "sha256:57be4e03ae9dd62c3471f667a0d81a14513e314d4d92081292b90435944ff951",
"urls": ["https://github.com/hunspell/hunspell/files/2573619/{filename}"]
},
"windows": {
"filename": "hunspell-1.7.0.zip",
"hash": "sha256:7089cc01ffd9122c960e1f8c7930a75be989ca4e9468773cef1b0a655bfb4368",
"urls": ["https://github.com/hunspell/hunspell/archive/v1.7.0.zip"]
}
},

View File

@ -145,6 +145,8 @@ if iswindows:
ft_lib_dirs = [sw_lib_dir]
ft_libs = ['freetype']
ft_inc_dirs = [os.path.join(sw_inc_dir, 'freetype2'), sw_inc_dir]
hunspell_inc_dirs = [os.path.join(sw_inc_dir, 'hunspell')]
hunspell_lib_dirs = [sw_lib_dir]
zlib_inc_dirs = [sw_inc_dir]
zlib_lib_dirs = [sw_lib_dir]
podofo_inc = os.path.join(sw_inc_dir, 'podofo')

View File

@ -4,7 +4,8 @@
"sources": "calibre/utils/spell/hunspell_wrapper.cpp",
"inc_dirs": "!hunspell_inc_dirs",
"lib_dirs": "!hunspell_lib_dirs",
"libraries": "hunspell",
"libraries": "hunspell-1.7",
"windows_libraries": "libhunspell",
"needs_c++11": true
},
{