mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix calibre build process to work with poppler 0.16.x and poppler 0.18.x
This commit is contained in:
parent
53792745b2
commit
991901e8e1
@ -177,6 +177,7 @@ fc_error = None if os.path.exists(os.path.join(fc_inc, 'fontconfig.h')) else \
|
|||||||
|
|
||||||
|
|
||||||
poppler_error = None
|
poppler_error = None
|
||||||
|
poppler_cflags = ['-DPNG_SKIP_SETJMP_CHECK'] if islinux else []
|
||||||
if not poppler_inc_dirs or not os.path.exists(
|
if not poppler_inc_dirs or not os.path.exists(
|
||||||
os.path.join(poppler_inc_dirs[0], 'OutputDev.h')):
|
os.path.join(poppler_inc_dirs[0], 'OutputDev.h')):
|
||||||
poppler_error = \
|
poppler_error = \
|
||||||
@ -186,6 +187,10 @@ if not poppler_inc_dirs or not os.path.exists(
|
|||||||
' the poppler XPDF headers. If your distro does not '
|
' the poppler XPDF headers. If your distro does not '
|
||||||
' include them you will have to re-compile poppler '
|
' include them you will have to re-compile poppler '
|
||||||
' by hand with --enable-xpdf-headers')
|
' by hand with --enable-xpdf-headers')
|
||||||
|
else:
|
||||||
|
lh = os.path.join(poppler_inc_dirs[0], 'Link.h')
|
||||||
|
if 'class AnnotLink' not in open(lh, 'rb').read():
|
||||||
|
poppler_cflags.append('-DPOPPLER_OLD_LINK_TYPE')
|
||||||
|
|
||||||
magick_error = None
|
magick_error = None
|
||||||
if not magick_inc_dirs or not os.path.exists(os.path.join(magick_inc_dirs[0],
|
if not magick_inc_dirs or not os.path.exists(os.path.join(magick_inc_dirs[0],
|
||||||
|
@ -11,15 +11,15 @@ from distutils import sysconfig
|
|||||||
|
|
||||||
from PyQt4.pyqtconfig import QtGuiModuleMakefile
|
from PyQt4.pyqtconfig import QtGuiModuleMakefile
|
||||||
|
|
||||||
from setup import Command, islinux, isfreebsd, isbsd, isosx, SRC, iswindows
|
from setup import Command, islinux, isbsd, isosx, SRC, iswindows
|
||||||
from setup.build_environment import fc_inc, fc_lib, chmlib_inc_dirs, \
|
from setup.build_environment import (fc_inc, fc_lib, chmlib_inc_dirs,
|
||||||
fc_error, poppler_libs, poppler_lib_dirs, poppler_inc_dirs, podofo_inc, \
|
fc_error, poppler_libs, poppler_lib_dirs, poppler_inc_dirs, podofo_inc,
|
||||||
podofo_lib, podofo_error, poppler_error, pyqt, OSX_SDK, NMAKE, \
|
podofo_lib, podofo_error, poppler_error, pyqt, OSX_SDK, NMAKE,
|
||||||
QMAKE, msvc, MT, win_inc, win_lib, png_inc_dirs, win_ddk, \
|
QMAKE, msvc, MT, win_inc, win_lib, png_inc_dirs, win_ddk,
|
||||||
magick_inc_dirs, magick_lib_dirs, png_lib_dirs, png_libs, \
|
magick_inc_dirs, magick_lib_dirs, png_lib_dirs, png_libs,
|
||||||
magick_error, magick_libs, ft_lib_dirs, ft_libs, jpg_libs, \
|
magick_error, magick_libs, ft_lib_dirs, ft_libs, jpg_libs,
|
||||||
jpg_lib_dirs, chmlib_lib_dirs, sqlite_inc_dirs, icu_inc_dirs, \
|
jpg_lib_dirs, chmlib_lib_dirs, sqlite_inc_dirs, icu_inc_dirs,
|
||||||
icu_lib_dirs
|
icu_lib_dirs, poppler_cflags)
|
||||||
MT
|
MT
|
||||||
isunix = islinux or isosx or isbsd
|
isunix = islinux or isosx or isbsd
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ extensions = [
|
|||||||
lib_dirs=poppler_lib_dirs+magick_lib_dirs+png_lib_dirs+ft_lib_dirs+jpg_lib_dirs,
|
lib_dirs=poppler_lib_dirs+magick_lib_dirs+png_lib_dirs+ft_lib_dirs+jpg_lib_dirs,
|
||||||
inc_dirs=poppler_inc_dirs+magick_inc_dirs+png_inc_dirs,
|
inc_dirs=poppler_inc_dirs+magick_inc_dirs+png_inc_dirs,
|
||||||
error=reflow_error,
|
error=reflow_error,
|
||||||
cflags=['-DPNG_SKIP_SETJMP_CHECK'] if islinux else []
|
cflags=poppler_cflags
|
||||||
),
|
),
|
||||||
|
|
||||||
Extension('lzx',
|
Extension('lzx',
|
||||||
|
@ -41,7 +41,7 @@ using namespace std;
|
|||||||
|
|
||||||
namespace calibre_reflow {
|
namespace calibre_reflow {
|
||||||
|
|
||||||
#ifndef AnnotLink
|
#ifdef POPPLER_OLD_LINK_TYPE
|
||||||
#define AnnotLink Link
|
#define AnnotLink Link
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user