mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add hyphen dependency
This commit is contained in:
parent
02b5cdb24c
commit
5c1b69f5b9
@ -41,7 +41,7 @@ def binary_includes():
|
||||
] + list(map(
|
||||
get_dll_path,
|
||||
('usb-1.0 mtp expat sqlite3 ffi z openjp2 poppler dbus-1 iconv xml2 xslt jpeg png16'
|
||||
' webp webpmux webpdemux exslt ncursesw readline chm hunspell-1.7'
|
||||
' webp webpmux webpdemux exslt ncursesw readline chm hunspell-1.7 hyphen'
|
||||
' 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()
|
||||
)) + [
|
||||
|
@ -502,7 +502,7 @@ class Freeze(object):
|
||||
def add_misc_libraries(self):
|
||||
for x in (
|
||||
'usb-1.0.0', 'mtp.9', 'chm.0', 'sqlite3.0', 'hunspell-1.7.0',
|
||||
'icudata.64', 'icui18n.64', 'icuio.64', 'icuuc.64',
|
||||
'icudata.64', 'icui18n.64', 'icuio.64', 'icuuc.64', 'hyphen.0',
|
||||
'xslt.1', 'exslt.0', 'xml2.2', 'z.1', 'unrar',
|
||||
'crypto.1.0.0', 'ssl.1.0.0', 'iconv.2', # 'ltdl.7'
|
||||
):
|
||||
|
@ -115,6 +115,14 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "hyphen",
|
||||
"unix": {
|
||||
"filename": "hyphen-2.8.8.tar.gz",
|
||||
"hash": "sha1:0556c392beb59433e577e3517575801212201df6",
|
||||
"urls": ["https://downloads.sourceforge.net/hunspell/{filename}"]
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "openssl",
|
||||
|
@ -128,6 +128,8 @@ zlib_inc_dirs = []
|
||||
zlib_lib_dirs = []
|
||||
hunspell_inc_dirs = []
|
||||
hunspell_lib_dirs = []
|
||||
hyphen_inc_dirs = []
|
||||
hyphen_lib_dirs = []
|
||||
openssl_inc_dirs, openssl_lib_dirs = [], []
|
||||
ICU = sw = ''
|
||||
|
||||
@ -137,6 +139,8 @@ if iswindows:
|
||||
sw_lib_dir = os.path.join(prefix, 'lib')
|
||||
icu_inc_dirs = [sw_inc_dir]
|
||||
icu_lib_dirs = [sw_lib_dir]
|
||||
hyphen_inc_dirs = [sw_inc_dir]
|
||||
hyphen_lib_dirs = [sw_lib_dir]
|
||||
openssl_inc_dirs = [sw_inc_dir]
|
||||
openssl_lib_dirs = [sw_lib_dir]
|
||||
sqlite_inc_dirs = [sw_inc_dir]
|
||||
|
@ -18,6 +18,8 @@
|
||||
"name": "hyphen",
|
||||
"sources": "calibre/utils/hyphenation/hyphen.c",
|
||||
"libraries": "hyphen",
|
||||
"inc_dirs": "!hyphen_inc_dirs",
|
||||
"lib_dirs": "!hyphen_lib_dirs",
|
||||
"needs_c99": true
|
||||
},
|
||||
{
|
||||
|
@ -63,7 +63,7 @@ simple_hyphenate(PyObject *self, PyObject *args) {
|
||||
|
||||
// we use the simple (old) algorithm since we dont handle replacements
|
||||
// anyway
|
||||
if (hnj_hyphen_hyphenate(dict, word_str, wd_size, hyphens)) {
|
||||
if (hnj_hyphen_hyphenate(dict, word_str, (int)wd_size, hyphens)) {
|
||||
PyErr_Format(PyExc_ValueError, "Cannot hyphenate word: %s", word_str);
|
||||
} else {
|
||||
for (size_t i = 0; i < wd_size; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user