From 13b7e0114f5782ded4b6f0e724934025db2a0eb8 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Thu, 12 Apr 2012 00:30:43 +0200 Subject: [PATCH] Require Vala 0.14 unconditionally It's more predictable and by now fairly well available. --- README | 2 +- wscript | 27 ++++++++++++--------------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/README b/README index 805d5db6..2315bc9e 100644 --- a/README +++ b/README @@ -12,7 +12,7 @@ Midori is a lightweight web browser. * Extensions written in C. Requirements: GLib 2.22, GTK+ 2.10, WebkitGTK+ 1.1.17, libXML2, - libsoup 2.27.90, sqlite 3.0, Vala 0.10 + libsoup 2.27.90, sqlite 3.0, Vala 0.14 Optional: GTK+ 3.0, Unique 0.9, libnotify diff --git a/wscript b/wscript index 246aa583..b1d8107b 100644 --- a/wscript +++ b/wscript @@ -92,9 +92,21 @@ def configure (conf): conf.define (defname, dirvalue) return dirvalue + def check_version (given_version, major, minor, micro): + if '.' in given_version: + given_major, given_minor, given_micro = given_version.split ('.') + else: + given_major, given_minor, given_micro = given_version + return int(given_major) > major or \ + int(given_major) == major and int(given_minor) > minor or \ + int(given_major) == major and int(given_minor) == minor and int(given_micro) >= micro + conf.check_tool ('compiler_cc') conf.check_tool ('vala') conf.check_tool ('glib2') + if not check_version (conf.env['VALAC_VERSION'], 0, 14, 0): + Utils.pprint ('RED', 'Vala 0.14.0 or later is required.') + sys.exit (1) if option_enabled ('nls'): conf.check_tool ('intltool') @@ -169,15 +181,6 @@ def configure (conf): atleast_version=version, mandatory=mandatory) return conf.env['HAVE_' + var] - def check_version (given_version, major, minor, micro): - if '.' in given_version: - given_major, given_minor, given_micro = given_version.split ('.') - else: - given_major, given_minor, given_micro = given_version - return int(given_major) > major or \ - int(given_major) == major and int(given_minor) > minor or \ - int(given_major) == major and int(given_minor) == minor and int(given_micro) >= micro - if option_enabled ('unique'): if option_enabled('gtk3'): unique_pkg = 'unique-3.0' else: unique_pkg = 'unique-1.0' @@ -234,12 +237,6 @@ def configure (conf): includes='/usr/X11R6/include', mandatory=False) conf.check (lib='Xss', libpath='/usr/X11R6/lib', mandatory=False) if option_enabled ('gtk3'): - if option_enabled ('addons') and not check_version (conf.env['VALAC_VERSION'], 0, 14, 0): - Utils.pprint ('RED', 'Vala 0.14.0 or later is required ' \ - 'to build with GTK+ 3 and extensions.\n' \ - 'Pass --disable-addons to build without extensions.\n' \ - 'Pass --disable-gtk3 to build with extensions and GTK+ 2.') - sys.exit (1) check_pkg ('gtk+-3.0', '3.0.0', var='GTK', mandatory=False) check_pkg ('webkitgtk-3.0', '1.1.17', var='WEBKIT', mandatory=False) if not conf.env['HAVE_GTK'] or not conf.env['HAVE_WEBKIT']: