SF.net SVN: geany-plugins:[2185] trunk/geany-plugins/devhelp/ wscript_configure

eht16 at users.sourceforge.net eht16 at xxxxx
Tue Aug 30 20:24:21 UTC 2011


Revision: 2185
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=2185&view=rev
Author:   eht16
Date:     2011-08-30 20:24:21 +0000 (Tue, 30 Aug 2011)
Log Message:
-----------
Fix Waf build if no suitable libdevhelp library is found

Modified Paths:
--------------
    trunk/geany-plugins/devhelp/wscript_configure

Modified: trunk/geany-plugins/devhelp/wscript_configure
===================================================================
--- trunk/geany-plugins/devhelp/wscript_configure	2011-08-30 01:11:28 UTC (rev 2184)
+++ trunk/geany-plugins/devhelp/wscript_configure	2011-08-30 20:24:21 UTC (rev 2185)
@@ -21,6 +21,7 @@
 #
 # $Id: wscript_configure 1735 2010-11-09 17:03:40Z eht16 $
 
+from waflib.Errors import ConfigurationError
 from build.wafutils import add_to_env_and_define, check_cfg_cached
 
 packages = [
@@ -47,7 +48,10 @@
                  mandatory=False,
                  args='--cflags --libs')
 
-if not conf.env['HAVE_LIBDEVHELP'] == 1:
+
+if conf.env['HAVE_LIBDEVHELP'] == 1:
+    add_to_env_and_define(conf, 'HAVE_BOOK_MANAGER', 1)
+else:
     # fallback
     check_cfg_cached(conf,
                      package='libdevhelp-1.0',
@@ -55,7 +59,6 @@
                      uselib_store='LIBDEVHELP',
                      mandatory=False,
                      args='--cflags --libs')
-else:
-    add_to_env_and_define(conf, 'HAVE_BOOK_MANAGER', 1)
-
-
+    # finally raise an error if we didn't find any suitable devhelp library to disable this plugin
+    if not conf.env['HAVE_LIBDEVHELP'] == 1:
+        raise ConfigurationError(u'libdevhelp is necessary for the devhelp plugin')

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Plugins-Commits mailing list