mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Linux build system: Use the environment variables OVERRIDE_CFLAGS and OVERRIDE_LDFLAGS to allow cflags and ldflags to be user specified. Fixes #3770 (calibre build problems)
This commit is contained in:
parent
942b0e74c1
commit
23ba4047ad
@ -134,8 +134,11 @@ if isosx:
|
|||||||
if isunix:
|
if isunix:
|
||||||
cc = os.environ.get('CC', 'gcc')
|
cc = os.environ.get('CC', 'gcc')
|
||||||
cxx = os.environ.get('CXX', 'g++')
|
cxx = os.environ.get('CXX', 'g++')
|
||||||
cflags = '-O3 -Wall -DNDEBUG -fPIC -fno-strict-aliasing -pipe'.split()
|
cflags = os.environ.get('OVERRIDE_CFLAGS',
|
||||||
ldflags = ['-Wall']
|
'-O3 -Wall -DNDEBUG -fno-strict-aliasing -pipe')
|
||||||
|
cflags = shlex.split(cflags) + '-fPIC'
|
||||||
|
ldflags = os.environ.get('OVERRIDE_LDFLAGS', '-Wall')
|
||||||
|
ldflags = shlex.split(ldflags)
|
||||||
cflags += shlex.split(os.environ.get('CFLAGS', ''))
|
cflags += shlex.split(os.environ.get('CFLAGS', ''))
|
||||||
ldflags += shlex.split(os.environ.get('LDFLAGS', ''))
|
ldflags += shlex.split(os.environ.get('LDFLAGS', ''))
|
||||||
|
|
||||||
|
@ -200,6 +200,12 @@ class Install(Develop):
|
|||||||
<prefix>/share/calibre. These can all be controlled via options.
|
<prefix>/share/calibre. These can all be controlled via options.
|
||||||
|
|
||||||
The default <prefix> is the prefix of your python installation.
|
The default <prefix> is the prefix of your python installation.
|
||||||
|
|
||||||
|
The .desktop, .mime and icon files are installed using XDG. The
|
||||||
|
location they are installed to can be controlled by setting
|
||||||
|
the environment variables:
|
||||||
|
XDG_DATA_DIRS=/usr/share equivalent
|
||||||
|
XDG_UTILS_INSTALL_MODE=system
|
||||||
''')
|
''')
|
||||||
short_description = 'Install calibre from source'
|
short_description = 'Install calibre from source'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user