Print warnings at the end of configuration
This commit is contained in:
parent
65eff6f150
commit
184abdfc94
1 changed files with 55 additions and 26 deletions
81
meson.build
81
meson.build
|
|
@ -12,6 +12,8 @@ project_url_issues = project_url + '/issues/new'
|
|||
|
||||
conf = configuration_data()
|
||||
|
||||
warnings = []
|
||||
|
||||
################################################################################
|
||||
# Project info
|
||||
|
||||
|
|
@ -142,12 +144,14 @@ endif
|
|||
|
||||
|
||||
if cc.get_id() == 'gcc' and cc.version() == '7.2.0'
|
||||
warning('''
|
||||
gcc_warning = '''
|
||||
GCC 7.2.0 has a serious bug affecting GEGL/GIMP. We advise
|
||||
against using this version of the compiler (previous and
|
||||
further versions are fine).
|
||||
See https://bugzilla.gnome.org/show_bug.cgi?id=787222
|
||||
''')
|
||||
'''
|
||||
warning(gcc_warning)
|
||||
warnings += gcc_warning
|
||||
endif
|
||||
|
||||
|
||||
|
|
@ -363,14 +367,16 @@ glib_networking_works =(glib_networking_works_run.compiled()
|
|||
|
||||
if not glib_networking_works
|
||||
if meson.is_cross_build()
|
||||
warning('''
|
||||
glib_warning = '''
|
||||
Test for glib-networking cannot be performed while cross-compiling.
|
||||
Make sure glib-networking is installed, otherwise GIMP will not be able
|
||||
to display the remote help pages through the help browser, nor will it
|
||||
be able to open remote HTTPS (or other protocol using SSL/TLS) files.
|
||||
HTTPS is becoming the expected standard and should not be considered
|
||||
optional anymore.
|
||||
''')
|
||||
'''
|
||||
warning(glib_warning)
|
||||
warnings += glib_warning
|
||||
else
|
||||
error('Test for glib-networking failed. This is required.')
|
||||
endif
|
||||
|
|
@ -390,7 +396,7 @@ pango_check =(pango_check_run.compiled()
|
|||
and pango_check_run.returncode() == 0)
|
||||
|
||||
if not pango_check
|
||||
warning('\n *** '.join([
|
||||
pango_warning = '\n *** '.join([
|
||||
'You have a fontconfig >= fontconfig_required_version installed on your',
|
||||
'system, but your Pango library is using an older version. This old version',
|
||||
'is probably in /usr/X11R6. Look at the above output, and note that the',
|
||||
|
|
@ -401,7 +407,9 @@ if not pango_check
|
|||
'The easiest way be sure of this is to simply get rid of the old',
|
||||
'fontconfig. When you rebuild pango, make sure the result for',
|
||||
'FONTCONFIG_CFLAGS is the same as the result here.',
|
||||
]))
|
||||
])
|
||||
warning(pango_warning)
|
||||
warnings += pango_warning
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
|
@ -711,9 +719,9 @@ if not [ '', 'false', 'no', ].contains(sendmail_choice)
|
|||
if sendmail.found()
|
||||
sendmail_path = sendmail.path()
|
||||
else
|
||||
warning(
|
||||
'Sendmail specified but not found. It should be installed at runtime!'
|
||||
)
|
||||
mail_warning = 'Sendmail specified but not found. It should be installed at runtime!'
|
||||
warning(mail_warning)
|
||||
warnings += mail_warning
|
||||
endif
|
||||
|
||||
email_message = '@0@ (@1@)'.format(true, sendmail_path)
|
||||
|
|
@ -724,9 +732,9 @@ else
|
|||
if xdg_email.found()
|
||||
xdg_email_path = xdg_email.path()
|
||||
else
|
||||
warning(
|
||||
'Xdg-email not found, but required at runtime for email sending.'
|
||||
)
|
||||
mail_warning = 'Xdg-email not found, but required at runtime for email sending.'
|
||||
warning(mail_warning)
|
||||
warnings += mail_warning
|
||||
endif
|
||||
|
||||
email_message = '@0@ (@1@)'.format(true, xdg_email_path)
|
||||
|
|
@ -760,13 +768,15 @@ perl = find_program('perl5', 'perl', 'perl5.005', 'perl5.004', 'perl')
|
|||
python3_required_version = '>=3.6.0'
|
||||
|
||||
if get_option('python') == 'never'
|
||||
warning('''
|
||||
python_warning = '''
|
||||
You disabled the installation of core Python plug-ins. This is discouraged
|
||||
as it won't provide the full GIMP experience.
|
||||
Note that you may install the Python plug-ins even if you have no Python
|
||||
interpreter at build-time by passing the configure option -Dpython=always.
|
||||
Just make sure that a Python @0@ interpreter is available at run-time.
|
||||
'''.format(python3_required_version))
|
||||
'''.format(python3_required_version)
|
||||
warning(python_warning)
|
||||
warnings += python_warning
|
||||
|
||||
have_python = false
|
||||
|
||||
|
|
@ -801,12 +811,14 @@ else
|
|||
endif
|
||||
|
||||
if (not python_found) and (always_install)
|
||||
warning('''
|
||||
python_warning = '''
|
||||
Python @0@ or PyGObject was not found.
|
||||
Python plug-ins will be installed anyway but you should make sure that
|
||||
a compatible Python interpreter is available at installation, otherwise
|
||||
installed plug-ins won't be usable.
|
||||
'''.format(python3_required_version))
|
||||
'''.format(python3_required_version)
|
||||
warning(python_warning)
|
||||
warnings += python_warning
|
||||
endif
|
||||
|
||||
have_python = python_found or always_install
|
||||
|
|
@ -815,13 +827,15 @@ endif
|
|||
## Javascript
|
||||
|
||||
if get_option('javascript') == 'never'
|
||||
warning('''
|
||||
js_warning = '''
|
||||
You disabled the installation of core Javascript plug-ins. This is
|
||||
discouraged as it won't provide the full GIMP experience.
|
||||
Note that you may install the Javascript plug-ins even if you have no GJS
|
||||
interpreter at build-time by passing the configure option -Djavascript=always.
|
||||
Just make sure that the GJS interpreter is available at run-time.
|
||||
''')
|
||||
'''
|
||||
warning(js_warning)
|
||||
warnings += js_warning
|
||||
have_javascript = false
|
||||
|
||||
else
|
||||
|
|
@ -839,12 +853,14 @@ else
|
|||
endif
|
||||
|
||||
if (not gjs.found()) and (always_install)
|
||||
warning('''
|
||||
js_warning = '''
|
||||
GJS was not found.
|
||||
JavaScript plug-ins will be installed anyway but you should make sure that
|
||||
the JavaScript interpreter GJS is available at installation, otherwise
|
||||
installed plug-ins won't be usable.
|
||||
''')
|
||||
'''
|
||||
warning(js_warning)
|
||||
warnings += js_warning
|
||||
endif
|
||||
|
||||
have_javascript = gjs.found() or always_install
|
||||
|
|
@ -853,13 +869,15 @@ endif
|
|||
## Lua
|
||||
|
||||
if get_option('lua') == 'never'
|
||||
warning('''
|
||||
lua_warning = '''
|
||||
You disabled the installation of core Lua plug-ins. This is discouraged
|
||||
as it won't provide the full GIMP experience.
|
||||
Note that you may install the Lua plug-ins even if you have no Lua LGI
|
||||
interpreter at build-time by passing the configure option -Dlua=always.
|
||||
Just make sure that the Lua LGI interpreter is available at run-time.
|
||||
''')
|
||||
'''
|
||||
warning(lua_warning)
|
||||
warnings += lua_warning
|
||||
have_lua = false
|
||||
|
||||
else
|
||||
|
|
@ -877,12 +895,14 @@ else
|
|||
endif
|
||||
|
||||
if (not lua.found()) and always_install
|
||||
warning('''
|
||||
lua_warning = '''
|
||||
Luajit was not found.
|
||||
Lua plug-ins will be installed anyway but you should make sure that
|
||||
luajit and LGI are available at installation, otherwise
|
||||
installed plug-ins won't be usable.
|
||||
''')
|
||||
'''
|
||||
warning(lua_warning)
|
||||
warnings += lua_warning
|
||||
endif
|
||||
|
||||
have_lua = lua.found() or always_install
|
||||
|
|
@ -913,12 +933,14 @@ if have_vector_icons
|
|||
# shared-mime-info is needed to correctly detect SVG files
|
||||
# (except on Windows, apparently).
|
||||
if platform_windows
|
||||
warning('''
|
||||
vec_warning = '''
|
||||
You enabled vector icons on Win32. Make sure to run:
|
||||
$ gdk-pixbuf-query-loaders.exe --update-cache
|
||||
on the target machine (this command generates loaders.cache)
|
||||
so that GdkPixbuf knows where to find the SVG loader.
|
||||
''')
|
||||
'''
|
||||
warning(vec_warning)
|
||||
warnings += vec_warning
|
||||
else
|
||||
shared_mime_info = dependency('shared-mime-info')
|
||||
endif
|
||||
|
|
@ -1576,3 +1598,10 @@ final_message = [
|
|||
]
|
||||
|
||||
message('\n'.join(final_message))
|
||||
|
||||
if warnings.length() > 0
|
||||
warning('Warnings occured during configuration')
|
||||
foreach warning : warnings
|
||||
warning(warning)
|
||||
endforeach
|
||||
endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue