diff --git a/setup/extensions.py b/setup/extensions.py index c2b8467300..e3283b0ea3 100644 --- a/setup/extensions.py +++ b/setup/extensions.py @@ -134,8 +134,11 @@ if isosx: if isunix: cc = os.environ.get('CC', 'gcc') cxx = os.environ.get('CXX', 'g++') - cflags = '-O3 -Wall -DNDEBUG -fPIC -fno-strict-aliasing -pipe'.split() - ldflags = ['-Wall'] + cflags = os.environ.get('OVERRIDE_CFLAGS', + '-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', '')) ldflags += shlex.split(os.environ.get('LDFLAGS', '')) diff --git a/setup/install.py b/setup/install.py index fb17049e4c..1dbbb3f8a5 100644 --- a/setup/install.py +++ b/setup/install.py @@ -200,6 +200,12 @@ class Install(Develop): /share/calibre. These can all be controlled via options. The default 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'