mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Setup build env
This commit is contained in:
parent
2e5cb8f727
commit
2e2236684d
@ -9,7 +9,7 @@ __docformat__ = 'restructuredtext en'
|
|||||||
import os, subprocess, re, sys, sysconfig
|
import os, subprocess, re, sys, sysconfig
|
||||||
from distutils.spawn import find_executable
|
from distutils.spawn import find_executable
|
||||||
|
|
||||||
from setup import isosx, iswindows, is64bit, islinux
|
from setup import isosx, iswindows, is64bit, islinux, ishaiku
|
||||||
is64bit
|
is64bit
|
||||||
|
|
||||||
NMAKE = RC = msvc = MT = win_inc = win_lib = None
|
NMAKE = RC = msvc = MT = win_inc = win_lib = None
|
||||||
@ -37,7 +37,7 @@ QMAKE = os.environ.get('QMAKE', QMAKE)
|
|||||||
|
|
||||||
PKGCONFIG = find_executable('pkg-config')
|
PKGCONFIG = find_executable('pkg-config')
|
||||||
PKGCONFIG = os.environ.get('PKG_CONFIG', PKGCONFIG)
|
PKGCONFIG = os.environ.get('PKG_CONFIG', PKGCONFIG)
|
||||||
if islinux and not PKGCONFIG:
|
if islinux or ishaiku and not PKGCONFIG:
|
||||||
raise SystemExit('Failed to find pkg-config on your system. You can use the environment variable PKG_CONFIG to point to the pkg-config executable')
|
raise SystemExit('Failed to find pkg-config on your system. You can use the environment variable PKG_CONFIG to point to the pkg-config executable')
|
||||||
|
|
||||||
def run_pkgconfig(name, envvar, default, flag, prefix):
|
def run_pkgconfig(name, envvar, default, flag, prefix):
|
||||||
@ -97,8 +97,8 @@ def get_sip_dir():
|
|||||||
pyqt['pyqt_sip_dir'] = get_sip_dir()
|
pyqt['pyqt_sip_dir'] = get_sip_dir()
|
||||||
pyqt['sip_inc_dir'] = os.environ.get('SIP_INC_DIR', sysconfig.get_path('include'))
|
pyqt['sip_inc_dir'] = os.environ.get('SIP_INC_DIR', sysconfig.get_path('include'))
|
||||||
|
|
||||||
glib_flags = subprocess.check_output([PKGCONFIG, '--libs', 'glib-2.0']).strip() if islinux else ''
|
glib_flags = subprocess.check_output([PKGCONFIG, '--libs', 'glib-2.0']).strip() if islinux or ishaiku else ''
|
||||||
fontconfig_flags = subprocess.check_output([PKGCONFIG, '--libs', 'fontconfig']).strip() if islinux else ''
|
fontconfig_flags = subprocess.check_output([PKGCONFIG, '--libs', 'fontconfig']).strip() if islinux or ishaiku else ''
|
||||||
qt_inc = pyqt['inc']
|
qt_inc = pyqt['inc']
|
||||||
qt_lib = pyqt['lib']
|
qt_lib = pyqt['lib']
|
||||||
ft_lib_dirs = []
|
ft_lib_dirs = []
|
||||||
@ -121,7 +121,7 @@ QT_DLLS = ['Qt5' + x for x in (
|
|||||||
'WebKit', 'WebKitWidgets', 'Widgets', 'Multimedia', 'MultimediaWidgets', 'Xml', # 'XmlPatterns',
|
'WebKit', 'WebKitWidgets', 'Widgets', 'Multimedia', 'MultimediaWidgets', 'Xml', # 'XmlPatterns',
|
||||||
)]
|
)]
|
||||||
QT_PLUGINS = ('imageformats', 'audio', 'iconengines', 'mediaservice', 'platforms', 'playlistformats', 'printsupport', 'sqldrivers')
|
QT_PLUGINS = ('imageformats', 'audio', 'iconengines', 'mediaservice', 'platforms', 'playlistformats', 'printsupport', 'sqldrivers')
|
||||||
if islinux:
|
if islinux or ishaiku:
|
||||||
# platformthemes cause crashes in Ubuntu
|
# platformthemes cause crashes in Ubuntu
|
||||||
QT_PLUGINS += ('platforminputcontexts', 'generic',)
|
QT_PLUGINS += ('platforminputcontexts', 'generic',)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user