From: Christian Dywan Date: Wed, 14 Mar 2012 19:55:34 +0000 (+0100) Subject: Optionally use Granite and show in about:version X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09c041f740c842c2a8ed5eba8d0ad554084c315e;p=midori Optionally use Granite and show in about:version See bzr branch lp:granite See: https://bugs.launchpad.net/midori/+bug/898497 --- diff --git a/midori/midori-view.c b/midori/midori-view.c index 7b0efd33..a16deca3 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -4078,6 +4078,7 @@ midori_view_set_uri (MidoriView* view, "Glib%d.%d.%d (%d.%d.%d)" "libsoup%s" "cairo%s (%s)" + "granite%s" "libnotify%s" "single instance%s" "Platform%s %s %s" @@ -4099,6 +4100,7 @@ midori_view_set_uri (MidoriView* view, glib_major_version, glib_minor_version, glib_micro_version, LIBSOUP_VERSION, CAIRO_VERSION_STRING, cairo_version_string (), + GRANITE_VERSION, LIBNOTIFY_VERSION, #ifdef HAVE_HILDON_2_2 "Hildon 2.2", diff --git a/midori/wscript_build b/midori/wscript_build index 51527bbc..e0ee7e69 100644 --- a/midori/wscript_build +++ b/midori/wscript_build @@ -8,7 +8,7 @@ import platform progressive = True libs = 'M UNIQUE LIBSOUP GMODULE GTHREAD LIBIDN GIO GTK SQLITE ' \ 'LIBNOTIFY WEBKIT JAVASCRIPTCOREGTK LIBXML X11 XSS WS2_32 HILDON' \ - 'HILDON_FM' + 'HILDON_FM GRANITE' if progressive or Options.commands['check']: obj = bld.new_task_gen ('cc', 'staticlib') diff --git a/tests/wscript_build b/tests/wscript_build index 58b2d8ef..11f14b8d 100644 --- a/tests/wscript_build +++ b/tests/wscript_build @@ -35,6 +35,6 @@ for test in tests: obj.source = source obj.vapi_dirs = '../midori' obj.packages = 'glib-2.0 gio-2.0 gtk+-2.0 libsoup-2.4 webkit-1.0 midori' - obj.uselib = 'UNIQUE LIBSOUP GIO GTK SQLITE WEBKIT LIBXML' + obj.uselib = 'UNIQUE LIBSOUP GIO GTK SQLITE WEBKIT LIBXML GRANITE' obj.uselib_local = 'midori-core' obj.unit_test = 1 diff --git a/wscript b/wscript index 542a5d65..03ffe353 100644 --- a/wscript +++ b/wscript @@ -206,6 +206,20 @@ def configure (conf): conf.define ('LIBNOTIFY_VERSION', 'No') conf.define ('HAVE_LIBNOTIFY', [0,1][libnotify == 'yes']) + if option_enabled ('granite'): + if option_enabled('gtk3'): + option_checkfatal ('granite', 'granite requires --enable-gtk3') + check_pkg ('granite', '0.1', False) + granite = ['N/A', 'yes'][conf.env['HAVE_GRANITE'] == 1] + if granite != 'yes': + option_checkfatal ('granite', 'new notebook, pop-overs') + conf.define ('GRANITE_VERSION', 'No') + else: + conf.define ('GRANITE_VERSION', conf.check_cfg (modversion='granite')) + else: + granite = 'no ' + conf.define ('GRANITE_VERSION', 'No') + conf.check (lib='m', mandatory=True) check_pkg ('gmodule-2.0', '2.8.0', False) check_pkg ('gthread-2.0', '2.8.0', False) @@ -394,6 +408,7 @@ def set_options (opt): group = opt.add_option_group ('Optional features', '') add_enable_option ('unique', 'single instance support', group, disable=is_win32 (os.environ)) add_enable_option ('libnotify', 'notification support', group) + add_enable_option ('granite', 'new notebook, pop-overs', group) add_enable_option ('addons', 'building of extensions', group) add_enable_option ('tests', 'building of tests', group, disable=True) add_enable_option ('hildon', 'Maemo integration', group, disable=not is_maemo ())