[Xfce4-commits] <midori:master> Show found package versions in build configuration

Christian Dywan noreply at xfce.org
Sat Dec 8 03:32:03 CET 2012


Updating branch refs/heads/master
         to 522dbd2ad327b54f1008f26f0d1b3afad71a2207 (commit)
       from be110e367809ba546d633b468933d105fb693a66 (commit)

commit 522dbd2ad327b54f1008f26f0d1b3afad71a2207
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sat Dec 8 02:13:17 2012 +0100

    Show found package versions in build configuration

 wscript |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/wscript b/wscript
index 15d60df..1fd254b 100644
--- a/wscript
+++ b/wscript
@@ -186,10 +186,15 @@ def configure (conf):
     def check_pkg (name, version='', mandatory=True, var=None, args=''):
         if not var:
             var = name.split ('-')[0].upper ()
-        conf.check_cfg (package=name, uselib_store=var, args='--cflags --libs ' + args,
+        ver_str = ['',' >= ' + version][version != '']
+        def okmsg_ver (kw):
+            return conf.check_cfg (modversion=name, uselibstore=var)
+        conf.check_cfg (msg='Checking for ' + name + ver_str, okmsg=okmsg_ver,
+            package=name, uselib_store=var, args='--cflags --libs ' + args,
             atleast_version=version, mandatory=mandatory)
         have = conf.env['HAVE_' + var] == 1
-        conf.define (var + '_VERSION', ['No', conf.check_cfg (modversion=name, uselib_store=var)][have])
+        conf.define (var + '_VERSION', ['No', conf.check_cfg (modversion=name,
+            uselib_store=var, errmsg=name + ver_str + ' not found')][have])
         return have
 
     if option_enabled ('gtk3'):


More information about the Xfce4-commits mailing list