mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Linux installer: Check that freetype is new enough
This commit is contained in:
parent
c08a34be69
commit
8fbb9b254b
@ -799,6 +799,19 @@ def check_glibc_version(min_required=(2, 31), release_date='2020-02-01'):
|
|||||||
).format(ver, '.'.join(map(str, min_required)), release_date))
|
).format(ver, '.'.join(map(str, min_required)), release_date))
|
||||||
|
|
||||||
|
|
||||||
|
def check_for_recent_freetype():
|
||||||
|
import ctypes
|
||||||
|
try:
|
||||||
|
f = ctypes.CDLL('libfreetype.so')
|
||||||
|
except OSError:
|
||||||
|
raise SystemExit('Your system is missing the FreeType library libfreetype.so. Try installing the freetype package.')
|
||||||
|
try:
|
||||||
|
f.FT_Get_Color_Glyph_Paint
|
||||||
|
except AttributeError:
|
||||||
|
raise SystemExit('Your system has too old a version of the FreeType library.'
|
||||||
|
' freetype >= 2.11 is needed for the FT_Get_Color_Glyph_Paint function which is required by Qt WebEngine')
|
||||||
|
|
||||||
|
|
||||||
def main(install_dir=None, isolated=False, bin_dir=None, share_dir=None, ignore_umask=False, version=None):
|
def main(install_dir=None, isolated=False, bin_dir=None, share_dir=None, ignore_umask=False, version=None):
|
||||||
if not ignore_umask and not isolated:
|
if not ignore_umask and not isolated:
|
||||||
check_umask()
|
check_umask()
|
||||||
@ -825,6 +838,8 @@ def main(install_dir=None, isolated=False, bin_dir=None, share_dir=None, ignore_
|
|||||||
check_for_libOpenGl()
|
check_for_libOpenGl()
|
||||||
if q[0] >= 7:
|
if q[0] >= 7:
|
||||||
check_for_libxcb_cursor()
|
check_for_libxcb_cursor()
|
||||||
|
if q >= (7, 16, 0):
|
||||||
|
check_for_recent_freetype()
|
||||||
run_installer(install_dir, isolated, bin_dir, share_dir, version)
|
run_installer(install_dir, isolated, bin_dir, share_dir, version)
|
||||||
|
|
||||||
|
|
||||||
|
@ -848,6 +848,19 @@ def check_glibc_version(min_required=(2, 31), release_date='2020-02-01'):
|
|||||||
).format(ver, '.'.join(map(str, min_required)), release_date))
|
).format(ver, '.'.join(map(str, min_required)), release_date))
|
||||||
|
|
||||||
|
|
||||||
|
def check_for_recent_freetype():
|
||||||
|
import ctypes
|
||||||
|
try:
|
||||||
|
f = ctypes.CDLL('libfreetype.so')
|
||||||
|
except OSError:
|
||||||
|
raise SystemExit('Your system is missing the FreeType library libfreetype.so. Try installing the freetype package.')
|
||||||
|
try:
|
||||||
|
f.FT_Get_Color_Glyph_Paint
|
||||||
|
except AttributeError:
|
||||||
|
raise SystemExit('Your system has too old a version of the FreeType library.'
|
||||||
|
' freetype >= 2.11 is needed for the FT_Get_Color_Glyph_Paint function which is required by Qt WebEngine')
|
||||||
|
|
||||||
|
|
||||||
def main(install_dir=None, isolated=False, bin_dir=None, share_dir=None, ignore_umask=False, version=None):
|
def main(install_dir=None, isolated=False, bin_dir=None, share_dir=None, ignore_umask=False, version=None):
|
||||||
if not ignore_umask and not isolated:
|
if not ignore_umask and not isolated:
|
||||||
check_umask()
|
check_umask()
|
||||||
@ -874,6 +887,8 @@ def main(install_dir=None, isolated=False, bin_dir=None, share_dir=None, ignore_
|
|||||||
check_for_libOpenGl()
|
check_for_libOpenGl()
|
||||||
if q[0] >= 7:
|
if q[0] >= 7:
|
||||||
check_for_libxcb_cursor()
|
check_for_libxcb_cursor()
|
||||||
|
if q >= (7, 16, 0):
|
||||||
|
check_for_recent_freetype()
|
||||||
run_installer(install_dir, isolated, bin_dir, share_dir, version)
|
run_installer(install_dir, isolated, bin_dir, share_dir, version)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user