mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Put fontconfig back in the OS X build since poppler uses it
This commit is contained in:
parent
6b644e1b87
commit
e7397f60d5
@ -15,6 +15,8 @@ from setup import __version__ as VERSION, __appname__ as APPNAME, basenames, \
|
||||
LICENSE = open('LICENSE', 'rb').read()
|
||||
MAGICK_HOME='@executable_path/../Frameworks/ImageMagick'
|
||||
ENV = dict(
|
||||
FONTCONFIG_PATH='@executable_path/../Resources/fonts',
|
||||
FONTCONFIG_FILE='@executable_path/../Resources/fonts/fonts.conf',
|
||||
MAGICK_CONFIGURE_PATH=MAGICK_HOME+'/config',
|
||||
MAGICK_CODER_MODULE_PATH=MAGICK_HOME+'/modules-Q16/coders',
|
||||
MAGICK_CODER_FILTER_PATH=MAGICK_HOME+'/modules-Q16/filter',
|
||||
@ -178,7 +180,7 @@ class Py2App(object):
|
||||
self.add_poppler()
|
||||
self.add_libjpeg()
|
||||
self.add_libpng()
|
||||
self.add_freetype()
|
||||
self.add_fontconfig()
|
||||
self.add_imagemagick()
|
||||
self.add_misc_libraries()
|
||||
|
||||
@ -377,7 +379,7 @@ class Py2App(object):
|
||||
@flush
|
||||
def add_poppler(self):
|
||||
info('\nAdding poppler')
|
||||
for x in ('libpoppler.27.dylib',):
|
||||
for x in ('libpoppler.28.dylib',):
|
||||
self.install_dylib(os.path.join(SW, 'lib', x))
|
||||
for x in ('pdftohtml', 'pdftoppm', 'pdfinfo'):
|
||||
self.install_dylib(os.path.join(SW, 'bin', x), False)
|
||||
@ -395,11 +397,27 @@ class Py2App(object):
|
||||
|
||||
|
||||
@flush
|
||||
def add_freetype(self):
|
||||
info('\nAdding freetype')
|
||||
for x in ('freetype.6', 'expat.1'):
|
||||
def add_fontconfig(self):
|
||||
info('\nAdding fontconfig')
|
||||
for x in ('fontconfig.1', 'freetype.6', 'expat.1'):
|
||||
src = os.path.join(SW, 'lib', 'lib'+x+'.dylib')
|
||||
self.install_dylib(src)
|
||||
dst = os.path.join(self.resources_dir, 'fonts')
|
||||
if os.path.exists(dst):
|
||||
shutil.rmtree(dst)
|
||||
src = os.path.join(SW, 'etc', 'fonts')
|
||||
shutil.copytree(src, dst, symlinks=False)
|
||||
fc = os.path.join(dst, 'fonts.conf')
|
||||
raw = open(fc, 'rb').read()
|
||||
raw = raw.replace('<dir>/usr/share/fonts</dir>', '''\
|
||||
<dir>/Library/Fonts</dir>
|
||||
<dir>/System/Library/Fonts</dir>
|
||||
<dir>/usr/X11R6/lib/X11/fonts</dir>
|
||||
<dir>/usr/share/fonts</dir>
|
||||
<dir>/var/root/Library/Fonts</dir>
|
||||
<dir>/usr/share/fonts</dir>
|
||||
''')
|
||||
open(fc, 'wb').write(raw)
|
||||
|
||||
@flush
|
||||
def add_imagemagick(self):
|
||||
|
@ -122,11 +122,11 @@ def test():
|
||||
test_freetype()
|
||||
test_sfntly()
|
||||
test_sqlite()
|
||||
test_qt()
|
||||
test_imaging()
|
||||
test_unrar()
|
||||
test_icu()
|
||||
test_woff()
|
||||
test_qt()
|
||||
if iswindows:
|
||||
test_win32()
|
||||
test_winutil()
|
||||
|
Loading…
x
Reference in New Issue
Block a user