diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-11-13 19:31:41 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-11-14 11:43:24 -0500 |
commit | 8b05990c13811df2056288aacc9154bf1d2e4d84 (patch) | |
tree | a52961d9f95caa1545696512ad89e90d0b976903 | |
parent | 382917ee8f1a47902a1d99ff7b610dc510be898a (diff) | |
download | meson-8b05990c13811df2056288aacc9154bf1d2e4d84.zip meson-8b05990c13811df2056288aacc9154bf1d2e4d84.tar.gz meson-8b05990c13811df2056288aacc9154bf1d2e4d84.tar.bz2 |
Disable gresource dependency generation as it breaks Ninja.
-rw-r--r-- | mesonbuild/modules/gnome.py | 28 | ||||
-rw-r--r-- | test cases/frameworks/7 gnome/resources/meson.build | 4 |
2 files changed, 18 insertions, 14 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 2806014..777fda8 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -26,6 +26,13 @@ from .. import mlog from .. import mesonlib from .. import interpreter +# gresource compilation is broken due to the way +# the resource compiler and Ninja clash about it +# +# https://github.com/ninja-build/ninja/issues/1184 +# https://bugzilla.gnome.org/show_bug.cgi?id=774368 +gresource_dep_needed_version = '>9.99.99' + native_glib_version = None girwarning_printed = False gresource_warning_printed = False @@ -44,11 +51,10 @@ class GnomeModule: def __print_gresources_warning(self, state): global gresource_warning_printed if not gresource_warning_printed: - if mesonlib.version_compare(self._get_native_glib_version(state), '< 2.50.2'): - mlog.warning('GLib compiled dependencies do not work fully ' - 'with versions of GLib older than 2.50.2.\n' - 'See the following upstream issue:', - mlog.bold('https://bugzilla.gnome.org/show_bug.cgi?id=745754')) + if not mesonlib.version_compare(self._get_native_glib_version(state), gresource_dep_needed_version): + mlog.warning('''GLib compiled dependencies do not work reliably with +the current version of GLib. See the following upstream issue:''', + mlog.bold('https://bugzilla.gnome.org/show_bug.cgi?id=774368')) gresource_warning_printed = True return [] @@ -69,13 +75,11 @@ class GnomeModule: dependencies = [dependencies] glib_version = self._get_native_glib_version(state) - if mesonlib.version_compare(glib_version, '< 2.48.2'): + if not mesonlib.version_compare(glib_version, gresource_dep_needed_version): if len(dependencies) > 0: - raise MesonException( - 'The "dependencies" argument of gnome.compile_resources() ' - 'can only be used with glib-compile-resources version ' - '2.48.2 or newer, due to ' - '<https://bugzilla.gnome.org/show_bug.cgi?id=673101>') + raise MesonException('''The "dependencies" argument of gnome.compile_resources() +can not be used with the current version of glib-compiled-resources, due to +<https://bugzilla.gnome.org/show_bug.cgi?id=774368>''') ifile = args[1] if isinstance(ifile, mesonlib.File): @@ -107,7 +111,7 @@ class GnomeModule: kwargs['input'] = args[1] kwargs['output'] = args[0] + '.c' kwargs['depends'] = depends - if mesonlib.version_compare(glib_version, '< 2.50.2'): + if not mesonlib.version_compare(glib_version, gresource_dep_needed_version): # This will eventually go out of sync if dependencies are added kwargs['depend_files'] = depend_files kwargs['command'] = cmd diff --git a/test cases/frameworks/7 gnome/resources/meson.build b/test cases/frameworks/7 gnome/resources/meson.build index 5762a8c..f8c3d58 100644 --- a/test cases/frameworks/7 gnome/resources/meson.build +++ b/test cases/frameworks/7 gnome/resources/meson.build @@ -11,8 +11,8 @@ simple_res_exe = executable('simple-resources-test', dependencies: gio) test('simple resource test', simple_res_exe) -if glib.version() >= '2.48.2' - # This test cannot pass if GLib version is older than 2.48.2. +if glib.version() >= '9.99.9' + # This test cannot pass if GLib version is older than 9.99.9. # Meson will raise an error if the user tries to use the 'dependencies' # argument and the version of GLib is too old for generated resource # dependencies to work correctly. |