[Xfce4-commits] <midori:master> Require Vala 0.14 unconditionally

Christian Dywan noreply at xfce.org
Thu Apr 12 00:34:01 CEST 2012


Updating branch refs/heads/master
         to 13b7e0114f5782ded4b6f0e724934025db2a0eb8 (commit)
       from e6240e0ee431420ba5edcbe1726b5fe5bea93e73 (commit)

commit 13b7e0114f5782ded4b6f0e724934025db2a0eb8
Author: Christian Dywan <christian at twotoasts.de>
Date:   Thu Apr 12 00:30:43 2012 +0200

    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 805d5db..2315bc9 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 246aa58..b1d8107 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']:


More information about the Xfce4-commits mailing list